mftsccs-browser 2.1.16-beta → 3.0.0-beta
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/dist/main.bundle.js
CHANGED
|
@@ -134,7 +134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
134
134
|
\*****************************************/
|
|
135
135
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
136
136
|
|
|
137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllConceptsByType: () => (/* binding */ GetAllConceptsByType)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetAllConceptsByType(type, userId) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n var urlencoded = new URLSearchParams();\n urlencoded.append(\"type\", type);\n urlencoded.append(\"user_id\", userId.toString());\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConceptsByTypeUrl(), {\n method: 'POST',\n headers: header,\n body: urlencoded\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result[i]);\n }\n }\n else {\n console.log(\"GetAllConceptsByType error\", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('GetAllConceptsByType error message: ', error.message);\n }\n else {\n console.log('GetAllConceptsByType unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConceptsByTypeUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllConceptsByType.ts?");
|
|
137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllConceptsByType: () => (/* binding */ GetAllConceptsByType)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetAllConceptsByType(type, userId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetAllConceptsByType, arguments_1);\n try {\n var urlencoded = new URLSearchParams();\n urlencoded.append(\"type\", type);\n urlencoded.append(\"user_id\", userId.toString());\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConceptsByTypeUrl(), {\n method: 'POST',\n headers: header,\n body: urlencoded\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result[i]);\n }\n }\n else {\n console.log(\"GetAllConceptsByType error\", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('GetAllConceptsByType error message: ', error.message);\n }\n else {\n console.log('GetAllConceptsByType unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConceptsByTypeUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllConceptsByType.ts?");
|
|
138
138
|
|
|
139
139
|
/***/ }),
|
|
140
140
|
|
|
@@ -154,7 +154,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
154
154
|
\*******************************************************/
|
|
155
155
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
156
156
|
|
|
157
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* binding */ GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllConnectionsOfCompositionOnline: () => (/* binding */ GetAllConnectionsOfCompositionOnline)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/FindConeceptsFromConnection */ \"./src/Services/FindConeceptsFromConnection.ts\");\n/* harmony import */ var _Services_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/FindConnectionsOfCompositionBulkInMemory */ \"./src/Services/FindConnectionsOfCompositionBulkInMemory.ts\");\n/* harmony import */ var _Services_CheckForConnectionDeletion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CheckForConnectionDeletion */ \"./src/Services/CheckForConnectionDeletion.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\nfunction GetAllConnectionsOfCompositionBulk() {\n return __awaiter(this, arguments, void 0, function* (composition_ids = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_7__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_7__.sendMessage)('GetAllConnectionsOfCompositionBulk', { composition_ids });\n return res.data;\n }\n catch (error) {\n console.error('GetAllConnectionsOfCompositionBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_7__.handleServiceWorkerException)(error);\n }\n }\n var connectionList = [];\n var conceptList = [];\n if (composition_ids.length <= 0) {\n return connectionList;\n }\n var oldConnectionList = yield (0,_Services_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(composition_ids);\n var connectionListString = yield GetAllConnectionsOfCompositionOnline(composition_ids);\n connectionList = connectionListString;\n (0,_Services_CheckForConnectionDeletion__WEBPACK_IMPORTED_MODULE_4__.CheckForConnectionDeletion)(connectionList, oldConnectionList);\n yield (0,_Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__.FindConceptsFromConnections)(connectionList);\n return connectionList;\n });\n}\nfunction GetAllConnectionsOfCompositionOnline() {\n return __awaiter(this, arguments, void 0, function* (composition_ids = []) {\n var connectionList = [];\n try {\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_5__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConnectionsOfCompositionBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(composition_ids)\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.AddConnection(result[i]);\n connectionList.push(result[i]);\n }\n }\n else {\n console.log('Get all connections of composition bulk error message: ', \"Cannot get response\");\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__.HandleHttpError)(response);\n }\n return connectionList;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get all connections of composition bulk error message: ', error.message);\n }\n else {\n console.log('Get all connections of composition bulk unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConnectionsOfCompositionBulkUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllConnectionsOfCompositionBulk.ts?");
|
|
157
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* binding */ GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllConnectionsOfCompositionOnline: () => (/* binding */ GetAllConnectionsOfCompositionOnline)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/FindConeceptsFromConnection */ \"./src/Services/FindConeceptsFromConnection.ts\");\n/* harmony import */ var _Services_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/FindConnectionsOfCompositionBulkInMemory */ \"./src/Services/FindConnectionsOfCompositionBulkInMemory.ts\");\n/* harmony import */ var _Services_CheckForConnectionDeletion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CheckForConnectionDeletion */ \"./src/Services/CheckForConnectionDeletion.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\nfunction GetAllConnectionsOfCompositionBulk() {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition_ids = []) {\n _app__WEBPACK_IMPORTED_MODULE_7__.Logger.logfunction(GetAllConnectionsOfCompositionBulk, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_7__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_7__.sendMessage)('GetAllConnectionsOfCompositionBulk', { composition_ids });\n return res.data;\n }\n catch (error) {\n console.error('GetAllConnectionsOfCompositionBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_7__.handleServiceWorkerException)(error);\n }\n }\n var connectionList = [];\n var conceptList = [];\n if (composition_ids.length <= 0) {\n return connectionList;\n }\n var oldConnectionList = yield (0,_Services_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(composition_ids);\n var connectionListString = yield GetAllConnectionsOfCompositionOnline(composition_ids);\n connectionList = connectionListString;\n (0,_Services_CheckForConnectionDeletion__WEBPACK_IMPORTED_MODULE_4__.CheckForConnectionDeletion)(connectionList, oldConnectionList);\n yield (0,_Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__.FindConceptsFromConnections)(connectionList);\n return connectionList;\n });\n}\nfunction GetAllConnectionsOfCompositionOnline() {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition_ids = []) {\n _app__WEBPACK_IMPORTED_MODULE_7__.Logger.logfunction(GetAllConnectionsOfCompositionOnline, arguments_2);\n var connectionList = [];\n try {\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_5__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConnectionsOfCompositionBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(composition_ids)\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.AddConnection(result[i]);\n connectionList.push(result[i]);\n }\n }\n else {\n console.log('Get all connections of composition bulk error message: ', \"Cannot get response\");\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__.HandleHttpError)(response);\n }\n return connectionList;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get all connections of composition bulk error message: ', error.message);\n }\n else {\n console.log('Get all connections of composition bulk unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_6__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetAllConnectionsOfCompositionBulkUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllConnectionsOfCompositionBulk.ts?");
|
|
158
158
|
|
|
159
159
|
/***/ }),
|
|
160
160
|
|
|
@@ -164,7 +164,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
164
164
|
\**********************************************************/
|
|
165
165
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
166
166
|
|
|
167
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllLinkerConnectionsFromTheConcept: () => (/* binding */ GetAllLinkerConnectionsFromTheConcept)\n/* harmony export */ });\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nfunction GetAllLinkerConnectionsFromTheConcept(conceptId) {\n return __awaiter(this, void 0, void 0, function* () {\n var connections = [];\n try {\n const start = new Date().getTime();\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_2__.BaseUrl.GetAllLinkerConnectionOfConceptUrl() + `?conceptId=${conceptId}`, {\n method: 'GET',\n headers: header,\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n var connection = result[i];\n connections.push(connection);\n }\n }\n else {\n console.log(\"Get all linker connection from the concepts error\", \"cannot get respone\");\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get all linker connection from the concepts error: ', error.message);\n }\n else {\n console.log('Get all linker connection from the concepts error(Unexpected): ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__.HandleInternalError)(error, _app__WEBPACK_IMPORTED_MODULE_2__.BaseUrl.GetAllLinkerConnectionOfConceptUrl());\n }\n return connections;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllLinkerConnectionsFromTheConcept.ts?");
|
|
167
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetAllLinkerConnectionsFromTheConcept: () => (/* binding */ GetAllLinkerConnectionsFromTheConcept)\n/* harmony export */ });\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nfunction GetAllLinkerConnectionsFromTheConcept(conceptId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetAllLinkerConnectionsFromTheConcept, arguments_1);\n var connections = [];\n try {\n const start = new Date().getTime();\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_2__.BaseUrl.GetAllLinkerConnectionOfConceptUrl() + `?conceptId=${conceptId}`, {\n method: 'GET',\n headers: header,\n });\n if (response.ok) {\n const result = yield response.json();\n for (var i = 0; i < result.length; i++) {\n var connection = result[i];\n connections.push(connection);\n }\n }\n else {\n console.log(\"Get all linker connection from the concepts error\", \"cannot get respone\");\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get all linker connection from the concepts error: ', error.message);\n }\n else {\n console.log('Get all linker connection from the concepts error(Unexpected): ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_0__.HandleInternalError)(error, _app__WEBPACK_IMPORTED_MODULE_2__.BaseUrl.GetAllLinkerConnectionOfConceptUrl());\n }\n return connections;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetAllLinkerConnectionsFromTheConcept.ts?");
|
|
168
168
|
|
|
169
169
|
/***/ }),
|
|
170
170
|
|
|
@@ -194,7 +194,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
194
194
|
\*******************************/
|
|
195
195
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
196
196
|
|
|
197
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConcept: () => (/* binding */ GetConcept)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * This function helps you get concept from the id. This can only be positive.\n * @param id The id that you want to get the concept of\n * @returns\n */\nfunction GetConcept(id) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConcept', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n let result = (0,_app__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n if (id == 0 || id == undefined || id == null) {\n return result;\n }\n var conceptUse = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConcept(id);\n let isNpc = _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetNpc(id);\n if (conceptUse.id != 0 || isNpc) {\n return conceptUse;\n }\n else {\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n console.log(\"this is the url\", _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl());\n const formdata = new FormData();\n formdata.append(\"id\", id.toString());\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl(), {\n method: 'POST',\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n if (result.id > 0) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result);\n }\n else {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddNpc(id);\n }\n }\n else {\n console.log(\"Get the concept error\", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return result;\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get the concept error message: ', error.message);\n }\n else {\n console.log('Get the concept unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConcept.ts?");
|
|
197
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConcept: () => (/* binding */ GetConcept)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * This function helps you get concept from the id. This can only be positive.\n * @param id The id that you want to get the concept of\n * @returns\n */\nfunction GetConcept(id) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logfunction(GetConcept, arguments_1);\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConcept', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n let result = (0,_app__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n if (id == 0 || id == undefined || id == null) {\n return result;\n }\n var conceptUse = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConcept(id);\n let isNpc = _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetNpc(id);\n if (conceptUse.id != 0 || isNpc) {\n return conceptUse;\n }\n else {\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n console.log(\"this is the url\", _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl());\n const formdata = new FormData();\n formdata.append(\"id\", id.toString());\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl(), {\n method: 'POST',\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n if (result.id > 0) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result);\n }\n else {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddNpc(id);\n }\n }\n else {\n console.log(\"Get the concept error\", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return result;\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get the concept error message: ', error.message);\n }\n else {\n console.log('Get the concept unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConcept.ts?");
|
|
198
198
|
|
|
199
199
|
/***/ }),
|
|
200
200
|
|
|
@@ -204,7 +204,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
204
204
|
\***********************************/
|
|
205
205
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
206
206
|
|
|
207
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BulkConceptGetterApi: () => (/* binding */ BulkConceptGetterApi),\n/* harmony export */ GetConceptBulk: () => (/* binding */ GetConceptBulk)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n/**\n * This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts\n * namely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from\n * the api. The fetched concepts from api are then stored in the memory for further use in future.\n * @param conceptIds list of concept ids that need to be fetched\n * @returns list of concepts\n */\nfunction GetConceptBulk(passedConcepts) {\n return __awaiter(this, void 0, void 0, function* () {\n let result = [];\n let setTime = new Date().getTime();\n let startTime = performance.now();\n // let conceptIds = passedConcepts.filter((value, index, self) => {\n // return self.indexOf(value) === index;\n // });\n let conceptIds = Array.from(new Set(passedConcepts));\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptBulk', { passedConcepts });\n return res.data;\n }\n catch (error) {\n console.error('GetConceptBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n if (conceptIds.length > 0) {\n let bulkConceptFetch = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let conceptUse = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConcept(conceptIds[i]);\n if (conceptUse.id == 0) {\n bulkConceptFetch.push(conceptIds[i]);\n }\n }\n // let newAlgoTime = new Date().getTime();\n //let remainingIds:any = {};\n // for(let i=0; i< conceptIds.length; i++){\n // remainingIds[conceptIds[i]] = false;\n // }\n //await ConceptsData.GetConceptBulkData(conceptIds, result, remainingIds );\n // for(let key in remainingIds){\n // if(remainingIds[key] == false){\n // bulkConceptFetch.push(Number(key));\n // }\n // }\n //bulkConceptFetch = conceptIds;\n if (bulkConceptFetch.length == 0) {\n return result;\n }\n else {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(bulkConceptFetch)\n });\n if (response.ok) {\n result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n let concept = result[i];\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n }\n console.log(\"added the concepts\");\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"read\", \"unknown\", undefined, 200, result, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined)\n }\n else {\n console.log(\"Get Concept Bulk error\", response.status);\n // Add Log\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, \"unknown\", \"read\", \"unknown\", undefined, response.status, response, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Concept Bulk error message: ', error.message);\n }\n else {\n console.log('Get Concept Bulk unexpected error: ', error);\n }\n // Add Log\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, \"unknown\", \"read\", \"unknown\", undefined, 500, error, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl());\n }\n return result;\n });\n}\nfunction BulkConceptGetterApi(bulkConceptFetch) {\n return __awaiter(this, void 0, void 0, function* () {\n const conceptList = [];\n if (bulkConceptFetch.length > 0) {\n const myHeaders = {\n 'Content-Type': 'application/json',\n };\n try {\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl(), {\n method: 'POST',\n headers: myHeaders,\n body: JSON.stringify(bulkConceptFetch),\n });\n if (response.ok) {\n const result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n const concept = result[i];\n conceptList.push(concept);\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n }\n }\n else {\n console.log('bulk concept getter api error: ', response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('bulk concept getter api error: ', error.message);\n }\n else {\n console.log('bulk concept getter api error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl());\n }\n }\n return conceptList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptBulk.ts?");
|
|
207
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BulkConceptGetterApi: () => (/* binding */ BulkConceptGetterApi),\n/* harmony export */ GetConceptBulk: () => (/* binding */ GetConceptBulk)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n/**\n * This function takes in a list of ids and returns a list of concepts . This uses local memory to find concepts\n * namely in the concept binary tree. If it could not find the concepts in local memory then it fetches those from\n * the api. The fetched concepts from api are then stored in the memory for further use in future.\n * @param conceptIds list of concept ids that need to be fetched\n * @returns list of concepts\n */\nfunction GetConceptBulk(passedConcepts) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetConceptBulk, arguments_1);\n let result = [];\n let setTime = new Date().getTime();\n let startTime = performance.now();\n // let conceptIds = passedConcepts.filter((value, index, self) => {\n // return self.indexOf(value) === index;\n // });\n let conceptIds = Array.from(new Set(passedConcepts));\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptBulk', { passedConcepts });\n return res.data;\n }\n catch (error) {\n console.error('GetConceptBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n if (conceptIds.length > 0) {\n let bulkConceptFetch = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let conceptUse = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConcept(conceptIds[i]);\n if (conceptUse.id == 0) {\n bulkConceptFetch.push(conceptIds[i]);\n }\n }\n // let newAlgoTime = new Date().getTime();\n //let remainingIds:any = {};\n // for(let i=0; i< conceptIds.length; i++){\n // remainingIds[conceptIds[i]] = false;\n // }\n //await ConceptsData.GetConceptBulkData(conceptIds, result, remainingIds );\n // for(let key in remainingIds){\n // if(remainingIds[key] == false){\n // bulkConceptFetch.push(Number(key));\n // }\n // }\n //bulkConceptFetch = conceptIds;\n if (bulkConceptFetch.length == 0) {\n return result;\n }\n else {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(bulkConceptFetch)\n });\n if (response.ok) {\n result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n let concept = result[i];\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n }\n console.log(\"added the concepts\");\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"read\", \"unknown\", undefined, 200, result, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined)\n }\n else {\n console.log(\"Get Concept Bulk error\", response.status);\n // Add Log\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, \"unknown\", \"read\", \"unknown\", undefined, response.status, response, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Concept Bulk error message: ', error.message);\n }\n else {\n console.log('Get Concept Bulk unexpected error: ', error);\n }\n // Add Log\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logError(startTime, \"unknown\", \"read\", \"unknown\", undefined, 500, error, \"GetConceptBulk\", ['passedConcepts'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl());\n }\n return result;\n });\n}\nfunction BulkConceptGetterApi(bulkConceptFetch) {\n return __awaiter(this, void 0, void 0, function* () {\n const conceptList = [];\n if (bulkConceptFetch.length > 0) {\n const myHeaders = {\n 'Content-Type': 'application/json',\n };\n try {\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl(), {\n method: 'POST',\n headers: myHeaders,\n body: JSON.stringify(bulkConceptFetch),\n });\n if (response.ok) {\n const result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n const concept = result[i];\n conceptList.push(concept);\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n }\n }\n else {\n console.log('bulk concept getter api error: ', response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('bulk concept getter api error: ', error.message);\n }\n else {\n console.log('bulk concept getter api error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptBulkUrl());\n }\n }\n return conceptList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptBulk.ts?");
|
|
208
208
|
|
|
209
209
|
/***/ }),
|
|
210
210
|
|
|
@@ -214,7 +214,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
214
214
|
\*************************************************/
|
|
215
215
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
216
216
|
|
|
217
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConceptByCharacterAndType: () => (/* binding */ GetConceptByCharacterAndType)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetConceptByCharacterAndType(characterValue, typeId) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptByCharacterAndType', { characterValue, typeId });\n return res.data;\n }\n catch (error) {\n console.error('GetConceptByCharacterAndType sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, typeId);\n if (concept == null || concept.id == 0) {\n var json = {\n 'character_value': `${characterValue}`,\n 'type_id': typeId\n };\n var toSendJson = JSON.stringify(json);\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterAndTypeUrl(), {\n method: 'POST',\n headers: header,\n body: toSendJson,\n });\n if (response.ok) {\n let conceptString = yield response.json();\n concept = conceptString;\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n else {\n // throw new Error(`Error! status: ${response.status}`);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"This is the concept by type and character error\", response.status);\n }\n }\n return concept;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(' This is the concept by type and character error message: ', error.message);\n }\n else {\n console.log(' This is the concept by type and character unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterAndTypeUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptByCharacterAndType.ts?");
|
|
217
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConceptByCharacterAndType: () => (/* binding */ GetConceptByCharacterAndType)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetConceptByCharacterAndType(characterValue, typeId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetConceptByCharacterAndType, arguments_1);\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetConceptByCharacterAndType', { characterValue, typeId });\n return res.data;\n }\n catch (error) {\n console.error('GetConceptByCharacterAndType sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.GetConceptByCharacterAndTypeLocal(characterValue, typeId);\n if (concept == null || concept.id == 0) {\n var json = {\n 'character_value': `${characterValue}`,\n 'type_id': typeId\n };\n var toSendJson = JSON.stringify(json);\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterAndTypeUrl(), {\n method: 'POST',\n headers: header,\n body: toSendJson,\n });\n if (response.ok) {\n let conceptString = yield response.json();\n concept = conceptString;\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(concept);\n }\n else {\n // throw new Error(`Error! status: ${response.status}`);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"This is the concept by type and character error\", response.status);\n }\n }\n return concept;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(' This is the concept by type and character error message: ', error.message);\n }\n else {\n console.log(' This is the concept by type and character unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterAndTypeUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptByCharacterAndType.ts?");
|
|
218
218
|
|
|
219
219
|
/***/ }),
|
|
220
220
|
|
|
@@ -224,7 +224,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
224
224
|
\***********************************************/
|
|
225
225
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
226
226
|
|
|
227
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConceptByCharacterValue: () => (/* binding */ GetConceptByCharacterValue)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetConceptByCharacterValue(characterValue) {\n return __awaiter(this, void 0, void 0, function* () {\n let result = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultConcept)();\n try {\n const formdata = new FormData();\n formdata.append(\"character_value\", characterValue);\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterValueUrl(), {\n method: 'POST',\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n if (result.id > 0) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result);\n }\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"Error in Getting concept by character value Error\", response.status);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Error in Getting concept by character value error message: ', error);\n }\n else {\n console.log('Error in Getting concept by character value unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterValueUrl());\n }\n return result;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptByCharacterValue.ts?");
|
|
227
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConceptByCharacterValue: () => (/* binding */ GetConceptByCharacterValue)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetConceptByCharacterValue(characterValue) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetConceptByCharacterValue, arguments_1);\n let result = (0,_app__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultConcept)();\n try {\n const formdata = new FormData();\n formdata.append(\"character_value\", characterValue);\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterValueUrl(), {\n method: 'POST',\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n if (result.id > 0) {\n _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_0__.ConceptsData.AddConcept(result);\n }\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"Error in Getting concept by character value Error\", response.status);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Error in Getting concept by character value error message: ', error);\n }\n else {\n console.log('Error in Getting concept by character value unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConceptByCharacterValueUrl());\n }\n return result;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConceptByCharacterValue.ts?");
|
|
228
228
|
|
|
229
229
|
/***/ }),
|
|
230
230
|
|
|
@@ -234,7 +234,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
234
234
|
\**********************************/
|
|
235
235
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
236
236
|
|
|
237
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnection: () => (/* binding */ GetConnection)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetConnection(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let result = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.GetConnection(id);\n try {\n if (result.id != 0) {\n return result;\n }\n else {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const formdata = new FormData();\n formdata.append(\"id\", id.toString());\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetConnectionUrl(), {\n method: 'POST',\n headers: header,\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.AddConnection(result);\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"Get Connection Error\", response.status);\n }\n return result;\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Connection error message: ', error.message);\n }\n else {\n console.log('Get Connection unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetConnectionUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnection.ts?");
|
|
237
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnection: () => (/* binding */ GetConnection)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetConnection(id) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetConnection, arguments_1);\n let result = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.GetConnection(id);\n try {\n if (result.id != 0) {\n return result;\n }\n else {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const formdata = new FormData();\n formdata.append(\"id\", id.toString());\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetConnectionUrl(), {\n method: 'POST',\n headers: header,\n body: formdata\n });\n if (response.ok) {\n result = (yield response.json());\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_1__.ConnectionData.AddConnection(result);\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n console.log(\"Get Connection Error\", response.status);\n }\n return result;\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Connection error message: ', error.message);\n }\n else {\n console.log('Get Connection unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetConnectionUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnection.ts?");
|
|
238
238
|
|
|
239
239
|
/***/ }),
|
|
240
240
|
|
|
@@ -244,7 +244,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
244
244
|
\**************************************/
|
|
245
245
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
246
246
|
|
|
247
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionBulk: () => (/* binding */ GetConnectionBulk)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/FindConeceptsFromConnection */ \"./src/Services/FindConeceptsFromConnection.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n/**\n * After fetching these connections it is saved in the local static ConnectionBinaryTree so it can be reused without being fetched\n * @param connectionIds array of connection ids that need to fetched by the local system\n * @returns the list of connections that have been fetched\n */\nfunction GetConnectionBulk() {\n return __awaiter(this, arguments, void 0, function* (connectionIds = []) {\n let connectionList = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConnectionBulk', { connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (connectionIds.length > 0) {\n let bulkConnectionFetch = [];\n // if the connections are already present in the local memory then take it from there \n //else put it in a list called bulkConnectionFetch which will be used to call and api.\n for (let i = 0; i < connectionIds.length; i++) {\n let conceptUse = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.GetConnection(connectionIds[i]);\n if (conceptUse.id == 0) {\n bulkConnectionFetch.push(connectionIds[i]);\n }\n else {\n connectionList.push(conceptUse);\n }\n }\n // let remainingIds:any = {};\n // await ConnectionData.GetConnectionBulkData(connectionIds, connectionList, remainingIds );\n //bulkConnectionFetch = connectionIds;\n // if the case that bulkConnectionFetch does not have any elements then we just return everything we have\n if (bulkConnectionFetch.length == 0) {\n return connectionList;\n }\n else {\n // if the connection could not be found in the local memory then fetch from the api.\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConnectionBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(bulkConnectionFetch)\n });\n if (response.ok) {\n const result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n let connection = result[i];\n connectionList.push(connection);\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.AddConnection(connection);\n }\n }\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n console.log(\"Get Connection Bulk error\", response.status);\n }\n }\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Connection Bulk error message: ', error);\n }\n else {\n console.log('Get Connection Bulk unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConnectionBulkUrl());\n }\n yield (0,_Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__.FindConceptsFromConnections)(connectionList);\n return connectionList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnectionBulk.ts?");
|
|
247
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionBulk: () => (/* binding */ GetConnectionBulk)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/FindConeceptsFromConnection */ \"./src/Services/FindConeceptsFromConnection.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n/**\n * After fetching these connections it is saved in the local static ConnectionBinaryTree so it can be reused without being fetched\n * @param connectionIds array of connection ids that need to fetched by the local system\n * @returns the list of connections that have been fetched\n */\nfunction GetConnectionBulk() {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (connectionIds = []) {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(GetConnectionBulk, arguments_1);\n let connectionList = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetConnectionBulk', { connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionBulk sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (connectionIds.length > 0) {\n let bulkConnectionFetch = [];\n // if the connections are already present in the local memory then take it from there \n //else put it in a list called bulkConnectionFetch which will be used to call and api.\n for (let i = 0; i < connectionIds.length; i++) {\n let conceptUse = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.GetConnection(connectionIds[i]);\n if (conceptUse.id == 0) {\n bulkConnectionFetch.push(connectionIds[i]);\n }\n else {\n connectionList.push(conceptUse);\n }\n }\n // let remainingIds:any = {};\n // await ConnectionData.GetConnectionBulkData(connectionIds, connectionList, remainingIds );\n //bulkConnectionFetch = connectionIds;\n // if the case that bulkConnectionFetch does not have any elements then we just return everything we have\n if (bulkConnectionFetch.length == 0) {\n return connectionList;\n }\n else {\n // if the connection could not be found in the local memory then fetch from the api.\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConnectionBulkUrl(), {\n method: 'POST',\n headers: header,\n body: JSON.stringify(bulkConnectionFetch)\n });\n if (response.ok) {\n const result = yield response.json();\n if (result.length > 0) {\n for (let i = 0; i < result.length; i++) {\n let connection = result[i];\n connectionList.push(connection);\n _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_0__.ConnectionData.AddConnection(connection);\n }\n }\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n console.log(\"Get Connection Bulk error\", response.status);\n }\n }\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get Connection Bulk error message: ', error);\n }\n else {\n console.log('Get Connection Bulk unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetConnectionBulkUrl());\n }\n yield (0,_Services_FindConeceptsFromConnection__WEBPACK_IMPORTED_MODULE_2__.FindConceptsFromConnections)(connectionList);\n return connectionList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnectionBulk.ts?");
|
|
248
248
|
|
|
249
249
|
/***/ }),
|
|
250
250
|
|
|
@@ -254,7 +254,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
254
254
|
\**********************************************/
|
|
255
255
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
256
256
|
|
|
257
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionOfTheConcept: () => (/* binding */ GetConnectionOfTheConcept)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetConnectionOfTheConcept(typeId_1, ofTheConceptId_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (typeId, ofTheConceptId, userId, inpage = 10, page = 1) {\n let connectionList = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConnectionOfTheConcept', { typeId, ofTheConceptId, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionOfTheConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n let urlencoded = new URLSearchParams();\n urlencoded.append(\"typeId\", `${typeId}`);\n urlencoded.append(\"ofTheConceptId\", `${ofTheConceptId}`);\n urlencoded.append(\"userId\", `${userId}`);\n urlencoded.append(\"inpage\", `${inpage}`);\n urlencoded.append(\"page\", `${page}`);\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetAllConnectionsOfConceptUrl(), {\n method: 'POST',\n headers: header,\n body: urlencoded\n });\n if (response.ok) {\n connectionList = (yield response.json());\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n console.log(\"Get connection of concept error\", response.status);\n }\n return connectionList;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get connection of concept error message: ', error.message);\n }\n else {\n console.log('Get connection of concept unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetAllConnectionsOfConceptUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnectionOfTheConcept.ts?");
|
|
257
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionOfTheConcept: () => (/* binding */ GetConnectionOfTheConcept)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetConnectionOfTheConcept(typeId_1, ofTheConceptId_1, userId_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (typeId, ofTheConceptId, userId, inpage = 10, page = 1) {\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logfunction(GetConnectionOfTheConcept, arguments_1);\n let connectionList = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('GetConnectionOfTheConcept', { typeId, ofTheConceptId, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionOfTheConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n let urlencoded = new URLSearchParams();\n urlencoded.append(\"typeId\", `${typeId}`);\n urlencoded.append(\"ofTheConceptId\", `${ofTheConceptId}`);\n urlencoded.append(\"userId\", `${userId}`);\n urlencoded.append(\"inpage\", `${inpage}`);\n urlencoded.append(\"page\", `${page}`);\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetAllConnectionsOfConceptUrl(), {\n method: 'POST',\n headers: header,\n body: urlencoded\n });\n if (response.ok) {\n connectionList = (yield response.json());\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n console.log(\"Get connection of concept error\", response.status);\n }\n return connectionList;\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Get connection of concept error message: ', error.message);\n }\n else {\n console.log('Get connection of concept unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.GetAllConnectionsOfConceptUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetConnectionOfTheConcept.ts?");
|
|
258
258
|
|
|
259
259
|
/***/ }),
|
|
260
260
|
|
|
@@ -264,7 +264,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
264
264
|
\*********************************************/
|
|
265
265
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
266
266
|
|
|
267
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetReservedConnectionIds: () => (/* binding */ GetReservedConnectionIds)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ReservedIds */ \"./src/DataStructures/ReservedIds.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetReservedConnectionIds() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedConnectionIdUrl(), {\n method: 'GET',\n headers: header,\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n throw new Error(`Error! status: ${response.status}`);\n }\n const result = yield response.json();\n for (let i = 0; i < result.length; i++) {\n _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__.ReservedConnectionIds.AddId(result[i]);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('get reserved connection ids error message: ', error.message);\n }\n else {\n console.log('get reserved connection ids unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedConnectionIdUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetReservedConnectionIds.ts?");
|
|
267
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetReservedConnectionIds: () => (/* binding */ GetReservedConnectionIds)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ReservedIds */ \"./src/DataStructures/ReservedIds.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetReservedConnectionIds() {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetReservedConnectionIds, arguments_1);\n try {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedConnectionIdUrl(), {\n method: 'GET',\n headers: header,\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n throw new Error(`Error! status: ${response.status}`);\n }\n const result = yield response.json();\n for (let i = 0; i < result.length; i++) {\n _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__.ReservedConnectionIds.AddId(result[i]);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('get reserved connection ids error message: ', error.message);\n }\n else {\n console.log('get reserved connection ids unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedConnectionIdUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetReservedConnectionIds.ts?");
|
|
268
268
|
|
|
269
269
|
/***/ }),
|
|
270
270
|
|
|
@@ -274,7 +274,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
274
274
|
\***********************************/
|
|
275
275
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
276
276
|
|
|
277
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetReservedIds: () => (/* binding */ GetReservedIds)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ReservedIds */ \"./src/DataStructures/ReservedIds.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction GetReservedIds() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedIdUrl(), {\n method: 'GET',\n headers: header,\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n throw new Error(`Error! status: ${response.status}`);\n }\n const result = yield response.json();\n for (let i = 0; i < result.length; i++) {\n _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__.ReservedIds.AddId(result[i]);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('get reserved ids error message: ', error.message);\n }\n else {\n console.log('get reserved ids unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedIdUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetReservedIds.ts?");
|
|
277
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetReservedIds: () => (/* binding */ GetReservedIds)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/ReservedIds */ \"./src/DataStructures/ReservedIds.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetReservedIds() {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetReservedIds, arguments_1);\n try {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_2__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedIdUrl(), {\n method: 'GET',\n headers: header,\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpError)(response);\n throw new Error(`Error! status: ${response.status}`);\n }\n const result = yield response.json();\n for (let i = 0; i < result.length; i++) {\n _DataStructures_ReservedIds__WEBPACK_IMPORTED_MODULE_0__.ReservedIds.AddId(result[i]);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('get reserved ids error message: ', error.message);\n }\n else {\n console.log('get reserved ids unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.GetReservedIdUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/GetReservedIds.ts?");
|
|
278
278
|
|
|
279
279
|
/***/ }),
|
|
280
280
|
|
|
@@ -294,7 +294,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
294
294
|
\**************************/
|
|
295
295
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
296
296
|
|
|
297
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LoginToBackend: () => (/* binding */ LoginToBackend)\n/* harmony export */ });\n/* harmony import */ var
|
|
297
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LoginToBackend: () => (/* binding */ LoginToBackend)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction LoginToBackend(email, password) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(LoginToBackend, arguments_1);\n try {\n let object = {\n 'email': email,\n 'password': password\n };\n let myHeaders = new Headers();\n myHeaders.append(\"Content-Type\", \"application/json\");\n let requestObject = JSON.stringify(object);\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.LoginUrl(), {\n method: 'POST',\n headers: myHeaders,\n body: requestObject\n });\n const result = yield response.json();\n if (response.ok) {\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_2__.TokenStorage.BearerAccessToken = result.data.token;\n return result;\n }\n else {\n console.log('Login tsccs error message: ', response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleHttpErrorObject)(response, result);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Login tsccs error message: ', error.message);\n }\n else {\n console.log(' Login tsccs unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_3__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.LoginUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/Login.ts?");
|
|
298
298
|
|
|
299
299
|
/***/ }),
|
|
300
300
|
|
|
@@ -304,7 +304,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
304
304
|
\*****************************************/
|
|
305
305
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
306
306
|
|
|
307
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheNameInBackend: () => (/* binding */ MakeTheNameInBackend)\n/* harmony export */ });\n/* harmony import */ var
|
|
307
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheNameInBackend: () => (/* binding */ MakeTheNameInBackend)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction MakeTheNameInBackend(newConceptId, referent, typeId, typeUserId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(MakeTheNameInBackend, arguments_1);\n try {\n let object = {\n 'newConceptId': newConceptId,\n 'referent': referent,\n 'typeId': typeId,\n 'typeUserId': typeUserId\n };\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n let requestObject = JSON.stringify(object);\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.MakeTheNameInBackendUrl(), {\n method: 'POST',\n headers: myHeaders,\n body: requestObject\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('make the name in backend error message: ', error.message);\n }\n else {\n console.log('make the name in backend unexpected error: ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.MakeTheNameInBackendUrl());\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/MakeTheNameInBackend.ts?");
|
|
308
308
|
|
|
309
309
|
/***/ }),
|
|
310
310
|
|
|
@@ -314,7 +314,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
314
314
|
\******************************************/
|
|
315
315
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
316
316
|
|
|
317
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheTypeConceptApi: () => (/* binding */ MakeTheTypeConceptApi)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var
|
|
317
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheTypeConceptApi: () => (/* binding */ MakeTheTypeConceptApi)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Services_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/ConceptFinding/GetConceptByCharacterAndCategory */ \"./src/Services/ConceptFinding/GetConceptByCharacterAndCategory.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n/**\n * This function is used to check the type concpet of a passed string\n * if the text is \"the_person\" then the function finds the related concept\n * @param type This is the type of the concept that needs to be created.\n * @param userId This is the userId of the creator.\n * @returns the concept created.\n */\nfunction MakeTheTypeConceptApi(type, userId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logfunction(MakeTheTypeConceptApi, arguments_1);\n // create a default concept with all defaulting to zero\n let concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_2__.CreateDefaultConcept)();\n try {\n // get the concept by character and category from the api\n concept = yield (0,_Services_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(type);\n if (concept.id == 0 || concept.typeId == 4) {\n let header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_1__.GetRequestHeader)('application/x-www-form-urlencoded');\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.MakeTheTypeConceptUrl(), {\n method: 'POST',\n headers: header,\n body: `type=${type}`\n });\n if (!response.ok) {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_5__.HandleHttpError)(response);\n throw new Error(`Error! status: ${response.status}`);\n }\n let result = yield response.json();\n concept = result;\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log('Make The Type Concept Api error : ', error.message);\n }\n else {\n console.log('Make The Type Concept Api error : ', error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_5__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.MakeTheTypeConceptUrl());\n }\n return concept;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/MakeTheTypeConceptApi.ts?");
|
|
318
318
|
|
|
319
319
|
/***/ }),
|
|
320
320
|
|
|
@@ -324,7 +324,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
324
324
|
\************************************/
|
|
325
325
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
326
326
|
|
|
327
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecursiveSearchApi: () => (/* binding */ RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* binding */ RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* binding */ RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* binding */ RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* binding */ RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchLocal: () => (/* binding */ RecursiveSearchLocal)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nfunction RecursiveSearchApi() {\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApi\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApi sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n concepts = yield (0,_Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__.GetCompositionFromConnectionsWithDataId)(conceptIds, connections);\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n return concepts;\n });\n}\nfunction RecursiveSearchApiWithInternalConnections() {\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiWithInternalConnections\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiWithInternalConnections sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n concepts = yield (0,_Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__.GetCompositionFromConnectionsWithDataIdFromConnections)(conceptIds, connections);\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n return concepts;\n });\n}\nfunction RecursiveSearchApiRaw() {\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiRaw\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiRaw sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchApiRawFullLinker() {\n return __awaiter(this, arguments, void 0, function* (composition = 0, fullLinkers = [], textSearch = \"\") {\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiRawFullLinker\", {\n composition,\n fullLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiRawFullLinker sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.fullLinkers = fullLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchApiNewRawFullLinker() {\n return __awaiter(this, arguments, void 0, function* (composition = 0, fullLinkers = [], textSearch = \"\") {\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiNewRawFullLinker\", {\n composition,\n fullLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiNewRawFullLinker sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.fullLinkers = fullLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchLocal(composition_1) {\n return __awaiter(this, arguments, void 0, function* (composition, listLinkers = [], textSearch = \"\") { });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/RecursiveSearch.ts?");
|
|
327
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RecursiveSearchApi: () => (/* binding */ RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* binding */ RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* binding */ RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* binding */ RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* binding */ RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchLocal: () => (/* binding */ RecursiveSearchLocal)\n/* harmony export */ });\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nfunction RecursiveSearchApi() {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(RecursiveSearchApi, arguments_1);\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApi\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApi sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n concepts = yield (0,_Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__.GetCompositionFromConnectionsWithDataId)(conceptIds, connections);\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n return concepts;\n });\n}\nfunction RecursiveSearchApiWithInternalConnections() {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(RecursiveSearchApiWithInternalConnections, arguments_2);\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiWithInternalConnections\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiWithInternalConnections sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n concepts = yield (0,_Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_2__.GetCompositionFromConnectionsWithDataIdFromConnections)(conceptIds, connections);\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n return concepts;\n });\n}\nfunction RecursiveSearchApiRaw() {\n var arguments_3 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition = 0, listLinkers = [], textSearch = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(RecursiveSearchApiRaw, arguments_3);\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiRaw\", {\n composition,\n listLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiRaw sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.listLinkers = listLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchApiRawFullLinker() {\n var arguments_4 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition = 0, fullLinkers = [], textSearch = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(RecursiveSearchApiRawFullLinker, arguments_4);\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiRawFullLinker\", {\n composition,\n fullLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiRawFullLinker sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.fullLinkers = fullLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchApiNewRawFullLinker() {\n var arguments_5 = arguments;\n return __awaiter(this, arguments, void 0, function* (composition = 0, fullLinkers = [], textSearch = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(RecursiveSearchApiRawFullLinker, arguments_5);\n let concepts = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)(\"RecursiveSearchApiNewRawFullLinker\", {\n composition,\n fullLinkers,\n textSearch,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"RecursiveSearchApiNewRawFullLinker sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let searchQuery = new _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_1__.SearchQuery();\n searchQuery.composition = composition;\n searchQuery.fullLinkers = fullLinkers;\n searchQuery.textSearch = textSearch;\n let raw = JSON.stringify(searchQuery);\n let Connections = [];\n let myHeaders = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeader)();\n const response = yield fetch(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl(), {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n });\n if (response.ok) {\n const result = yield response.json();\n let conceptIds = result.compositionIds;\n let connections = result.internalConnections;\n let externalConnections = result.externalConnections;\n return result;\n }\n else {\n console.log(\"recursive search error \", response.status);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleHttpError)(response);\n }\n return [];\n }\n catch (error) {\n if (error instanceof Error) {\n console.log(\"recursive search error message: \", error.message);\n }\n else {\n console.log(\"recursive search unexpected error: \", error);\n }\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_4__.HandleInternalError)(error, _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.RecursiveSearchUrl());\n }\n });\n}\nfunction RecursiveSearchLocal(composition_1) {\n return __awaiter(this, arguments, void 0, function* (composition, listLinkers = [], textSearch = \"\") { });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/RecursiveSearch.ts?");
|
|
328
328
|
|
|
329
329
|
/***/ }),
|
|
330
330
|
|
|
@@ -344,7 +344,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
344
344
|
\**********************************************/
|
|
345
345
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
346
346
|
|
|
347
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FreeschemaQueryApi: () => (/* binding */ FreeschemaQueryApi)\n/* harmony export */ });\n/* harmony import */ var
|
|
347
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FreeschemaQueryApi: () => (/* binding */ FreeschemaQueryApi)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction FreeschemaQueryApi(query_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (query, token = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(FreeschemaQueryApi, arguments_1);\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeaderWithAuthorization)(\"application/json\", token);\n const queryUrl = _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.FreeschemaQueryUrl();\n const body = JSON.stringify(query);\n try {\n const response = yield fetch(queryUrl, {\n method: 'POST',\n headers: header,\n body: body\n });\n if (response.ok) {\n let result = yield response.json();\n return result;\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n console.log(\"This is the freeschema query error\", response.status);\n return [];\n }\n }\n catch (ex) {\n console.log(\"This is the freeschema query error others\", ex);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(ex, queryUrl);\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/Search/FreeschemaQueryApi.ts?");
|
|
348
348
|
|
|
349
349
|
/***/ }),
|
|
350
350
|
|
|
@@ -374,7 +374,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
374
374
|
\*************************************************/
|
|
375
375
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
376
376
|
|
|
377
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SearchLinkMultipleApi: () => (/* binding */ SearchLinkMultipleApi)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction SearchLinkMultipleApi(searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\") {\n let startTime = performance.now();\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeaderWithAuthorization)(\"application/json\", token);\n const queryUrl = _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.SearchLinkMultipleAllApiUrl();\n const body = JSON.stringify(searchQuery);\n try {\n const response = yield fetch(queryUrl, {\n method: 'POST',\n headers: header,\n body: body\n });\n if (response.ok) {\n let result = yield response.json();\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"search\", \"unknown\", undefined, 200, result, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined )\n return result;\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n console.log(\"This is the searching multiple error\", response.status);\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, \"unknown\", \"search\", \"unknown\", undefined, response.status, response, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined);\n return [];\n }\n }\n catch (ex) {\n console.log(\"This is the searching multiple error\", ex);\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, \"unknown\", \"search\", \"unknown\", undefined, 500, ex, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(ex, queryUrl);\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/Search/SearchLinkMultipleApi.ts?");
|
|
377
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SearchLinkMultipleApi: () => (/* binding */ SearchLinkMultipleApi)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Services/Security/GetRequestHeader */ \"./src/Services/Security/GetRequestHeader.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nfunction SearchLinkMultipleApi(searchQuery_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\") {\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(SearchLinkMultipleApi, arguments_1);\n let startTime = performance.now();\n var header = (0,_Services_Security_GetRequestHeader__WEBPACK_IMPORTED_MODULE_3__.GetRequestHeaderWithAuthorization)(\"application/json\", token);\n const queryUrl = _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_1__.BaseUrl.SearchLinkMultipleAllApiUrl();\n const body = JSON.stringify(searchQuery);\n try {\n const response = yield fetch(queryUrl, {\n method: 'POST',\n headers: header,\n body: body\n });\n if (response.ok) {\n let result = yield response.json();\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"search\", \"unknown\", undefined, 200, result, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined )\n return result;\n }\n else {\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleHttpError)(response);\n console.log(\"This is the searching multiple error\", response.status);\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, \"unknown\", \"search\", \"unknown\", undefined, response.status, response, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined);\n return [];\n }\n }\n catch (ex) {\n console.log(\"This is the searching multiple error\", ex);\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(startTime, \"unknown\", \"search\", \"unknown\", undefined, 500, ex, \"SearchLinkMultipleApi\", ['searchQuery', 'token'], \"unknown\", undefined);\n (0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__.HandleInternalError)(ex, queryUrl);\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Api/Search/SearchLinkMultipleApi.ts?");
|
|
378
378
|
|
|
379
379
|
/***/ }),
|
|
380
380
|
|
|
@@ -584,7 +584,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
584
584
|
\*******************************************/
|
|
585
585
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
586
586
|
|
|
587
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConceptsData: () => (/* binding */ ConceptsData)\n/* harmony export */ });\n/* harmony import */ var _Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Database/indexeddb */ \"./src/Database/indexeddb.ts\");\n/* harmony import */ var _BinaryTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BinaryCharacterTree */ \"./src/DataStructures/BinaryCharacterTree.ts\");\n/* harmony import */ var _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BinaryTypeTree */ \"./src/DataStructures/BinaryTypeTree.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nclass ConceptsData {\n constructor() {\n this.name = \"conceptsArray\";\n }\n static CheckContains(concept) {\n var contains = false;\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].id == concept.id) {\n contains = true;\n }\n }\n return contains;\n }\n static AddNpc(id) {\n if (!this.NPC.includes(id)) {\n if (this.NPC.length > 10) {\n this.NPC = [];\n }\n this.NPC.push(id);\n }\n }\n static GetNpc(id) {\n if (this.NPC.includes(id)) {\n return true;\n }\n return false;\n }\n static AddConceptToStorage(concept) {\n if (concept.id > 0) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__.UpdateToDatabase)(\"concept\", concept);\n }\n }\n static GetConceptBulkData(ids, connectionArray, remainingIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getConceptListFromIds(ids, connectionArray, remainingIds);\n });\n }\n static AddConcept(concept) {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__AddConcept', { concept }); // is async function\n // return res.data // remove comment when this function is async\n }\n catch (error) {\n console.error('Concept Data, Add Concpet sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (concept.id > 0) {\n // console.log(\"added the concept to the tree\", concept);\n //var contains = this.CheckContains(concept);\n // this.conceptDictionary[concept.id] = concept;\n // if(contains){\n // this.RemoveConcept(concept);\n // }\n //UpdateToDatabase(\"concept\",concept);\n //IndexDbUpdate.UpdateConceptIndexDb(concept);\n _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.addConceptToTree(concept);\n _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.addConceptToTree(concept);\n //BinaryCharacterTree.addConceptToTree(concept);\n }\n }\n static AddConceptToMemory(concept) {\n if (concept.id > 0) {\n //var contains = this.CheckContains(concept);\n // this.conceptDictionary[concept.id] = concept;\n // if(contains){\n // this.RemoveConcept(concept);\n // }\n _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.addConceptToTree(concept);\n _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.addConceptToTree(concept);\n // BinaryCharacterTree.addConceptToTree(concept);\n }\n }\n static AddConceptTemporary(concept) {\n var contains = this.CheckContains(concept);\n this.conceptDictionary[concept.id] = concept;\n if (contains) {\n this.RemoveConcept(concept);\n }\n this.conceptsArray.push(concept);\n }\n static RemoveConcept(concept) {\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].id == concept.id) {\n this.conceptsArray.splice(i, 1);\n }\n }\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__.removeFromDatabase)(\"concept\", concept.id);\n }\n static GetConcept(id) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConcept', { id });\n return res.data;\n }\n catch (error) {\n console.error('Concept Data, Get Concpet sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (id == 0 || id == undefined || id == null) {\n return (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n }\n var myConcept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var node = yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getNodeFromTree(id);\n if (node === null || node === void 0 ? void 0 : node.value) {\n var returnedConcept = node.value;\n if (returnedConcept) {\n myConcept = returnedConcept;\n // if(myConcept.count > IndexDbUpdate.MIN_USE_FOR_INDEX_DB){\n // IndexDbUpdate.UpdateConceptIndexDb(myConcept);\n // }\n }\n }\n return myConcept;\n });\n }\n static GetConceptByCharacter(characterValue) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getNodeFromTree(characterValue);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptByCharacterUpdated(characterValue) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getNodeFromTree(characterValue);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptByCharacterAndTypeLocal(character_value, typeId) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n //var Node = await BinaryCharacterTree.getCharacterAndTypeFromTree(character_value,typeId);\n concept = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsWithCharacterValueNew(character_value, typeId);\n // if(Node){\n // concept = Node.value;\n // console.log(\"found the output\");\n // console.log(concept);\n // }\n return concept;\n });\n }\n static GetConceptByCharacterAndCategoryLocal(character_value, categoryId) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = yield _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getCharacterAndCategoryFromTree(character_value, categoryId);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptsByTypeId(typeId) {\n var myConcept;\n let ConceptList = [];\n myConcept = null;\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].typeId == typeId) {\n ConceptList.push(this.conceptsArray[i]);\n }\n }\n return ConceptList;\n }\n static GetConceptsByTypeIdAndUser(typeId, userId) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConceptsByTypeIdAndUser', { typeId, userId });\n return res.data;\n }\n catch (error) {\n console.error('Concept Data, Get Concpet sw error:', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let ConceptList = [];\n ConceptList = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsFromTreeWithUserIdNew(typeId, userId);\n return ConceptList;\n });\n }\n static GetBinaryCharacterTree() {\n return _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.characterRoot;\n }\n getName() {\n return this.name;\n }\n}\nConceptsData.conceptsArray = [];\nConceptsData.NPC = [];\nConceptsData.conceptDictionary = [];\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/DataStructures/ConceptData.ts?");
|
|
587
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConceptsData: () => (/* binding */ ConceptsData)\n/* harmony export */ });\n/* harmony import */ var _Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Database/indexeddb */ \"./src/Database/indexeddb.ts\");\n/* harmony import */ var _BinaryTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BinaryCharacterTree */ \"./src/DataStructures/BinaryCharacterTree.ts\");\n/* harmony import */ var _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BinaryTypeTree */ \"./src/DataStructures/BinaryTypeTree.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nclass ConceptsData {\n constructor() {\n this.name = \"conceptsArray\";\n }\n static CheckContains(concept) {\n var contains = false;\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].id == concept.id) {\n contains = true;\n }\n }\n return contains;\n }\n static AddNpc(id) {\n if (!this.NPC.includes(id)) {\n if (this.NPC.length > 10) {\n this.NPC = [];\n }\n this.NPC.push(id);\n }\n }\n static GetNpc(id) {\n if (this.NPC.includes(id)) {\n return true;\n }\n return false;\n }\n static AddConceptToStorage(concept) {\n if (concept.id > 0) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__.UpdateToDatabase)(\"concept\", concept);\n }\n }\n static GetConceptBulkData(ids, connectionArray, remainingIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getConceptListFromIds(ids, connectionArray, remainingIds);\n });\n }\n static AddConcept(concept) {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__AddConcept', { concept }); // is async function\n // return res.data // remove comment when this function is async\n }\n catch (error) {\n console.error('Concept Data, Add Concpet sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (concept.id > 0) {\n // console.log(\"added the concept to the tree\", concept);\n //var contains = this.CheckContains(concept);\n // this.conceptDictionary[concept.id] = concept;\n // if(contains){\n // this.RemoveConcept(concept);\n // }\n //UpdateToDatabase(\"concept\",concept);\n //IndexDbUpdate.UpdateConceptIndexDb(concept);\n _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.addConceptToTree(concept);\n _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.addConceptToTree(concept);\n //BinaryCharacterTree.addConceptToTree(concept);\n }\n }\n static AddConceptToMemory(concept) {\n if (concept.id > 0) {\n //var contains = this.CheckContains(concept);\n // this.conceptDictionary[concept.id] = concept;\n // if(contains){\n // this.RemoveConcept(concept);\n // }\n _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.addConceptToTree(concept);\n _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.addConceptToTree(concept);\n // BinaryCharacterTree.addConceptToTree(concept);\n }\n }\n static AddConceptTemporary(concept) {\n var contains = this.CheckContains(concept);\n this.conceptDictionary[concept.id] = concept;\n if (contains) {\n this.RemoveConcept(concept);\n }\n this.conceptsArray.push(concept);\n }\n static RemoveConcept(concept) {\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].id == concept.id) {\n this.conceptsArray.splice(i, 1);\n }\n }\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_0__.removeFromDatabase)(\"concept\", concept.id);\n }\n static GetConcept(id) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConcept', { id });\n return res.data;\n }\n catch (error) {\n console.error('Concept Data, Get Concpet sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n if (id == 0 || id == undefined || id == null) {\n return (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n }\n var myConcept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var node = yield _BinaryTree__WEBPACK_IMPORTED_MODULE_1__.BinaryTree.getNodeFromTree(id);\n if (node === null || node === void 0 ? void 0 : node.value) {\n var returnedConcept = node.value;\n if (returnedConcept) {\n myConcept = returnedConcept;\n // if(myConcept.count > IndexDbUpdate.MIN_USE_FOR_INDEX_DB){\n // IndexDbUpdate.UpdateConceptIndexDb(myConcept);\n // }\n }\n }\n return myConcept;\n });\n }\n static GetConceptByCharacter(characterValue) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getNodeFromTree(characterValue);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptByCharacterUpdated(characterValue) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getNodeFromTree(characterValue);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptByCharacterAndTypeLocal(character_value, typeId) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n //var Node = await BinaryCharacterTree.getCharacterAndTypeFromTree(character_value,typeId);\n concept = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsWithCharacterValueNew(character_value, typeId);\n // if(Node){\n // concept = Node.value;\n // console.log(\"found the output\");\n // console.log(concept);\n // }\n return concept;\n });\n }\n static GetConceptByCharacterAndCategoryLocal(character_value, categoryId) {\n return __awaiter(this, void 0, void 0, function* () {\n var concept = (0,_Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n var Node = yield _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.getCharacterAndCategoryFromTree(character_value, categoryId);\n if (Node) {\n concept = Node.value;\n }\n return concept;\n });\n }\n static GetConceptsByTypeId(typeId) {\n var myConcept;\n let ConceptList = [];\n myConcept = null;\n for (var i = 0; i < this.conceptsArray.length; i++) {\n if (this.conceptsArray[i].typeId == typeId) {\n ConceptList.push(this.conceptsArray[i]);\n }\n }\n return ConceptList;\n }\n static GetConceptsByTypeIdAndUser(typeId, userId) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(ConceptsData.GetConceptsByTypeIdAndUser, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('ConceptsData__GetConceptsByTypeIdAndUser', { typeId, userId });\n return res.data;\n }\n catch (error) {\n console.error('Concept Data, Get Concpet sw error:', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let ConceptList = [];\n ConceptList = yield _BinaryTypeTree__WEBPACK_IMPORTED_MODULE_3__.BinaryTypeTree.getTypeVariantsFromTreeWithUserIdNew(typeId, userId);\n return ConceptList;\n });\n }\n static GetBinaryCharacterTree() {\n return _BinaryCharacterTree__WEBPACK_IMPORTED_MODULE_2__.BinaryCharacterTree.characterRoot;\n }\n getName() {\n return this.name;\n }\n}\nConceptsData.conceptsArray = [];\nConceptsData.NPC = [];\nConceptsData.conceptDictionary = [];\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/DataStructures/ConceptData.ts?");
|
|
588
588
|
|
|
589
589
|
/***/ }),
|
|
590
590
|
|
|
@@ -674,7 +674,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
674
674
|
\**********************************************/
|
|
675
675
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
676
676
|
|
|
677
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionData: () => (/* binding */ ConnectionData)\n/* harmony export */ });\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Database/indexeddb */ \"./src/Database/indexeddb.ts\");\n/* harmony import */ var _Connection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionBinaryTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionOfTheTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionTypeTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\nclass ConnectionData {\n constructor() {\n this.name = \"Connection Array\";\n }\n static CheckContains(connection) {\n let contains = false;\n for (let i = 0; i < this.connectionArray.length; i++) {\n if (this.connectionArray[i].id == connection.id) {\n contains = true;\n }\n }\n return contains;\n }\n static AddConnectionToStorage(connection) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__.UpdateToDatabase)(\"connection\", connection);\n }\n static AddConnection(connection) {\n // var contains = this.CheckContains(connection);\n // if(contains){\n // this.RemoveConnection(connection);\n // }\n // if(connection.id != 0 || connection.isTemp){\n // storeToDatabase(\"connection\",connection);\n // }\n // this.connectionArray.push(connection);\n // if(!connection.isTemp){\n //UpdateToDatabase(\"connection\", connection);\n try {\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.addConnection(connection);\n }\n catch (error) {\n console.log(\"this is the error in making the connection\");\n throw error;\n }\n }\n static AddConnectionToMemory(connection) {\n if (!connection.isTemp) {\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.addConnection(connection);\n }\n }\n static AddToDictionary(connection) {\n this.connectionDictionary[connection.id] = connection;\n }\n static RemoveConnection(connection) {\n // for(var i=0; i<this.connectionArray.length; i++){\n // if(this.connectionArray[i].id == connection.id){\n // this.connectionArray.splice(i, 1);\n // }\n // }\n if (connection.id != 0) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__.removeFromDatabase)(\"connection\", connection.id);\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.removeNodeFromTree(connection.id);\n // ConnectionTypeTree.removeTypeConcept(connection.typeId, connection.id);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.removeNodeFromTree(connection.id);\n }\n }\n static GetConnectionTypeOfTree() {\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.node;\n }\n static GetConnectionByOfTheConceptAndType(ofTheConceptId, typeId) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionByOfTheConceptAndType\", { ofTheConceptId, typeId });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionByOfTheConceptAndType sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let connections = _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);\n if (connections) {\n return connections;\n }\n return [];\n }\n catch (error) {\n console.log(\"this is the error in GetConnectionByOfTheConceptAndType\", error);\n return [];\n }\n });\n }\n static GetConnectionByOfType(ofTheConceptId, typeId) {\n let connections = _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);\n if (connections) {\n return connections;\n }\n return [];\n }\n static GetConnectionTree() {\n return _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.connectionroot;\n }\n static GetConnectionTypeTree() {\n return _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.connectionTypeRoot;\n }\n static GetConnectionBulkData(ids, connectionArray, remainingIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getConnectionListFromIds(ids, connectionArray, remainingIds);\n });\n }\n static GetConnection(id) {\n return __awaiter(this, void 0, void 0, function* () {\n // Increment Connection\n _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.incrementConnection(id);\n // var myConcept: Connection|null;\n // myConcept = null;\n // for(var i=0; i<this.connectionArray.length; i++){\n // if(this.connectionArray[i].id == id){\n // myConcept = this.connectionArray[i];\n // }\n // }\n // return myConcept;\n let myConnection = new _Connection__WEBPACK_IMPORTED_MODULE_3__.Connection(0, 0, 0, 0, 0, 0, 0);\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('ConnectionData__GetConnection', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetConnection sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let node = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(id);\n if (node === null || node === void 0 ? void 0 : node.value) {\n let returnedConcept = node.value;\n if (returnedConcept) {\n myConnection = returnedConcept;\n //if(myConnection.count > IndexDbUpdate.MIN_USE_FOR_INDEX_DB){\n // IndexDbUpdate.UpdateConnectionIndexDb(myConnection);\n //}\n }\n }\n // if(myConcept.id == 0 || myConcept == null){\n // for(var i=0; i<this.conceptsArray.length; i++){\n // if(this.conceptsArray[i].id == id){\n // myConcept = this.conceptsArray[i];\n // }\n // }\n // }\n return myConnection;\n }\n catch (error) {\n console.log(\"this is the error in GetConnection\", error);\n return myConnection;\n }\n });\n }\n // commented\n static GetConnectionsOfCompositionLocal(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let connections = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionsOfCompositionLocal\", { id });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionsOfCompositionLocal sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let connectionIds = [];\n connectionIds = ConnectionData.GetConnectionByOfType(id, id);\n for (let i = 0; i < connectionIds.length; i++) {\n let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);\n if (conn) {\n connections.push(conn.value);\n }\n }\n }\n catch (error) {\n console.log(\"this is the error GetConnectionsOfCompositionLocal\", id, connections);\n }\n return connections;\n //let node = await ConnectionTypeTree.getNodeFromTree(id);\n // if(node?.value){\n // let returnedConnection = node.value;\n // if(returnedConnection){\n // let myConnection = returnedConnection as Connection;\n // connections.push(myConnection);\n // for(let i=0; i<node.variants.length;i++){\n // connections.push(node.variants[i].value);\n // }\n // }\n // }\n //return connections;\n });\n }\n static GetConnectionsOfConcept(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let connectionIds = [];\n let connections = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionsOfConcept\", { id });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionsOfConcept sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n connectionIds = yield ConnectionData.GetConnectionByOfTheConceptAndType(id, id);\n for (let i = 0; i < connectionIds.length; i++) {\n let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);\n if (conn) {\n connections.push(conn.value);\n }\n }\n return connections;\n }\n catch (error) {\n console.log(\"this is the error in GetConnectionsOfConcept\", error);\n return connections;\n }\n });\n }\n getName() {\n return this.name;\n }\n}\nConnectionData.connectionArray = [];\nConnectionData.connectionDictionary = [];\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/DataStructures/ConnectionData.ts?");
|
|
677
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ConnectionData: () => (/* binding */ ConnectionData)\n/* harmony export */ });\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Database/indexeddb */ \"./src/Database/indexeddb.ts\");\n/* harmony import */ var _Connection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionBinaryTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionBinaryTree.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionOfTheTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionOfTheTree.ts\");\n/* harmony import */ var _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ConnectionBinaryTree/ConnectionTypeTree */ \"./src/DataStructures/ConnectionBinaryTree/ConnectionTypeTree.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\nclass ConnectionData {\n constructor() {\n this.name = \"Connection Array\";\n }\n static CheckContains(connection) {\n let contains = false;\n for (let i = 0; i < this.connectionArray.length; i++) {\n if (this.connectionArray[i].id == connection.id) {\n contains = true;\n }\n }\n return contains;\n }\n static AddConnectionToStorage(connection) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__.UpdateToDatabase)(\"connection\", connection);\n }\n static AddConnection(connection) {\n // var contains = this.CheckContains(connection);\n // if(contains){\n // this.RemoveConnection(connection);\n // }\n // if(connection.id != 0 || connection.isTemp){\n // storeToDatabase(\"connection\",connection);\n // }\n // this.connectionArray.push(connection);\n // if(!connection.isTemp){\n //UpdateToDatabase(\"connection\", connection);\n try {\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.addConnection(connection);\n }\n catch (error) {\n console.log(\"this is the error in making the connection\");\n throw error;\n }\n }\n static AddConnectionToMemory(connection) {\n if (!connection.isTemp) {\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.addConnectionToTree(connection);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.addConnection(connection);\n }\n }\n static AddToDictionary(connection) {\n this.connectionDictionary[connection.id] = connection;\n }\n static RemoveConnection(connection) {\n // for(var i=0; i<this.connectionArray.length; i++){\n // if(this.connectionArray[i].id == connection.id){\n // this.connectionArray.splice(i, 1);\n // }\n // }\n if (connection.id != 0) {\n (0,_Database_indexeddb__WEBPACK_IMPORTED_MODULE_2__.removeFromDatabase)(\"connection\", connection.id);\n _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.removeNodeFromTree(connection.id);\n // ConnectionTypeTree.removeTypeConcept(connection.typeId, connection.id);\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.removeNodeFromTree(connection.id);\n }\n }\n static GetConnectionTypeOfTree() {\n _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.node;\n }\n static GetConnectionByOfTheConceptAndType(ofTheConceptId, typeId) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionByOfTheConceptAndType\", { ofTheConceptId, typeId });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionByOfTheConceptAndType sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let connections = _ConnectionBinaryTree_ConnectionOfTheTree__WEBPACK_IMPORTED_MODULE_5__.ConnectionOfTheTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);\n if (connections) {\n return connections;\n }\n return [];\n }\n catch (error) {\n console.log(\"this is the error in GetConnectionByOfTheConceptAndType\", error);\n return [];\n }\n });\n }\n static GetConnectionByOfType(ofTheConceptId, typeId) {\n _app__WEBPACK_IMPORTED_MODULE_1__.Logger.logfunction(ConnectionData.GetConnectionByOfType, arguments);\n let connections = _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.GetConnectionByOfTheConceptAndTypeId(ofTheConceptId, typeId);\n if (connections) {\n return connections;\n }\n return [];\n }\n static GetConnectionTree() {\n return _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.connectionroot;\n }\n static GetConnectionTypeTree() {\n return _ConnectionBinaryTree_ConnectionTypeTree__WEBPACK_IMPORTED_MODULE_6__.ConnectionTypeTree.connectionTypeRoot;\n }\n static GetConnectionBulkData(ids, connectionArray, remainingIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getConnectionListFromIds(ids, connectionArray, remainingIds);\n });\n }\n static GetConnection(id) {\n return __awaiter(this, void 0, void 0, function* () {\n // Increment Connection\n _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.incrementConnection(id);\n // var myConcept: Connection|null;\n // myConcept = null;\n // for(var i=0; i<this.connectionArray.length; i++){\n // if(this.connectionArray[i].id == id){\n // myConcept = this.connectionArray[i];\n // }\n // }\n // return myConcept;\n let myConnection = new _Connection__WEBPACK_IMPORTED_MODULE_3__.Connection(0, 0, 0, 0, 0, 0, 0);\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('ConnectionData__GetConnection', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetConnection sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let node = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(id);\n if (node === null || node === void 0 ? void 0 : node.value) {\n let returnedConcept = node.value;\n if (returnedConcept) {\n myConnection = returnedConcept;\n //if(myConnection.count > IndexDbUpdate.MIN_USE_FOR_INDEX_DB){\n // IndexDbUpdate.UpdateConnectionIndexDb(myConnection);\n //}\n }\n }\n // if(myConcept.id == 0 || myConcept == null){\n // for(var i=0; i<this.conceptsArray.length; i++){\n // if(this.conceptsArray[i].id == id){\n // myConcept = this.conceptsArray[i];\n // }\n // }\n // }\n return myConnection;\n }\n catch (error) {\n console.log(\"this is the error in GetConnection\", error);\n return myConnection;\n }\n });\n }\n // commented\n static GetConnectionsOfCompositionLocal(id) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_1__.Logger.logfunction(ConnectionData.GetConnectionsOfCompositionLocal, arguments_1);\n let connections = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionsOfCompositionLocal\", { id });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionsOfCompositionLocal sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let connectionIds = [];\n connectionIds = ConnectionData.GetConnectionByOfType(id, id);\n for (let i = 0; i < connectionIds.length; i++) {\n let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);\n if (conn) {\n connections.push(conn.value);\n }\n }\n }\n catch (error) {\n console.log(\"this is the error GetConnectionsOfCompositionLocal\", id, connections);\n }\n return connections;\n //let node = await ConnectionTypeTree.getNodeFromTree(id);\n // if(node?.value){\n // let returnedConnection = node.value;\n // if(returnedConnection){\n // let myConnection = returnedConnection as Connection;\n // connections.push(myConnection);\n // for(let i=0; i<node.variants.length;i++){\n // connections.push(node.variants[i].value);\n // }\n // }\n // }\n //return connections;\n });\n }\n static GetConnectionsOfConcept(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let connectionIds = [];\n let connections = [];\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)(\"ConnectionData__GetConnectionsOfConcept\", { id });\n return res.data;\n }\n catch (error) {\n console.error(\"GetConnectionsOfConcept sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n connectionIds = yield ConnectionData.GetConnectionByOfTheConceptAndType(id, id);\n for (let i = 0; i < connectionIds.length; i++) {\n let conn = yield _ConnectionBinaryTree_ConnectionBinaryTree__WEBPACK_IMPORTED_MODULE_4__.ConnectionBinaryTree.getNodeFromTree(connectionIds[i]);\n if (conn) {\n connections.push(conn.value);\n }\n }\n return connections;\n }\n catch (error) {\n console.log(\"this is the error in GetConnectionsOfConcept\", error);\n return connections;\n }\n });\n }\n getName() {\n return this.name;\n }\n}\nConnectionData.connectionArray = [];\nConnectionData.connectionDictionary = [];\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/DataStructures/ConnectionData.ts?");
|
|
678
678
|
|
|
679
679
|
/***/ }),
|
|
680
680
|
|
|
@@ -1084,7 +1084,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1084
1084
|
\******************************************/
|
|
1085
1085
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1086
1086
|
|
|
1087
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Logger: () => (/* binding */ Logger),\n/* harmony export */ getCookie: () => (/* binding */ getCookie)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\n\n\nclass Logger {\n /**\n * Automatically starts the auto-sync mechanism.\n * This is private and does not need external interaction.\n */\n static startAutoSync() {\n if (this.autoSyncInterval) {\n console.warn(\"Auto-sync is already running.\");\n return;\n }\n this.nextSyncTime = Date.now() + this.SYNC_INTERVAL_MS;\n setInterval(() => {\n const currentTime = Date.now();\n // console.log(\"Current Time : \",currentTime);\n if (this.nextSyncTime && currentTime >= this.nextSyncTime) {\n // console.log(\"Time to sync log.\")\n this.nextSyncTime = currentTime + this.SYNC_INTERVAL_MS;\n this.sendPackageLogsToServer();\n this.sendApplicationLogsToServer();\n }\n }, 60000); // Check every minute\n }\n /**\n * Automatically stops the auto-sync mechanism when required.\n */\n static stopAutoSync() {\n if (this.autoSyncInterval !== null) {\n clearInterval(this.autoSyncInterval);\n this.autoSyncInterval = null;\n this.nextSyncTime = null;\n }\n }\n /**\n * Set the log level (e.g., \"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\").\n */\n static setLogLevel(level) {\n this.logLevel = level;\n }\n /**\n * Determines whether the current log level permits the given level to be logged.\n */\n static shouldLog(level) {\n return this.LOG_LEVELS.indexOf(level) >= this.LOG_LEVELS.indexOf(this.logLevel);\n }\n /**\n * Logs a message with optional additional structured data.\n */\n static formatLogData(level, message, data) {\n if (!this.shouldLog(level))\n return;\n const logEntry = Object.assign({ timestamp: new Date().toLocaleString(), level,\n message }, data);\n this.packageLogsData.push(logEntry);\n // this.saveLogToLocalStorage(this.mftsccsBrowser, logEntry)\n // console.log(\"Package Log Updated : \", this.log);\n }\n static log(level, message, data) {\n if (!this.logPackageActivationStatus)\n return;\n try {\n this.formatLogData(level, message, data || null);\n }\n catch (error) {\n console.error(\"Error on Logger Log : \", error);\n }\n }\n static logInfo(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.log(\"INFO\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logInfo\");\n }\n }\n static logError(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"ERROR\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logError\");\n }\n }\n static logWarning(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"WARNING\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logWarning\");\n }\n }\n static logDebug(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"DEBUG\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logDebug\");\n }\n }\n // Log Application Activity\n static logApplication(type, message, data) {\n console.log(\"LogApplicationActivationStatus : \", this.logApplicationActivationStatus);\n if (!this.logApplicationActivationStatus)\n return;\n try {\n const timestamp = new Date().toLocaleString();\n const logEntry = {\n timestamp: timestamp,\n type: type,\n message: message,\n data: data || null,\n };\n this.applicationLogsData.push(logEntry);\n // this.saveLogToLocalStorage(this.appLogs, logEntry)\n // console.log(\"Application Log Updated : \", this.applicationLogsData);\n }\n catch (error) {\n console.error(\"Failed to log application activity:\", error);\n }\n }\n /**\n * Helper method to send logs to the server.\n */\n static sendApplicationLogsToServer() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n console.log(\"Log from sendApplicationLogsToServer : \", this.applicationLogsData);\n if (this.applicationLogsData.length === 0) {\n return;\n }\n const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;\n if (!accessToken)\n return;\n const storedLogs = this.applicationLogsData;\n const chunkSize = 50;\n for (let i = 0; i < storedLogs.length; i += chunkSize) {\n const chunk = storedLogs.slice(i, i + chunkSize);\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${accessToken}`\n },\n body: JSON.stringify({\n logType: this.appLogs,\n logData: chunk\n })\n });\n if (!response.ok) {\n const responseBody = yield response.text();\n console.error(\"Failed to send app-logs:-\", response.status, response.statusText, responseBody);\n }\n }\n // clear application log from memory\n this.applicationLogsData = [];\n }\n catch (error) {\n console.error(\"Network error while sending logs:\", error);\n }\n });\n }\n static sendPackageLogsToServer() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n console.log(\"Log from sendPackageLogsToServer : \", this.packageLogsData);\n if (this.packageLogsData.length === 0)\n return;\n const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;\n if (!accessToken)\n return;\n const storedLogs = this.packageLogsData;\n const chunkSize = 50;\n for (let i = 0; i < storedLogs.length; i += chunkSize) {\n const chunk = storedLogs.slice(i, i + chunkSize);\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${accessToken}`\n },\n body: JSON.stringify({\n logType: this.mftsccsBrowser,\n logData: chunk\n }),\n });\n if (!response.ok) {\n const responseBody = yield response.text();\n console.error(\"Failed to send logs:-\", response.status, response.statusText, responseBody);\n return;\n }\n }\n // clear mftsccs log from memory\n this.packageLogsData = [];\n }\n catch (error) {\n console.error(\"Error while sending logs to server:\", error);\n }\n });\n }\n /**\n * Helper method to save logs to localStorage.\n */\n static saveLogToLocalStorage(logType, logMessage) {\n try {\n if (typeof localStorage === undefined) {\n console.warn(\"Local Storage type undefined\");\n return;\n }\n else {\n const logs = JSON.parse((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(logType)) || \"[]\");\n logs.push(logMessage);\n localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem(logType, JSON.stringify(logs));\n }\n }\n catch (error) {\n console.error(\"Error on saving log in localstorage\");\n this.log(\"ERROR\", \"Error while saving log in local storage\");\n }\n }\n static clearLogsFromLocalStorage(logType) {\n if (typeof localStorage === undefined) {\n console.warn('localStorage is not available');\n return;\n }\n else {\n localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem(logType);\n // console.log('Logs removed from localStorage');\n }\n }\n}\n_a = Logger;\nLogger.logLevel = \"INFO\";\nLogger.packageLogsData = [];\nLogger.applicationLogsData = [];\nLogger.LOG_LEVELS = [\"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\"];\nLogger.SYNC_INTERVAL_MS = 120 * 1000; // 120 Sec\nLogger.nextSyncTime = null;\nLogger.appLogs = \"app\";\nLogger.mftsccsBrowser = \"mftsccs\";\nLogger.logApplicationActivationStatus = false;\nLogger.logPackageActivationStatus = false;\n// Private auto-sync interval management\nLogger.autoSyncInterval = null;\n// Ensure logs are managed automatically\n(() => {\n _a.startAutoSync();\n})();\n/**\n *\n * @param cname The name of the cookie\n * @returns Cookie value\n */\nfunction getCookie(cname) {\n try {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }\n catch (error) {\n console.error(\"Error on getcookie\");\n return \"\";\n }\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Middleware/logger.service.ts?");
|
|
1087
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Logger: () => (/* binding */ Logger),\n/* harmony export */ getCookie: () => (/* binding */ getCookie)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar _a;\n\n\nclass Logger {\n /**\n * Automatically starts the auto-sync mechanism.\n * This is private and does not need external interaction.\n */\n static startAutoSync() {\n if (this.autoSyncInterval) {\n console.warn(\"Auto-sync is already running.\");\n return;\n }\n this.nextSyncTime = Date.now() + this.SYNC_INTERVAL_MS;\n setInterval(() => {\n const currentTime = Date.now();\n // console.log(\"Current Time : \",currentTime);\n if (this.nextSyncTime && currentTime >= this.nextSyncTime) {\n // console.log(\"Time to sync log.\")\n this.nextSyncTime = currentTime + this.SYNC_INTERVAL_MS;\n this.sendPackageLogsToServer();\n this.sendApplicationLogsToServer();\n }\n }, 60000); // Check every minute\n }\n /**\n * Automatically stops the auto-sync mechanism when required.\n */\n static stopAutoSync() {\n if (this.autoSyncInterval !== null) {\n clearInterval(this.autoSyncInterval);\n this.autoSyncInterval = null;\n this.nextSyncTime = null;\n }\n }\n /**\n * Set the log level (e.g., \"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\").\n */\n static setLogLevel(level) {\n this.logLevel = level;\n }\n /**\n * Determines whether the current log level permits the given level to be logged.\n */\n static shouldLog(level) {\n return this.LOG_LEVELS.indexOf(level) >= this.LOG_LEVELS.indexOf(this.logLevel);\n }\n /**\n * Logs a message with optional additional structured data.\n */\n static formatLogData(level, message, data) {\n if (!this.shouldLog(level))\n return;\n const logEntry = Object.assign({ timestamp: new Date().toLocaleString(), level,\n message }, data);\n this.packageLogsData.push(logEntry);\n // this.saveLogToLocalStorage(this.mftsccsBrowser, logEntry)\n console.log(\"Package Log Updated : \", this.packageLogsData);\n }\n static log(level, message, data) {\n if (!this.logPackageActivationStatus)\n return;\n try {\n this.formatLogData(level, message, data || null);\n }\n catch (error) {\n console.error(\"Error on Logger Log : \", error);\n }\n }\n static logfunction(myfunction, ...args) {\n // if(this.logPackageActivationStatus){\n let myarguments = args;\n //let size = Object.values(myarguments[0]).length;\n console.log(\"info\", myfunction.name, myarguments, myarguments[0].length);\n let logData = {\n functionName: myfunction.name,\n functionParameters: myarguments\n };\n this.formatLogData('INFO', \"function called\", logData);\n // }\n }\n static logInfo(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.log(\"INFO\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logInfo\");\n }\n }\n static logError(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"ERROR\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logError\");\n }\n }\n static logWarning(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"WARNING\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logWarning\");\n }\n }\n static logDebug(startTime, userId, operationType, requestFrom, requestIP, responseStatus, responseData, functionName, functionParameters, userAgent, conceptsUsed) {\n try {\n const sessionId = getCookie(\"SessionId\");\n const responseTime = `${(performance.now() - startTime).toFixed(3)}ms`;\n const responseSize = responseData ? `${JSON.stringify(responseData).length}` : \"0\";\n const logData = {\n userId,\n operationType,\n requestFrom,\n requestIP,\n responseStatus,\n responseTime,\n responseSize,\n sessionId: sessionId === null || sessionId === void 0 ? void 0 : sessionId.toString(),\n functionName,\n functionParameters,\n userAgent,\n conceptsUsed,\n };\n this.formatLogData(\"DEBUG\", `Information logged for ${functionName}`, logData);\n }\n catch (error) {\n console.error(\"Error on logDebug\");\n }\n }\n // Log Application Activity\n static logApplication(type, message, data) {\n console.log(\"LogApplicationActivationStatus : \", this.logApplicationActivationStatus);\n if (!this.logApplicationActivationStatus)\n return;\n try {\n const timestamp = new Date().toLocaleString();\n const logEntry = {\n timestamp: timestamp,\n type: type,\n message: message,\n data: data || null,\n };\n this.applicationLogsData.push(logEntry);\n // this.saveLogToLocalStorage(this.appLogs, logEntry)\n // console.log(\"Application Log Updated : \", this.applicationLogsData);\n }\n catch (error) {\n console.error(\"Failed to log application activity:\", error);\n }\n }\n /**\n * Helper method to send logs to the server.\n */\n static sendApplicationLogsToServer() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n console.log(\"Log from sendApplicationLogsToServer : \", this.applicationLogsData);\n if (this.applicationLogsData.length === 0) {\n return;\n }\n const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;\n if (!accessToken)\n return;\n const storedLogs = this.applicationLogsData;\n const chunkSize = 50;\n for (let i = 0; i < storedLogs.length; i += chunkSize) {\n const chunk = storedLogs.slice(i, i + chunkSize);\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${accessToken}`\n },\n body: JSON.stringify({\n logType: this.appLogs,\n logData: chunk\n })\n });\n if (!response.ok) {\n const responseBody = yield response.text();\n console.error(\"Failed to send app-logs:-\", response.status, response.statusText, responseBody);\n }\n }\n // clear application log from memory\n this.applicationLogsData = [];\n }\n catch (error) {\n console.error(\"Network error while sending logs:\", error);\n }\n });\n }\n static sendPackageLogsToServer() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n console.log(\"Log from sendPackageLogsToServer : \", this.packageLogsData);\n if (this.packageLogsData.length === 0)\n return;\n const accessToken = _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_1__.TokenStorage.BearerAccessToken;\n if (!accessToken)\n return;\n const storedLogs = this.packageLogsData;\n const chunkSize = 50;\n for (let i = 0; i < storedLogs.length; i += chunkSize) {\n const chunk = storedLogs.slice(i, i + chunkSize);\n const response = yield fetch(_app__WEBPACK_IMPORTED_MODULE_0__.BaseUrl.PostLogger(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${accessToken}`\n },\n body: JSON.stringify({\n logType: this.mftsccsBrowser,\n logData: chunk\n }),\n });\n if (!response.ok) {\n const responseBody = yield response.text();\n console.error(\"Failed to send logs:-\", response.status, response.statusText, responseBody);\n return;\n }\n }\n // clear mftsccs log from memory\n this.packageLogsData = [];\n }\n catch (error) {\n console.error(\"Error while sending logs to server:\", error);\n }\n });\n }\n /**\n * Helper method to save logs to localStorage.\n */\n static saveLogToLocalStorage(logType, logMessage) {\n try {\n if (typeof localStorage === undefined) {\n console.warn(\"Local Storage type undefined\");\n return;\n }\n else {\n const logs = JSON.parse((localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(logType)) || \"[]\");\n logs.push(logMessage);\n localStorage === null || localStorage === void 0 ? void 0 : localStorage.setItem(logType, JSON.stringify(logs));\n }\n }\n catch (error) {\n console.error(\"Error on saving log in localstorage\");\n this.log(\"ERROR\", \"Error while saving log in local storage\");\n }\n }\n static clearLogsFromLocalStorage(logType) {\n if (typeof localStorage === undefined) {\n console.warn('localStorage is not available');\n return;\n }\n else {\n localStorage === null || localStorage === void 0 ? void 0 : localStorage.removeItem(logType);\n // console.log('Logs removed from localStorage');\n }\n }\n}\n_a = Logger;\nLogger.logLevel = \"INFO\";\nLogger.packageLogsData = [];\nLogger.applicationLogsData = [];\nLogger.LOG_LEVELS = [\"DEBUG\", \"INFO\", \"WARNING\", \"ERROR\"];\nLogger.SYNC_INTERVAL_MS = 120 * 1000; // 120 Sec\nLogger.nextSyncTime = null;\nLogger.appLogs = \"app\";\nLogger.mftsccsBrowser = \"mftsccs\";\nLogger.logApplicationActivationStatus = false;\nLogger.logPackageActivationStatus = false;\n// Private auto-sync interval management\nLogger.autoSyncInterval = null;\n// Ensure logs are managed automatically\n(() => {\n _a.startAutoSync();\n})();\n/**\n *\n * @param cname The name of the cookie\n * @returns Cookie value\n */\nfunction getCookie(cname) {\n try {\n let name = cname + \"=\";\n let decodedCookie = decodeURIComponent(document.cookie);\n let ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }\n catch (error) {\n console.error(\"Error on getcookie\");\n return \"\";\n }\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Middleware/logger.service.ts?");
|
|
1088
1088
|
|
|
1089
1089
|
/***/ }),
|
|
1090
1090
|
|
|
@@ -1104,7 +1104,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1104
1104
|
\************************************************/
|
|
1105
1105
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1106
1106
|
|
|
1107
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DecodeCountInfo: () => (/* binding */ DecodeCountInfo),\n/* harmony export */ GetConnectionTypeForCount: () => (/* binding */ GetConnectionTypeForCount)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var
|
|
1107
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DecodeCountInfo: () => (/* binding */ DecodeCountInfo),\n/* harmony export */ GetConnectionTypeForCount: () => (/* binding */ GetConnectionTypeForCount)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_Count_CountInfo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataStructures/Count/CountInfo */ \"./src/DataStructures/Count/CountInfo.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\nfunction DecodeCountInfo(countStrings = []) {\n let countInfos = [];\n if (countStrings.length > 0) {\n for (let i = 0; i < countStrings.length; i++) {\n let countInfo = separateString(countStrings[i]);\n countInfos.push(countInfo);\n }\n }\n return countInfos;\n}\nfunction GetConnectionTypeForCount(countInfos) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_1__.Logger.logfunction(GetConnectionTypeForCount, arguments_1);\n let CountDictionary = {};\n for (let i = 0; i < countInfos.length; i++) {\n let concept = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(countInfos[i].connectionTypeId);\n countInfos[i].connectionType = concept.characterValue;\n CountDictionary[countInfos[i].conceptId] = countInfos[i];\n }\n return CountDictionary;\n });\n}\nfunction separateString(input) {\n // Split the string by the underscore\n const parts = input.split('_');\n // Check if the input has exactly three parts\n if (parts.length === 3) {\n let countInfo = new _DataStructures_Count_CountInfo__WEBPACK_IMPORTED_MODULE_2__.CountInfo();\n countInfo.conceptId = Number(parts[0]);\n countInfo.connectionTypeId = Number(parts[1]);\n countInfo.count = Number(parts[2]);\n return countInfo;\n }\n else {\n throw new Error('Input string must contain exactly three parts separated by underscores.');\n }\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Common/DecodeCountInfo.ts?");
|
|
1108
1108
|
|
|
1109
1109
|
/***/ }),
|
|
1110
1110
|
|
|
@@ -1294,7 +1294,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1294
1294
|
\************************************************/
|
|
1295
1295
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1296
1296
|
|
|
1297
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DeleteConnectionByType: () => (/* binding */ DeleteConnectionByType),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* binding */ GetAllTheConnectionsByTypeAndOfTheConcept)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsFromTheConcept */ \"./src/Api/GetAllLinkerConnectionsFromTheConcept.ts\");\n/* harmony import */ var _Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsToTheConcept */ \"./src/Api/GetAllLinkerConnectionsToTheConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n/**\n *\n * @param id\n * @param linker\n * @returns\n */\nfunction DeleteConnectionByType(id, linker) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('DeleteConnectionByType', { id, linker });\n return res.data;\n }\n catch (error) {\n console.error('DeleteConnectionByType sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);\n for (let i = 0; i < externalConnections.length; i++) {\n _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);\n }\n let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);\n let toDelete = [];\n for (let i = 0; i < connections.length; i++) {\n if (connections[i].typeId == concept.id) {\n toDelete.push(connections[i]);\n }\n }\n for (let i = 0; i < toDelete.length; i++) {\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.DeleteConnectionById)(toDelete[i].id);\n }\n });\n}\n/**\n * This function returns all the connections from the ofTheConceptId and connection type\n * @param id ofTheConceptId\n * @param linker the connection type\n * @returns Array of connections\n */\nfunction GetAllTheConnectionsByTypeAndOfTheConcept(id_1, linker_1) {\n return __awaiter(this, arguments, void 0, function* (id, linker, reverse = false) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetAllTheConnectionsByTypeAndOfTheConcept', { id, linker, reverse });\n return res.data;\n }\n catch (error) {\n console.error('GetAllTheConnectionsByTypeAndOfTheConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let toDelete = [];\n if (reverse) {\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__.GetAllLinkerConnectionsToTheConcept)(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.MakeTheTypeConceptApi)(linker, 999);\n for (let i = 0; i < externalConnections.length; i++) {\n if (externalConnections[i].typeId == concept.id) {\n toDelete.push(externalConnections[i]);\n }\n }\n }\n else {\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);\n for (let i = 0; i < externalConnections.length; i++) {\n _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);\n }\n let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);\n for (let i = 0; i < connections.length; i++) {\n if (connections[i].typeId == concept.id) {\n toDelete.push(connections[i]);\n }\n }\n }\n return toDelete;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/DeleteConnectionByType.ts?");
|
|
1297
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DeleteConnectionByType: () => (/* binding */ DeleteConnectionByType),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* binding */ GetAllTheConnectionsByTypeAndOfTheConcept)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsFromTheConcept */ \"./src/Api/GetAllLinkerConnectionsFromTheConcept.ts\");\n/* harmony import */ var _Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllLinkerConnectionsToTheConcept */ \"./src/Api/GetAllLinkerConnectionsToTheConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n/**\n *\n * @param id\n * @param linker\n * @returns\n */\nfunction DeleteConnectionByType(id, linker) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(DeleteConnectionByType, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('DeleteConnectionByType', { id, linker });\n return res.data;\n }\n catch (error) {\n console.error('DeleteConnectionByType sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);\n for (let i = 0; i < externalConnections.length; i++) {\n _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);\n }\n let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);\n let toDelete = [];\n for (let i = 0; i < connections.length; i++) {\n if (connections[i].typeId == concept.id) {\n toDelete.push(connections[i]);\n }\n }\n for (let i = 0; i < toDelete.length; i++) {\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.DeleteConnectionById)(toDelete[i].id);\n }\n });\n}\n/**\n * This function returns all the connections from the ofTheConceptId and connection type\n * @param id ofTheConceptId\n * @param linker the connection type\n * @returns Array of connections\n */\nfunction GetAllTheConnectionsByTypeAndOfTheConcept(id_1, linker_1) {\n return __awaiter(this, arguments, void 0, function* (id, linker, reverse = false) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetAllTheConnectionsByTypeAndOfTheConcept', { id, linker, reverse });\n return res.data;\n }\n catch (error) {\n console.error('GetAllTheConnectionsByTypeAndOfTheConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let toDelete = [];\n if (reverse) {\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsToTheConcept__WEBPACK_IMPORTED_MODULE_1__.GetAllLinkerConnectionsToTheConcept)(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.MakeTheTypeConceptApi)(linker, 999);\n for (let i = 0; i < externalConnections.length; i++) {\n if (externalConnections[i].typeId == concept.id) {\n toDelete.push(externalConnections[i]);\n }\n }\n }\n else {\n let externalConnections = yield (0,_Api_GetAllLinkerConnectionsFromTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetAllLinkerConnectionsFromTheConcept)(id);\n for (let i = 0; i < externalConnections.length; i++) {\n _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.AddConnection(externalConnections[i]);\n }\n let connections = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnectionsOfConcept(id);\n let concept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptByCharacter)(linker);\n for (let i = 0; i < connections.length; i++) {\n if (connections[i].typeId == concept.id) {\n toDelete.push(connections[i]);\n }\n }\n }\n return toDelete;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/DeleteConnectionByType.ts?");
|
|
1298
1298
|
|
|
1299
1299
|
/***/ }),
|
|
1300
1300
|
|
|
@@ -1324,7 +1324,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1324
1324
|
\****************************************/
|
|
1325
1325
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1326
1326
|
|
|
1327
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetComposition: () => (/* binding */ GetComposition),\n/* harmony export */ GetCompositionById: () => (/* binding */ GetCompositionById),\n/* harmony export */ GetCompositionFromMemory: () => (/* binding */ GetCompositionFromMemory),\n/* harmony export */ GetCompositionFromMemoryNormal: () => (/* binding */ GetCompositionFromMemoryNormal),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* binding */ GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionWithAllIds: () => (/* binding */ GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithId: () => (/* binding */ GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* binding */ GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetCompositionWithIdFromMemory: () => (/* binding */ GetCompositionWithIdFromMemory),\n/* harmony export */ GetCompositionWithIdFromMemoryFromConnection: () => (/* binding */ GetCompositionWithIdFromMemoryFromConnection),\n/* harmony export */ GetCompositionWithIdFromMemoryFromConnections: () => (/* binding */ GetCompositionWithIdFromMemoryFromConnections),\n/* harmony export */ GetCompositionWithIdFromMemoryNew: () => (/* binding */ GetCompositionWithIdFromMemoryNew),\n/* harmony export */ RecursiveFetchBuildLayer: () => (/* binding */ RecursiveFetchBuildLayer),\n/* harmony export */ RecursiveFetchBuildLayerDataId: () => (/* binding */ RecursiveFetchBuildLayerDataId),\n/* harmony export */ RecursiveFetchBuildLayerNormal: () => (/* binding */ RecursiveFetchBuildLayerNormal),\n/* harmony export */ recursiveFetch: () => (/* binding */ recursiveFetch),\n/* harmony export */ recursiveFetchConcept: () => (/* binding */ recursiveFetchConcept),\n/* harmony export */ recursiveFetchConceptNormal: () => (/* binding */ recursiveFetchConceptNormal),\n/* harmony export */ recursiveFetchConceptSingleLoop: () => (/* binding */ recursiveFetchConceptSingleLoop),\n/* harmony export */ recursiveFetchWithSubCompositions: () => (/* binding */ recursiveFetchWithSubCompositions)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetCompositionById(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let returnOutput = { connectionList: [], compositionList: [] };\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionById', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionById error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n returnOutput.connectionList = connectionListString;\n for (let i = 0; i < returnOutput.connectionList.length; i++) {\n if (!returnOutput.compositionList.includes(returnOutput.connectionList[i].ofTheConceptId)) {\n returnOutput.compositionList.push(returnOutput.connectionList[i].ofTheConceptId);\n }\n }\n return returnOutput;\n }\n catch (error) {\n console.error('GetCompositionById error: ', error);\n return returnOutput;\n }\n });\n}\n/**\n * ## format JUSTDATA ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayer(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ## format DATAID ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayerDataId(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ## format Normal ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayerNormal(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConceptNormal(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ## format JUSTDATA ##\n * this function builds the composition with the main id as the point of building.\n * This just requires the id\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction GetComposition(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetComposition', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetComposition error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n console.log(\"this is the connection list online\", connectionList);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\nfunction GetCompositionWithAllIds(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchWithSubCompositions(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format JUSTDATA ###\n * This function just builds data from the memory.\n * This is a function that takes on all the concepts and connections of the concept (as a composition ) and builds\n * it into a json data.\n * @param id this id is just used to get all the composition data from the concepts and connections in memory\n * @returns\n */\nfunction GetCompositionFromMemory(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format Normal ###\n * This function just builds data from the memory.\n * This is a function that takes on all the concepts and connections of the concept (as a composition ) and builds\n * it into a json data.\n * @param id this id is just used to get all the composition data from the concepts and connections in memory\n * @returns\n */\nfunction GetCompositionFromMemoryNormal(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryNormal', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemoryNormal error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConceptNormal(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdFromMemory(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let FinalReturn = {};\n let connectionList = [];\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n try {\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n }\n catch (error) {\n console.log(\"this is the exception in GetCompositionWithIdFromMemory\", id);\n }\n return FinalReturn;\n });\n}\n/**\n * ### Format Normal ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionFromMemoryWithConnections(id, connectionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryWithConnections', { id, connectionList });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemoryWithConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdFromMemoryFromConnection(id, connectionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n console.log(\"this is the output\", output, concept);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * ### experimental ####\n * This is the new format that needs to work with a single or max two loops\n * @param id the id whose composition needs to be created\n * @returns\n */\nfunction GetCompositionWithIdFromMemoryNew(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemoryNew', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemoryNew error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n console.log(\"this concept you cannot find \", id);\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let startTime = new Date().getTime();\n //console.log(\"this is the connection list which has to be looped\", connectionList);\n let output = yield recursiveFetchConceptSingleLoop(concept, connectionList, compositionList);\n console.log(\"this is the time for the data to be made\", new Date().getTime() - startTime);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE #####\n * ### This just returns composition from memory and not from anywhere else.\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdAndDateFromMemory(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdAndDateFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdAndDateFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n FinalReturn['created_at'] = concept.entryTimeStamp;\n return FinalReturn;\n });\n}\nfunction GetCompositionWithIdFromMemoryFromConnections(id_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList = []) {\n var _a, _b;\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * #### Format DATAID ####\n * ## This will return the composition even if it is not in the local memory ##\n * @param id\n * @returns\n */\nfunction GetCompositionWithId(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithId', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithId error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ## Format justdata ###\n * ## This contains a concept in the parameter so that you dont have to again find the concept ##\n * This function takes concepts and connections and then builds a json.\n * @param concept The concept that needs to get other concepts that are inside of it.\n * @param connectionList List of connections that are available in the composition. We have to loop over it.\n * @param compositionList Composition list is the list of concepts that have connections inside of them.\n * @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n * @returns\n */\nfunction recursiveFetchConcept(concept_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let output = {};\n let arroutput = [];\n let id = concept.id;\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n return output;\n });\n}\n/**\n* ## Format Normal ###\n* ## This contains a concept in the parameter so that you dont have to again find the concept ##\n* This function takes concepts and connections and then builds a json.\n* @param concept The concept that needs to get other concepts that are inside of it.\n* @param connectionList List of connections that are available in the composition. We have to loop over it.\n* @param compositionList Composition list is the list of concepts that have connections inside of them.\n* @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n* @returns\n*/\nfunction recursiveFetchConceptNormal(concept_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let startTime = new Date().getTime();\n let output = {};\n let arroutput = [];\n let id = concept.id;\n output[\"id\"] = id;\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n // console.log(\"second loop normal\", new Date().getTime() - startTime);\n return output;\n });\n}\n/**\n * ## experimental ##\n* This function takes concepts and connections and then builds a json.\n* @param concept The concept that needs to get other concepts that are inside of it.\n* @param connectionList List of connections that are available in the composition. We have to loop over it.\n* @param compositionList Composition list is the list of concepts that have connections inside of them.\n* @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n* @returns\n*/\nfunction recursiveFetchConceptSingleLoop(concept_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let output = {};\n let id = concept.id;\n let startTime = new Date().getTime();\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n let myString = mainString;\n let returnoutput = { [myString]: concept === null || concept === void 0 ? void 0 : concept.characterValue };\n return returnoutput;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n let newData = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetTheConcept)(connectionList[i].ofTheConceptId);\n let toConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetTheConcept)(connectionList[i].toTheConceptId);\n connectionList[i].ofConcept = newData;\n connectionList[i].toConcept = toConcept;\n let ofKey = newData.id;\n let toConceptKey = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let regex = \"the_\";\n let localmainString = toConceptKey;\n let localToKey = localmainString.replace(regex, \"\");\n if (output[ofKey] == undefined || output[ofKey] == null) {\n output[ofKey] = {};\n }\n output[ofKey][localToKey] = toConcept.characterValue;\n }\n }\n let finalOutput = {};\n for (let i = 0; i < connectionList.length; i++) {\n let ofConcept = connectionList[i].ofConcept;\n let toConcept = connectionList[i].toConcept;\n let ofConceptKey = (_f = (_e = ofConcept === null || ofConcept === void 0 ? void 0 : ofConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"\";\n let toConceptKey = (_h = (_g = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"\";\n let regex = \"the_\";\n let localmainString = toConceptKey;\n let localToKey = localmainString.replace(regex, \"\");\n if (finalOutput[ofConcept.id] == undefined || finalOutput[ofConcept.id] == null) {\n finalOutput[ofConcept.id] = {};\n }\n let internalOutput = finalOutput[ofConcept.id];\n if (internalOutput[ofConceptKey] == undefined || internalOutput[ofConceptKey] == null) {\n internalOutput[ofConceptKey] = {};\n }\n if (output[connectionList[i].ofTheConceptId] != undefined && output[connectionList[i].toTheConceptId] != undefined) {\n internalOutput[ofConceptKey][localToKey] = output[toConcept.id];\n }\n else {\n internalOutput[ofConceptKey][localToKey] = toConcept.characterValue;\n }\n }\n return finalOutput[concept.id];\n });\n}\n/**\n * ## Format justdata ##\n * @param id\n * @param connectionList\n * @param compositionList\n * @param visitedConcepts\n * @returns\n */\nfunction recursiveFetch(id_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let output = {};\n let arroutput = [];\n if (id == 0) {\n return null;\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if ((concept == null || concept.id == 0) && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n if (concept.id != 0) {\n if (concept.type == null) {\n let toConceptTypeId = concept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n concept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n concept.type = toConceptType;\n }\n }\n }\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n let insideTime = new Date().getTime();\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetch(toConceptId, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetch(toConceptId, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n return output;\n });\n}\nfunction recursiveFetchWithSubCompositions(id_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let output = {};\n let arroutput = [];\n if (id == 0) {\n return null;\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if ((concept == null || concept.id == 0) && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n if (concept.id != 0) {\n if (concept.type == null) {\n let toConceptTypeId = concept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n concept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n concept.type = toConceptType;\n }\n }\n }\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n output[\"id\"] = id;\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchWithSubCompositions(toConceptId, connectionList, compositionList);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchWithSubCompositions(toConceptId, connectionList, compositionList);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n }\n }\n return output;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetComposition.ts?");
|
|
1327
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetComposition: () => (/* binding */ GetComposition),\n/* harmony export */ GetCompositionById: () => (/* binding */ GetCompositionById),\n/* harmony export */ GetCompositionFromMemory: () => (/* binding */ GetCompositionFromMemory),\n/* harmony export */ GetCompositionFromMemoryNormal: () => (/* binding */ GetCompositionFromMemoryNormal),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* binding */ GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionWithAllIds: () => (/* binding */ GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithId: () => (/* binding */ GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* binding */ GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetCompositionWithIdFromMemory: () => (/* binding */ GetCompositionWithIdFromMemory),\n/* harmony export */ GetCompositionWithIdFromMemoryFromConnection: () => (/* binding */ GetCompositionWithIdFromMemoryFromConnection),\n/* harmony export */ GetCompositionWithIdFromMemoryFromConnections: () => (/* binding */ GetCompositionWithIdFromMemoryFromConnections),\n/* harmony export */ GetCompositionWithIdFromMemoryNew: () => (/* binding */ GetCompositionWithIdFromMemoryNew),\n/* harmony export */ RecursiveFetchBuildLayer: () => (/* binding */ RecursiveFetchBuildLayer),\n/* harmony export */ RecursiveFetchBuildLayerDataId: () => (/* binding */ RecursiveFetchBuildLayerDataId),\n/* harmony export */ RecursiveFetchBuildLayerNormal: () => (/* binding */ RecursiveFetchBuildLayerNormal),\n/* harmony export */ recursiveFetch: () => (/* binding */ recursiveFetch),\n/* harmony export */ recursiveFetchConcept: () => (/* binding */ recursiveFetchConcept),\n/* harmony export */ recursiveFetchConceptNormal: () => (/* binding */ recursiveFetchConceptNormal),\n/* harmony export */ recursiveFetchConceptSingleLoop: () => (/* binding */ recursiveFetchConceptSingleLoop),\n/* harmony export */ recursiveFetchWithSubCompositions: () => (/* binding */ recursiveFetchWithSubCompositions)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction GetCompositionById(id) {\n return __awaiter(this, void 0, void 0, function* () {\n let returnOutput = { connectionList: [], compositionList: [] };\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionById', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionById error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n returnOutput.connectionList = connectionListString;\n for (let i = 0; i < returnOutput.connectionList.length; i++) {\n if (!returnOutput.compositionList.includes(returnOutput.connectionList[i].ofTheConceptId)) {\n returnOutput.compositionList.push(returnOutput.connectionList[i].ofTheConceptId);\n }\n }\n return returnOutput;\n }\n catch (error) {\n console.error('GetCompositionById error: ', error);\n return returnOutput;\n }\n });\n}\n/**\n * ## format JUSTDATA ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayer(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ## format DATAID ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayerDataId(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ## format Normal ##\n * this function builds the composition with the main id as the point of building.\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction RecursiveFetchBuildLayerNormal(id, connectionList, compositionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let returnOutput = {};\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConceptNormal(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ## format JUSTDATA ##\n * this function builds the composition with the main id as the point of building.\n * This just requires the id\n * @param id id of the main composition that you want to build\n * @param connectionList list of connections\n * @param compositionList list of of_the_concept_ids for all the connections.\n * @returns\n */\nfunction GetComposition(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetComposition', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetComposition error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n console.log(\"this is the connection list online\", connectionList);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\nfunction GetCompositionWithAllIds(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchWithSubCompositions(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format JUSTDATA ###\n * This function just builds data from the memory.\n * This is a function that takes on all the concepts and connections of the concept (as a composition ) and builds\n * it into a json data.\n * @param id this id is just used to get all the composition data from the concepts and connections in memory\n * @returns\n */\nfunction GetCompositionFromMemory(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format Normal ###\n * This function just builds data from the memory.\n * This is a function that takes on all the concepts and connections of the concept (as a composition ) and builds\n * it into a json data.\n * @param id this id is just used to get all the composition data from the concepts and connections in memory\n * @returns\n */\nfunction GetCompositionFromMemoryNormal(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryNormal', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemoryNormal error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = ConnectionData.GetConnectionsOfComposition(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConceptNormal(concept, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n return returnOutput;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdFromMemory(id) {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetCompositionWithIdFromMemory, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let FinalReturn = {};\n let connectionList = [];\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n try {\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n }\n catch (error) {\n console.log(\"this is the exception in GetCompositionWithIdFromMemory\", id);\n }\n return FinalReturn;\n });\n}\n/**\n * ### Format Normal ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionFromMemoryWithConnections(id, connectionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionFromMemoryWithConnections', { id, connectionList });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromMemoryWithConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * Gets data just from memory\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdFromMemoryFromConnection(id, connectionList) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let returnOutput = {};\n // connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetchConcept(concept, connectionList, compositionList);\n console.log(\"this is the output\", output, concept);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE ####\n * ### experimental ####\n * This is the new format that needs to work with a single or max two loops\n * @param id the id whose composition needs to be created\n * @returns\n */\nfunction GetCompositionWithIdFromMemoryNew(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdFromMemoryNew', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdFromMemoryNew error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n console.log(\"this concept you cannot find \", id);\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let startTime = new Date().getTime();\n //console.log(\"this is the connection list which has to be looped\", connectionList);\n let output = yield recursiveFetchConceptSingleLoop(concept, connectionList, compositionList);\n console.log(\"this is the time for the data to be made\", new Date().getTime() - startTime);\n // let output = await recursiveFetchConceptSingleLoop(concept, connectionList,compositionList );\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput = output;\n let FinalReturn = {};\n FinalReturn['created_at'] = concept.entryTimeStamp;\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ### Format DATAIDDATE #####\n * ### This just returns composition from memory and not from anywhere else.\n * @param id\n * @returns\n */\nfunction GetCompositionWithIdAndDateFromMemory(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithIdAndDateFromMemory', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithIdAndDateFromMemory error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n connectionList = yield _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_3__.ConnectionData.GetConnectionsOfCompositionLocal(id);\n //connectionList = await ConnectionData.GetConnectionsOfConcept(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n FinalReturn['created_at'] = concept.entryTimeStamp;\n return FinalReturn;\n });\n}\nfunction GetCompositionWithIdFromMemoryFromConnections(id_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList = []) {\n var _a, _b;\n let returnOutput = {};\n //connectionList = await ConnectionData.GetConnectionsOfCompositionLocal(id);\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * #### Format DATAID ####\n * ## This will return the composition even if it is not in the local memory ##\n * @param id\n * @returns\n */\nfunction GetCompositionWithId(id) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionWithId', { id });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionWithId error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let connectionList = [];\n let returnOutput = {};\n let connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfComposition)(id);\n connectionList = connectionListString;\n let compositionList = [];\n for (let i = 0; i < connectionList.length; i++) {\n if (!compositionList.includes(connectionList[i].ofTheConceptId)) {\n compositionList.push(connectionList[i].ofTheConceptId);\n }\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if (concept.id == 0 && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n let output = yield recursiveFetch(id, connectionList, compositionList);\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n returnOutput[mainString] = output;\n let FinalReturn = {};\n FinalReturn['data'] = returnOutput;\n FinalReturn['id'] = id;\n return FinalReturn;\n });\n}\n/**\n * ## Format justdata ###\n * ## This contains a concept in the parameter so that you dont have to again find the concept ##\n * This function takes concepts and connections and then builds a json.\n * @param concept The concept that needs to get other concepts that are inside of it.\n * @param connectionList List of connections that are available in the composition. We have to loop over it.\n * @param compositionList Composition list is the list of concepts that have connections inside of them.\n * @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n * @returns\n */\nfunction recursiveFetchConcept(concept_1, connectionList_1, compositionList_1) {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(recursiveFetchConcept, arguments_2);\n let output = {};\n let arroutput = [];\n let id = concept.id;\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n return output;\n });\n}\n/**\n* ## Format Normal ###\n* ## This contains a concept in the parameter so that you dont have to again find the concept ##\n* This function takes concepts and connections and then builds a json.\n* @param concept The concept that needs to get other concepts that are inside of it.\n* @param connectionList List of connections that are available in the composition. We have to loop over it.\n* @param compositionList Composition list is the list of concepts that have connections inside of them.\n* @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n* @returns\n*/\nfunction recursiveFetchConceptNormal(concept_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let startTime = new Date().getTime();\n let output = {};\n let arroutput = [];\n let id = concept.id;\n output[\"id\"] = id;\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchConcept(toConcept, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n // console.log(\"second loop normal\", new Date().getTime() - startTime);\n return output;\n });\n}\n/**\n * ## experimental ##\n* This function takes concepts and connections and then builds a json.\n* @param concept The concept that needs to get other concepts that are inside of it.\n* @param connectionList List of connections that are available in the composition. We have to loop over it.\n* @param compositionList Composition list is the list of concepts that have connections inside of them.\n* @param visitedConcepts This is a checking mechanism to not go in loops. So preferably pass an empty array.\n* @returns\n*/\nfunction recursiveFetchConceptSingleLoop(concept_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (concept, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let output = {};\n let id = concept.id;\n let startTime = new Date().getTime();\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n let myString = mainString;\n let returnoutput = { [myString]: concept === null || concept === void 0 ? void 0 : concept.characterValue };\n return returnoutput;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n let newData = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetTheConcept)(connectionList[i].ofTheConceptId);\n let toConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetTheConcept)(connectionList[i].toTheConceptId);\n connectionList[i].ofConcept = newData;\n connectionList[i].toConcept = toConcept;\n let ofKey = newData.id;\n let toConceptKey = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let regex = \"the_\";\n let localmainString = toConceptKey;\n let localToKey = localmainString.replace(regex, \"\");\n if (output[ofKey] == undefined || output[ofKey] == null) {\n output[ofKey] = {};\n }\n output[ofKey][localToKey] = toConcept.characterValue;\n }\n }\n let finalOutput = {};\n for (let i = 0; i < connectionList.length; i++) {\n let ofConcept = connectionList[i].ofConcept;\n let toConcept = connectionList[i].toConcept;\n let ofConceptKey = (_f = (_e = ofConcept === null || ofConcept === void 0 ? void 0 : ofConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"\";\n let toConceptKey = (_h = (_g = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"\";\n let regex = \"the_\";\n let localmainString = toConceptKey;\n let localToKey = localmainString.replace(regex, \"\");\n if (finalOutput[ofConcept.id] == undefined || finalOutput[ofConcept.id] == null) {\n finalOutput[ofConcept.id] = {};\n }\n let internalOutput = finalOutput[ofConcept.id];\n if (internalOutput[ofConceptKey] == undefined || internalOutput[ofConceptKey] == null) {\n internalOutput[ofConceptKey] = {};\n }\n if (output[connectionList[i].ofTheConceptId] != undefined && output[connectionList[i].toTheConceptId] != undefined) {\n internalOutput[ofConceptKey][localToKey] = output[toConcept.id];\n }\n else {\n internalOutput[ofConceptKey][localToKey] = toConcept.characterValue;\n }\n }\n return finalOutput[concept.id];\n });\n}\n/**\n * ## Format justdata ##\n * @param id\n * @param connectionList\n * @param compositionList\n * @param visitedConcepts\n * @returns\n */\nfunction recursiveFetch(id_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let output = {};\n let arroutput = [];\n if (id == 0) {\n return null;\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if ((concept == null || concept.id == 0) && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n if (concept.id != 0) {\n if (concept.type == null) {\n let toConceptTypeId = concept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n concept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n concept.type = toConceptType;\n }\n }\n }\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n for (let i = 0; i < connectionList.length; i++) {\n let insideTime = new Date().getTime();\n if (connectionList[i].ofTheConceptId == id) {\n if (id != connectionList[i].toTheConceptId) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept.id != 0) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetch(toConceptId, connectionList, compositionList, visitedConcepts);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetch(toConceptId, connectionList, compositionList, visitedConcepts);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n else {\n console.log(\"this is the faulty connection \", connectionList[i]);\n }\n }\n }\n }\n return output;\n });\n}\nfunction recursiveFetchWithSubCompositions(id_1, connectionList_1, compositionList_1) {\n return __awaiter(this, arguments, void 0, function* (id, connectionList, compositionList, visitedConcepts = []) {\n var _a, _b, _c, _d;\n let output = {};\n let arroutput = [];\n if (id == 0) {\n return null;\n }\n let concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(id);\n if ((concept == null || concept.id == 0) && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(id);\n concept = conceptString;\n }\n if (concept.id != 0) {\n if (concept.type == null) {\n let toConceptTypeId = concept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n concept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n concept.type = toConceptType;\n }\n }\n }\n let mainString = (_b = (_a = concept === null || concept === void 0 ? void 0 : concept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"\";\n if (!compositionList.includes(id)) {\n return concept === null || concept === void 0 ? void 0 : concept.characterValue;\n }\n else {\n if (visitedConcepts.includes(id)) {\n return \"\";\n }\n else {\n visitedConcepts.push(id);\n }\n output[\"id\"] = id;\n for (let i = 0; i < connectionList.length; i++) {\n if (connectionList[i].ofTheConceptId == id) {\n let toConceptId = connectionList[i].toTheConceptId;\n let toConcept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptId);\n if ((toConcept == null || toConcept.id == 0) && toConceptId != null && toConceptId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptId);\n toConcept = conceptString;\n }\n if (toConcept) {\n if ((toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) == null) {\n let toConceptTypeId = toConcept.typeId;\n let toConceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConcept(toConceptTypeId);\n toConcept.type = toConceptType;\n if (toConceptType == null && toConceptTypeId != null && toConceptTypeId != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_0__.GetConcept)(toConceptTypeId);\n toConceptType = conceptString;\n toConcept.type = toConceptType;\n }\n }\n }\n let regex = \"the_\";\n let localmainString = (_d = (_c = toConcept === null || toConcept === void 0 ? void 0 : toConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"\";\n let localKey = localmainString.replace(regex, \"\");\n if (isNaN(Number(localKey))) {\n if (localKey) {\n const result = yield recursiveFetchWithSubCompositions(toConceptId, connectionList, compositionList);\n output[localKey] = result;\n }\n }\n else {\n const result = yield recursiveFetchWithSubCompositions(toConceptId, connectionList, compositionList);\n arroutput[localKey] = result;\n output = arroutput;\n }\n }\n }\n }\n return output;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetComposition.ts?");
|
|
1328
1328
|
|
|
1329
1329
|
/***/ }),
|
|
1330
1330
|
|
|
@@ -1334,7 +1334,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1334
1334
|
\********************************************/
|
|
1335
1335
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1336
1336
|
|
|
1337
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetCompositionBulk: () => (/* binding */ GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* binding */ GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsInObject: () => (/* binding */ GetCompositionFromConnectionsInObject),\n/* harmony export */ GetCompositionFromConnectionsInObjectNormal: () => (/* binding */ GetCompositionFromConnectionsInObjectNormal),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* binding */ GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* binding */ GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* binding */ GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObjectNew: () => (/* binding */ GetCompositionFromConnectionsWithDataIdInObjectNew),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* binding */ GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* binding */ GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* binding */ GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* binding */ GetConnectionDataPrefetch)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FindConnectionsOfCompositionBulkInMemory */ \"./src/Services/FindConnectionsOfCompositionBulkInMemory.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * ## Format JUSTDATA ##\n * Function converts the conceptIds to json (compositions)\n * This function takes in the conceptIds and returns a list of compositions related to those concepts.\n * @param conceptIds list of concept ids that are compositions.\n * @returns compositions\n */\nfunction GetCompositionBulk() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = []) {\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__.GetAllConnectionsOfCompositionBulk)(conceptIds);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * Function converts the conceptIds to json (compositions)\n * @param conceptIds this is the list of concept ids that should be converted to compostions in data - id format.\n * @returns list of compositions in the data - id format.\n */\nfunction GetCompositionBulkWithDataId() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = []) {\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__.GetAllConnectionsOfCompositionBulk)(conceptIds);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithDataId() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataId', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataId error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n // let newConnections = await GetConnectionBulk(connectionIds);\n // let oldConnections = await FindConnectionsOfCompositionsBulkInMemory(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\n * it also prints out internal connections.\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithDataIdFromConnections() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdFromConnections', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataIdFromConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemoryFromConnection)(conceptIds[i], newConnections);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .\n */\nfunction GetCompositionFromConnectionsWithDataIdIndex() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdIndex', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataIdIndex error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n let myNewConnections = newConnections;\n let oldConnections = yield (0,_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format is dictionary with key as concept id and value as data (json) ##\n * This function converts the conceptIds and internal connectionIds to compositions format with index(conceptId).\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .\n */\nfunction GetCompositionFromConnectionsWithIndex() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n let myNewConnections = newConnections;\n let oldConnections = yield (0,_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\n * it also prints out internal connections.\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithIndexFromConnections() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithIndexFromConnections', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithIndexFromConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemoryWithConnections)(conceptIds[i], newConnections);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * Used to prefetch all the connections and their related concepts.\n * @param connectionIds these are the connection ids that are used to fetch all the connections and also their related concepts.\n * @returns all the connections that are passed as ids.\n */\nfunction GetConnectionDataPrefetch(connectionIds) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConnectionDataPrefetch', { connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionDataPrefetch error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let remainingConnections = [];\n let connectionsAll = [];\n let remainingIds = {};\n for (let i = 0; i < connectionIds.length; i++) {\n let connection = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnection(connectionIds[i]);\n // console.log(\"this is the connection fetch\", connection);\n if (connection.id == 0) {\n remainingConnections.push(connectionIds[i]);\n }\n else {\n connectionsAll.push(connection);\n }\n }\n for (let i = 0; i < remainingConnections.length; i++) {\n remainingIds[connectionIds[i]] = false;\n }\n //await ConnectionData.GetConnectionBulkData(connectionIds, connectionsAll, remainingIds);\n // for(let key in remainingIds){\n // if(remainingIds[key] == false){\n // remainingConnections.push(Number(key));\n // }\n // }\n // remainingConnections = connectionIds;\n let prefetchConcepts = [];\n let connectionsAllLocal = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(remainingConnections);\n connectionsAll = [...connectionsAll, ...connectionsAllLocal];\n for (let j = 0; j < connectionsAll.length; j++) {\n prefetchConcepts.push(connectionsAll[j].ofTheConceptId);\n prefetchConcepts.push(connectionsAll[j].toTheConceptId);\n prefetchConcepts.push(connectionsAll[j].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(prefetchConcepts);\n return connectionsAll;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * This function converts the conceptIds and internal connections to create compositions.\n * Format is of a dictionary with ids as the key and value is the composition data.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsWithDataIdInObject() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * ## duplicate ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsWithDataIdInObjectNew() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemoryNew)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format justdata ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsInObject() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format Normal ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsInObjectNormal() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemoryNormal)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n console.log(\"this is the normal data\", conceptIds[i], comp);\n }\n return compositions;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetCompositionBulk.ts?");
|
|
1337
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetCompositionBulk: () => (/* binding */ GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* binding */ GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsInObject: () => (/* binding */ GetCompositionFromConnectionsInObject),\n/* harmony export */ GetCompositionFromConnectionsInObjectNormal: () => (/* binding */ GetCompositionFromConnectionsInObjectNormal),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* binding */ GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* binding */ GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* binding */ GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObjectNew: () => (/* binding */ GetCompositionFromConnectionsWithDataIdInObjectNew),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* binding */ GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* binding */ GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* binding */ GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* binding */ GetConnectionDataPrefetch)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FindConnectionsOfCompositionBulkInMemory */ \"./src/Services/FindConnectionsOfCompositionBulkInMemory.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * ## Format JUSTDATA ##\n * Function converts the conceptIds to json (compositions)\n * This function takes in the conceptIds and returns a list of compositions related to those concepts.\n * @param conceptIds list of concept ids that are compositions.\n * @returns compositions\n */\nfunction GetCompositionBulk() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = []) {\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__.GetAllConnectionsOfCompositionBulk)(conceptIds);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * Function converts the conceptIds to json (compositions)\n * @param conceptIds this is the list of concept ids that should be converted to compostions in data - id format.\n * @returns list of compositions in the data - id format.\n */\nfunction GetCompositionBulkWithDataId() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = []) {\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_0__.GetAllConnectionsOfCompositionBulk)(conceptIds);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithDataId() {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetCompositionFromConnectionsWithDataId, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataId', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataId error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n // let newConnections = await GetConnectionBulk(connectionIds);\n // let oldConnections = await FindConnectionsOfCompositionsBulkInMemory(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\n * it also prints out internal connections.\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithDataIdFromConnections() {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetCompositionFromConnectionsWithDataIdFromConnections, arguments_2);\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdFromConnections', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataIdFromConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemoryFromConnection)(conceptIds[i], newConnections);\n compositions.push(comp);\n }\n return compositions;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format with index(conceptId).\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .\n */\nfunction GetCompositionFromConnectionsWithDataIdIndex() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithDataIdIndex', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithDataIdIndex error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n let myNewConnections = newConnections;\n let oldConnections = yield (0,_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format is dictionary with key as concept id and value as data (json) ##\n * This function converts the conceptIds and internal connectionIds to compositions format with index(conceptId).\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns dictionary of compositions created from the passed conceptIds and connectionIds with conceptId as its index .\n */\nfunction GetCompositionFromConnectionsWithIndex() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n let myNewConnections = newConnections;\n let oldConnections = yield (0,_FindConnectionsOfCompositionBulkInMemory__WEBPACK_IMPORTED_MODULE_3__.FindConnectionsOfCompositionsBulkInMemory)(conceptIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## FORMAT DATAIDDATE ##\n * This is just a different version of GetCompositionFromConnectionsWithDataId, This has the added functionality that\n * it also prints out internal connections.\n * This function converts the conceptIds and internal connectionIds to compositions in data-Id format.\n * @param conceptIds This is the list of concept ids that need to be converted to compositions.\n * @param connectionIds These are the internal connectionIds that need to be passed to create the compositions.\n * @returns list of compositions created from the passed conceptIds and connectionIds.\n */\nfunction GetCompositionFromConnectionsWithIndexFromConnections() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connectionIds = []) {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetCompositionFromConnectionsWithIndexFromConnections', { conceptIds, connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionFromConnectionsWithIndexFromConnections error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let newConnections = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connectionIds);\n //CheckForConnectionDeletionWithIds(connectionIds,oldConnections);\n let compositions = [];\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemoryWithConnections)(conceptIds[i], newConnections);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * Used to prefetch all the connections and their related concepts.\n * @param connectionIds these are the connection ids that are used to fetch all the connections and also their related concepts.\n * @returns all the connections that are passed as ids.\n */\nfunction GetConnectionDataPrefetch(connectionIds) {\n var arguments_3 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetConnectionDataPrefetch, arguments_3);\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetConnectionDataPrefetch', { connectionIds });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionDataPrefetch error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let remainingConnections = [];\n let connectionsAll = [];\n let remainingIds = {};\n for (let i = 0; i < connectionIds.length; i++) {\n let connection = yield _app__WEBPACK_IMPORTED_MODULE_2__.ConnectionData.GetConnection(connectionIds[i]);\n // console.log(\"this is the connection fetch\", connection);\n if (connection.id == 0) {\n remainingConnections.push(connectionIds[i]);\n }\n else {\n connectionsAll.push(connection);\n }\n }\n for (let i = 0; i < remainingConnections.length; i++) {\n remainingIds[connectionIds[i]] = false;\n }\n //await ConnectionData.GetConnectionBulkData(connectionIds, connectionsAll, remainingIds);\n // for(let key in remainingIds){\n // if(remainingIds[key] == false){\n // remainingConnections.push(Number(key));\n // }\n // }\n // remainingConnections = connectionIds;\n let prefetchConcepts = [];\n let connectionsAllLocal = yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(remainingConnections);\n connectionsAll = [...connectionsAll, ...connectionsAllLocal];\n for (let j = 0; j < connectionsAll.length; j++) {\n prefetchConcepts.push(connectionsAll[j].ofTheConceptId);\n prefetchConcepts.push(connectionsAll[j].toTheConceptId);\n prefetchConcepts.push(connectionsAll[j].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(prefetchConcepts);\n return connectionsAll;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * This function converts the conceptIds and internal connections to create compositions.\n * Format is of a dictionary with ids as the key and value is the composition data.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsWithDataIdInObject() {\n var arguments_4 = arguments;\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetCompositionFromConnectionsWithDataIdInObject, arguments_4);\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format DATAIDDATE ##\n * ## duplicate ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsWithDataIdInObjectNew() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionWithIdFromMemoryNew)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format justdata ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsInObject() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemory)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n }\n return compositions;\n });\n}\n/**\n * ## Format Normal ##\n * This function converts the conceptIds and internal connections to create compositions.\n * @param conceptIds these are the concept ids that need to be fetched to create their compositions\n * @param connections these are the connections that are used to create the structure.\n * @returns a dictionary / object that has key as their conceptId and the value as their composition object.\n */\nfunction GetCompositionFromConnectionsInObjectNormal() {\n return __awaiter(this, arguments, void 0, function* (conceptIds = [], connections = []) {\n // get all the connections that are not available in memory from the api.\n yield (0,_Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_1__.GetConnectionBulk)(connections);\n // create a list of compositions from the fetched concepts and connections.\n let compositions = {};\n for (let i = 0; i < conceptIds.length; i++) {\n let comp = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_4__.GetCompositionFromMemoryNormal)(conceptIds[i]);\n compositions[conceptIds[i]] = comp;\n console.log(\"this is the normal data\", conceptIds[i], comp);\n }\n return compositions;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetCompositionBulk.ts?");
|
|
1338
1338
|
|
|
1339
1339
|
/***/ }),
|
|
1340
1340
|
|
|
@@ -1344,7 +1344,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1344
1344
|
\********************************************/
|
|
1345
1345
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1346
1346
|
|
|
1347
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FormatTheConcepts: () => (/* binding */ FormatTheConcepts),\n/* harmony export */ GetCompositionList: () => (/* binding */ GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* binding */ GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* binding */ GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* binding */ GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* binding */ GetCompositionListWithIdUpdated)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllConceptsByType */ \"./src/Api/GetAllConceptsByType.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n// get the list of compositions from the type \n// for eg get list of boomgpt\nfunction GetCompositionList(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionList', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionList sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction GetCompositionListAll(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n let LocalCompositionList = (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListLocal)(compositionName, userId);\n let CompositionList = GetCompositionList(compositionName, userId);\n let AllList = [];\n Promise.race([LocalCompositionList, CompositionList])\n .then((result) => {\n console.log(\"Promise result\", result);\n AllList.push(...result);\n })\n .catch((error) => {\n console.log(\"error in handling\", error);\n });\n CompositionList.then((result) => {\n console.log(\"This is the second promise result\", result);\n AllList.push(...result);\n });\n return AllList;\n });\n}\n// export async function GetCompositionListAllWithId(compositionName: string,userId:number, inpage:number = 10, page:number =1){\n// let LocalCompositionList = await GetCompositionListLocalWithId(compositionName, userId);\n// console.log(\"tbis is the local composition list\", LocalCompositionList);\n// let CompositionList = await GetCompositionListWithId(compositionName,userId)\n// console.log(\"this is the online composition list\", CompositionList);\n// let AllList: any[] = [];\n// // Promise.race([LocalCompositionList, CompositionList])\n// // .then((result)=> {\n// // console.log(\"Promise result\", result);\n// // AllList.push(...result);\n// // })\n// // .catch((error)=>{\n// // console.log(\"error in handling\", error);\n// // });\n// // CompositionList.then((result)=>{\n// // console.log(\"This is the second promise result\", result);\n// // AllList.push(...result);\n// // })\n// AllList.push(...LocalCompositionList);\n// AllList.push(...CompositionList);\n// return AllList;\n// }\nfunction GetCompositionListAllWithId(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListAllWithId', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionListAllWithId sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let conceptLocal = yield (0,_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(compositionName);\n let conceptOnline = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n let conceptList = [];\n let conceptListLocal = [];\n let finalLocal = [];\n let conceptListOnline = [];\n if (conceptLocal.id != 0) {\n conceptListLocal = yield _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_3__.LocalConceptsData.GetConceptsByTypeIdAndUser(conceptLocal.id, userId);\n }\n if (conceptOnline.id != 0) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n conceptListOnline = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(conceptOnline.id, userId);\n conceptList = conceptListOnline;\n }\n for (let i = 0; i < conceptListLocal.length; i++) {\n let isDuplicate = false;\n for (let j = 0; j < conceptListOnline.length; j++) {\n if (conceptListLocal[i].ghostId == conceptListOnline[j].ghostId) {\n isDuplicate = true;\n }\n }\n if (!isDuplicate) {\n finalLocal.push(conceptListLocal[i]);\n }\n }\n console.log(\"This is the all list\", finalLocal);\n let AllList = [];\n AllList = yield FormatTheConcepts(conceptList, finalLocal, inpage, page);\n return AllList;\n });\n}\nfunction GetCompositionListWithId(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListWithId', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionListWithId sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction GetCompositionListWithIdUpdated(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__.GetConceptByCharacterUpdated)(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction FormatTheConcepts(conceptList_1, localConceptList_1) {\n return __awaiter(this, arguments, void 0, function* (conceptList, localConceptList, inpage = 10, page = 1) {\n let CompositionList = [];\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n let localConceptLength = localConceptList.length;\n for (let i = startPage; i < startPage + inpage - localConceptLength; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n for (let i = 0; i < localConceptList.length; i++) {\n let compositionJson = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetCompositionLocalWithId)(localConceptList[i].id);\n CompositionList.push(compositionJson);\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage - localConceptLength; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n return CompositionList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetCompositionList.ts?");
|
|
1347
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FormatTheConcepts: () => (/* binding */ FormatTheConcepts),\n/* harmony export */ GetCompositionList: () => (/* binding */ GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* binding */ GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* binding */ GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* binding */ GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* binding */ GetCompositionListWithIdUpdated)\n/* harmony export */ });\n/* harmony import */ var _Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetAllConceptsByType */ \"./src/Api/GetAllConceptsByType.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n// get the list of compositions from the type \n// for eg get list of boomgpt\nfunction GetCompositionList(compositionName_1, userId_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(GetCompositionList, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionList', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionList sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction GetCompositionListAll(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n let LocalCompositionList = (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListLocal)(compositionName, userId);\n let CompositionList = GetCompositionList(compositionName, userId);\n let AllList = [];\n Promise.race([LocalCompositionList, CompositionList])\n .then((result) => {\n console.log(\"Promise result\", result);\n AllList.push(...result);\n })\n .catch((error) => {\n console.log(\"error in handling\", error);\n });\n CompositionList.then((result) => {\n console.log(\"This is the second promise result\", result);\n AllList.push(...result);\n });\n return AllList;\n });\n}\n// export async function GetCompositionListAllWithId(compositionName: string,userId:number, inpage:number = 10, page:number =1){\n// let LocalCompositionList = await GetCompositionListLocalWithId(compositionName, userId);\n// console.log(\"tbis is the local composition list\", LocalCompositionList);\n// let CompositionList = await GetCompositionListWithId(compositionName,userId)\n// console.log(\"this is the online composition list\", CompositionList);\n// let AllList: any[] = [];\n// // Promise.race([LocalCompositionList, CompositionList])\n// // .then((result)=> {\n// // console.log(\"Promise result\", result);\n// // AllList.push(...result);\n// // })\n// // .catch((error)=>{\n// // console.log(\"error in handling\", error);\n// // });\n// // CompositionList.then((result)=>{\n// // console.log(\"This is the second promise result\", result);\n// // AllList.push(...result);\n// // })\n// AllList.push(...LocalCompositionList);\n// AllList.push(...CompositionList);\n// return AllList;\n// }\nfunction GetCompositionListAllWithId(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListAllWithId', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionListAllWithId sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let conceptLocal = yield (0,_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(compositionName);\n let conceptOnline = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n let conceptList = [];\n let conceptListLocal = [];\n let finalLocal = [];\n let conceptListOnline = [];\n if (conceptLocal.id != 0) {\n conceptListLocal = yield _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_3__.LocalConceptsData.GetConceptsByTypeIdAndUser(conceptLocal.id, userId);\n }\n if (conceptOnline.id != 0) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n conceptListOnline = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(conceptOnline.id, userId);\n conceptList = conceptListOnline;\n }\n for (let i = 0; i < conceptListLocal.length; i++) {\n let isDuplicate = false;\n for (let j = 0; j < conceptListOnline.length; j++) {\n if (conceptListLocal[i].ghostId == conceptListOnline[j].ghostId) {\n isDuplicate = true;\n }\n }\n if (!isDuplicate) {\n finalLocal.push(conceptListLocal[i]);\n }\n }\n console.log(\"This is the all list\", finalLocal);\n let AllList = [];\n AllList = yield FormatTheConcepts(conceptList, finalLocal, inpage, page);\n return AllList;\n });\n}\nfunction GetCompositionListWithId(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)('GetCompositionListWithId', { compositionName, userId, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetCompositionListWithId sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction GetCompositionListWithIdUpdated(compositionName_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (compositionName, userId, inpage = 10, page = 1) {\n let concept = yield (0,_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_6__.GetConceptByCharacterUpdated)(compositionName);\n let CompositionList = [];\n if (concept) {\n yield (0,_Api_GetAllConceptsByType__WEBPACK_IMPORTED_MODULE_0__.GetAllConceptsByType)(compositionName, userId);\n let conceptList = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_2__.ConceptsData.GetConceptsByTypeIdAndUser(concept.id, userId);\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n }\n return CompositionList;\n });\n}\nfunction FormatTheConcepts(conceptList_1, localConceptList_1) {\n return __awaiter(this, arguments, void 0, function* (conceptList, localConceptList, inpage = 10, page = 1) {\n let CompositionList = [];\n let startPage = inpage * (page - 1);\n let prefetchComposition = [];\n let localConceptLength = localConceptList.length;\n for (let i = startPage; i < startPage + inpage - localConceptLength; i++) {\n if (conceptList[i]) {\n prefetchComposition.push(conceptList[i].id);\n }\n }\n for (let i = 0; i < localConceptList.length; i++) {\n let compositionJson = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.GetCompositionLocalWithId)(localConceptList[i].id);\n CompositionList.push(compositionJson);\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_1__.GetAllConnectionsOfCompositionBulk)(prefetchComposition);\n for (let i = startPage; i < startPage + inpage - localConceptLength; i++) {\n if (conceptList[i]) {\n let compositionJson = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_5__.GetCompositionWithIdFromMemory)(conceptList[i].id);\n CompositionList.push(compositionJson);\n }\n }\n return CompositionList;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetCompositionList.ts?");
|
|
1348
1348
|
|
|
1349
1349
|
/***/ }),
|
|
1350
1350
|
|
|
@@ -1364,7 +1364,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1364
1364
|
\***************************************************************/
|
|
1365
1365
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1366
1366
|
|
|
1367
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* binding */ GetConnectionBetweenTwoConceptsLinker)\n/* harmony export */ });\n/* harmony import */ var _Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetCompositionConnectionsBetweenTwoConcepts */ \"./src/Api/GetCompositionConnectionsBetweenTwoConcepts.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n/**\n * This function will give you all the connections between two concepts by their linker or fullLinker\n * @param ofTheConcept start of the connecction\n * @param toTheConcept end of the connection\n * @param linker the primitive linkers with type connection (16) these are the old type of linkers (if you want full linker then put this as empty string)\n * @param fullLinker fullLinker is the modern linker (if you want linker then put this as empty string)\n * @param forward if you want to get the forward relation in the primitive linker put true else for backward linker false.\n * @returns list of connections\n */\nfunction GetConnectionBetweenTwoConceptsLinker(ofTheConcept_1, toTheConcept_1, linker_1, fullLinker_1) {\n return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, fullLinker, forward = true) {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionBetweenTwoConceptsLinker', { ofTheConcept, toTheConcept, linker, fullLinker, forward });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionBetweenTwoConceptsLinker sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n let typeConcept = (0,_app__WEBPACK_IMPORTED_MODULE_1__.CreateDefaultConcept)();\n if (linker != \"\") {\n let typeLinker = \"\";\n if (forward) {\n let prefix = ((_a = ofTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) + \"_s\";\n let linkerAdd = linker + \"_s\";\n let forwardLinker = prefix + \"_\" + linkerAdd;\n typeLinker = forwardLinker;\n }\n else {\n let prefix1 = ((_b = toTheConcept.type) === null || _b === void 0 ? void 0 : _b.characterValue) + \"_s\";\n let linkerAdd1 = linker + \"_by\";\n let backwardLinker = prefix1 + \"_\" + linkerAdd1;\n typeLinker = backwardLinker;\n }\n typeConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\"connection\", typeLinker, false, 999);\n }\n if (fullLinker != \"\") {\n typeConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptApi)(fullLinker, 999);\n }\n let connections = [];\n if (!forward)\n connections = yield (0,_Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__.GetCompositionConnectionsBetweenTwoConcepts)(toTheConcept.id, ofTheConcept.id, typeConcept.id);\n else\n connections = yield (0,_Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__.GetCompositionConnectionsBetweenTwoConcepts)(ofTheConcept.id, toTheConcept.id, typeConcept.id);\n return connections;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetConnectionBetweenTwoConceptsLinker.ts?");
|
|
1367
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* binding */ GetConnectionBetweenTwoConceptsLinker)\n/* harmony export */ });\n/* harmony import */ var _Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetCompositionConnectionsBetweenTwoConcepts */ \"./src/Api/GetCompositionConnectionsBetweenTwoConcepts.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n/**\n * This function will give you all the connections between two concepts by their linker or fullLinker\n * @param ofTheConcept start of the connecction\n * @param toTheConcept end of the connection\n * @param linker the primitive linkers with type connection (16) these are the old type of linkers (if you want full linker then put this as empty string)\n * @param fullLinker fullLinker is the modern linker (if you want linker then put this as empty string)\n * @param forward if you want to get the forward relation in the primitive linker put true else for backward linker false.\n * @returns list of connections\n */\nfunction GetConnectionBetweenTwoConceptsLinker(ofTheConcept_1, toTheConcept_1, linker_1, fullLinker_1) {\n return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, fullLinker, forward = true) {\n var _a, _b;\n if (_app__WEBPACK_IMPORTED_MODULE_1__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.sendMessage)('GetConnectionBetweenTwoConceptsLinker', { ofTheConcept, toTheConcept, linker, fullLinker, forward });\n return res.data;\n }\n catch (error) {\n console.error('GetConnectionBetweenTwoConceptsLinker sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_1__.handleServiceWorkerException)(error);\n }\n }\n _app__WEBPACK_IMPORTED_MODULE_1__.Logger.logfunction(GetConnectionBetweenTwoConceptsLinker);\n let typeConcept = (0,_app__WEBPACK_IMPORTED_MODULE_1__.CreateDefaultConcept)();\n if (linker != \"\") {\n let typeLinker = \"\";\n if (forward) {\n let prefix = ((_a = ofTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) + \"_s\";\n let linkerAdd = linker + \"_s\";\n let forwardLinker = prefix + \"_\" + linkerAdd;\n typeLinker = forwardLinker;\n }\n else {\n let prefix1 = ((_b = toTheConcept.type) === null || _b === void 0 ? void 0 : _b.characterValue) + \"_s\";\n let linkerAdd1 = linker + \"_by\";\n let backwardLinker = prefix1 + \"_\" + linkerAdd1;\n typeLinker = backwardLinker;\n }\n typeConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\"connection\", typeLinker, false, 999);\n }\n if (fullLinker != \"\") {\n typeConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptApi)(fullLinker, 999);\n }\n let connections = [];\n if (!forward)\n connections = yield (0,_Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__.GetCompositionConnectionsBetweenTwoConcepts)(toTheConcept.id, ofTheConcept.id, typeConcept.id);\n else\n connections = yield (0,_Api_GetCompositionConnectionsBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_0__.GetCompositionConnectionsBetweenTwoConcepts)(ofTheConcept.id, toTheConcept.id, typeConcept.id);\n return connections;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetConnectionBetweenTwoConceptsLinker.ts?");
|
|
1368
1368
|
|
|
1369
1369
|
/***/ }),
|
|
1370
1370
|
|
|
@@ -1414,7 +1414,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1414
1414
|
\*************************************/
|
|
1415
1415
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1416
1416
|
|
|
1417
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetRelation: () => (/* binding */ GetRelation),\n/* harmony export */ GetRelationRaw: () => (/* binding */ GetRelationRaw)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConceptFinding/GetConceptByCharacterAndCategory */ \"./src/Services/ConceptFinding/GetConceptByCharacterAndCategory.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nfunction GetRelation(id_1, relation_1) {\n return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelation', { id, relation, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetRelation error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let output = [];\n let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(id);\n let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);\n let relatedConcept = relatedConceptString;\n if (relatedConcept.id > 0) {\n let connectionsString = yield (0,_Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetConnectionOfTheConcept)(relatedConcept.id, concept.id, concept.userId, inpage, page);\n let connections = connectionsString;\n let prefetch = [];\n for (let i = 0; i < connections.length; i++) {\n prefetch.push(connections[i].toTheConceptId);\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetAllConnectionsOfCompositionBulk)(prefetch);\n for (let i = 0; i < connections.length; i++) {\n let toConceptId = connections[i].toTheConceptId;\n let toConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(toConceptId);\n let newComposition = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_1__.GetCompositionWithIdAndDateFromMemory)(toConcept.id);\n output.push(newComposition);\n }\n }\n return output;\n });\n}\nfunction GetRelationRaw(id_1, relation_1) {\n return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelationRaw', { id, relation, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetRelationRaw error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let output = [];\n let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(id);\n let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);\n let relatedConcept = relatedConceptString;\n if (relatedConcept.id > 0) {\n let connectionsString = yield (0,_Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetConnectionOfTheConcept)(relatedConcept.id, concept.id, concept.userId, inpage, page);\n let connections = connectionsString;\n let prefetch = [];\n for (let i = 0; i < connections.length; i++) {\n prefetch.push(connections[i].toTheConceptId);\n }\n for (let i = 0; i < connections.length; i++) {\n let toConceptId = connections[i].toTheConceptId;\n let toConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(toConceptId);\n output.push(toConcept);\n }\n }\n return output;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetRelation.ts?");
|
|
1417
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ GetRelation: () => (/* binding */ GetRelation),\n/* harmony export */ GetRelationRaw: () => (/* binding */ GetRelationRaw)\n/* harmony export */ });\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _GetComposition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConceptFinding/GetConceptByCharacterAndCategory */ \"./src/Services/ConceptFinding/GetConceptByCharacterAndCategory.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\nfunction GetRelation(id_1, relation_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(GetRelation, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelation', { id, relation, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetRelation error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let output = [];\n let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(id);\n let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);\n let relatedConcept = relatedConceptString;\n if (relatedConcept.id > 0) {\n let connectionsString = yield (0,_Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetConnectionOfTheConcept)(relatedConcept.id, concept.id, concept.userId, inpage, page);\n let connections = connectionsString;\n let prefetch = [];\n for (let i = 0; i < connections.length; i++) {\n prefetch.push(connections[i].toTheConceptId);\n }\n yield (0,_Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetAllConnectionsOfCompositionBulk)(prefetch);\n for (let i = 0; i < connections.length; i++) {\n let toConceptId = connections[i].toTheConceptId;\n let toConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(toConceptId);\n let newComposition = yield (0,_GetComposition__WEBPACK_IMPORTED_MODULE_1__.GetCompositionWithIdAndDateFromMemory)(toConcept.id);\n output.push(newComposition);\n }\n }\n return output;\n });\n}\nfunction GetRelationRaw(id_1, relation_1) {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (id, relation, inpage = 10, page = 1) {\n _app__WEBPACK_IMPORTED_MODULE_5__.Logger.logfunction(GetRelationRaw, arguments_2);\n if (_app__WEBPACK_IMPORTED_MODULE_5__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_5__.sendMessage)('GetRelationRaw', { id, relation, inpage, page });\n return res.data;\n }\n catch (error) {\n console.error('GetRelationRaw error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_5__.handleServiceWorkerException)(error);\n }\n }\n let output = [];\n let concept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(id);\n let relatedConceptString = yield (0,_ConceptFinding_GetConceptByCharacterAndCategory__WEBPACK_IMPORTED_MODULE_4__.GetConceptByCharacterAndCategory)(relation);\n let relatedConcept = relatedConceptString;\n if (relatedConcept.id > 0) {\n let connectionsString = yield (0,_Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_0__.GetConnectionOfTheConcept)(relatedConcept.id, concept.id, concept.userId, inpage, page);\n let connections = connectionsString;\n let prefetch = [];\n for (let i = 0; i < connections.length; i++) {\n prefetch.push(connections[i].toTheConceptId);\n }\n for (let i = 0; i < connections.length; i++) {\n let toConceptId = connections[i].toTheConceptId;\n let toConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(toConceptId);\n output.push(toConcept);\n }\n }\n return output;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetRelation.ts?");
|
|
1418
1418
|
|
|
1419
1419
|
/***/ }),
|
|
1420
1420
|
|
|
@@ -1424,7 +1424,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1424
1424
|
\***************************************/
|
|
1425
1425
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1426
1426
|
|
|
1427
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetTheConcept)\n/* harmony export */ });\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n *\n * @param id this is the id that can be used to get the concept.\n * @param userId This is the user that calls the concept\n * @returns Concept if it exists\n */\nfunction GetTheConcept(id_1) {\n return __awaiter(this, arguments, void 0, function* (id, userId = 999) {\n let startTime = performance.now();\n
|
|
1427
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ GetTheConcept)\n/* harmony export */ });\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Api_GetConcept__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConcept */ \"./src/Api/GetConcept.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n *\n * @param id this is the id that can be used to get the concept.\n * @param userId This is the user that calls the concept\n * @returns Concept if it exists\n */\nfunction GetTheConcept(id_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (id, userId = 999) {\n let startTime = performance.now();\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(GetTheConcept, arguments_1);\n if (_AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.activateStatus) {\n try {\n _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_0__.AccessTracker.incrementConcept(id);\n }\n catch (_a) {\n console.error(\"Error adding connection in access tracker\");\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.log(\"ERROR\", \"Error Adding Connection\");\n }\n }\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n try {\n console.time(\"serviceworker\");\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('GetTheConcept', { id, userId });\n console.timeEnd(\"serviceworker\");\n return res.data;\n }\n catch (error) {\n console.error('GetTheConcept sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n }\n let concept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_4__.CreateDefaultConcept)();\n if (id < 0) {\n let lconcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetUserGhostId)(userId, id);\n concept = (0,_app__WEBPACK_IMPORTED_MODULE_2__.convertFromLConceptToConcept)(lconcept);\n return concept;\n }\n concept = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_3__.ConceptsData.GetConcept(id);\n if ((concept == null || concept.id == 0) && id != null && id != undefined) {\n let conceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_1__.GetConcept)(id);\n concept = conceptString;\n }\n if (concept.id != 0) {\n if (concept.type == null) {\n let conceptType = yield _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_3__.ConceptsData.GetConcept(concept.typeId);\n if (conceptType == null && concept.typeId != null && concept.typeId != undefined) {\n let typeConceptString = yield (0,_Api_GetConcept__WEBPACK_IMPORTED_MODULE_1__.GetConcept)(concept.typeId);\n let typeConcept = typeConceptString;\n concept.type = typeConcept;\n }\n }\n }\n // Add Log\n // Logger.logInfo(startTime, userId, \"read\", \"unknown\", undefined, 200, concept, \"GetTheConcept\", ['id', 'userId'], \"unknown\", undefined )\n return concept;\n }\n catch (err) {\n console.error(\"this is the error in the getting concept\", err);\n // Add Log\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logError(startTime, userId, \"read\", \"unknown\", undefined, 500, err, \"GetTheConcept\", [id, userId], \"unknown\", undefined);\n throw err;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/GetTheConcept.ts?");
|
|
1428
1428
|
|
|
1429
1429
|
/***/ }),
|
|
1430
1430
|
|
|
@@ -1454,7 +1454,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1454
1454
|
\***********************************************************************/
|
|
1455
1455
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1456
1456
|
|
|
1457
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* binding */ CreateConnectionBetweenTwoConceptsLocal)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\nfunction CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1, linker_1) {\n return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, both = false, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d, _e, _f;\n let startTime = performance.now();\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateConnectionBetweenTwoConceptsLocal', { ofTheConcept, toTheConcept, linker, both, actions });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error('CreateConnectionBetweenTwoConceptsLocal sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_0__.handleServiceWorkerException)(error);\n }\n }\n var userId = ofTheConcept.userId;\n if (both) {\n let prefix1 = ((_e = toTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) + \"_s\";\n let linkerAdd1 = linker + \"_by\";\n let backwardLinker = prefix1 + \"_\" + linkerAdd1;\n // if(count){\n // await CountRelationship(linkerAdd1, toTheConcept, userId);\n // }\n var connectionConceptReverse = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.MakeTheInstanceConceptLocal)(\"connection\", backwardLinker, false, 999, 999, 999, 0, actions);\n let pewCon = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.CreateTheConnectionLocal)(toTheConcept.id, ofTheConcept.id, connectionConceptReverse.id, 1000, undefined, undefined, actions);\n }\n let prefix = ((_f = ofTheConcept.type) === null || _f === void 0 ? void 0 : _f.characterValue) + \"_s\";\n let linkerAdd = linker + \"_s\";\n let forwardLinker = prefix + \"_\" + linkerAdd;\n // if(count){\n // // await CountRelationship(linkerAdd, ofTheConcept, userId);\n // }\n var connectionConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.MakeTheInstanceConceptLocal)(\"connection\", forwardLinker, false, 999, 999, 999, undefined, actions);\n let newConnection = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.CreateTheConnectionLocal)(ofTheConcept.id, toTheConcept.id, connectionConcept.id, 1000, undefined, undefined, actions);\n // Add Log\n // Logger.logInfo(\n // startTime, \n // userId, \n // 'create', \n // undefined, \n // undefined, \n // 200, \n // newConnection, \n // 'CreateConnectionBetweenTwoConceptsLocal',\n // ['ofTheConceptId', 'toTheConceptId', 'linker', 'both'], \n // undefined,\n // undefined\n // )\n return newConnection;\n }\n catch (ex) {\n // Add Log\n _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__.Logger.logError(startTime, ofTheConcept.userId, 'create', undefined, undefined, 500, ex, 'CreateConnectionBetweenTwoConceptsLocal', [ofTheConcept, toTheConcept, linker, both], undefined, undefined);\n throw ex;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts?");
|
|
1457
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* binding */ CreateConnectionBetweenTwoConceptsLocal)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\nfunction CreateConnectionBetweenTwoConceptsLocal(ofTheConcept_1, toTheConcept_1, linker_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (ofTheConcept, toTheConcept, linker, both = false, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d, _e, _f;\n _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__.Logger.logfunction(CreateConnectionBetweenTwoConceptsLocal, arguments_1);\n let startTime = performance.now();\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_0__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.sendMessage)('CreateConnectionBetweenTwoConceptsLocal', { ofTheConcept, toTheConcept, linker, both, actions });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error('CreateConnectionBetweenTwoConceptsLocal sw error: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_0__.handleServiceWorkerException)(error);\n }\n }\n var userId = ofTheConcept.userId;\n if (both) {\n let prefix1 = ((_e = toTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) + \"_s\";\n let linkerAdd1 = linker + \"_by\";\n let backwardLinker = prefix1 + \"_\" + linkerAdd1;\n // if(count){\n // await CountRelationship(linkerAdd1, toTheConcept, userId);\n // }\n var connectionConceptReverse = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.MakeTheInstanceConceptLocal)(\"connection\", backwardLinker, false, 999, 999, 999, 0, actions);\n let pewCon = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.CreateTheConnectionLocal)(toTheConcept.id, ofTheConcept.id, connectionConceptReverse.id, 1000, undefined, undefined, actions);\n }\n let prefix = ((_f = ofTheConcept.type) === null || _f === void 0 ? void 0 : _f.characterValue) + \"_s\";\n let linkerAdd = linker + \"_s\";\n let forwardLinker = prefix + \"_\" + linkerAdd;\n // if(count){\n // // await CountRelationship(linkerAdd, ofTheConcept, userId);\n // }\n var connectionConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.MakeTheInstanceConceptLocal)(\"connection\", forwardLinker, false, 999, 999, 999, undefined, actions);\n let newConnection = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.CreateTheConnectionLocal)(ofTheConcept.id, toTheConcept.id, connectionConcept.id, 1000, undefined, undefined, actions);\n // Add Log\n // Logger.logInfo(\n // startTime, \n // userId, \n // 'create', \n // undefined, \n // undefined, \n // 200, \n // newConnection, \n // 'CreateConnectionBetweenTwoConceptsLocal',\n // ['ofTheConceptId', 'toTheConceptId', 'linker', 'both'], \n // undefined,\n // undefined\n // )\n return newConnection;\n }\n catch (ex) {\n // Add Log\n _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_1__.Logger.logError(startTime, ofTheConcept.userId, 'create', undefined, undefined, 500, ex, 'CreateConnectionBetweenTwoConceptsLocal', [ofTheConcept, toTheConcept, linker, both], undefined, undefined);\n throw ex;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts?");
|
|
1458
1458
|
|
|
1459
1459
|
/***/ }),
|
|
1460
1460
|
|
|
@@ -1594,7 +1594,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1594
1594
|
\***********************************************************/
|
|
1595
1595
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1596
1596
|
|
|
1597
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* binding */ MakeTheInstanceConceptLocal)\n/* harmony export */ });\n/* harmony import */ var _CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateTheConceptLocal */ \"./src/Services/Local/CreateTheConceptLocal.ts\");\n/* harmony import */ var _MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n/**\n * This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\n * concept connection system. This function is the building block of the concept connection system.\n * This function automatically passes the concept to be synced to the background. Next time you sync the data this concept will also be created in the backend.\n * @param type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\n * @param referent the actual value of the concept. The actual name of value of the concept.\n * @param composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\n * connected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\n * and creates only in the case that the concept does not already exists with its type and value as its unique identifier.\n * @param userId the userId of the creator.\n * @param accessId this is the accessId of the creator. By default should be 4.\n * @param sessionInformationId this is the session that is created by the system.\n * @param referentId In case we need this concept to refer to any other concept.\n * @param actions InnerActions Array for capturing concepts and connection\n * @returns a concept which is either newly created or an older concept that already exists.\n */\nfunction MakeTheInstanceConceptLocal(type_1, referent_1) {\n return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, accessId, sessionInformationId = 999, referentId = 0, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d;\n let startTime = performance.now();\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('MakeTheInstanceConceptLocal', { type, referent, composition, userId, accessId, sessionInformationId, referentId, actions });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error('MakeTheInstanceConceptLocal error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n try {\n let sessionInformationId = 999;\n let categoryId = 4;\n let sessionInformationUserId = userId;\n // change this\n let accessId = 4;\n let stringToCheck = \"\";\n let stringLength = referent.length;\n let typeConcept;\n let concept;\n let startsWithThe = type.startsWith(\"the_\");\n if (startsWithThe) {\n stringToCheck = type;\n }\n else {\n stringToCheck = \"the_\" + type;\n }\n if (composition) {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(type, sessionInformationId, userId, userId, actions);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, type, userId, categoryId, typeConcept.id, accessId, true, referentId, actions);\n concept = conceptString;\n }\n else if (stringLength > 255) {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(stringToCheck, sessionInformationId, sessionInformationUserId, userId, actions);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, stringToCheck, userId, categoryId, typeConcept.id, accessId, undefined, undefined, actions);\n concept = conceptString;\n }\n else {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(stringToCheck, sessionInformationId, sessionInformationUserId, userId, actions);\n typeConcept = typeConceptString;\n let conceptByCharTypeString = yield _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__.LocalConceptsData.GetConceptByCharacterAndTypeLocal(referent, typeConcept.id);\n let conceptTypeCharacter = conceptByCharTypeString;\n concept = conceptTypeCharacter;\n if (conceptTypeCharacter.id == 0 && conceptTypeCharacter.userId == 0) {\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, stringToCheck, userId, categoryId, typeConcept.id, accessId, undefined, undefined, actions);\n concept = conceptString;\n }\n }\n concept.type = typeConcept;\n _app__WEBPACK_IMPORTED_MODULE_3__.LocalSyncData.AddConcept(concept);\n // Add Log\n // Logger.logInfo(\n // startTime,\n // userId,\n // \"create\",\n // \"Unknown\",\n // \"Unknown\",\n // 200,\n // concept,\n // \"MakeTheInstanceConceptLocal\",\n // ['type', 'referent', 'composition', 'userId', 'accessId', 'sessionInformationId', 'referentId'],\n // \"UnknownUserAgent\",\n // []\n // );\n actions.concepts.push(concept);\n return concept;\n }\n catch (error) {\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logError(startTime, userId, \"create\", \"Unknown\", \"Unknown\", 500, undefined, \"MakeTheInstanceConceptLocal\", [type, referent, composition, userId, accessId, sessionInformationId, referentId], \"UnknownUserAgent\", []);\n throw error;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/MakeTheInstanceConceptLocal.ts?");
|
|
1597
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* binding */ MakeTheInstanceConceptLocal)\n/* harmony export */ });\n/* harmony import */ var _CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateTheConceptLocal */ \"./src/Services/Local/CreateTheConceptLocal.ts\");\n/* harmony import */ var _MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n/**\n * This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\n * concept connection system. This function is the building block of the concept connection system.\n * This function automatically passes the concept to be synced to the background. Next time you sync the data this concept will also be created in the backend.\n * @param type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\n * @param referent the actual value of the concept. The actual name of value of the concept.\n * @param composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\n * connected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\n * and creates only in the case that the concept does not already exists with its type and value as its unique identifier.\n * @param userId the userId of the creator.\n * @param accessId this is the accessId of the creator. By default should be 4.\n * @param sessionInformationId this is the session that is created by the system.\n * @param referentId In case we need this concept to refer to any other concept.\n * @param actions InnerActions Array for capturing concepts and connection\n * @returns a concept which is either newly created or an older concept that already exists.\n */\nfunction MakeTheInstanceConceptLocal(type_1, referent_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, accessId, sessionInformationId = 999, referentId = 0, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d;\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logfunction(MakeTheInstanceConceptLocal, arguments_1);\n let startTime = performance.now();\n if (_app__WEBPACK_IMPORTED_MODULE_3__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_3__.sendMessage)('MakeTheInstanceConceptLocal', { type, referent, composition, userId, accessId, sessionInformationId, referentId, actions });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error('MakeTheInstanceConceptLocal error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_3__.handleServiceWorkerException)(error);\n }\n }\n try {\n let sessionInformationId = 999;\n let categoryId = 4;\n let sessionInformationUserId = userId;\n // change this\n let accessId = 4;\n let stringToCheck = \"\";\n let stringLength = referent.length;\n let typeConcept;\n let concept;\n let startsWithThe = type.startsWith(\"the_\");\n if (startsWithThe) {\n stringToCheck = type;\n }\n else {\n stringToCheck = \"the_\" + type;\n }\n if (composition) {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(type, sessionInformationId, userId, userId, actions);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, type, userId, categoryId, typeConcept.id, accessId, true, referentId, actions);\n concept = conceptString;\n }\n else if (stringLength > 255) {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(stringToCheck, sessionInformationId, sessionInformationUserId, userId, actions);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, stringToCheck, userId, categoryId, typeConcept.id, accessId, undefined, undefined, actions);\n concept = conceptString;\n }\n else {\n let typeConceptString = yield (0,_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_1__.MakeTheTypeConceptLocal)(stringToCheck, sessionInformationId, sessionInformationUserId, userId, actions);\n typeConcept = typeConceptString;\n let conceptByCharTypeString = yield _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_2__.LocalConceptsData.GetConceptByCharacterAndTypeLocal(referent, typeConcept.id);\n let conceptTypeCharacter = conceptByCharTypeString;\n concept = conceptTypeCharacter;\n if (conceptTypeCharacter.id == 0 && conceptTypeCharacter.userId == 0) {\n let conceptString = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(referent, stringToCheck, userId, categoryId, typeConcept.id, accessId, undefined, undefined, actions);\n concept = conceptString;\n }\n }\n concept.type = typeConcept;\n _app__WEBPACK_IMPORTED_MODULE_3__.LocalSyncData.AddConcept(concept);\n // Add Log\n // Logger.logInfo(\n // startTime,\n // userId,\n // \"create\",\n // \"Unknown\",\n // \"Unknown\",\n // 200,\n // concept,\n // \"MakeTheInstanceConceptLocal\",\n // ['type', 'referent', 'composition', 'userId', 'accessId', 'sessionInformationId', 'referentId'],\n // \"UnknownUserAgent\",\n // []\n // );\n actions.concepts.push(concept);\n return concept;\n }\n catch (error) {\n _app__WEBPACK_IMPORTED_MODULE_3__.Logger.logError(startTime, userId, \"create\", \"Unknown\", \"Unknown\", 500, undefined, \"MakeTheInstanceConceptLocal\", [type, referent, composition, userId, accessId, sessionInformationId, referentId], \"UnknownUserAgent\", []);\n throw error;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/MakeTheInstanceConceptLocal.ts?");
|
|
1598
1598
|
|
|
1599
1599
|
/***/ }),
|
|
1600
1600
|
|
|
@@ -1604,7 +1604,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1604
1604
|
\************************************************/
|
|
1605
1605
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1606
1606
|
|
|
1607
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* binding */ MakeTheTypeConceptLocal)\n/* harmony export */ });\n/* harmony import */ var _CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateTheConceptLocal */ \"./src/Services/Local/CreateTheConceptLocal.ts\");\n/* harmony import */ var _GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _SplitStrings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _MakeTheConceptLocal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MakeTheConceptLocal */ \"./src/Services/Local/MakeTheConceptLocal.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * There are two types of concepts. One type of concept is a type concept. These concepts have no actual value and do not mean\n * anything unless they are associated with other values. These are placeholders like first_name, last_name, age etc that are required in the system.\n * These types need to be created seperately.\n *\n *\n * @param typeString type of the concept that needs to be created.\n * @param sessionId SessionId of the user\n * @param sessionUserId Not required pass 999\n * @param userId UserId of the user creating this concept\n * @param actions InnerActions|undefined actions to collect\n * @returns\n */\nfunction MakeTheTypeConceptLocal(typeString_1, sessionId_1, sessionUserId_1, userId_1) {\n return __awaiter(this, arguments, void 0, function* (typeString, sessionId, sessionUserId, userId, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d;\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)(\"MakeTheTypeConceptLocal\", {\n typeString, sessionId, sessionUserId, userId, actions\n });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error(\"MakeTheTypeConceptLocal error sw: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let accessId = 4;\n let existingConcept = yield (0,_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacterAndCategoryLocal)(typeString);\n if (existingConcept) {\n if (existingConcept.id == 0 || existingConcept.userId == 0) {\n let splittedStringArray = (0,_SplitStrings__WEBPACK_IMPORTED_MODULE_2__.SplitStrings)(typeString);\n if (splittedStringArray[0] == typeString) {\n let concept = yield (0,_MakeTheConceptLocal__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(typeString, \"the\", userId, 1, 51, actions);\n existingConcept = concept;\n }\n else {\n // var categoryConcept = await MakeTheTypeConceptLocal(splittedStringArray[0], sessionId, sessionUserId, userId);\n // var typeConcept = await MakeTheTypeConceptLocal(splittedStringArray[1], sessionId, sessionUserId, userId );\n // if(typeConcept){\n let categoryConcept = yield MakeTheTypeConceptLocal(splittedStringArray[0], sessionId, sessionUserId, userId, actions);\n let typeConcept = yield MakeTheTypeConceptLocal(splittedStringArray[1], sessionId, sessionUserId, userId, actions);\n let concept = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(typeString, splittedStringArray[1], userId, categoryConcept.id, typeConcept.id, accessId, undefined, undefined, actions);\n existingConcept = concept;\n // }\n }\n }\n }\n // LocalSyncData.AddConcept(existingConcept);\n return existingConcept;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/MakeTheTypeLocal.ts?");
|
|
1607
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* binding */ MakeTheTypeConceptLocal)\n/* harmony export */ });\n/* harmony import */ var _CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateTheConceptLocal */ \"./src/Services/Local/CreateTheConceptLocal.ts\");\n/* harmony import */ var _GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _SplitStrings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _MakeTheConceptLocal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MakeTheConceptLocal */ \"./src/Services/Local/MakeTheConceptLocal.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n/**\n * There are two types of concepts. One type of concept is a type concept. These concepts have no actual value and do not mean\n * anything unless they are associated with other values. These are placeholders like first_name, last_name, age etc that are required in the system.\n * These types need to be created seperately.\n *\n *\n * @param typeString type of the concept that needs to be created.\n * @param sessionId SessionId of the user\n * @param sessionUserId Not required pass 999\n * @param userId UserId of the user creating this concept\n * @param actions InnerActions|undefined actions to collect\n * @returns\n */\nfunction MakeTheTypeConceptLocal(typeString_1, sessionId_1, sessionUserId_1, userId_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (typeString, sessionId, sessionUserId, userId, actions = { concepts: [], connections: [] }) {\n var _a, _b, _c, _d;\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(MakeTheTypeConceptLocal, arguments_1);\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)(\"MakeTheTypeConceptLocal\", {\n typeString, sessionId, sessionUserId, userId, actions\n });\n if ((_b = (_a = res === null || res === void 0 ? void 0 : res.actions) === null || _a === void 0 ? void 0 : _a.concepts) === null || _b === void 0 ? void 0 : _b.length)\n actions.concepts = JSON.parse(JSON.stringify(res.actions.concepts));\n if ((_d = (_c = res === null || res === void 0 ? void 0 : res.actions) === null || _c === void 0 ? void 0 : _c.connections) === null || _d === void 0 ? void 0 : _d.length)\n actions.connections = JSON.parse(JSON.stringify(res.actions.connections));\n return res.data;\n }\n catch (error) {\n console.error(\"MakeTheTypeConceptLocal error sw: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let accessId = 4;\n let existingConcept = yield (0,_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacterAndCategoryLocal)(typeString);\n if (existingConcept) {\n if (existingConcept.id == 0 || existingConcept.userId == 0) {\n let splittedStringArray = (0,_SplitStrings__WEBPACK_IMPORTED_MODULE_2__.SplitStrings)(typeString);\n if (splittedStringArray[0] == typeString) {\n let concept = yield (0,_MakeTheConceptLocal__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(typeString, \"the\", userId, 1, 51, actions);\n existingConcept = concept;\n }\n else {\n // var categoryConcept = await MakeTheTypeConceptLocal(splittedStringArray[0], sessionId, sessionUserId, userId);\n // var typeConcept = await MakeTheTypeConceptLocal(splittedStringArray[1], sessionId, sessionUserId, userId );\n // if(typeConcept){\n let categoryConcept = yield MakeTheTypeConceptLocal(splittedStringArray[0], sessionId, sessionUserId, userId, actions);\n let typeConcept = yield MakeTheTypeConceptLocal(splittedStringArray[1], sessionId, sessionUserId, userId, actions);\n let concept = yield (0,_CreateTheConceptLocal__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(typeString, splittedStringArray[1], userId, categoryConcept.id, typeConcept.id, accessId, undefined, undefined, actions);\n existingConcept = concept;\n // }\n }\n }\n }\n // LocalSyncData.AddConcept(existingConcept);\n return existingConcept;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Local/MakeTheTypeLocal.ts?");
|
|
1608
1608
|
|
|
1609
1609
|
/***/ }),
|
|
1610
1610
|
|
|
@@ -1664,7 +1664,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1664
1664
|
\************************************************/
|
|
1665
1665
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1666
1666
|
|
|
1667
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ MakeTheInstanceConcept)\n/* harmony export */ });\n/* harmony import */ var _Api_Create_CreateTheTextData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/Create/CreateTheTextData */ \"./src/Api/Create/CreateTheTextData.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Api_MakeTheNameInBackend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Api/MakeTheNameInBackend */ \"./src/Api/MakeTheNameInBackend.ts\");\n/* harmony import */ var _DataStructures_TheTexts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/TheTexts */ \"./src/DataStructures/TheTexts.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateTheConcept */ \"./src/Services/CreateTheConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n/**\n * This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\n * concept connection system. This function is the building block of the concept connection system.\n * @param type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\n * @param referent the actual value of the concept. The actual name of value of the concept.\n * @param composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\n * connected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\n * and creates only in the case that the concept does not already exists with its type and value as its unique identifier.\n * @param userId the userId of the creator.\n * @param passedAccessId this is the accessId of the creator. By default should be 4.\n * @param passedSessionId this is the session that is created by the system.\n * @param referentId In case we need this concept to refer to any other concept.\n * @returns a concept which is either newly created or an older concept that already exists.\n */\nfunction MakeTheInstanceConcept(type_1, referent_1) {\n return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, passedAccessId = 4, passedSessionId = 999, referentId = 0) {\n let startTime = performance.now();\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)(\"MakeTheInstanceConcept\", {\n type,\n referent,\n composition,\n userId,\n passedAccessId,\n passedSessionId,\n referentId,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"MakeTheInstanceConcept sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let sessionInformationId = passedSessionId;\n let categoryId = 4;\n let categoryUserId = userId;\n let referentUserId = 999;\n let securityId = 999;\n let securityUserId = userId;\n let sessionInformationUserId = userId;\n // change this\n let accessId = passedAccessId;\n let accessUserId = userId;\n let stringToCheck = \"\";\n let stringLength = referent.length;\n let typeConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_5__.CreateDefaultConcept)();\n let concept;\n let startsWithThe = type.startsWith(\"the_\");\n if (startsWithThe) {\n stringToCheck = type;\n }\n else {\n stringToCheck = \"the_\" + type;\n }\n if (composition) {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(type, userId);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(referent, userId, categoryId, typeConcept.id, referentId, accessId, type);\n concept = conceptString;\n }\n else if (stringLength > 255) {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(stringToCheck, userId);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(referent, userId, categoryId, typeConcept.id, referentId, accessId, stringToCheck);\n concept = conceptString;\n let TheTextsData = new _DataStructures_TheTexts__WEBPACK_IMPORTED_MODULE_3__.TheTexts(userId, referent, securityId, securityUserId, accessId, accessUserId, sessionInformationId, sessionInformationUserId, Date.now().toString(), true);\n (0,_Api_Create_CreateTheTextData__WEBPACK_IMPORTED_MODULE_0__.CreateTextData)(TheTextsData);\n }\n else {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(stringToCheck, userId);\n typeConcept = typeConceptString;\n let conceptByCharTypeString = yield (0,_Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacterAndType)(referent, typeConcept.id);\n let conceptTypeCharacter = conceptByCharTypeString;\n concept = conceptTypeCharacter;\n if (conceptTypeCharacter.id == 0 && conceptTypeCharacter.userId == 0) {\n // let makeTheNameString = await MakeTheName(referent,userId, securityId, securityUserId, accessId, accessUserId, sessionInformationId, sessionInformationUserId,typeConcept.id, typeConcept.userId,conceptTypeCharacter );\n // let makeTheNameConcept = makeTheNameString as Concept;\n // concept = conceptTypeCharacter;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__.CreateTheConceptImmediate)(referent, userId, categoryId, typeConcept.id, 12, accessId, stringToCheck);\n concept = conceptString;\n (0,_Api_MakeTheNameInBackend__WEBPACK_IMPORTED_MODULE_2__.MakeTheNameInBackend)(concept.id, `${referent}`, typeConcept.id, userId);\n }\n }\n // if(concept){\n // if(concept.type == null){\n // let conceptType = ConceptsData.GetConcept(concept.typeId);\n // if(conceptType == null && concept.typeId != null && concept.typeId != undefined){\n // let typeConceptStringNew = await GetConcept(concept.typeId);\n // let newTypeConcept = typeConceptStringNew as Concept;\n // concept.type = newTypeConcept;\n // }\n // }\n // }\n concept.type = typeConcept;\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"create\", \"unknown\", undefined, 200, concept, \"MakeTheInstanceConcept\", \n // ['type', 'referent', 'composition', 'userId', 'passedAccessId', 'passedSessionId', 'referentId'], \n // \"unknown\", \n // undefined \n // )\n return concept;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/MakeTheInstanceConcept.ts?");
|
|
1667
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ MakeTheInstanceConcept)\n/* harmony export */ });\n/* harmony import */ var _Api_Create_CreateTheTextData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Api/Create/CreateTheTextData */ \"./src/Api/Create/CreateTheTextData.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Api_MakeTheNameInBackend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Api/MakeTheNameInBackend */ \"./src/Api/MakeTheNameInBackend.ts\");\n/* harmony import */ var _DataStructures_TheTexts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DataStructures/TheTexts */ \"./src/DataStructures/TheTexts.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateTheConcept */ \"./src/Services/CreateTheConcept.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n/**\n * This is the basic function of the concept connection system. This function let's you create a concept within the constraints of the\n * concept connection system. This function is the building block of the concept connection system.\n * @param type this is the type of the concept. You can also think of this as the key of concept. first_name, last_name etc.\n * @param referent the actual value of the concept. The actual name of value of the concept.\n * @param composition this is a boolean that defines if the concept is a composition or not. If this is a composition then other things are also\n * connected internally with this concept. If composition is true then always a new concept is created otherwise it checks if the concept already exists\n * and creates only in the case that the concept does not already exists with its type and value as its unique identifier.\n * @param userId the userId of the creator.\n * @param passedAccessId this is the accessId of the creator. By default should be 4.\n * @param passedSessionId this is the session that is created by the system.\n * @param referentId In case we need this concept to refer to any other concept.\n * @returns a concept which is either newly created or an older concept that already exists.\n */\nfunction MakeTheInstanceConcept(type_1, referent_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (type, referent, composition = false, userId, passedAccessId = 4, passedSessionId = 999, referentId = 0) {\n _app__WEBPACK_IMPORTED_MODULE_4__.Logger.logfunction(MakeTheInstanceConcept, arguments_1);\n let startTime = performance.now();\n if (_app__WEBPACK_IMPORTED_MODULE_4__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.sendMessage)(\"MakeTheInstanceConcept\", {\n type,\n referent,\n composition,\n userId,\n passedAccessId,\n passedSessionId,\n referentId,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"MakeTheInstanceConcept sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_4__.handleServiceWorkerException)(error);\n }\n }\n let sessionInformationId = passedSessionId;\n let categoryId = 4;\n let categoryUserId = userId;\n let referentUserId = 999;\n let securityId = 999;\n let securityUserId = userId;\n let sessionInformationUserId = userId;\n // change this\n let accessId = passedAccessId;\n let accessUserId = userId;\n let stringToCheck = \"\";\n let stringLength = referent.length;\n let typeConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_5__.CreateDefaultConcept)();\n let concept;\n let startsWithThe = type.startsWith(\"the_\");\n if (startsWithThe) {\n stringToCheck = type;\n }\n else {\n stringToCheck = \"the_\" + type;\n }\n if (composition) {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(type, userId);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(referent, userId, categoryId, typeConcept.id, referentId, accessId, type);\n concept = conceptString;\n }\n else if (stringLength > 255) {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(stringToCheck, userId);\n typeConcept = typeConceptString;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(referent, userId, categoryId, typeConcept.id, referentId, accessId, stringToCheck);\n concept = conceptString;\n let TheTextsData = new _DataStructures_TheTexts__WEBPACK_IMPORTED_MODULE_3__.TheTexts(userId, referent, securityId, securityUserId, accessId, accessUserId, sessionInformationId, sessionInformationUserId, Date.now().toString(), true);\n (0,_Api_Create_CreateTheTextData__WEBPACK_IMPORTED_MODULE_0__.CreateTextData)(TheTextsData);\n }\n else {\n let typeConceptString = yield (0,_app__WEBPACK_IMPORTED_MODULE_4__.MakeTheTypeConceptApi)(stringToCheck, userId);\n typeConcept = typeConceptString;\n let conceptByCharTypeString = yield (0,_Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_1__.GetConceptByCharacterAndType)(referent, typeConcept.id);\n let conceptTypeCharacter = conceptByCharTypeString;\n concept = conceptTypeCharacter;\n if (conceptTypeCharacter.id == 0 && conceptTypeCharacter.userId == 0) {\n // let makeTheNameString = await MakeTheName(referent,userId, securityId, securityUserId, accessId, accessUserId, sessionInformationId, sessionInformationUserId,typeConcept.id, typeConcept.userId,conceptTypeCharacter );\n // let makeTheNameConcept = makeTheNameString as Concept;\n // concept = conceptTypeCharacter;\n let conceptString = yield (0,_CreateTheConcept__WEBPACK_IMPORTED_MODULE_6__.CreateTheConceptImmediate)(referent, userId, categoryId, typeConcept.id, 12, accessId, stringToCheck);\n concept = conceptString;\n (0,_Api_MakeTheNameInBackend__WEBPACK_IMPORTED_MODULE_2__.MakeTheNameInBackend)(concept.id, `${referent}`, typeConcept.id, userId);\n }\n }\n // if(concept){\n // if(concept.type == null){\n // let conceptType = ConceptsData.GetConcept(concept.typeId);\n // if(conceptType == null && concept.typeId != null && concept.typeId != undefined){\n // let typeConceptStringNew = await GetConcept(concept.typeId);\n // let newTypeConcept = typeConceptStringNew as Concept;\n // concept.type = newTypeConcept;\n // }\n // }\n // }\n concept.type = typeConcept;\n // Add Log\n // Logger.logInfo(startTime, \"unknown\", \"create\", \"unknown\", undefined, 200, concept, \"MakeTheInstanceConcept\", \n // ['type', 'referent', 'composition', 'userId', 'passedAccessId', 'passedSessionId', 'referentId'], \n // \"unknown\", \n // undefined \n // )\n return concept;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/MakeTheInstanceConcept.ts?");
|
|
1668
1668
|
|
|
1669
1669
|
/***/ }),
|
|
1670
1670
|
|
|
@@ -1704,7 +1704,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1704
1704
|
\*********************************************/
|
|
1705
1705
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1706
1706
|
|
|
1707
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FormatFromConnectionsAlteredArrayExternal: () => (/* binding */ FormatFromConnectionsAlteredArrayExternal),\n/* harmony export */ FormatFunctionData: () => (/* binding */ FormatFunctionData),\n/* harmony export */ FormatFunctionDataForData: () => (/* binding */ FormatFunctionDataForData)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/RegexFunction */ \"./src/Services/Common/RegexFunction.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n/**\n* ## Format DATA-ID ##\n* this function takes in connections and creates a single level objects so that all the data are added to its object/ array.\n* This is then passed on further for stiching.\n* @param connections\n* @param compositionData\n* @param reverse\n* @returns\n*/\nfunction FormatFunctionDataForData(connections_1, compositionData_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, reverse = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n if (!(key in newData)) {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let mytype = (_d = (_c = ofTheConcept === null || ofTheConcept === void 0 ? void 0 : ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"none\";\n let value = ofTheConcept.characterValue;\n let dataCharacter = linkerConcept.characterValue;\n // if there is not connection type defined then put the type of the destination concept.\n if (dataCharacter == \"\") {\n dataCharacter = mytype;\n dataCharacter = (0,_Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__.removeThePrefix)(dataCharacter);\n }\n let data = {\n \"id\": ofTheConcept.id,\n \"data\": {\n [mytype]: value\n }\n };\n let reverseCharater = dataCharacter + \"_reverse\";\n if (reverseCharater.includes(\"_s_\")) {\n // do nothing\n }\n else {\n if (typeof newData[key] == \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = data;\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_f = (_e = ofTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"self\";\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n if (!(key in newData)) {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n try {\n let mytype = (_h = (_g = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"none\";\n let value = toTheConcept.characterValue;\n let dataCharacter = linkerConcept.characterValue;\n let isComp = false;\n // if there is not connection type defined then put the type of the destination concept.\n if (dataCharacter == \"\") {\n dataCharacter = mytype;\n dataCharacter = (0,_Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__.removeThePrefix)(dataCharacter);\n isComp = true;\n }\n let data = {\n \"id\": toTheConcept.id,\n \"data\": {\n [mytype]: value\n }\n };\n if (isNaN(Number(dataCharacter))) {\n if (dataCharacter.includes(\"_s_\")) {\n // do nothing\n }\n else {\n if (typeof newData[key] == \"string\") {\n newData[key] = {};\n }\n newData[key][dataCharacter] = data;\n }\n }\n else {\n newData[key] = [];\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n return compositionData;\n });\n}\n/**\n* ############ Format is data-id and is used for list. ############\n* This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n* The list format is helpful because you do not have to go over each individual query.\n* @param connections the type connections that need (external connections) to be passed\n* @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n* @param mainComposition this is list of ids of the main composition that builds the tree\n* @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n* @returns\n*/\nfunction FormatFromConnectionsAlteredArrayExternal(connections_1, compositionData_1, newCompositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, newCompositionData, mainComposition, reverse = [], CountDictionary) {\n var _a, _b, _c, _d, _e, _f, _g;\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n if (toTheConcept.id in compositionData) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n let flag = false;\n if (connections[i].toTheConceptId in compositionData) {\n flag = true;\n }\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n let newType = typeof newData[key];\n if (newType == \"string\") {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let isComp = compositionData[connections[i].ofTheConceptId];\n if (isComp) {\n let data = {\n \"id\": ofTheConcept.id,\n \"data\": compositionData[connections[i].ofTheConceptId],\n \"created_on\": connections[i].entryTimeStamp\n };\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(data);\n }\n else {\n if (reverseCharater.includes(\"_s_\")) {\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(data);\n }\n else {\n newData[key][reverseCharater] = data;\n }\n }\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n if (ofTheConcept.id in compositionData) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_d = (_c = ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"self\";\n let flag = false;\n if (connections[i].toTheConceptId in compositionData) {\n flag = true;\n }\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n let newType = typeof newData[key];\n if (newType == \"string\") {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n let isComp = true;\n let linkerConceptValue = linkerConcept.characterValue;\n if (linkerConceptValue == \"\") {\n linkerConceptValue = toTheConcept.characterValue;\n isComp = true;\n }\n if (linkerConceptValue == \"\") {\n linkerConceptValue = (_e = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue;\n }\n try {\n let mytype = (_g = (_f = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _f === void 0 ? void 0 : _f.characterValue) !== null && _g !== void 0 ? _g : \"none\";\n let myData = compositionData[connections[i].toTheConceptId];\n if (myData) {\n let data = {\n \"id\": toTheConcept.id,\n \"data\": compositionData[connections[i].toTheConceptId],\n \"created_on\": connections[i].entryTimeStamp\n };\n if (Array.isArray(newData[key])) {\n if (isComp) {\n newData[key].push(myData);\n }\n else {\n newData[key].push(myData);\n }\n }\n else {\n if (Array.isArray(newData[key][linkerConceptValue])) {\n newData[key][linkerConcept.characterValue].push(data);\n }\n else {\n if (linkerConceptValue.includes(\"_s_\")) {\n newData[key][linkerConceptValue] = [];\n newData[key][linkerConceptValue].push(data);\n }\n else {\n newData[key][linkerConceptValue] = data;\n }\n }\n }\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = {};\n mymainData[\"id\"] = mainComposition[i];\n mymainData[\"data\"] = compositionData[mainComposition[i]];\n mainData.push(mymainData);\n }\n return mainData;\n });\n}\n/**\n * ## Format DATA-ID ##\n * this function takes in connections and creates a single level objects so that all the data are added to its object/ array.\n * This is then passed on further for stiching.\n * @param connections\n * @param compositionData\n * @param reverse\n * @returns\n */\nfunction FormatFunctionData(connections_1, compositionData_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, reverse = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let mytype = (_d = (_c = ofTheConcept === null || ofTheConcept === void 0 ? void 0 : ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"none\";\n let value = ofTheConcept.characterValue;\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (reverseCharater.includes(\"_s_\")) {\n if (!(ofTheConcept.id in compositionData)) {\n compositionData[ofTheConcept.id] = {};\n }\n compositionData[ofTheConcept.id][mytype] = value;\n }\n compositionData[toTheConcept.id] = {};\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_f = (_e = ofTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"self\";\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n try {\n let mytype = (_h = (_g = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"none\";\n let value = toTheConcept.characterValue;\n if (linkerConcept.characterValue.includes(\"_s_\")) {\n if (!(toTheConcept.id in compositionData)) {\n compositionData[toTheConcept.id] = {};\n }\n compositionData[toTheConcept.id][mytype] = value;\n }\n compositionData[ofTheConcept.id] = {};\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n return compositionData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/DataIdFormat.ts?");
|
|
1707
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FormatFromConnectionsAlteredArrayExternal: () => (/* binding */ FormatFromConnectionsAlteredArrayExternal),\n/* harmony export */ FormatFunctionData: () => (/* binding */ FormatFunctionData),\n/* harmony export */ FormatFunctionDataForData: () => (/* binding */ FormatFunctionDataForData)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/RegexFunction */ \"./src/Services/Common/RegexFunction.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n/**\n* ## Format DATA-ID ##\n* this function takes in connections and creates a single level objects so that all the data are added to its object/ array.\n* This is then passed on further for stiching.\n* @param connections\n* @param compositionData\n* @param reverse\n* @returns\n*/\nfunction FormatFunctionDataForData(connections_1, compositionData_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, reverse = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(FormatFunctionDataForData, arguments_1);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n if (!(key in newData)) {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let mytype = (_d = (_c = ofTheConcept === null || ofTheConcept === void 0 ? void 0 : ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"none\";\n let value = ofTheConcept.characterValue;\n let dataCharacter = linkerConcept.characterValue;\n // if there is not connection type defined then put the type of the destination concept.\n if (dataCharacter == \"\") {\n dataCharacter = mytype;\n dataCharacter = (0,_Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__.removeThePrefix)(dataCharacter);\n }\n let data = {\n \"id\": ofTheConcept.id,\n \"data\": {\n [mytype]: value\n }\n };\n let reverseCharater = dataCharacter + \"_reverse\";\n if (reverseCharater.includes(\"_s_\")) {\n // do nothing\n }\n else {\n if (typeof newData[key] == \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = data;\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_f = (_e = ofTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"self\";\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n if (!(key in newData)) {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n try {\n let mytype = (_h = (_g = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"none\";\n let value = toTheConcept.characterValue;\n let dataCharacter = linkerConcept.characterValue;\n let isComp = false;\n // if there is not connection type defined then put the type of the destination concept.\n if (dataCharacter == \"\") {\n dataCharacter = mytype;\n dataCharacter = (0,_Common_RegexFunction__WEBPACK_IMPORTED_MODULE_1__.removeThePrefix)(dataCharacter);\n isComp = true;\n }\n let data = {\n \"id\": toTheConcept.id,\n \"data\": {\n [mytype]: value\n }\n };\n if (isNaN(Number(dataCharacter))) {\n if (dataCharacter.includes(\"_s_\")) {\n // do nothing\n }\n else {\n if (typeof newData[key] == \"string\") {\n newData[key] = {};\n }\n newData[key][dataCharacter] = data;\n }\n }\n else {\n newData[key] = [];\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n return compositionData;\n });\n}\n/**\n* ############ Format is data-id and is used for list. ############\n* This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n* The list format is helpful because you do not have to go over each individual query.\n* @param connections the type connections that need (external connections) to be passed\n* @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n* @param mainComposition this is list of ids of the main composition that builds the tree\n* @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n* @returns\n*/\nfunction FormatFromConnectionsAlteredArrayExternal(connections_1, compositionData_1, newCompositionData_1, mainComposition_1) {\n var arguments_2 = arguments;\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, newCompositionData, mainComposition, reverse = [], CountDictionary) {\n var _a, _b, _c, _d, _e, _f, _g;\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(FormatFromConnectionsAlteredArrayExternal, arguments_2);\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n if (toTheConcept.id in compositionData) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n let flag = false;\n if (connections[i].toTheConceptId in compositionData) {\n flag = true;\n }\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n let newType = typeof newData[key];\n if (newType == \"string\") {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let isComp = compositionData[connections[i].ofTheConceptId];\n if (isComp) {\n let data = {\n \"id\": ofTheConcept.id,\n \"data\": compositionData[connections[i].ofTheConceptId],\n \"created_on\": connections[i].entryTimeStamp\n };\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(data);\n }\n else {\n if (reverseCharater.includes(\"_s_\")) {\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(data);\n }\n else {\n newData[key][reverseCharater] = data;\n }\n }\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n if (ofTheConcept.id in compositionData) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_d = (_c = ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"self\";\n let flag = false;\n if (connections[i].toTheConceptId in compositionData) {\n flag = true;\n }\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n let newType = typeof newData[key];\n if (newType == \"string\") {\n newData[key] = {};\n }\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n let isComp = true;\n let linkerConceptValue = linkerConcept.characterValue;\n if (linkerConceptValue == \"\") {\n linkerConceptValue = toTheConcept.characterValue;\n isComp = true;\n }\n if (linkerConceptValue == \"\") {\n linkerConceptValue = (_e = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue;\n }\n try {\n let mytype = (_g = (_f = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _f === void 0 ? void 0 : _f.characterValue) !== null && _g !== void 0 ? _g : \"none\";\n let myData = compositionData[connections[i].toTheConceptId];\n if (myData) {\n let data = {\n \"id\": toTheConcept.id,\n \"data\": compositionData[connections[i].toTheConceptId],\n \"created_on\": connections[i].entryTimeStamp\n };\n if (Array.isArray(newData[key])) {\n if (isComp) {\n newData[key].push(myData);\n }\n else {\n newData[key].push(myData);\n }\n }\n else {\n if (Array.isArray(newData[key][linkerConceptValue])) {\n newData[key][linkerConcept.characterValue].push(data);\n }\n else {\n if (linkerConceptValue.includes(\"_s_\")) {\n newData[key][linkerConceptValue] = [];\n newData[key][linkerConceptValue].push(data);\n }\n else {\n newData[key][linkerConceptValue] = data;\n }\n }\n }\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = {};\n mymainData[\"id\"] = mainComposition[i];\n mymainData[\"data\"] = compositionData[mainComposition[i]];\n mainData.push(mymainData);\n }\n return mainData;\n });\n}\n/**\n * ## Format DATA-ID ##\n * this function takes in connections and creates a single level objects so that all the data are added to its object/ array.\n * This is then passed on further for stiching.\n * @param connections\n * @param compositionData\n * @param reverse\n * @returns\n */\nfunction FormatFunctionData(connections_1, compositionData_1) {\n var arguments_3 = arguments;\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, reverse = []) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n _app__WEBPACK_IMPORTED_MODULE_0__.Logger.logfunction(FormatFunctionData, arguments_3);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n let ofTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].ofTheConceptId);\n let toTheConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].toTheConceptId);\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_b = (_a = toTheConcept.type) === null || _a === void 0 ? void 0 : _a.characterValue) !== null && _b !== void 0 ? _b : \"self\";\n if (connections[i].toTheConceptId in compositionData) {\n newData = compositionData[connections[i].toTheConceptId];\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].toTheConceptId] = newData;\n }\n try {\n let mytype = (_d = (_c = ofTheConcept === null || ofTheConcept === void 0 ? void 0 : ofTheConcept.type) === null || _c === void 0 ? void 0 : _c.characterValue) !== null && _d !== void 0 ? _d : \"none\";\n let value = ofTheConcept.characterValue;\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (reverseCharater.includes(\"_s_\")) {\n if (!(ofTheConcept.id in compositionData)) {\n compositionData[ofTheConcept.id] = {};\n }\n compositionData[ofTheConcept.id][mytype] = value;\n }\n compositionData[toTheConcept.id] = {};\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (ofTheConcept.id != 0 && toTheConcept.id != 0) {\n let newData;\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetTheConcept)(connections[i].typeId);\n let key = (_f = (_e = ofTheConcept.type) === null || _e === void 0 ? void 0 : _e.characterValue) !== null && _f !== void 0 ? _f : \"self\";\n if (connections[i].ofTheConceptId in compositionData) {\n newData = compositionData[connections[i].ofTheConceptId];\n }\n else {\n newData = {};\n newData[key] = {};\n compositionData[connections[i].ofTheConceptId] = newData;\n }\n try {\n let mytype = (_h = (_g = toTheConcept === null || toTheConcept === void 0 ? void 0 : toTheConcept.type) === null || _g === void 0 ? void 0 : _g.characterValue) !== null && _h !== void 0 ? _h : \"none\";\n let value = toTheConcept.characterValue;\n if (linkerConcept.characterValue.includes(\"_s_\")) {\n if (!(toTheConcept.id in compositionData)) {\n compositionData[toTheConcept.id] = {};\n }\n compositionData[toTheConcept.id][mytype] = value;\n }\n compositionData[ofTheConcept.id] = {};\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n return compositionData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/DataIdFormat.ts?");
|
|
1708
1708
|
|
|
1709
1709
|
/***/ }),
|
|
1710
1710
|
|
|
@@ -1744,7 +1744,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1744
1744
|
\***************************************************/
|
|
1745
1745
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1746
1746
|
|
|
1747
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DataIdBuildLayer: () => (/* binding */ DataIdBuildLayer),\n/* harmony export */ FormatConceptsAndConnections: () => (/* binding */ FormatConceptsAndConnections),\n/* harmony export */ FormatFromConnections: () => (/* binding */ FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* binding */ FormatFromConnectionsAltered),\n/* harmony export */ FormatFromConnectionsAlteredArray: () => (/* binding */ FormatFromConnectionsAlteredArray),\n/* harmony export */ SearchLinkMultipleAll: () => (/* binding */ SearchLinkMultipleAll)\n/* harmony export */ });\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction SearchLinkMultipleAll(searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\", caller = null, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n try {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('SearchLinkMultipleAll', { searchQuery, token, caller, format });\n // console.log('data received search from sw', res)\n return res.data;\n }\n }\n catch (error) {\n console.error('SearchLinkMultipleAll error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n let conceptIds = [];\n let linkers = [];\n let connections = [];\n let reverse = [];\n let mainCompositionId = searchQuery[0].composition;\n let conceptsConnections = {};\n let result = {};\n if (caller === null || caller === void 0 ? void 0 : caller.isDataLoaded) {\n conceptsConnections.compositionIds = (_a = caller.conceptIds) === null || _a === void 0 ? void 0 : _a.slice();\n conceptsConnections.internalConnections = (_b = caller.internalConnections) === null || _b === void 0 ? void 0 : _b.slice();\n conceptsConnections.linkers = (_c = caller.linkers) === null || _c === void 0 ? void 0 : _c.slice();\n conceptsConnections.reverse = (_d = caller.reverse) === null || _d === void 0 ? void 0 : _d.slice();\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n else {\n console.log('calling api');\n conceptsConnections = yield (0,_Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleApi)(searchQuery, token);\n console.log('calling api end');\n if (caller) {\n caller.conceptIds = (_e = conceptsConnections.compositionIds) === null || _e === void 0 ? void 0 : _e.slice();\n caller.internalConnections = (_f = conceptsConnections.internalConnections) === null || _f === void 0 ? void 0 : _f.slice();\n caller.linkers = (_g = conceptsConnections.linkers) === null || _g === void 0 ? void 0 : _g.slice();\n caller.reverse = (_h = conceptsConnections.reverse) === null || _h === void 0 ? void 0 : _h.slice();\n caller.isDataLoaded = true;\n }\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n let out = yield DataIdBuildLayer(linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery[0], format);\n return out;\n }\n catch (e) {\n console.log(\"this is the error in the search link multiple\", e);\n throw e;\n }\n });\n}\n/**\n * ######### This layer builds the data. Format is dataid ##########\n * @param linkers list of ids that help us\n * @param conceptIds this is all the concept ids that need to be composited\n * @param connections these are the internal connections of the compositions that help in creating individual compositions\n * @param reverse this is the list of connection ids that need to show reverse connections(to->from)\n * @param mainCompositionId this is the main centre point of this data.\n * @returns\n */\nfunction DataIdBuildLayer(linkers_1, conceptIds_1, connections_1, reverse_1, mainCompositionId_1, searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n try {\n let prefetchConnections = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetConnectionDataPrefetch)(linkers);\n let concepts;\n let out;\n if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.JUSTDATA) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObject)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.NORMAL) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObjectNormal)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == 100) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObjectNew)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.LISTNORMAL) {\n out = yield (0,_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__.formatDataArrayNormal)(linkers, conceptIds, connections, searchQuery.ofCompositions, reverse);\n }\n else {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObject)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n return out;\n }\n catch (err) {\n console.log('Error Occured in build layer', err);\n return undefined;\n }\n });\n}\n/**\n * ## Format is DATAID ##\n * This is altered format and is different from others because it passes all the connections prebuilt/prefetched\n * This will not let the connections to be again fetched from the memory.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is the id of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAltered(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = {};\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n/**\n * ######### Format is normal ######### used for listing.\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatConceptsAndConnections(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ############ Format is data-id and is used for list. ############\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAlteredArray(connections_1, compositionData_1, conceptIds_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, conceptIds, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\n * @param linkers this is the list of linkers that\n * @param compositionData\n * @param mainComposition\n * @param reverse list of connection ids that need to show reverse conneciton.\n * @returns\n */\nfunction FormatFromConnections(linkers_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, compositionData, mainComposition, reverse = []) {\n let mainData = {};\n let connections = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConnectionBulk)(linkers);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(myConcepts);\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n // console.log(\"this is the new data\", newData);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/SearchLinkMultiple.ts?");
|
|
1747
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DataIdBuildLayer: () => (/* binding */ DataIdBuildLayer),\n/* harmony export */ FormatConceptsAndConnections: () => (/* binding */ FormatConceptsAndConnections),\n/* harmony export */ FormatFromConnections: () => (/* binding */ FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* binding */ FormatFromConnectionsAltered),\n/* harmony export */ FormatFromConnectionsAlteredArray: () => (/* binding */ FormatFromConnectionsAlteredArray),\n/* harmony export */ SearchLinkMultipleAll: () => (/* binding */ SearchLinkMultipleAll)\n/* harmony export */ });\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction SearchLinkMultipleAll(searchQuery_1) {\n var arguments_1 = arguments;\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\", caller = null, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n _app__WEBPACK_IMPORTED_MODULE_2__.Logger.logfunction(SearchLinkMultipleAll, arguments_1);\n try {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('SearchLinkMultipleAll', { searchQuery, token, caller, format });\n // console.log('data received search from sw', res)\n return res.data;\n }\n }\n catch (error) {\n console.error('SearchLinkMultipleAll error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n let conceptIds = [];\n let linkers = [];\n let connections = [];\n let reverse = [];\n let mainCompositionId = searchQuery[0].composition;\n let conceptsConnections = {};\n let result = {};\n if (caller === null || caller === void 0 ? void 0 : caller.isDataLoaded) {\n conceptsConnections.compositionIds = (_a = caller.conceptIds) === null || _a === void 0 ? void 0 : _a.slice();\n conceptsConnections.internalConnections = (_b = caller.internalConnections) === null || _b === void 0 ? void 0 : _b.slice();\n conceptsConnections.linkers = (_c = caller.linkers) === null || _c === void 0 ? void 0 : _c.slice();\n conceptsConnections.reverse = (_d = caller.reverse) === null || _d === void 0 ? void 0 : _d.slice();\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n else {\n console.log('calling api');\n conceptsConnections = yield (0,_Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleApi)(searchQuery, token);\n console.log('calling api end');\n if (caller) {\n caller.conceptIds = (_e = conceptsConnections.compositionIds) === null || _e === void 0 ? void 0 : _e.slice();\n caller.internalConnections = (_f = conceptsConnections.internalConnections) === null || _f === void 0 ? void 0 : _f.slice();\n caller.linkers = (_g = conceptsConnections.linkers) === null || _g === void 0 ? void 0 : _g.slice();\n caller.reverse = (_h = conceptsConnections.reverse) === null || _h === void 0 ? void 0 : _h.slice();\n caller.isDataLoaded = true;\n }\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n let out = yield DataIdBuildLayer(linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery[0], format);\n return out;\n }\n catch (e) {\n console.log(\"this is the error in the search link multiple\", e);\n throw e;\n }\n });\n}\n/**\n * ######### This layer builds the data. Format is dataid ##########\n * @param linkers list of ids that help us\n * @param conceptIds this is all the concept ids that need to be composited\n * @param connections these are the internal connections of the compositions that help in creating individual compositions\n * @param reverse this is the list of connection ids that need to show reverse connections(to->from)\n * @param mainCompositionId this is the main centre point of this data.\n * @returns\n */\nfunction DataIdBuildLayer(linkers_1, conceptIds_1, connections_1, reverse_1, mainCompositionId_1, searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n try {\n let prefetchConnections = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetConnectionDataPrefetch)(linkers);\n let concepts;\n let out;\n if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.JUSTDATA) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObject)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.NORMAL) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObjectNormal)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == 100) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObjectNew)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.LISTNORMAL) {\n out = yield (0,_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__.formatDataArrayNormal)(linkers, conceptIds, connections, searchQuery.ofCompositions, reverse);\n }\n else {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObject)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n return out;\n }\n catch (err) {\n console.log('Error Occured in build layer', err);\n return undefined;\n }\n });\n}\n/**\n * ## Format is DATAID ##\n * This is altered format and is different from others because it passes all the connections prebuilt/prefetched\n * This will not let the connections to be again fetched from the memory.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is the id of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAltered(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = {};\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n/**\n * ######### Format is normal ######### used for listing.\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatConceptsAndConnections(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ############ Format is data-id and is used for list. ############\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAlteredArray(connections_1, compositionData_1, conceptIds_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, conceptIds, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\n * @param linkers this is the list of linkers that\n * @param compositionData\n * @param mainComposition\n * @param reverse list of connection ids that need to show reverse conneciton.\n * @returns\n */\nfunction FormatFromConnections(linkers_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, compositionData, mainComposition, reverse = []) {\n let mainData = {};\n let connections = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConnectionBulk)(linkers);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(myConcepts);\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n // console.log(\"this is the new data\", newData);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/SearchLinkMultiple.ts?");
|
|
1748
1748
|
|
|
1749
1749
|
/***/ }),
|
|
1750
1750
|
|
|
@@ -1804,7 +1804,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1804
1804
|
\*******************************************/
|
|
1805
1805
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1806
1806
|
|
|
1807
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ UpdateComposition)\n/* harmony export */ });\n/* harmony import */ var _Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helpers/UniqueInsert */ \"./src/Helpers/UniqueInsert.ts\");\n/* harmony import */ var _Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helpers/CheckIfExists */ \"./src/Helpers/CheckIfExists.ts\");\n/* harmony import */ var _Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Helpers/RemoveFromArray */ \"./src/Helpers/RemoveFromArray.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _CreateTheConnection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _DeleteConnection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// function to update the cache composition\nfunction UpdateComposition(patcherStructure) {\n return __awaiter(this, void 0, void 0, function* () {\n if (_app__WEBPACK_IMPORTED_MODULE_13__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_13__.sendMessage)(\"UpdateComposition\", {\n patcherStructure,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"UpdateComposition sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_13__.handleServiceWorkerException)(error);\n }\n }\n // get all the default userId, sessionId, accessId passed by the patcherStructure\n const userId = patcherStructure.userId;\n const sessionId = patcherStructure.sessionId;\n const accessId = patcherStructure.accessId;\n let connectionList = [];\n const conceptList = [];\n let composition = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n let parentConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n const toDeleteConcepts = [];\n // the main composition Id that has the data that needs to be patched\n let compositionId = patcherStructure.compositionId;\n // if you want to edit the subcompositions of the composition then you have to pass to this\n const ofTheConceptId = patcherStructure.ofTheCompositionId;\n let toDeleteConnections = [];\n if (compositionId < 0) {\n let localConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(compositionId, userId);\n if (localConcept.id > 0) {\n compositionId = localConcept.id;\n }\n else {\n return null;\n }\n }\n // get all connections from the backend because it needs latest data\n const connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_4__.GetAllConnectionsOfComposition)(compositionId);\n connectionList = connectionListString;\n const conceptIdList = [];\n const compositionCache = new _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_11__.Composition();\n const compositionList = [];\n compositionCache.id = compositionId;\n // put this in the upper section before updating because this will tell all other distributed\n //servers to destroy the copy of the composition that they have as new composition is coming up\n compositionCache.isUpdating();\n // get all the connections that are inside of the composition and store them in\n let allConcepts = [];\n for (let i = 0; i < connectionList.length; i++) {\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(compositionList, connectionList[i].ofTheConceptId);\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(conceptIdList, connectionList[i].ofTheConceptId);\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(conceptIdList, connectionList[i].toTheConceptId);\n allConcepts.push(connectionList[i].ofTheConceptId);\n }\n compositionCache.subcompositions = compositionList;\n compositionCache.connections = connectionList;\n // get all the concepts that are inside of the composition and store them in a conceptList\n for (let i = 0; i < conceptIdList.length; i++) {\n const conceptString = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(conceptIdList[i]);\n const concept = conceptString;\n if (compositionId == conceptIdList[i]) {\n composition = concept;\n }\n if (ofTheConceptId == conceptIdList[i]) {\n parentConcept = concept;\n }\n conceptList.push(concept);\n }\n // now trying to patch the new object into the composition\n const object = patcherStructure.patchObject;\n for (const key in object) {\n let insertingConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n const value = object[key];\n let localConcept = composition;\n // if the immedidate parent exists in the composition (i.e. for multilevel composition)\n if (parentConcept.id > 0) {\n localConcept = parentConcept;\n }\n if (Array.isArray(value) || typeof value == \"object\") {\n insertingConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(key, \"\", true, composition.userId, 4, 999);\n compositionCache.subcompositions.push(insertingConcept.id);\n // check if the concept exists in the concept list because if it exists then we have to delete old connection\n const ExistingConcepts = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckIfTypeConceptsExistsInArray)(conceptList, insertingConcept);\n // if the existing concept then start the process for deleting the concept in the list\n for (let i = 0; i < ExistingConcepts.length; i++) {\n if (ExistingConcepts[i].id > 0) {\n const deletingConnections = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckAllConnectionsConnectedInConnectionArray)(compositionCache.connections, ExistingConcepts[i].id);\n toDeleteConnections = toDeleteConnections.concat(deletingConnections);\n toDeleteConcepts.push(ExistingConcepts[i]);\n }\n }\n yield (0,_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_12__.CreateTheCompositionWithCache)(object[key], insertingConcept.id, insertingConcept.userId, composition.id, composition.userId, 4, 999, compositionCache);\n }\n else {\n // make the new concept in the object\n insertingConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(key, value, false, userId, accessId, sessionId);\n // check if the concept exists in the concept list because if it exists then we have to delete old connection\n const ExistingConcepts = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckIfTypeConceptsExistsInArray)(conceptList, insertingConcept);\n // if the existing concept then start the process for deleting the concept in the list\n for (let i = 0; i < ExistingConcepts.length; i++) {\n if (ExistingConcepts[i].id > 0) {\n const deletingConnections = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckAllConnectionsConnectedInConnectionArray)(compositionCache.connections, ExistingConcepts[i].id);\n toDeleteConnections = toDeleteConnections.concat(deletingConnections);\n toDeleteConcepts.push(ExistingConcepts[i]);\n }\n }\n }\n // create the connection between the new concept and the old composition\n const connectionString = (0,_CreateTheConnection__WEBPACK_IMPORTED_MODULE_7__.createTheConnection)(localConcept.id, localConcept.userId, insertingConcept.id, composition.id);\n const connection = connectionString;\n conceptList.push(insertingConcept);\n compositionCache.connections.push(connection);\n }\n // now you have to delete the connection in bulk\n for (let j = 0; j < toDeleteConnections.length; j++) {\n // remove from the cache list\n (0,_Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__.RemoveConnectionFromList)(compositionCache.connections, toDeleteConnections[j]);\n // delete the connection in the backend\n (0,_DeleteConnection__WEBPACK_IMPORTED_MODULE_8__.DeleteConnectionById)(toDeleteConnections[j].id);\n }\n // also delete the existing concept from the cache.\n for (let k = 0; k < toDeleteConcepts.length; k++) {\n // remove concept from the cache concept list\n (0,_Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__.RemoveConceptFromList)(conceptList, toDeleteConcepts[k]);\n }\n // now create a composition cache object to cache it into node server\n compositionCache.concepts = compositionCache.concepts.concat(conceptList);\n compositionCache.mainConcept = composition;\n compositionCache.id = composition.id;\n // // create a cache\n yield compositionCache.updateCache();\n // update it the binary tree\n _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_10__.CompositionBinaryTree.addCompositionToTree(compositionCache);\n _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_9__.SyncData.SyncDataOnline();\n let x = compositionCache.GetDataCache();\n return x;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/UpdateComposition.ts?");
|
|
1807
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ UpdateComposition)\n/* harmony export */ });\n/* harmony import */ var _Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helpers/UniqueInsert */ \"./src/Helpers/UniqueInsert.ts\");\n/* harmony import */ var _Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helpers/CheckIfExists */ \"./src/Helpers/CheckIfExists.ts\");\n/* harmony import */ var _Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Helpers/RemoveFromArray */ \"./src/Helpers/RemoveFromArray.ts\");\n/* harmony import */ var _CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _GetTheConcept__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _CreateTheConnection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _DeleteConnection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// function to update the cache composition\nfunction UpdateComposition(patcherStructure) {\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_13__.Logger.logfunction(UpdateComposition);\n if (_app__WEBPACK_IMPORTED_MODULE_13__.serviceWorker) {\n try {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_13__.sendMessage)(\"UpdateComposition\", {\n patcherStructure,\n });\n return res.data;\n }\n catch (error) {\n console.error(\"UpdateComposition sw error: \", error);\n (0,_app__WEBPACK_IMPORTED_MODULE_13__.handleServiceWorkerException)(error);\n }\n }\n // get all the default userId, sessionId, accessId passed by the patcherStructure\n const userId = patcherStructure.userId;\n const sessionId = patcherStructure.sessionId;\n const accessId = patcherStructure.accessId;\n let connectionList = [];\n const conceptList = [];\n let composition = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n let parentConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n const toDeleteConcepts = [];\n // the main composition Id that has the data that needs to be patched\n let compositionId = patcherStructure.compositionId;\n // if you want to edit the subcompositions of the composition then you have to pass to this\n const ofTheConceptId = patcherStructure.ofTheCompositionId;\n let toDeleteConnections = [];\n if (compositionId < 0) {\n let localConcept = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(compositionId, userId);\n if (localConcept.id > 0) {\n compositionId = localConcept.id;\n }\n else {\n return null;\n }\n }\n // get all connections from the backend because it needs latest data\n const connectionListString = yield (0,_Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_4__.GetAllConnectionsOfComposition)(compositionId);\n connectionList = connectionListString;\n const conceptIdList = [];\n const compositionCache = new _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_11__.Composition();\n const compositionList = [];\n compositionCache.id = compositionId;\n // put this in the upper section before updating because this will tell all other distributed\n //servers to destroy the copy of the composition that they have as new composition is coming up\n compositionCache.isUpdating();\n // get all the connections that are inside of the composition and store them in\n let allConcepts = [];\n for (let i = 0; i < connectionList.length; i++) {\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(compositionList, connectionList[i].ofTheConceptId);\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(conceptIdList, connectionList[i].ofTheConceptId);\n (0,_Helpers_UniqueInsert__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(conceptIdList, connectionList[i].toTheConceptId);\n allConcepts.push(connectionList[i].ofTheConceptId);\n }\n compositionCache.subcompositions = compositionList;\n compositionCache.connections = connectionList;\n // get all the concepts that are inside of the composition and store them in a conceptList\n for (let i = 0; i < conceptIdList.length; i++) {\n const conceptString = yield (0,_GetTheConcept__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(conceptIdList[i]);\n const concept = conceptString;\n if (compositionId == conceptIdList[i]) {\n composition = concept;\n }\n if (ofTheConceptId == conceptIdList[i]) {\n parentConcept = concept;\n }\n conceptList.push(concept);\n }\n // now trying to patch the new object into the composition\n const object = patcherStructure.patchObject;\n for (const key in object) {\n let insertingConcept = (0,_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_3__.CreateDefaultConcept)();\n const value = object[key];\n let localConcept = composition;\n // if the immedidate parent exists in the composition (i.e. for multilevel composition)\n if (parentConcept.id > 0) {\n localConcept = parentConcept;\n }\n if (Array.isArray(value) || typeof value == \"object\") {\n insertingConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(key, \"\", true, composition.userId, 4, 999);\n compositionCache.subcompositions.push(insertingConcept.id);\n // check if the concept exists in the concept list because if it exists then we have to delete old connection\n const ExistingConcepts = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckIfTypeConceptsExistsInArray)(conceptList, insertingConcept);\n // if the existing concept then start the process for deleting the concept in the list\n for (let i = 0; i < ExistingConcepts.length; i++) {\n if (ExistingConcepts[i].id > 0) {\n const deletingConnections = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckAllConnectionsConnectedInConnectionArray)(compositionCache.connections, ExistingConcepts[i].id);\n toDeleteConnections = toDeleteConnections.concat(deletingConnections);\n toDeleteConcepts.push(ExistingConcepts[i]);\n }\n }\n yield (0,_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_12__.CreateTheCompositionWithCache)(object[key], insertingConcept.id, insertingConcept.userId, composition.id, composition.userId, 4, 999, compositionCache);\n }\n else {\n // make the new concept in the object\n insertingConcept = yield (0,_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(key, value, false, userId, accessId, sessionId);\n // check if the concept exists in the concept list because if it exists then we have to delete old connection\n const ExistingConcepts = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckIfTypeConceptsExistsInArray)(conceptList, insertingConcept);\n // if the existing concept then start the process for deleting the concept in the list\n for (let i = 0; i < ExistingConcepts.length; i++) {\n if (ExistingConcepts[i].id > 0) {\n const deletingConnections = (0,_Helpers_CheckIfExists__WEBPACK_IMPORTED_MODULE_1__.CheckAllConnectionsConnectedInConnectionArray)(compositionCache.connections, ExistingConcepts[i].id);\n toDeleteConnections = toDeleteConnections.concat(deletingConnections);\n toDeleteConcepts.push(ExistingConcepts[i]);\n }\n }\n }\n // create the connection between the new concept and the old composition\n const connectionString = (0,_CreateTheConnection__WEBPACK_IMPORTED_MODULE_7__.createTheConnection)(localConcept.id, localConcept.userId, insertingConcept.id, composition.id);\n const connection = connectionString;\n conceptList.push(insertingConcept);\n compositionCache.connections.push(connection);\n }\n // now you have to delete the connection in bulk\n for (let j = 0; j < toDeleteConnections.length; j++) {\n // remove from the cache list\n (0,_Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__.RemoveConnectionFromList)(compositionCache.connections, toDeleteConnections[j]);\n // delete the connection in the backend\n (0,_DeleteConnection__WEBPACK_IMPORTED_MODULE_8__.DeleteConnectionById)(toDeleteConnections[j].id);\n }\n // also delete the existing concept from the cache.\n for (let k = 0; k < toDeleteConcepts.length; k++) {\n // remove concept from the cache concept list\n (0,_Helpers_RemoveFromArray__WEBPACK_IMPORTED_MODULE_2__.RemoveConceptFromList)(conceptList, toDeleteConcepts[k]);\n }\n // now create a composition cache object to cache it into node server\n compositionCache.concepts = compositionCache.concepts.concat(conceptList);\n compositionCache.mainConcept = composition;\n compositionCache.id = composition.id;\n // // create a cache\n yield compositionCache.updateCache();\n // update it the binary tree\n _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_10__.CompositionBinaryTree.addCompositionToTree(compositionCache);\n _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_9__.SyncData.SyncDataOnline();\n let x = compositionCache.GetDataCache();\n return x;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/UpdateComposition.ts?");
|
|
1808
1808
|
|
|
1809
1809
|
/***/ }),
|
|
1810
1810
|
|
|
@@ -2024,7 +2024,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2024
2024
|
\********************/
|
|
2025
2025
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2026
2026
|
|
|
2027
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADMIN: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.ADMIN),\n/* harmony export */ ALLID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.ALLID),\n/* harmony export */ AccessTracker: () => (/* reexport safe */ _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_119__.AccessTracker),\n/* harmony export */ AddGhostConcept: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.AddGhostConcept),\n/* harmony export */ Anomaly: () => (/* reexport safe */ _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_110__.Anomaly),\n/* harmony export */ BaseUrl: () => (/* reexport safe */ _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl),\n/* harmony export */ BinaryTree: () => (/* reexport safe */ _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__.BinaryTree),\n/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */ _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_108__.BuilderStatefulWidget),\n/* harmony export */ Composition: () => (/* reexport safe */ _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__.Composition),\n/* harmony export */ CompositionBinaryTree: () => (/* reexport safe */ _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__.CompositionBinaryTree),\n/* harmony export */ CompositionNode: () => (/* reexport safe */ _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__.CompositionNode),\n/* harmony export */ Concept: () => (/* reexport safe */ _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__.Concept),\n/* harmony export */ ConceptsData: () => (/* reexport safe */ _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__.ConceptsData),\n/* harmony export */ Connection: () => (/* reexport safe */ _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__.Connection),\n/* harmony export */ ConnectionData: () => (/* reexport safe */ _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__.ConnectionData),\n/* harmony export */ CreateComposition: () => (/* reexport safe */ _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ CreateConnectionBetweenEntityLocal: () => (/* reexport safe */ _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_120__.CreateConnectionBetweenEntityLocal),\n/* harmony export */ CreateConnectionBetweenTwoConcepts: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConcepts),\n/* harmony export */ CreateConnectionBetweenTwoConceptsGeneral: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConceptsGeneral),\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* reexport safe */ _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__.CreateConnectionBetweenTwoConceptsLocal),\n/* harmony export */ CreateDefaultConcept: () => (/* reexport safe */ _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__.CreateDefaultConcept),\n/* harmony export */ CreateDefaultLConcept: () => (/* reexport safe */ _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__.CreateDefaultLConcept),\n/* harmony export */ CreateSession: () => (/* reexport safe */ _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__.CreateSession),\n/* harmony export */ CreateSessionVisit: () => (/* reexport safe */ _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__.CreateSessionVisit),\n/* harmony export */ CreateTheCompositionLocal: () => (/* reexport safe */ _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__.CreateTheCompositionLocal),\n/* harmony export */ CreateTheCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__.CreateTheCompositionWithCache),\n/* harmony export */ CreateTheConnection: () => (/* reexport safe */ _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__.createTheConnection),\n/* harmony export */ CreateTheConnectionGeneral: () => (/* reexport safe */ _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__.CreateTheConnectionGeneral),\n/* harmony export */ CreateTheConnectionLocal: () => (/* reexport safe */ _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__.CreateTheConnectionLocal),\n/* harmony export */ DATAID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAID),\n/* harmony export */ DATAIDDATE: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAIDDATE),\n/* harmony export */ DelayFunctionExecution: () => (/* reexport safe */ _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__.DelayFunctionExecution),\n/* harmony export */ DeleteConceptById: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteConceptById),\n/* harmony export */ DeleteConceptLocal: () => (/* reexport safe */ _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__.DeleteConceptLocal),\n/* harmony export */ DeleteConnectionById: () => (/* reexport safe */ _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__.DeleteConnectionById),\n/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__.DeleteConnectionByType),\n/* harmony export */ DeleteUser: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteUser),\n/* harmony export */ DependencyObserver: () => (/* reexport safe */ _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__.DependencyObserver),\n/* harmony export */ FilterSearch: () => (/* reexport safe */ _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__.FilterSearch),\n/* harmony export */ FormatFromConnections: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnectionsAltered),\n/* harmony export */ FreeschemaQuery: () => (/* reexport safe */ _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_115__.FreeschemaQuery),\n/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */ _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_116__.FreeschemaQueryApi),\n/* harmony export */ GetAllConnectionsOfComposition: () => (/* reexport safe */ _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__.GetAllConnectionsOfComposition),\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* reexport safe */ _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__.GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__.GetAllTheConnectionsByTypeAndOfTheConcept),\n/* harmony export */ GetComposition: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetComposition),\n/* harmony export */ GetCompositionBulk: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionList: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__.GetCompositionListListener),\n/* harmony export */ GetCompositionListLocal: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocal),\n/* harmony export */ GetCompositionListLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocalWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithIdUpdated),\n/* harmony export */ GetCompositionListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__.GetCompositionListener),\n/* harmony export */ GetCompositionLocal: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocal),\n/* harmony export */ GetCompositionLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocalWithId),\n/* harmony export */ GetCompositionWithAllIds: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithCache),\n/* harmony export */ GetCompositionWithDataIdBulk: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdBulk),\n/* harmony export */ GetCompositionWithDataIdWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdWithCache),\n/* harmony export */ GetCompositionWithId: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetConceptBulk: () => (/* reexport safe */ _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__.GetConceptBulk),\n/* harmony export */ GetConceptByCharacter: () => (/* reexport safe */ _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ GetConceptByCharacterAndCategoryLocal: () => (/* reexport safe */ _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__.GetConceptByCharacterAndCategoryLocal),\n/* harmony export */ GetConceptByCharacterAndType: () => (/* reexport safe */ _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__.GetConceptByCharacterAndType),\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* reexport safe */ _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__.GetConnectionBetweenTwoConceptsLinker),\n/* harmony export */ GetConnectionBulk: () => (/* reexport safe */ _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__.GetConnectionBulk),\n/* harmony export */ GetConnectionById: () => (/* reexport safe */ _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__.GetConnectionById),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetConnectionDataPrefetch),\n/* harmony export */ GetConnectionOfTheConcept: () => (/* reexport safe */ _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__.GetConnectionOfTheConcept),\n/* harmony export */ GetLink: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLink),\n/* harmony export */ GetLinkListListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__.GetLinkListListener),\n/* harmony export */ GetLinkListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__.GetLinkListener),\n/* harmony export */ GetLinkRaw: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLinkRaw),\n/* harmony export */ GetLinkerConnectionFromConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionFromConcepts),\n/* harmony export */ GetLinkerConnectionToConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionToConcepts),\n/* harmony export */ GetRelation: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelation),\n/* harmony export */ GetRelationLocal: () => (/* reexport safe */ _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__.GetRelationLocal),\n/* harmony export */ GetRelationRaw: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelationRaw),\n/* harmony export */ GetTheConcept: () => (/* reexport safe */ _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ GetTheConceptLocal: () => (/* reexport safe */ _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__.GetTheConceptLocal),\n/* harmony export */ GetUserGhostId: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.GetUserGhostId),\n/* harmony export */ JUSTDATA: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.JUSTDATA),\n/* harmony export */ LConcept: () => (/* reexport safe */ _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__.LConcept),\n/* harmony export */ LConnection: () => (/* reexport safe */ _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__.LConnection),\n/* harmony export */ LISTNORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.LISTNORMAL),\n/* harmony export */ LocalConceptsData: () => (/* reexport safe */ _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__.LocalConceptsData),\n/* harmony export */ LocalSyncData: () => (/* reexport safe */ _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__.LocalSyncData),\n/* harmony export */ LocalTransaction: () => (/* reexport safe */ _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_109__.LocalTransaction),\n/* harmony export */ Logger: () => (/* reexport safe */ _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__.Logger),\n/* harmony export */ LoginToBackend: () => (/* reexport safe */ _Api_Login__WEBPACK_IMPORTED_MODULE_35__.LoginToBackend),\n/* harmony export */ MakeTheInstanceConcept: () => (/* reexport safe */ _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__.MakeTheInstanceConceptLocal),\n/* harmony export */ MakeTheTimestamp: () => (/* reexport safe */ _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__.MakeTheTimestamp),\n/* harmony export */ MakeTheTypeConcept: () => (/* reexport safe */ _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__.MakeTheTypeConcept),\n/* harmony export */ MakeTheTypeConceptApi: () => (/* reexport safe */ _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__.MakeTheTypeConceptApi),\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__.MakeTheTypeConceptLocal),\n/* harmony export */ NORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.NORMAL),\n/* harmony export */ PRIVATE: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PRIVATE),\n/* harmony export */ PUBLIC: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PUBLIC),\n/* harmony export */ PatcherStructure: () => (/* reexport safe */ _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__.PatcherStructure),\n/* harmony export */ RAW: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.RAW),\n/* harmony export */ RecursiveSearchApi: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchListener: () => (/* reexport safe */ _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__.RecursiveSearchListener),\n/* harmony export */ SchemaQueryListener: () => (/* reexport safe */ _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_117__.SchemaQueryListener),\n/* harmony export */ SearchAllConcepts: () => (/* reexport safe */ _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__.SearchAllConcepts),\n/* harmony export */ SearchLinkInternal: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternal),\n/* harmony export */ SearchLinkInternalAll: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternalAll),\n/* harmony export */ SearchLinkMultipleAll: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.SearchLinkMultipleAll),\n/* harmony export */ SearchLinkMultipleAllObservable: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.SearchLinkMultipleAllObservable),\n/* harmony export */ SearchLinkMultipleApi: () => (/* reexport safe */ _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__.SearchLinkMultipleApi),\n/* harmony export */ SearchQuery: () => (/* reexport safe */ _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__.SearchQuery),\n/* harmony export */ SearchStructure: () => (/* reexport safe */ _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__.SearchStructure),\n/* harmony export */ SearchWithLinker: () => (/* reexport safe */ _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__.SearchWithLinker),\n/* harmony export */ SearchWithTypeAndLinker: () => (/* reexport safe */ _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__.SearchWithTypeAndLinker),\n/* harmony export */ SearchWithTypeAndLinkerApi: () => (/* reexport safe */ _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__.SearchWithTypeAndLinkerApi),\n/* harmony export */ SessionData: () => (/* reexport safe */ _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__.SessionData),\n/* harmony export */ Signin: () => (/* reexport safe */ _Api_Signin__WEBPACK_IMPORTED_MODULE_38__[\"default\"]),\n/* harmony export */ Signup: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__[\"default\"]),\n/* harmony export */ SignupEntity: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__.SignupEntity),\n/* harmony export */ SplitStrings: () => (/* reexport safe */ _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__.SplitStrings),\n/* harmony export */ StatefulWidget: () => (/* reexport safe */ _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_113__.StatefulWidget),\n/* harmony export */ SyncData: () => (/* reexport safe */ _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__.SyncData),\n/* harmony export */ TrashTheConcept: () => (/* reexport safe */ _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__.TrashTheConcept),\n/* harmony export */ UpdateComposition: () => (/* reexport safe */ _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__[\"default\"]),\n/* harmony export */ UpdateCompositionLocal: () => (/* reexport safe */ _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__.UpdateCompositionLocal),\n/* harmony export */ UserBinaryTree: () => (/* reexport safe */ _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__.UserBinaryTree),\n/* harmony export */ Validator: () => (/* reexport safe */ _Validator_validator__WEBPACK_IMPORTED_MODULE_111__.Validator),\n/* harmony export */ ViewInternalData: () => (/* reexport safe */ _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__.ViewInternalData),\n/* harmony export */ ViewInternalDataApi: () => (/* reexport safe */ _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__.ViewInternalDataApi),\n/* harmony export */ WidgetTree: () => (/* reexport safe */ _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_118__.WidgetTree),\n/* harmony export */ convertFromConceptToLConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromConceptToLConcept),\n/* harmony export */ convertFromLConceptToConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromLConceptToConcept),\n/* harmony export */ convertWidgetTreeToWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ createFormFieldData: () => (/* reexport safe */ _Validator_utils__WEBPACK_IMPORTED_MODULE_112__.createFormFieldData),\n/* harmony export */ dispatchIdEvent: () => (/* binding */ dispatchIdEvent),\n/* harmony export */ getFromDatabaseWithType: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getFromDatabaseWithType),\n/* harmony export */ getObjectsFromIndexDb: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getObjectsFromIndexDb),\n/* harmony export */ handleServiceWorkerException: () => (/* binding */ handleServiceWorkerException),\n/* harmony export */ hasActivatedSW: () => (/* binding */ hasActivatedSW),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ recursiveFetch: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.recursiveFetch),\n/* harmony export */ recursiveFetchNew: () => (/* reexport safe */ _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__.recursiveFetchNew),\n/* harmony export */ renderLatestWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderLatestWidget),\n/* harmony export */ renderPage: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderPage),\n/* harmony export */ renderWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderWidget),\n/* harmony export */ searchLinkMultipleListener: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.searchLinkMultipleListener),\n/* harmony export */ sendEmail: () => (/* reexport safe */ _Services_Mail__WEBPACK_IMPORTED_MODULE_107__.sendEmail),\n/* harmony export */ sendMessage: () => (/* binding */ sendMessage),\n/* harmony export */ serviceWorker: () => (/* binding */ serviceWorker),\n/* harmony export */ setHasActivatedSW: () => (/* binding */ setHasActivatedSW),\n/* harmony export */ storeToDatabase: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.storeToDatabase),\n/* harmony export */ subscribedListeners: () => (/* binding */ subscribedListeners),\n/* harmony export */ unwrapContainers: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.unwrapContainers),\n/* harmony export */ updateAccessToken: () => (/* binding */ updateAccessToken),\n/* harmony export */ uploadAttachment: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadAttachment),\n/* harmony export */ uploadFile: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadFile),\n/* harmony export */ uploadImage: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadImage),\n/* harmony export */ validDocumentFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validDocumentFormats),\n/* harmony export */ validImageFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validImageFormats)\n/* harmony export */ });\n/* harmony import */ var _Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Services/CreateBinaryTreeFromData */ \"./src/Services/CreateBinaryTreeFromData.ts\");\n/* harmony import */ var _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataStructures/IdentifierFlags */ \"./src/DataStructures/IdentifierFlags.ts\");\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Services/SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Services/GetCompositionList */ \"./src/Services/GetCompositionList.ts\");\n/* harmony import */ var _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Services/Local/GetCompositionListLocal */ \"./src/Services/Local/GetCompositionListLocal.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Services/GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Services/Local/GetCompositionLocal */ \"./src/Services/Local/GetCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Services/CreateTheComposition */ \"./src/Services/CreateTheComposition.ts\");\n/* harmony import */ var _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Services/Local/CreateTheCompositionLocal */ \"./src/Services/Local/CreateTheCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Services/CreateConnectionBetweenTwoConcepts */ \"./src/Services/CreateConnectionBetweenTwoConcepts.ts\");\n/* harmony import */ var _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Services/GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Services/MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Services/Local/MakeTheInstanceConceptLocal */ \"./src/Services/Local/MakeTheInstanceConceptLocal.ts\");\n/* harmony import */ var _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Database/NoIndexDb */ \"./src/Database/NoIndexDb.ts\");\n/* harmony import */ var _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Services/CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Services/GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Services/GetLink */ \"./src/Services/GetLink.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Services/Local/MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Services/MakeTheTypeConcept */ \"./src/Services/MakeTheTypeConcept.ts\");\n/* harmony import */ var _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Api/MakeTheTypeConceptApi */ \"./src/Api/MakeTheTypeConceptApi.ts\");\n/* harmony import */ var _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Services/GetLinkerConnectionFromConcept */ \"./src/Services/GetLinkerConnectionFromConcept.ts\");\n/* harmony import */ var _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Services/DeleteConcept */ \"./src/Services/DeleteConcept.ts\");\n/* harmony import */ var _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Services/DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Api/Delete/DeleteConceptInBackend */ \"./src/Api/Delete/DeleteConceptInBackend.ts\");\n/* harmony import */ var _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Services/GetConnections */ \"./src/Services/GetConnections.ts\");\n/* harmony import */ var _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Services/MakeTheTimestamp */ \"./src/Services/MakeTheTimestamp.ts\");\n/* harmony import */ var _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Api/RecursiveSearch */ \"./src/Api/RecursiveSearch.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Upload__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Services/Upload */ \"./src/Services/Upload.ts\");\n/* harmony import */ var _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Api/GetConceptBulk */ \"./src/Api/GetConceptBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_Login__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Api/Login */ \"./src/Api/Login.ts\");\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _Api_Signup__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Api/Signup */ \"./src/Api/Signup.ts\");\n/* harmony import */ var _Api_Signin__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Api/Signin */ \"./src/Api/Signin.ts\");\n/* harmony import */ var _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Services/UpdateComposition */ \"./src/Services/UpdateComposition.ts\");\n/* harmony import */ var _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Api/Search/Search */ \"./src/Api/Search/Search.ts\");\n/* harmony import */ var _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Api/Search/SearchWithLinker */ \"./src/Api/Search/SearchWithLinker.ts\");\n/* harmony import */ var _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Services/Composition/CompositionCache */ \"./src/Services/Composition/CompositionCache.ts\");\n/* harmony import */ var _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Api/Session/CreateSession */ \"./src/Api/Session/CreateSession.ts\");\n/* harmony import */ var _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Api/Session/CreateSessionVisit */ \"./src/Api/Session/CreateSessionVisit.ts\");\n/* harmony import */ var _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Services/GetRelation */ \"./src/Services/GetRelation.ts\");\n/* harmony import */ var _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Services/Composition/BuildComposition */ \"./src/Services/Composition/BuildComposition.ts\");\n/* harmony import */ var _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Services/Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Services/Local/CreateDefaultLConcept */ \"./src/Services/Local/CreateDefaultLConcept.ts\");\n/* harmony import */ var _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Services/CreateTheConnectionGeneral */ \"./src/Services/CreateTheConnectionGeneral.ts\");\n/* harmony import */ var _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Services/Local/CreateTheConnectionLocal */ \"./src/Services/Local/CreateTheConnectionLocal.ts\");\n/* harmony import */ var _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./Services/User/UserTranslation */ \"./src/Services/User/UserTranslation.ts\");\n/* harmony import */ var _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./Services/Search/SearchLinkMultiple */ \"./src/Services/Search/SearchLinkMultiple.ts\");\n/* harmony import */ var _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./Services/Local/GetTheConceptLocal */ \"./src/Services/Local/GetTheConceptLocal.ts\");\n/* harmony import */ var _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./Services/Local/UpdateCompositionLocal */ \"./src/Services/Local/UpdateCompositionLocal.ts\");\n/* harmony import */ var _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./Services/Local/GetRelationLocal */ \"./src/Services/Local/GetRelationLocal.ts\");\n/* harmony import */ var _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./Services/Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./Services/View/ViewInternalData */ \"./src/Services/View/ViewInternalData.ts\");\n/* harmony import */ var _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./Api/View/ViewInternalDataApi */ \"./src/Api/View/ViewInternalDataApi.ts\");\n/* harmony import */ var _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./Services/Conversion/ConvertConcepts */ \"./src/Services/Conversion/ConvertConcepts.ts\");\n/* harmony import */ var _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Services/Search/SearchLinkInternal */ \"./src/Services/Search/SearchLinkInternal.ts\");\n/* harmony import */ var _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./Services/Local/CreateConnectionBetweenTwoConceptsLocal */ \"./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts\");\n/* harmony import */ var _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./Services/Local/DeleteConceptLocal */ \"./src/Services/Local/DeleteConceptLocal.ts\");\n/* harmony import */ var _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Services/GetConnectionBetweenTwoConceptsLinker */ \"./src/Services/GetConnectionBetweenTwoConceptsLinker.ts\");\n/* harmony import */ var _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Services/Common/DelayFunction */ \"./src/Services/Common/DelayFunction.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./Constants/AccessConstants */ \"./src/Constants/AccessConstants.ts\");\n/* harmony import */ var _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./Api/Search/SearchWithTypeAndLinker */ \"./src/Api/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./WrapperFunctions/DepenedencyObserver */ \"./src/WrapperFunctions/DepenedencyObserver.ts\");\n/* harmony import */ var _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./WrapperFunctions/SearchLinkMultipleAllObservable */ \"./src/WrapperFunctions/SearchLinkMultipleAllObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionObservable */ \"./src/WrapperFunctions/GetCompositionObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionListObservable */ \"./src/WrapperFunctions/GetCompositionListObservable.ts\");\n/* harmony import */ var _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./Services/Search/SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkObservable */ \"./src/WrapperFunctions/GetLinkObservable.ts\");\n/* harmony import */ var _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./WrapperFunctions/RecursiveSearchObservable */ \"./src/WrapperFunctions/RecursiveSearchObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkListObservable */ \"./src/WrapperFunctions/GetLinkListObservable.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./DataStructures/Concept */ \"./src/DataStructures/Concept.ts\");\n/* harmony import */ var _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./DataStructures/Local/LConcept */ \"./src/DataStructures/Local/LConcept.ts\");\n/* harmony import */ var _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./DataStructures/Local/LConnection */ \"./src/DataStructures/Local/LConnection.ts\");\n/* harmony import */ var _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./DataStructures/Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./DataStructures/BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./DataStructures/PatcherStructure */ \"./src/DataStructures/PatcherStructure.ts\");\n/* harmony import */ var _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./DataStructures/Session/SessionData */ \"./src/DataStructures/Session/SessionData.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionNode */ \"./src/DataStructures/Composition/CompositionNode.ts\");\n/* harmony import */ var _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./DataStructures/Local/LocalSyncData */ \"./src/DataStructures/Local/LocalSyncData.ts\");\n/* harmony import */ var _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./DataStructures/User/UserBinaryTree */ \"./src/DataStructures/User/UserBinaryTree.ts\");\n/* harmony import */ var _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./DataStructures/FilterSearch */ \"./src/DataStructures/FilterSearch.ts\");\n/* harmony import */ var _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./DataStructures/Search/SearchStructure */ \"./src/DataStructures/Search/SearchStructure.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./Services/GetDataFromIndexDb */ \"./src/Services/GetDataFromIndexDb.ts\");\n/* harmony import */ var _Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./Services/Local/CreateLocalBinaryTreeFromData */ \"./src/Services/Local/CreateLocalBinaryTreeFromData.ts\");\n/* harmony import */ var _Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./Services/InitializeSystem */ \"./src/Services/InitializeSystem.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\n/* harmony import */ var _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Constants/general.const */ \"./src/Constants/general.const.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./Middleware/ApplicationMonitor */ \"./src/Middleware/ApplicationMonitor.ts\");\n/* harmony import */ var _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./DataStructures/Responses/ErrorResponse */ \"./src/DataStructures/Responses/ErrorResponse.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Mail__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./Services/Mail */ \"./src/Services/Mail.ts\");\n/* harmony import */ var _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./Widgets/BuilderStatefulWidget */ \"./src/Widgets/BuilderStatefulWidget.ts\");\n/* harmony import */ var _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./Services/Transaction/LocalTransaction */ \"./src/Services/Transaction/LocalTransaction.ts\");\n/* harmony import */ var _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./Anomaly/anomaly */ \"./src/Anomaly/anomaly.ts\");\n/* harmony import */ var _Validator_validator__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./Validator/validator */ \"./src/Validator/validator.ts\");\n/* harmony import */ var _Validator_utils__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./Validator/utils */ \"./src/Validator/utils.ts\");\n/* harmony import */ var _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./Widgets/StatefulWidget */ \"./src/Widgets/StatefulWidget.ts\");\n/* harmony import */ var _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./Services/DeleteConnectionByType */ \"./src/Services/DeleteConnectionByType.ts\");\n/* harmony import */ var _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./DataStructures/Search/FreeschemaQuery */ \"./src/DataStructures/Search/FreeschemaQuery.ts\");\n/* harmony import */ var _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./Api/Search/FreeschemaQueryApi */ \"./src/Api/Search/FreeschemaQueryApi.ts\");\n/* harmony import */ var _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./WrapperFunctions/SchemaQueryObservable */ \"./src/WrapperFunctions/SchemaQueryObservable.ts\");\n/* harmony import */ var _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./Widgets/WidgetTree */ \"./src/Widgets/WidgetTree.ts\");\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./Services/CreateConnection/CreateConnectionEntity */ \"./src/Services/CreateConnection/CreateConnectionEntity.ts\");\n/* harmony import */ var _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./Widgets/RenderWidgetService */ \"./src/Widgets/RenderWidgetService.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar serviceWorker;\nconst TABID = Date.now().toString(36) + Math.random().toString(36).substring(2);\nlet subscribedListeners = [];\nlet serviceWorkerReady = false;\nlet messageQueue = [];\n// for sw use only START\nlet hasActivatedSW = false;\nfunction setHasActivatedSW(value) { hasActivatedSW = value; }\n// for sw use only END\n/**\n * This function lets you update the access token that the package uses. If this is not passed you cannot create, update, view or delete\n * Your concepts using this package.\n * @param accessToken access token got from the sign in process\n */\nfunction updateAccessToken(accessToken = \"\") {\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n if (serviceWorker)\n sendMessage('updateAccessToken', { accessToken });\n}\n/**\n *\n * @param url This is the url for the backend c# system or our main data fabric server\n * @param aiurl This is the AI url that pulls in the data using our AI system . If you do not enter this then also disable the enableAi flag.\n * @param accessToken This is the JWT token that needs to be passed (But since you have just initilized the system). There is no way we can get access token\n * So this access token can be empty string. You can set it afterwards with another function UpdateAccessToken();\n * @param nodeUrl This is the url for the node server. This is another server in the data fabric that is used as server for business logic and security features.\n * @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.\n * @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.\n * @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope\n */\nfunction init() {\n return __awaiter(this, arguments, void 0, function* (url = \"\", aiurl = \"\", accessToken = \"\", nodeUrl = \"\", enableAi = true, applicationName = \"\", enableSW = undefined, flags = {}) {\n try {\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL = url;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL = aiurl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL = nodeUrl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION = applicationName;\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n let randomizer = Math.floor(Math.random() * 100000000);\n // BaseUrl.BASE_RANDOMIZER = randomizer;\n // BaseUrl.BASE_RANDOMIZER = 999;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.setRandomizer(randomizer);\n // Change Default Flags\n const defaultFlags = {\n logApplication: false,\n logPackage: false,\n accessTracker: false,\n isTest: false\n };\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = defaultFlags;\n // Merge Provided Flags with Defaults\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = Object.assign(Object.assign({}, defaultFlags), flags);\n initializeFlags(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS);\n // console.log(\"BaseUrl.FLAGS before sending to service worker : \", BaseUrl.FLAGS)\n if (!(\"serviceWorker\" in navigator)) {\n yield initConceptConnection();\n console.warn(\"Service Worker not supported in this browser.\");\n return;\n }\n listenPostMessagaes();\n listenBroadCastMessages();\n if (enableSW && enableSW.activate && enableSW.manual) {\n yield new Promise((resolve, reject) => {\n navigator.serviceWorker.ready\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log('registraions ready', registration);\n serviceWorker = registration.active;\n yield initServiceWorker();\n resolve('done');\n }))\n .catch(err => {\n console.error(\"Error: Ready service worker\", err);\n reject(err);\n })\n .finally(() => console.log('Finally service worker ready done'));\n setTimeout(() => reject('Timeout ready'), 30000);\n });\n }\n else if (enableSW &&\n (enableSW === null || enableSW === void 0 ? void 0 : enableSW.activate)) {\n try {\n console.log(\"service worker initialiing\");\n yield handleRegisterServiceWorker(enableSW);\n }\n catch (error) {\n yield initConceptConnection();\n console.error(\"Unable to start service worker\", error);\n }\n }\n else {\n yield initConceptConnection();\n console.warn('Service Worker not activated');\n }\n return true;\n }\n catch (error) {\n yield initConceptConnection();\n console.warn(\"Cannot initialize the system\", error);\n }\n });\n}\n/**\n * Method to send message to the service worker from main thread\n * @param type string\n * @param payload any\n * @returns Promise<any>\n */\nfunction sendMessage(type_1, payload_1) {\n return __awaiter(this, arguments, void 0, function* (type, payload, retryCount = 0) {\n let messagedProcessed = false;\n const messageId = Math.random().toString(36).substring(2); // Generate a unique message ID\n payload.messageId = messageId;\n payload.TABID = TABID;\n // let actions = payload.actions\n const newPayload = JSON.parse(JSON.stringify(payload));\n let checkProcessInterval;\n if (type != 'checkProcess') {\n checkProcessInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {\n console.log('process took more than one second', messageId, type, messagedProcessed);\n // if (!await checkIfExecutingProcess(messageId, type) && !messagedProcessed) {\n // console.log(\"Message process missing\")\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n // }\n if (!messagedProcessed && !(yield checkIfExecutingProcess(messageId, type))) {\n clearInterval(checkProcessInterval);\n if (!messagedProcessed) {\n console.log('Failed to handle type ' + type + ' message not found ' + messageId);\n if (retryCount == 0 && type != 'checkProcess') {\n console.log('retrying ', type, messageId);\n const res = yield sendMessage(type, payload, retryCount + 1);\n return res;\n }\n else {\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n console.log('Failed to handle type ' + type + ' ' + messageId);\n }\n }\n console.log(\"Message process missing \", type, messageId, messageQueue);\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n }\n }), 2000);\n }\n return new Promise((resolve, reject) => {\n if (!((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')))\n console.log('will go to queue', navigator.serviceWorker.controller, serviceWorker, serviceWorkerReady, type == 'init');\n if ((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')) {\n const responseHandler = (event) => {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.messageId) == messageId) { // Check if the message ID matches\n messagedProcessed = true;\n if (type != 'checkProcess')\n console.log('received from sw', type, messageId);\n clearInterval(checkProcessInterval);\n if (!event.data.success) {\n if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.statusText })));\n }\n else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleInternalError)(new Response('Internal Server Error', { status: 500, statusText: (_e = event === null || event === void 0 ? void 0 : event.data) === null || _e === void 0 ? void 0 : _e.statusText })));\n }\n else {\n console.error('Error in the response from worker:', event);\n reject(`Failed to handle action ${type} ${JSON.stringify(payload)}, Response: ${JSON.stringify(event.data)}`);\n }\n }\n if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.actions) {\n payload.actions = JSON.parse(JSON.stringify(event.data.actions));\n }\n resolve(event.data);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }\n };\n navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n // Send the message to the service worker\n if (navigator.serviceWorker.controller) {\n if (type != 'checkProcess')\n console.log('sent to sw', type, messageId);\n navigator.serviceWorker.controller.postMessage({ type, payload: newPayload });\n }\n else if (serviceWorker) {\n console.log('sent to sw', type, messageId);\n console.warn(`controller not found but serviceWorker is available. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but navigator is empty!!!', serviceWorker);\n try {\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n catch (err) {\n console.log('Retrying again on catch service worker', err);\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n }\n else {\n console.warn(`Service Worker hasn't loaded yet. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but is not available NOW!!!');\n console.info('ready', navigator.serviceWorker.ready);\n // wait one second before checking again\n setTimeout(() => {\n console.warn(`Re-Trying after certain time. messageId: ${messageId}, type: ${type}`);\n if (serviceWorker) {\n console.info('This is triggered ');\n serviceWorker === null || serviceWorker === void 0 ? void 0 : serviceWorker.postMessage({ type, payload });\n }\n else {\n console.log('not ready', type);\n clearInterval(checkProcessInterval);\n reject(\"Service worker not ready\");\n }\n }, 30000); // 30 seconds\n }\n // Timeout for waiting for the response (e.g., 5 seconds)\n setTimeout(() => {\n clearInterval(checkProcessInterval);\n reject(`No response from service worker after timeout: ${type}`);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }, 210000); // 3.5 minutes\n }\n else {\n messageQueue.push({ message: { type, payload: newPayload } });\n console.log('Message Queued', type, payload);\n console.log((navigator.serviceWorker.controller || serviceWorker), (serviceWorkerReady || type == 'init'));\n if (type == 'init') {\n clearInterval(checkProcessInterval);\n resolve(null);\n }\n }\n });\n });\n}\n// export function sendMessage(type: string, payload: any) {\n// return new Promise((resolve) => {\n// const responseHandler = (event: any) => {\n// resolve(event.data);\n// navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n// };\n// navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n// navigator.serviceWorker.controller?.postMessage({ type, payload });\n// });\n// }\n// actions for message received on broadcast channel (specially from service worker)\nconst broadcastActions = {\n GetLinkListener: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n const listener = subscribedListeners.find(listener => listener.listenerId == payload.listenerId);\n listener === null || listener === void 0 ? void 0 : listener.callback(payload.data);\n return { success: true };\n }),\n dispatchEvent: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n if (serviceWorker) {\n let event = new Event(payload.id || '');\n dispatchEvent(event);\n }\n // self.clients.matchAll({ includeUncontrolled: true }).then(clients => {\n // clients.forEach(client => {\n // client.postMessage({ id, updatedData });\n // });\n // });\n return { success: true };\n }),\n checkInit: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n console.log('service worker init 0');\n if (navigator.serviceWorker.controller) {\n console.log('service worker init 1');\n serviceWorker = navigator.serviceWorker.controller;\n }\n yield initServiceWorker();\n return { success: true };\n })\n};\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenBroadCastMessages() {\n // broadcast event can be listened through both the service worker and other tabs\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n const { type, payload } = event.data;\n if (!type)\n return;\n let responseData = { success: false, data: undefined };\n if (broadcastActions[type]) {\n responseData = yield broadcastActions[type](payload);\n }\n else {\n console.warn(`Unable to handle \"${type}\" case in BC service worker`);\n }\n }));\n}\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenPostMessagaes() {\n // broadcast event can be listened through both the service worker and other tabs\n navigator.serviceWorker.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n try {\n if (event.data && event.data.type === 'API_401') {\n const { requestDetails } = event.data;\n // Re-create the POST request with the same headers and body\n const requestOptions = {\n method: requestDetails.method,\n headers: new Headers(requestDetails.headers),\n body: requestDetails.body // Pass the original body\n };\n // Re-hit the API with the same details\n const apiResponse = yield fetch(requestDetails.url, requestOptions);\n const responseBody = yield (apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.json()); // Get the response text\n // Send the response back to the Service Worker (same client)\n (_b = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId,\n response: new Response(responseBody, {\n status: apiResponse.status,\n statusText: apiResponse.statusText,\n headers: apiResponse.headers\n })\n });\n }\n }\n catch (error) {\n console.error(\"Error during listenPostMessage\", error);\n (_d = (_c = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _c === void 0 ? void 0 : _c.controller) === null || _d === void 0 ? void 0 : _d.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId\n });\n }\n }));\n}\n/**\n * Method to initialize the initial data\n * @param url string\n * @param aiurl string\n * @param accessToken string\n * @param nodeUrl string\n * @param enableAi boolean\n * @param applicationName string\n * @param isTest boolean\n * @returns Promise<any>\n */\nfunction initConceptConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n /**\n * We initialize the system so that we get all the concepts from the backend system that are most likely to be used\n * We use some sort of AI algorithm to initilize these concepts with the most used concept.\n * @param enableAi enableAi is a flag that the user can choose to set if they want to use this enable AI feature\n * If the developer does not want to use this feature then they can just set enableAi to false.\n */\n yield (0,_Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__[\"default\"])();\n const start = new Date().getTime();\n /**\n * This will create a binary tree in the memory from the indexdb.\n * This process will set Flags to denote that the binary tree is loaded, the character binary tree is loaded\n * and that the type binary tree has been loaded.\n * These trees are helpful in caching concepts and connections for the data fabric.\n */\n yield (0,_Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isDataLoaded= true;\n // IdentifierFlags.isCharacterLoaded= true;\n // IdentifierFlags.isTypeLoaded= true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare concept data is \", elapsed);\n })\n .catch((event) => {\n // console.log(\"This is the error in creating binary tree\", IdentifierFlags.isDataLoaded, IdentifierFlags.isCharacterLoaded, IdentifierFlags.isTypeLoaded);\n throw event;\n });\n /**\n * This will create a binary tree of local concepts that is saved from the indexdb.\n * This process after finishing creating a binary tree of local concepts then set flag to denote that\n * LocalBinaryTree has been created from the concepts in indexdb\n * Local Binary Type tree has been loaded to the index db (flag is set to denote that)\n * Character Binary Tree has been loaded from indexdb to memory (flag is set to denote that)\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isLocalDataLoaded = true;\n // IdentifierFlags.isLocalTypeLoaded = true;\n // IdentifierFlags.isLocalCharacterLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare local concept \", elapsed);\n })\n .catch((event) => {\n throw event;\n });\n /**\n * This process gets the local connections from indexdb and loads it to the local connections array which is inside of\n * a static class called LocalConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDbLocal)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n })\n .catch((event) => {\n //console.log(\"This is the error in creating local connections binary tree\");\n throw event;\n });\n /**\n * We have designed our system to use local concepts and connections with its own local ids(negative ids) that\n * is only valid for the browser that creates this. We have a translator in our node server.\n * This function does this process in initlization.\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__.PopulateTheLocalConnectionToMemory)().catch((event) => {\n console.log(\"This is the error in populating binary tree\");\n throw event;\n });\n // await PopulateTheLocalConceptsToMemory().catch((event)=>{\n // console.log(\"This is the error in populating binary tree\");\n // });\n /**\n * This process gets the connections from indexdb and loads it to the connections array which is inside of\n * a static class called ConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDb)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare connections \", elapsed);\n })\n .catch((event) => {\n //console.log(\"This is the error in creating connections tree\");\n throw event;\n });\n });\n}\n/**\n * Method to dispatch Event received from SW\n * @param id number|string\n * @param data any\n */\nfunction dispatchIdEvent(id, data = {}) {\n // console.log('id event dispatched', id)\n if (serviceWorker || typeof window != undefined) {\n // let event = new Event(`${id}`);\n let event = new CustomEvent(`${id}`, data);\n dispatchEvent(event);\n }\n else {\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.postMessage({ type: 'dispatchEvent', payload: { id } });\n }\n}\nfunction processMessageQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n while (messageQueue.length > 0) {\n const { message, resolve, reject } = messageQueue.shift();\n console.log('Queue poped', message.type);\n yield sendMessage(message.type, message.payload);\n }\n });\n}\n/**\n * Method to handle global exception occured in service worker\n * @param error any\n */\nconst handleServiceWorkerException = (error) => {\n // if (error instanceof FreeSchemaResponse && error.getStatus() != 401) {\n if (error instanceof _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__.FreeSchemaResponse) {\n console.error('FreeSchemaResponse Error', error);\n throw error;\n }\n // if (error instanceof FreeSchemaResponse && error.getStatus() == 401) console.error('401 triggered in sw defaulting')\n console.error('Service Worker Error', error);\n};\n/**\n * Function to setup initial flag\n */\nfunction initializeFlags(flags) {\n try {\n if (flags.logApplication) {\n _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__.ApplicationMonitor.initialize();\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logApplicationActivationStatus = true;\n console.warn(\"Application log started.\");\n }\n if (flags.logPackage) {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logPackageActivationStatus = true;\n console.warn(\"Package log started.\");\n }\n if (flags.accessTracker) {\n _app__WEBPACK_IMPORTED_MODULE_106__.AccessTracker.activateStatus = true;\n console.warn(\"Access Tracker Activated.\");\n }\n if (flags.isTest) {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n // return true;\n }\n return flags;\n }\n catch (error) {\n console.error(\"Failed to initialize flags:\", error);\n throw error;\n }\n}\n/**\n * Method to handle Registering service worker\n * @param enableSW any\n */\nfunction handleRegisterServiceWorker(enableSW) {\n return __awaiter(this, void 0, void 0, function* () {\n yield new Promise((resolve, reject) => {\n var _a, _b;\n let success = false;\n navigator.serviceWorker\n .register((_a = enableSW.pathToSW) !== null && _a !== void 0 ? _a : \"./serviceWorker.bundle.js\", {\n // type: \"module\",\n scope: (_b = enableSW.scope) !== null && _b !== void 0 ? _b : \"/\",\n })\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log(\"Service Worker registered:\", registration);\n // process queue if exist\n setInterval(() => processMessageQueue(), 5000);\n // Add Listeners before initializing the service worker\n // Listen for updates to the service worker\n console.log(\"update listen start\");\n registration.onupdatefound = () => {\n const newWorker = registration.installing;\n console.log(\"new worker\", newWorker);\n if (newWorker) {\n newWorker.onstatechange = () => __awaiter(this, void 0, void 0, function* () {\n console.warn(\"on state change triggered\", newWorker.state, navigator.serviceWorker.controller);\n if (newWorker.state === \"installing\") {\n console.log(\"Service Worker installing\");\n serviceWorker = undefined;\n serviceWorkerReady = false;\n }\n // if (newWorker.state === 'activated' && navigator.serviceWorker.controller) {\n if ((newWorker.state === \"activated\" || newWorker.state === 'redundant') && navigator.serviceWorker.controller) {\n // && navigator.serviceWorker.controller) {\n console.log(\"New Service Worker is active\", registration);\n serviceWorker = newWorker;\n // serviceWorker = registration.active;\n // Send init message now that it's active\n setTimeout(() => {\n console.log('Message Processed after some time');\n processMessageQueue();\n }, 5000);\n yield initServiceWorker();\n success = true;\n serviceWorkerReady = true;\n processMessageQueue();\n resolve();\n }\n });\n }\n };\n // Listen for the activation of the new service worker\n registration.addEventListener('controllerchange', () => __awaiter(this, void 0, void 0, function* () {\n console.warn('controller change triggered', navigator.serviceWorker.controller);\n if (navigator.serviceWorker.controller) {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service worker has been activated; controller change');\n yield initServiceWorker();\n // The new service worker is now controlling the page\n // You can reload the page if necessary or handle the update process here\n }\n }));\n // state change \n if (registration.installing || registration.waiting || registration.active) {\n registration.addEventListener('statechange', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.state) === 'activating') {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service Worker is activating statechange');\n yield initServiceWorker();\n }\n }));\n }\n // If the service worker is already active, mark it as ready\n if (registration.active) {\n serviceWorkerReady = true;\n console.log(\"active sw\");\n serviceWorker = registration.active;\n yield initServiceWorker();\n processMessageQueue();\n resolve();\n }\n else {\n // Handle if on state change didn't trigger\n setTimeout(() => {\n if (!success)\n reject(\"Not Completed Initialization\");\n }, 10000);\n }\n }))\n .catch((error) => __awaiter(this, void 0, void 0, function* () {\n yield initConceptConnection();\n reject(error);\n console.error(\"Service Worker registration failed:\", error);\n }));\n });\n });\n}\n/**\n * Method to initialize Serivce Worker\n */\nfunction initServiceWorker() {\n return __awaiter(this, void 0, void 0, function* () {\n yield sendMessage(\"init\", {\n url: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL,\n aiurl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL,\n accessToken: _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken,\n nodeUrl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL,\n enableAi: false,\n applicationName: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION,\n flags: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS\n });\n });\n}\nfunction checkIfExecutingProcess(messageId, type) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const res = yield sendMessage(\"checkProcess\", { checkMessageId: messageId });\n console.log('check interval data res for type ', type, messageId, res.data);\n if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.processing)\n return true;\n else\n false;\n }\n catch (error) {\n console.error('error on checing executing process', type, messageId, error);\n return false;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/app.ts?");
|
|
2027
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADMIN: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.ADMIN),\n/* harmony export */ ALLID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.ALLID),\n/* harmony export */ AccessTracker: () => (/* reexport safe */ _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_119__.AccessTracker),\n/* harmony export */ AddGhostConcept: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.AddGhostConcept),\n/* harmony export */ Anomaly: () => (/* reexport safe */ _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_110__.Anomaly),\n/* harmony export */ BaseUrl: () => (/* reexport safe */ _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl),\n/* harmony export */ BinaryTree: () => (/* reexport safe */ _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__.BinaryTree),\n/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */ _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_108__.BuilderStatefulWidget),\n/* harmony export */ Composition: () => (/* reexport safe */ _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__.Composition),\n/* harmony export */ CompositionBinaryTree: () => (/* reexport safe */ _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__.CompositionBinaryTree),\n/* harmony export */ CompositionNode: () => (/* reexport safe */ _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__.CompositionNode),\n/* harmony export */ Concept: () => (/* reexport safe */ _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__.Concept),\n/* harmony export */ ConceptsData: () => (/* reexport safe */ _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__.ConceptsData),\n/* harmony export */ Connection: () => (/* reexport safe */ _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__.Connection),\n/* harmony export */ ConnectionData: () => (/* reexport safe */ _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__.ConnectionData),\n/* harmony export */ CreateComposition: () => (/* reexport safe */ _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ CreateConnectionBetweenEntityLocal: () => (/* reexport safe */ _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_120__.CreateConnectionBetweenEntityLocal),\n/* harmony export */ CreateConnectionBetweenTwoConcepts: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConcepts),\n/* harmony export */ CreateConnectionBetweenTwoConceptsGeneral: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConceptsGeneral),\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* reexport safe */ _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__.CreateConnectionBetweenTwoConceptsLocal),\n/* harmony export */ CreateDefaultConcept: () => (/* reexport safe */ _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__.CreateDefaultConcept),\n/* harmony export */ CreateDefaultLConcept: () => (/* reexport safe */ _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__.CreateDefaultLConcept),\n/* harmony export */ CreateSession: () => (/* reexport safe */ _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__.CreateSession),\n/* harmony export */ CreateSessionVisit: () => (/* reexport safe */ _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__.CreateSessionVisit),\n/* harmony export */ CreateTheCompositionLocal: () => (/* reexport safe */ _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__.CreateTheCompositionLocal),\n/* harmony export */ CreateTheCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__.CreateTheCompositionWithCache),\n/* harmony export */ CreateTheConnection: () => (/* reexport safe */ _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__.createTheConnection),\n/* harmony export */ CreateTheConnectionGeneral: () => (/* reexport safe */ _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__.CreateTheConnectionGeneral),\n/* harmony export */ CreateTheConnectionLocal: () => (/* reexport safe */ _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__.CreateTheConnectionLocal),\n/* harmony export */ DATAID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAID),\n/* harmony export */ DATAIDDATE: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAIDDATE),\n/* harmony export */ DelayFunctionExecution: () => (/* reexport safe */ _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__.DelayFunctionExecution),\n/* harmony export */ DeleteConceptById: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteConceptById),\n/* harmony export */ DeleteConceptLocal: () => (/* reexport safe */ _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__.DeleteConceptLocal),\n/* harmony export */ DeleteConnectionById: () => (/* reexport safe */ _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__.DeleteConnectionById),\n/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__.DeleteConnectionByType),\n/* harmony export */ DeleteUser: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteUser),\n/* harmony export */ DependencyObserver: () => (/* reexport safe */ _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__.DependencyObserver),\n/* harmony export */ FilterSearch: () => (/* reexport safe */ _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__.FilterSearch),\n/* harmony export */ FormatFromConnections: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnectionsAltered),\n/* harmony export */ FreeschemaQuery: () => (/* reexport safe */ _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_115__.FreeschemaQuery),\n/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */ _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_116__.FreeschemaQueryApi),\n/* harmony export */ GetAllConnectionsOfComposition: () => (/* reexport safe */ _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__.GetAllConnectionsOfComposition),\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* reexport safe */ _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__.GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__.GetAllTheConnectionsByTypeAndOfTheConcept),\n/* harmony export */ GetComposition: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetComposition),\n/* harmony export */ GetCompositionBulk: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionList: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__.GetCompositionListListener),\n/* harmony export */ GetCompositionListLocal: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocal),\n/* harmony export */ GetCompositionListLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocalWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithIdUpdated),\n/* harmony export */ GetCompositionListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__.GetCompositionListener),\n/* harmony export */ GetCompositionLocal: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocal),\n/* harmony export */ GetCompositionLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocalWithId),\n/* harmony export */ GetCompositionWithAllIds: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithCache),\n/* harmony export */ GetCompositionWithDataIdBulk: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdBulk),\n/* harmony export */ GetCompositionWithDataIdWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdWithCache),\n/* harmony export */ GetCompositionWithId: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetConceptBulk: () => (/* reexport safe */ _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__.GetConceptBulk),\n/* harmony export */ GetConceptByCharacter: () => (/* reexport safe */ _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ GetConceptByCharacterAndCategoryLocal: () => (/* reexport safe */ _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__.GetConceptByCharacterAndCategoryLocal),\n/* harmony export */ GetConceptByCharacterAndType: () => (/* reexport safe */ _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__.GetConceptByCharacterAndType),\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* reexport safe */ _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__.GetConnectionBetweenTwoConceptsLinker),\n/* harmony export */ GetConnectionBulk: () => (/* reexport safe */ _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__.GetConnectionBulk),\n/* harmony export */ GetConnectionById: () => (/* reexport safe */ _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__.GetConnectionById),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetConnectionDataPrefetch),\n/* harmony export */ GetConnectionOfTheConcept: () => (/* reexport safe */ _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__.GetConnectionOfTheConcept),\n/* harmony export */ GetLink: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLink),\n/* harmony export */ GetLinkListListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__.GetLinkListListener),\n/* harmony export */ GetLinkListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__.GetLinkListener),\n/* harmony export */ GetLinkRaw: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLinkRaw),\n/* harmony export */ GetLinkerConnectionFromConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionFromConcepts),\n/* harmony export */ GetLinkerConnectionToConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionToConcepts),\n/* harmony export */ GetRelation: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelation),\n/* harmony export */ GetRelationLocal: () => (/* reexport safe */ _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__.GetRelationLocal),\n/* harmony export */ GetRelationRaw: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelationRaw),\n/* harmony export */ GetTheConcept: () => (/* reexport safe */ _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ GetTheConceptLocal: () => (/* reexport safe */ _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__.GetTheConceptLocal),\n/* harmony export */ GetUserGhostId: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.GetUserGhostId),\n/* harmony export */ JUSTDATA: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.JUSTDATA),\n/* harmony export */ LConcept: () => (/* reexport safe */ _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__.LConcept),\n/* harmony export */ LConnection: () => (/* reexport safe */ _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__.LConnection),\n/* harmony export */ LISTNORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.LISTNORMAL),\n/* harmony export */ LocalConceptsData: () => (/* reexport safe */ _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__.LocalConceptsData),\n/* harmony export */ LocalSyncData: () => (/* reexport safe */ _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__.LocalSyncData),\n/* harmony export */ LocalTransaction: () => (/* reexport safe */ _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_109__.LocalTransaction),\n/* harmony export */ Logger: () => (/* reexport safe */ _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__.Logger),\n/* harmony export */ LoginToBackend: () => (/* reexport safe */ _Api_Login__WEBPACK_IMPORTED_MODULE_35__.LoginToBackend),\n/* harmony export */ MakeTheInstanceConcept: () => (/* reexport safe */ _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__.MakeTheInstanceConceptLocal),\n/* harmony export */ MakeTheTimestamp: () => (/* reexport safe */ _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__.MakeTheTimestamp),\n/* harmony export */ MakeTheTypeConcept: () => (/* reexport safe */ _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__.MakeTheTypeConcept),\n/* harmony export */ MakeTheTypeConceptApi: () => (/* reexport safe */ _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__.MakeTheTypeConceptApi),\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__.MakeTheTypeConceptLocal),\n/* harmony export */ NORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.NORMAL),\n/* harmony export */ PRIVATE: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PRIVATE),\n/* harmony export */ PUBLIC: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PUBLIC),\n/* harmony export */ PatcherStructure: () => (/* reexport safe */ _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__.PatcherStructure),\n/* harmony export */ RAW: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.RAW),\n/* harmony export */ RecursiveSearchApi: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchListener: () => (/* reexport safe */ _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__.RecursiveSearchListener),\n/* harmony export */ SchemaQueryListener: () => (/* reexport safe */ _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_117__.SchemaQueryListener),\n/* harmony export */ SearchAllConcepts: () => (/* reexport safe */ _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__.SearchAllConcepts),\n/* harmony export */ SearchLinkInternal: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternal),\n/* harmony export */ SearchLinkInternalAll: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternalAll),\n/* harmony export */ SearchLinkMultipleAll: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.SearchLinkMultipleAll),\n/* harmony export */ SearchLinkMultipleAllObservable: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.SearchLinkMultipleAllObservable),\n/* harmony export */ SearchLinkMultipleApi: () => (/* reexport safe */ _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__.SearchLinkMultipleApi),\n/* harmony export */ SearchQuery: () => (/* reexport safe */ _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__.SearchQuery),\n/* harmony export */ SearchStructure: () => (/* reexport safe */ _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__.SearchStructure),\n/* harmony export */ SearchWithLinker: () => (/* reexport safe */ _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__.SearchWithLinker),\n/* harmony export */ SearchWithTypeAndLinker: () => (/* reexport safe */ _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__.SearchWithTypeAndLinker),\n/* harmony export */ SearchWithTypeAndLinkerApi: () => (/* reexport safe */ _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__.SearchWithTypeAndLinkerApi),\n/* harmony export */ SessionData: () => (/* reexport safe */ _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__.SessionData),\n/* harmony export */ Signin: () => (/* reexport safe */ _Api_Signin__WEBPACK_IMPORTED_MODULE_38__[\"default\"]),\n/* harmony export */ Signup: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__[\"default\"]),\n/* harmony export */ SignupEntity: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__.SignupEntity),\n/* harmony export */ SplitStrings: () => (/* reexport safe */ _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__.SplitStrings),\n/* harmony export */ StatefulWidget: () => (/* reexport safe */ _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_113__.StatefulWidget),\n/* harmony export */ SyncData: () => (/* reexport safe */ _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__.SyncData),\n/* harmony export */ TrashTheConcept: () => (/* reexport safe */ _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__.TrashTheConcept),\n/* harmony export */ UpdateComposition: () => (/* reexport safe */ _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__[\"default\"]),\n/* harmony export */ UpdateCompositionLocal: () => (/* reexport safe */ _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__.UpdateCompositionLocal),\n/* harmony export */ UserBinaryTree: () => (/* reexport safe */ _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__.UserBinaryTree),\n/* harmony export */ Validator: () => (/* reexport safe */ _Validator_validator__WEBPACK_IMPORTED_MODULE_111__.Validator),\n/* harmony export */ ViewInternalData: () => (/* reexport safe */ _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__.ViewInternalData),\n/* harmony export */ ViewInternalDataApi: () => (/* reexport safe */ _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__.ViewInternalDataApi),\n/* harmony export */ WidgetTree: () => (/* reexport safe */ _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_118__.WidgetTree),\n/* harmony export */ convertFromConceptToLConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromConceptToLConcept),\n/* harmony export */ convertFromLConceptToConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromLConceptToConcept),\n/* harmony export */ convertWidgetTreeToWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ createFormFieldData: () => (/* reexport safe */ _Validator_utils__WEBPACK_IMPORTED_MODULE_112__.createFormFieldData),\n/* harmony export */ dispatchIdEvent: () => (/* binding */ dispatchIdEvent),\n/* harmony export */ getFromDatabaseWithType: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getFromDatabaseWithType),\n/* harmony export */ getObjectsFromIndexDb: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getObjectsFromIndexDb),\n/* harmony export */ handleServiceWorkerException: () => (/* binding */ handleServiceWorkerException),\n/* harmony export */ hasActivatedSW: () => (/* binding */ hasActivatedSW),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ recursiveFetch: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.recursiveFetch),\n/* harmony export */ recursiveFetchNew: () => (/* reexport safe */ _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__.recursiveFetchNew),\n/* harmony export */ renderLatestWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderLatestWidget),\n/* harmony export */ renderPage: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderPage),\n/* harmony export */ renderWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.renderWidget),\n/* harmony export */ searchLinkMultipleListener: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.searchLinkMultipleListener),\n/* harmony export */ sendEmail: () => (/* reexport safe */ _Services_Mail__WEBPACK_IMPORTED_MODULE_107__.sendEmail),\n/* harmony export */ sendMessage: () => (/* binding */ sendMessage),\n/* harmony export */ serviceWorker: () => (/* binding */ serviceWorker),\n/* harmony export */ setHasActivatedSW: () => (/* binding */ setHasActivatedSW),\n/* harmony export */ storeToDatabase: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.storeToDatabase),\n/* harmony export */ subscribedListeners: () => (/* binding */ subscribedListeners),\n/* harmony export */ unwrapContainers: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__.unwrapContainers),\n/* harmony export */ updateAccessToken: () => (/* binding */ updateAccessToken),\n/* harmony export */ uploadAttachment: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadAttachment),\n/* harmony export */ uploadFile: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadFile),\n/* harmony export */ uploadImage: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadImage),\n/* harmony export */ validDocumentFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validDocumentFormats),\n/* harmony export */ validImageFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validImageFormats)\n/* harmony export */ });\n/* harmony import */ var _Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Services/CreateBinaryTreeFromData */ \"./src/Services/CreateBinaryTreeFromData.ts\");\n/* harmony import */ var _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataStructures/IdentifierFlags */ \"./src/DataStructures/IdentifierFlags.ts\");\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Services/SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Services/GetCompositionList */ \"./src/Services/GetCompositionList.ts\");\n/* harmony import */ var _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Services/Local/GetCompositionListLocal */ \"./src/Services/Local/GetCompositionListLocal.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Services/GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Services/Local/GetCompositionLocal */ \"./src/Services/Local/GetCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Services/CreateTheComposition */ \"./src/Services/CreateTheComposition.ts\");\n/* harmony import */ var _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Services/Local/CreateTheCompositionLocal */ \"./src/Services/Local/CreateTheCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Services/CreateConnectionBetweenTwoConcepts */ \"./src/Services/CreateConnectionBetweenTwoConcepts.ts\");\n/* harmony import */ var _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Services/GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Services/MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Services/Local/MakeTheInstanceConceptLocal */ \"./src/Services/Local/MakeTheInstanceConceptLocal.ts\");\n/* harmony import */ var _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Database/NoIndexDb */ \"./src/Database/NoIndexDb.ts\");\n/* harmony import */ var _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Services/CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Services/GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Services/GetLink */ \"./src/Services/GetLink.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Services/Local/MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Services/MakeTheTypeConcept */ \"./src/Services/MakeTheTypeConcept.ts\");\n/* harmony import */ var _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Api/MakeTheTypeConceptApi */ \"./src/Api/MakeTheTypeConceptApi.ts\");\n/* harmony import */ var _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Services/GetLinkerConnectionFromConcept */ \"./src/Services/GetLinkerConnectionFromConcept.ts\");\n/* harmony import */ var _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Services/DeleteConcept */ \"./src/Services/DeleteConcept.ts\");\n/* harmony import */ var _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Services/DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Api/Delete/DeleteConceptInBackend */ \"./src/Api/Delete/DeleteConceptInBackend.ts\");\n/* harmony import */ var _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Services/GetConnections */ \"./src/Services/GetConnections.ts\");\n/* harmony import */ var _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Services/MakeTheTimestamp */ \"./src/Services/MakeTheTimestamp.ts\");\n/* harmony import */ var _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Api/RecursiveSearch */ \"./src/Api/RecursiveSearch.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Upload__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Services/Upload */ \"./src/Services/Upload.ts\");\n/* harmony import */ var _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Api/GetConceptBulk */ \"./src/Api/GetConceptBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_Login__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Api/Login */ \"./src/Api/Login.ts\");\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _Api_Signup__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Api/Signup */ \"./src/Api/Signup.ts\");\n/* harmony import */ var _Api_Signin__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Api/Signin */ \"./src/Api/Signin.ts\");\n/* harmony import */ var _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Services/UpdateComposition */ \"./src/Services/UpdateComposition.ts\");\n/* harmony import */ var _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Api/Search/Search */ \"./src/Api/Search/Search.ts\");\n/* harmony import */ var _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Api/Search/SearchWithLinker */ \"./src/Api/Search/SearchWithLinker.ts\");\n/* harmony import */ var _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Services/Composition/CompositionCache */ \"./src/Services/Composition/CompositionCache.ts\");\n/* harmony import */ var _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Api/Session/CreateSession */ \"./src/Api/Session/CreateSession.ts\");\n/* harmony import */ var _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Api/Session/CreateSessionVisit */ \"./src/Api/Session/CreateSessionVisit.ts\");\n/* harmony import */ var _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Services/GetRelation */ \"./src/Services/GetRelation.ts\");\n/* harmony import */ var _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Services/Composition/BuildComposition */ \"./src/Services/Composition/BuildComposition.ts\");\n/* harmony import */ var _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Services/Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Services/Local/CreateDefaultLConcept */ \"./src/Services/Local/CreateDefaultLConcept.ts\");\n/* harmony import */ var _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Services/CreateTheConnectionGeneral */ \"./src/Services/CreateTheConnectionGeneral.ts\");\n/* harmony import */ var _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Services/Local/CreateTheConnectionLocal */ \"./src/Services/Local/CreateTheConnectionLocal.ts\");\n/* harmony import */ var _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./Services/User/UserTranslation */ \"./src/Services/User/UserTranslation.ts\");\n/* harmony import */ var _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./Services/Search/SearchLinkMultiple */ \"./src/Services/Search/SearchLinkMultiple.ts\");\n/* harmony import */ var _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./Services/Local/GetTheConceptLocal */ \"./src/Services/Local/GetTheConceptLocal.ts\");\n/* harmony import */ var _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./Services/Local/UpdateCompositionLocal */ \"./src/Services/Local/UpdateCompositionLocal.ts\");\n/* harmony import */ var _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./Services/Local/GetRelationLocal */ \"./src/Services/Local/GetRelationLocal.ts\");\n/* harmony import */ var _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./Services/Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./Services/View/ViewInternalData */ \"./src/Services/View/ViewInternalData.ts\");\n/* harmony import */ var _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./Api/View/ViewInternalDataApi */ \"./src/Api/View/ViewInternalDataApi.ts\");\n/* harmony import */ var _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./Services/Conversion/ConvertConcepts */ \"./src/Services/Conversion/ConvertConcepts.ts\");\n/* harmony import */ var _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Services/Search/SearchLinkInternal */ \"./src/Services/Search/SearchLinkInternal.ts\");\n/* harmony import */ var _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./Services/Local/CreateConnectionBetweenTwoConceptsLocal */ \"./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts\");\n/* harmony import */ var _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./Services/Local/DeleteConceptLocal */ \"./src/Services/Local/DeleteConceptLocal.ts\");\n/* harmony import */ var _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Services/GetConnectionBetweenTwoConceptsLinker */ \"./src/Services/GetConnectionBetweenTwoConceptsLinker.ts\");\n/* harmony import */ var _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Services/Common/DelayFunction */ \"./src/Services/Common/DelayFunction.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./Constants/AccessConstants */ \"./src/Constants/AccessConstants.ts\");\n/* harmony import */ var _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./Api/Search/SearchWithTypeAndLinker */ \"./src/Api/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./WrapperFunctions/DepenedencyObserver */ \"./src/WrapperFunctions/DepenedencyObserver.ts\");\n/* harmony import */ var _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./WrapperFunctions/SearchLinkMultipleAllObservable */ \"./src/WrapperFunctions/SearchLinkMultipleAllObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionObservable */ \"./src/WrapperFunctions/GetCompositionObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionListObservable */ \"./src/WrapperFunctions/GetCompositionListObservable.ts\");\n/* harmony import */ var _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./Services/Search/SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkObservable */ \"./src/WrapperFunctions/GetLinkObservable.ts\");\n/* harmony import */ var _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./WrapperFunctions/RecursiveSearchObservable */ \"./src/WrapperFunctions/RecursiveSearchObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkListObservable */ \"./src/WrapperFunctions/GetLinkListObservable.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./DataStructures/Concept */ \"./src/DataStructures/Concept.ts\");\n/* harmony import */ var _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./DataStructures/Local/LConcept */ \"./src/DataStructures/Local/LConcept.ts\");\n/* harmony import */ var _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./DataStructures/Local/LConnection */ \"./src/DataStructures/Local/LConnection.ts\");\n/* harmony import */ var _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./DataStructures/Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./DataStructures/BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./DataStructures/PatcherStructure */ \"./src/DataStructures/PatcherStructure.ts\");\n/* harmony import */ var _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./DataStructures/Session/SessionData */ \"./src/DataStructures/Session/SessionData.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionNode */ \"./src/DataStructures/Composition/CompositionNode.ts\");\n/* harmony import */ var _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./DataStructures/Local/LocalSyncData */ \"./src/DataStructures/Local/LocalSyncData.ts\");\n/* harmony import */ var _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./DataStructures/User/UserBinaryTree */ \"./src/DataStructures/User/UserBinaryTree.ts\");\n/* harmony import */ var _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./DataStructures/FilterSearch */ \"./src/DataStructures/FilterSearch.ts\");\n/* harmony import */ var _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./DataStructures/Search/SearchStructure */ \"./src/DataStructures/Search/SearchStructure.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./Services/GetDataFromIndexDb */ \"./src/Services/GetDataFromIndexDb.ts\");\n/* harmony import */ var _Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./Services/Local/CreateLocalBinaryTreeFromData */ \"./src/Services/Local/CreateLocalBinaryTreeFromData.ts\");\n/* harmony import */ var _Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./Services/InitializeSystem */ \"./src/Services/InitializeSystem.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\n/* harmony import */ var _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Constants/general.const */ \"./src/Constants/general.const.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./Middleware/ApplicationMonitor */ \"./src/Middleware/ApplicationMonitor.ts\");\n/* harmony import */ var _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./DataStructures/Responses/ErrorResponse */ \"./src/DataStructures/Responses/ErrorResponse.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./app */ \"./src/app.ts\");\n/* harmony import */ var _Services_Mail__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./Services/Mail */ \"./src/Services/Mail.ts\");\n/* harmony import */ var _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./Widgets/BuilderStatefulWidget */ \"./src/Widgets/BuilderStatefulWidget.ts\");\n/* harmony import */ var _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./Services/Transaction/LocalTransaction */ \"./src/Services/Transaction/LocalTransaction.ts\");\n/* harmony import */ var _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./Anomaly/anomaly */ \"./src/Anomaly/anomaly.ts\");\n/* harmony import */ var _Validator_validator__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./Validator/validator */ \"./src/Validator/validator.ts\");\n/* harmony import */ var _Validator_utils__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./Validator/utils */ \"./src/Validator/utils.ts\");\n/* harmony import */ var _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./Widgets/StatefulWidget */ \"./src/Widgets/StatefulWidget.ts\");\n/* harmony import */ var _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./Services/DeleteConnectionByType */ \"./src/Services/DeleteConnectionByType.ts\");\n/* harmony import */ var _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./DataStructures/Search/FreeschemaQuery */ \"./src/DataStructures/Search/FreeschemaQuery.ts\");\n/* harmony import */ var _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./Api/Search/FreeschemaQueryApi */ \"./src/Api/Search/FreeschemaQueryApi.ts\");\n/* harmony import */ var _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./WrapperFunctions/SchemaQueryObservable */ \"./src/WrapperFunctions/SchemaQueryObservable.ts\");\n/* harmony import */ var _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./Widgets/WidgetTree */ \"./src/Widgets/WidgetTree.ts\");\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./Services/CreateConnection/CreateConnectionEntity */ \"./src/Services/CreateConnection/CreateConnectionEntity.ts\");\n/* harmony import */ var _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./Widgets/RenderWidgetService */ \"./src/Widgets/RenderWidgetService.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar serviceWorker;\nconst TABID = Date.now().toString(36) + Math.random().toString(36).substring(2);\nlet subscribedListeners = [];\n// let serviceWorkerReady = false;\nlet messageQueue = [];\n// for sw use only START\nlet hasActivatedSW = false;\nfunction setHasActivatedSW(value) { hasActivatedSW = value; }\n// for sw use only END\n/**\n * This function lets you update the access token that the package uses. If this is not passed you cannot create, update, view or delete\n * Your concepts using this package.\n * @param accessToken access token got from the sign in process\n */\nfunction updateAccessToken(accessToken = \"\") {\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n if (serviceWorker)\n sendMessage('updateAccessToken', { accessToken });\n}\n/**\n *\n * @param url This is the url for the backend c# system or our main data fabric server\n * @param aiurl This is the AI url that pulls in the data using our AI system . If you do not enter this then also disable the enableAi flag.\n * @param accessToken This is the JWT token that needs to be passed (But since you have just initilized the system). There is no way we can get access token\n * So this access token can be empty string. You can set it afterwards with another function UpdateAccessToken();\n * @param nodeUrl This is the url for the node server. This is another server in the data fabric that is used as server for business logic and security features.\n * @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.\n * @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.\n * @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope\n */\nfunction init() {\n return __awaiter(this, arguments, void 0, function* (url = \"\", aiurl = \"\", accessToken = \"\", nodeUrl = \"\", enableAi = true, applicationName = \"\", enableSW = undefined, flags = {}) {\n try {\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL = url;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL = aiurl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL = nodeUrl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION = applicationName;\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n let randomizer = Math.floor(Math.random() * 100000000);\n // BaseUrl.BASE_RANDOMIZER = randomizer;\n // BaseUrl.BASE_RANDOMIZER = 999;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.setRandomizer(randomizer);\n // Change Default Flags\n const defaultFlags = {\n logApplication: false,\n logPackage: false,\n accessTracker: false,\n isTest: false\n };\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = defaultFlags;\n // Merge Provided Flags with Defaults\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = Object.assign(Object.assign({}, defaultFlags), flags);\n initializeFlags(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS);\n // console.log(\"BaseUrl.FLAGS before sending to service worker : \", BaseUrl.FLAGS)\n if (!(\"serviceWorker\" in navigator)) {\n yield initConceptConnection();\n console.warn(\"Service Worker not supported in this browser.\");\n return;\n }\n listenPostMessagaes();\n listenBroadCastMessages();\n if (enableSW && enableSW.activate && enableSW.manual) {\n yield new Promise((resolve, reject) => {\n navigator.serviceWorker.ready\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log('registraions ready', registration);\n serviceWorker = registration.active;\n yield initServiceWorker();\n resolve('done');\n }))\n .catch(err => {\n console.error(\"Error: Ready service worker\", err);\n reject(err);\n })\n .finally(() => console.log('Finally service worker ready done'));\n setTimeout(() => reject('Timeout ready'), 30000);\n });\n }\n else if (enableSW &&\n (enableSW === null || enableSW === void 0 ? void 0 : enableSW.activate)) {\n try {\n console.log(\"service worker initialiing\");\n yield handleRegisterServiceWorker(enableSW);\n }\n catch (error) {\n yield initConceptConnection();\n console.error(\"Unable to start service worker\", error);\n }\n }\n else {\n yield initConceptConnection();\n console.warn('Service Worker not activated');\n }\n return true;\n }\n catch (error) {\n yield initConceptConnection();\n console.warn(\"Cannot initialize the system\", error);\n }\n });\n}\n/**\n * Method to send message to the service worker from main thread\n * @param type string\n * @param payload any\n * @returns Promise<any>\n */\nfunction sendMessage(type_1, payload_1) {\n return __awaiter(this, arguments, void 0, function* (type, payload, retryCount = 0) {\n let messagedProcessed = false;\n const messageId = Math.random().toString(36).substring(2); // Generate a unique message ID\n payload.messageId = messageId;\n payload.TABID = TABID;\n // let actions = payload.actions\n const newPayload = JSON.parse(JSON.stringify(payload));\n let checkProcessInterval;\n if (type != 'checkProcess' && retryCount == 0) {\n checkProcessInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {\n console.log('process took more than one second', messageId, type, messagedProcessed);\n // if (!await checkIfExecutingProcess(messageId, type) && !messagedProcessed) {\n // console.log(\"Message process missing\")\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n // }\n if (!messagedProcessed && !(yield checkIfExecutingProcess(messageId, type))) {\n clearInterval(checkProcessInterval);\n if (!messagedProcessed) {\n console.log('Failed to handle type ' + type + ' message not found ' + messageId, 'retrying: ', retryCount == 0, type);\n if (retryCount == 0 && type != 'checkProcess') {\n console.log('retrying ', type, messageId);\n const res = yield sendMessage(type, payload, retryCount + 1);\n return res;\n }\n else {\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n console.log('Failed to handle type ' + type + ' ' + messageId);\n }\n }\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n }\n }), 2000);\n }\n return new Promise((resolve, reject) => {\n if (!((navigator.serviceWorker.controller || serviceWorker)))\n console.log('will go to queue', navigator.serviceWorker.controller, serviceWorker, type);\n if ((navigator.serviceWorker.controller || serviceWorker)) {\n const responseHandler = (event) => {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.messageId) == messageId) { // Check if the message ID matches\n messagedProcessed = true;\n if (type != 'checkProcess')\n console.log('received from sw', type, messageId);\n clearInterval(checkProcessInterval);\n if (!event.data.success) {\n if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.statusText })));\n }\n else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleInternalError)(new Response('Internal Server Error', { status: 500, statusText: (_e = event === null || event === void 0 ? void 0 : event.data) === null || _e === void 0 ? void 0 : _e.statusText })));\n }\n else {\n console.error('Error in the response from worker:', event);\n reject(`Failed to handle action ${type} ${JSON.stringify(payload)}, Response: ${JSON.stringify(event.data)}`);\n }\n }\n if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.actions) {\n payload.actions = JSON.parse(JSON.stringify(event.data.actions));\n }\n resolve(event.data);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }\n };\n navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n // Send the message to the service worker\n if (navigator.serviceWorker.controller) {\n if (type != 'checkProcess')\n console.log('sent to sw', type, messageId);\n navigator.serviceWorker.controller.postMessage({ type, payload: newPayload });\n }\n else if (serviceWorker) {\n console.log('sent to sw', type, messageId);\n console.warn(`controller not found but serviceWorker is available. messageId: ${messageId}, type: ${type}`);\n // if (serviceWorkerReady) console.warn('service worker was registered already but navigator is empty!!!', serviceWorker)\n try {\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n catch (err) {\n console.log('Retrying again on catch service worker', err);\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n }\n else {\n console.warn(`Service Worker hasn't loaded yet. messageId: ${messageId}, type: ${type}`);\n // if (serviceWorkerReady) console.warn('service worker was registered already but is not available NOW!!!')\n console.info('ready', navigator.serviceWorker.ready);\n // wait one second before checking again\n setTimeout(() => {\n console.warn(`Re-Trying after certain time. messageId: ${messageId}, type: ${type}`);\n if (serviceWorker) {\n console.info('This is triggered ');\n serviceWorker === null || serviceWorker === void 0 ? void 0 : serviceWorker.postMessage({ type, payload });\n }\n else {\n console.log('not ready', type);\n clearInterval(checkProcessInterval);\n reject(\"Service worker not ready\");\n }\n }, 30000); // 30 seconds\n }\n // Timeout for waiting for the response (e.g., 5 seconds)\n setTimeout(() => {\n clearInterval(checkProcessInterval);\n reject(`No response from service worker after timeout: ${type}`);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }, 210000); // 3.5 minutes\n }\n else {\n messageQueue.push({ message: { type, payload: newPayload } });\n console.log('Message Queued', type, payload);\n console.log(navigator.serviceWorker.controller, serviceWorker, type);\n if (type == 'init') {\n clearInterval(checkProcessInterval);\n resolve(null);\n }\n }\n });\n });\n}\n// export function sendMessage(type: string, payload: any) {\n// return new Promise((resolve) => {\n// const responseHandler = (event: any) => {\n// resolve(event.data);\n// navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n// };\n// navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n// navigator.serviceWorker.controller?.postMessage({ type, payload });\n// });\n// }\n// actions for message received on broadcast channel (specially from service worker)\nconst broadcastActions = {\n GetLinkListener: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n const listener = subscribedListeners.find(listener => listener.listenerId == payload.listenerId);\n listener === null || listener === void 0 ? void 0 : listener.callback(payload.data);\n return { success: true };\n }),\n dispatchEvent: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n if (serviceWorker) {\n let event = new Event(payload.id || '');\n dispatchEvent(event);\n }\n // self.clients.matchAll({ includeUncontrolled: true }).then(clients => {\n // clients.forEach(client => {\n // client.postMessage({ id, updatedData });\n // });\n // });\n return { success: true };\n }),\n checkInit: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n console.log('service worker init 0');\n if (navigator.serviceWorker.controller) {\n console.log('service worker init 1');\n serviceWorker = navigator.serviceWorker.controller;\n }\n yield initServiceWorker();\n return { success: true };\n })\n};\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenBroadCastMessages() {\n // broadcast event can be listened through both the service worker and other tabs\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n const { type, payload } = event.data;\n if (!type)\n return;\n let responseData = { success: false, data: undefined };\n if (broadcastActions[type]) {\n responseData = yield broadcastActions[type](payload);\n }\n else {\n console.warn(`Unable to handle \"${type}\" case in BC service worker`);\n }\n }));\n}\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenPostMessagaes() {\n // broadcast event can be listened through both the service worker and other tabs\n navigator.serviceWorker.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n try {\n if (event.data && event.data.type === 'API_401') {\n const { requestDetails } = event.data;\n // Re-create the POST request with the same headers and body\n const requestOptions = {\n method: requestDetails.method,\n headers: new Headers(requestDetails.headers),\n body: requestDetails.body // Pass the original body\n };\n // Re-hit the API with the same details\n const apiResponse = yield fetch(requestDetails.url, requestOptions);\n const responseBody = yield (apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.json()); // Get the response text\n // Send the response back to the Service Worker (same client)\n (_b = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId,\n response: new Response(responseBody, {\n status: apiResponse.status,\n statusText: apiResponse.statusText,\n headers: apiResponse.headers\n })\n });\n }\n }\n catch (error) {\n console.error(\"Error during listenPostMessage\", error);\n (_d = (_c = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _c === void 0 ? void 0 : _c.controller) === null || _d === void 0 ? void 0 : _d.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId\n });\n }\n }));\n}\n/**\n * Method to initialize the initial data\n * @param url string\n * @param aiurl string\n * @param accessToken string\n * @param nodeUrl string\n * @param enableAi boolean\n * @param applicationName string\n * @param isTest boolean\n * @returns Promise<any>\n */\nfunction initConceptConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n /**\n * We initialize the system so that we get all the concepts from the backend system that are most likely to be used\n * We use some sort of AI algorithm to initilize these concepts with the most used concept.\n * @param enableAi enableAi is a flag that the user can choose to set if they want to use this enable AI feature\n * If the developer does not want to use this feature then they can just set enableAi to false.\n */\n yield (0,_Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__[\"default\"])();\n const start = new Date().getTime();\n /**\n * This will create a binary tree in the memory from the indexdb.\n * This process will set Flags to denote that the binary tree is loaded, the character binary tree is loaded\n * and that the type binary tree has been loaded.\n * These trees are helpful in caching concepts and connections for the data fabric.\n */\n yield (0,_Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isDataLoaded= true;\n // IdentifierFlags.isCharacterLoaded= true;\n // IdentifierFlags.isTypeLoaded= true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare concept data is \", elapsed);\n })\n .catch((event) => {\n // console.log(\"This is the error in creating binary tree\", IdentifierFlags.isDataLoaded, IdentifierFlags.isCharacterLoaded, IdentifierFlags.isTypeLoaded);\n throw event;\n });\n /**\n * This will create a binary tree of local concepts that is saved from the indexdb.\n * This process after finishing creating a binary tree of local concepts then set flag to denote that\n * LocalBinaryTree has been created from the concepts in indexdb\n * Local Binary Type tree has been loaded to the index db (flag is set to denote that)\n * Character Binary Tree has been loaded from indexdb to memory (flag is set to denote that)\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isLocalDataLoaded = true;\n // IdentifierFlags.isLocalTypeLoaded = true;\n // IdentifierFlags.isLocalCharacterLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare local concept \", elapsed);\n })\n .catch((event) => {\n throw event;\n });\n /**\n * This process gets the local connections from indexdb and loads it to the local connections array which is inside of\n * a static class called LocalConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDbLocal)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n })\n .catch((event) => {\n //console.log(\"This is the error in creating local connections binary tree\");\n throw event;\n });\n /**\n * We have designed our system to use local concepts and connections with its own local ids(negative ids) that\n * is only valid for the browser that creates this. We have a translator in our node server.\n * This function does this process in initlization.\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__.PopulateTheLocalConnectionToMemory)().catch((event) => {\n console.log(\"This is the error in populating binary tree\");\n throw event;\n });\n // await PopulateTheLocalConceptsToMemory().catch((event)=>{\n // console.log(\"This is the error in populating binary tree\");\n // });\n /**\n * This process gets the connections from indexdb and loads it to the connections array which is inside of\n * a static class called ConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDb)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare connections \", elapsed);\n })\n .catch((event) => {\n //console.log(\"This is the error in creating connections tree\");\n throw event;\n });\n });\n}\n/**\n * Method to dispatch Event received from SW\n * @param id number|string\n * @param data any\n */\nfunction dispatchIdEvent(id, data = {}) {\n // console.log('id event dispatched', id)\n if (serviceWorker || typeof window != undefined) {\n // let event = new Event(`${id}`);\n let event = new CustomEvent(`${id}`, data);\n dispatchEvent(event);\n }\n else {\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.postMessage({ type: 'dispatchEvent', payload: { id } });\n }\n}\nfunction processMessageQueue() {\n var arguments_1 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logfunction(processMessageQueue, arguments_1);\n console.log('message queue', messageQueue);\n // process init if exist in queue\n const initQueueItem = messageQueue.find(item => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.message) === null || _a === void 0 ? void 0 : _a.type) == 'init'; });\n if (initQueueItem) {\n console.log('Processing Init Queue poped', initQueueItem === null || initQueueItem === void 0 ? void 0 : initQueueItem.type, initQueueItem);\n // remove current init items\n const index = messageQueue.indexOf(initQueueItem);\n if (index > -1) { // only splice array when item is found\n messageQueue.splice(index, 1); // 2nd parameter means remove one item only\n }\n yield sendMessage(initQueueItem === null || initQueueItem === void 0 ? void 0 : initQueueItem.type, initQueueItem === null || initQueueItem === void 0 ? void 0 : initQueueItem.payload);\n }\n console.log('message queue while', messageQueue);\n while (messageQueue.length > 0) {\n const { message, resolve, reject } = messageQueue.shift();\n console.log('Queue poped', message.type, message);\n yield sendMessage(message.type, message.payload);\n }\n });\n}\n/**\n * Method to handle global exception occured in service worker\n * @param error any\n */\nconst handleServiceWorkerException = (error) => {\n // if (error instanceof FreeSchemaResponse && error.getStatus() != 401) {\n if (error instanceof _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__.FreeSchemaResponse) {\n console.error('FreeSchemaResponse Error', error);\n throw error;\n }\n // if (error instanceof FreeSchemaResponse && error.getStatus() == 401) console.error('401 triggered in sw defaulting')\n console.error('Service Worker Error', error);\n};\n/**\n * Function to setup initial flag\n */\nfunction initializeFlags(flags) {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logfunction(initializeFlags, arguments);\n try {\n if (flags.logApplication) {\n _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__.ApplicationMonitor.initialize();\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logApplicationActivationStatus = true;\n console.warn(\"Application log started.\");\n }\n if (flags.logPackage) {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logPackageActivationStatus = true;\n console.warn(\"Package log started.\");\n }\n if (flags.accessTracker) {\n _app__WEBPACK_IMPORTED_MODULE_106__.AccessTracker.activateStatus = true;\n console.warn(\"Access Tracker Activated.\");\n }\n if (flags.isTest) {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n // return true;\n }\n return flags;\n }\n catch (error) {\n console.error(\"Failed to initialize flags:\", error);\n throw error;\n }\n}\n/**\n * Method to handle Registering service worker\n * @param enableSW any\n */\nfunction handleRegisterServiceWorker(enableSW) {\n var arguments_2 = arguments;\n return __awaiter(this, void 0, void 0, function* () {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logfunction(handleRegisterServiceWorker, arguments_2);\n yield new Promise((resolve, reject) => {\n var _a, _b;\n let success = false;\n navigator.serviceWorker\n .register((_a = enableSW.pathToSW) !== null && _a !== void 0 ? _a : \"./serviceWorker.bundle.js\", {\n // type: \"module\",\n scope: (_b = enableSW.scope) !== null && _b !== void 0 ? _b : \"/\",\n })\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log(\"Service Worker registered:\", registration);\n // process queue if exist\n setInterval(() => {\n console.log('message process interrval calling', messageQueue);\n if (messageQueue.length)\n processMessageQueue();\n }, 2000);\n // Add Listeners before initializing the service worker\n // Listen for updates to the service worker\n console.log(\"update listen start\");\n registration.onupdatefound = () => {\n const newWorker = registration.installing;\n console.log(\"new worker\", newWorker);\n if (newWorker) {\n newWorker.onstatechange = () => __awaiter(this, void 0, void 0, function* () {\n console.warn(\"on state change triggered\", newWorker.state, navigator.serviceWorker.controller);\n if (newWorker.state === \"installing\") {\n console.log(\"Service Worker installing\");\n serviceWorker = undefined;\n // serviceWorkerReady = false\n }\n // if (newWorker.state === 'activated' && navigator.serviceWorker.controller) {\n if ((newWorker.state === \"activated\" || newWorker.state === 'redundant') && navigator.serviceWorker.controller) {\n // && navigator.serviceWorker.controller) {\n // serviceWorkerReady = true;\n serviceWorker = newWorker;\n console.log(\"New Service Worker is active\", registration);\n // serviceWorker = registration.active;\n // Send init message now that it's active\n setTimeout(() => {\n console.log('Message Processed after some time');\n processMessageQueue();\n }, 5000);\n yield initServiceWorker();\n success = true;\n processMessageQueue();\n resolve();\n }\n });\n }\n };\n // Listen for the activation of the new service worker\n registration.addEventListener('controllerchange', () => __awaiter(this, void 0, void 0, function* () {\n console.warn('controller change triggered', navigator.serviceWorker.controller);\n if (navigator.serviceWorker.controller) {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service worker has been activated; controller change');\n yield initServiceWorker();\n // The new service worker is now controlling the page\n // You can reload the page if necessary or handle the update process here\n }\n }));\n // state change \n if (registration.installing || registration.waiting || registration.active) {\n registration.addEventListener('statechange', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.state) === 'activating') {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service Worker is activating statechange');\n yield initServiceWorker();\n }\n }));\n }\n // If the service worker is already active, mark it as ready\n if (registration.active) {\n // serviceWorkerReady = true;\n console.log(\"active sw\");\n serviceWorker = registration.active;\n yield initServiceWorker();\n processMessageQueue();\n resolve();\n }\n else {\n // Handle if on state change didn't trigger\n setTimeout(() => {\n if (!success)\n reject(\"Not Completed Initialization\");\n }, 10000);\n }\n }))\n .catch((error) => __awaiter(this, void 0, void 0, function* () {\n yield initConceptConnection();\n reject(error);\n console.error(\"Service Worker registration failed:\", error);\n }));\n });\n });\n}\n/**\n * Method to initialize Serivce Worker\n */\nfunction initServiceWorker() {\n return __awaiter(this, void 0, void 0, function* () {\n yield sendMessage(\"init\", {\n url: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL,\n aiurl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL,\n accessToken: _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken,\n nodeUrl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL,\n enableAi: false,\n applicationName: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION,\n flags: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS\n });\n });\n}\nfunction checkIfExecutingProcess(messageId, type) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const res = yield sendMessage(\"checkProcess\", { checkMessageId: messageId });\n console.log('check interval data res for type ', type, messageId, res.data);\n if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.processing)\n return true;\n else\n false;\n }\n catch (error) {\n console.error('error on checing executing process', type, messageId, error);\n return false;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/app.ts?");
|
|
2028
2028
|
|
|
2029
2029
|
/***/ })
|
|
2030
2030
|
|