graphdb-workbench 2.8.0-RC1 → 2.8.0-RC3
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/{105.647434fb577715a0cbf0.bundle.js → 105.f1f5759395f8ba9fff6f.bundle.js} +1 -1
- package/dist/182.dfcc20ae89193db499d9.bundle.js +1 -1
- package/dist/22.673ef35a23421e7dffcb.bundle.js +1 -1
- package/dist/{265.7fc757395a64fed907fc.bundle.js → 265.d128932eb1a7be270b66.bundle.js} +1 -1
- package/dist/27.2e7f5c9f8f4a670b3984.bundle.js +1 -0
- package/dist/33.d4d571fa95fe4279e91a.bundle.js +1 -0
- package/dist/341.40c87b67067473b65948.bundle.js +1 -1
- package/dist/347.9da36037aa6cf847fca9.bundle.js +1 -1
- package/dist/350.98af5dc7b011f3bb0cea.bundle.js +1 -1
- package/dist/351.4b24b91033c1f2ff99bc.bundle.js +1 -1
- package/dist/352.95aa115bee7aac6ad664.bundle.js +1 -1
- package/dist/353.23320eb168ae4ae33394.bundle.js +1 -1
- package/dist/354.979dc4d4d8495191a364.bundle.js +1 -1
- package/dist/384.5538193bdeac0703bc47.bundle.js +1 -1
- package/dist/396.c5a25717c4fc949419a7.bundle.js +1 -1
- package/dist/397.33463b93b02b13a80453.bundle.js +1 -1
- package/dist/{398.42f0bbe65197ac4cee74.bundle.js → 398.b83b6410f7cceec4fc3f.bundle.js} +1 -1
- package/dist/399.0916866cffd7814843af.bundle.js +1 -1
- package/dist/400.1ce74b220dacdb1ab34c.bundle.js +1 -1
- package/dist/402.61aaab5f119f02d6a6c4.bundle.js +1 -1
- package/dist/403.203cccb77544e449317a.bundle.js +1 -1
- package/dist/404.b921697f6552cc581aac.bundle.js +1 -1
- package/dist/405.3e17362183cfe674af25.bundle.js +1 -1
- package/dist/41.edbd16a2fc60a997c1ee.bundle.js +1 -1
- package/dist/42.f76e5e500efcc079a9c7.bundle.js +1 -1
- package/dist/48.49ca75d24206ea496ef5.bundle.js +1 -0
- package/dist/49.32ed550dc99d64e69f20.bundle.js +1 -0
- package/dist/{53.55925fb9fea11ab046d3.bundle.js → 53.a429006d4cd89ca07d7f.bundle.js} +1 -1
- package/dist/59.69785f5f7ae1e65841ff.bundle.js +1 -1
- package/dist/6.1143a99a77f0463b21b0.bundle.js +1 -0
- package/dist/64.2f87215d70caab13c80d.bundle.js +1 -0
- package/dist/70.4e944a1170802f15dc71.bundle.js +1 -1
- package/dist/77.c518fffc84eb04d570a9.bundle.js +1 -0
- package/dist/{bundle.a3c65cb24062525b5dd1.bundle.js → bundle.debfe2fd949a59877cbe.bundle.js} +2 -2
- package/dist/css/ttyg/chat-item-details.css +1 -0
- package/dist/i18n/locale-en.json +6 -3
- package/dist/i18n/locale-fr.json +6 -3
- package/dist/index.html +3 -3
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +4 -3
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +8 -8
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +12 -12
- package/package.json +1 -1
- package/dist/27.0bef4e8a2036ac558363.bundle.js +0 -1
- package/dist/33.af2c6f75cf2552a3673a.bundle.js +0 -1
- package/dist/48.3f307ccfc9f7fdb4493a.bundle.js +0 -1
- package/dist/49.cb3092e45da0b746f614.bundle.js +0 -1
- package/dist/6.f0a3eb64b7f08f563a1e.bundle.js +0 -1
- package/dist/64.d22107a2323b4f530473.bundle.js +0 -1
- package/dist/77.8ec067adfbc7ace36ba9.bundle.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[6,48,64,77,78,103,105,106,107,264,265,266,267,268,311],{101:function(e,t,s){"use strict";s.r(t);var n=s(223),r=(s(224),s(136)),a=s(160),i=s(226),o=s(227);function d(e,t){return{getConversation:t=>e.getConversation(t).then(e=>Object(n.chatModelMapper)(e.data)),renameConversation:t=>e.renameConversation(t.id,t.toRenameRequestPayload()).then(e=>Object(n.chatModelMapper)(e.data)),exportConversation:t=>e.exportConversation(t).then((function(e){const t=e.data,s=e.headers()["content-disposition"];let n="chat-export";return s&&(n=s.split("filename=")[1],n=n.substring(0,n.length)),{data:t,filename:n}})),askQuestion:t=>e.askQuestion(t.toAskRequestPayload()).then(e=>Object(r.chatAnswerModelMapper)(e.data)),continueChatRun:t=>{const s=t.toContinueRunRequestPayload();return e.continueChatRun(s).then(e=>Object(r.chatAnswerModelMapper)(e.data))},getConversations:(t,s)=>e.getConversations().then(e=>Object(n.chatsListMapper)(e.data)),deleteConversation:t=>e.deleteConversation(t),createConversation:t=>e.createConversation(t.toCreateChatRequestPayload()).then(e=>Object(r.chatAnswerModelMapper)(e.data)),getAgents:()=>{const s=t.getLocalReadablGraphdbRepositoryIds();return e.getAgents().then(e=>Object(a.agentListMapper)(e.data,s))},getAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.getAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},createAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.createAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},editAgent:s=>{const n=t.getLocalReadablGraphdbRepositoryIds();return e.editAgent(s).then(e=>Object(a.agentModelMapper)(e.data,n))},deleteAgent:t=>e.deleteAgent(t),explainResponse:(t,s)=>e.explainResponse(t.toExplainResponsePayload(s)).then(e=>Object(i.explainResponseMapper)(e.data)),getDefaultAgent:()=>{const s=t.getLocalReadablGraphdbRepositoryIds();return e.getAgentDefaultValues().then(e=>Object(a.agentModelMapper)(e.data,s))},explainAgentSettings:t=>e.explainAgentSettings(t).then(e=>Object(o.agentInstructionsExplainMapper)(e.data))}}angular.module("graphdb.framework.core.services.ttyg-service",["graphdb.framework.rest.ttyg.service"]).factory("TTYGService",d),d.$inject=["TTYGRestService","$repositories"]},108:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatAnswerModel",(function(){return n})),s.d(t,"ContinueChatRun",(function(){return r}));class n{constructor(e={}){this._chatId=e.chatId,this._chatName=e.chatName||"",this._timestamp=e.timestamp,this._messages=e.messages||[],this._continueRunId=e.continueRunId}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get chatName(){return this._chatName}set chatName(e){this._chatName=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get messages(){return this._messages}set messages(e){this._messages=e}get continueRunId(){return this._continueRunId}set continueRunId(e){this._continueRunId=e}}class r{constructor(e,t){this._chatItem=e,this._runId=t}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},118:function(e,t,s){"use strict";s.r(t),s.d(t,"ExplainResponseModel",(function(){return n})),s.d(t,"ExplainQueryMethodsListModel",(function(){return r})),s.d(t,"ExplainQueryMethodModel",(function(){return a})),s.d(t,"ExplainQueryType",(function(){return i}));class n{constructor(e={}){this._chatId=e.chatId,this._answerId=e.answerId,this._queryMethods=e.queryMethods,this._expanded=void 0===e.expanded||e.expanded}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get answerId(){return this._answerId}set answerId(e){this._answerId=e}get queryMethods(){return this._queryMethods}set queryMethods(e){this._queryMethods=e}get expanded(){return this._expanded}set expanded(e){this._expanded=e}}class r{constructor(e=[]){this._items=e}get items(){return this._items}set items(e){this._items=e}}class a{constructor(e={}){this._name=e.name,this._rawQuery=e.rawQuery,this._query=e.query,this._queryType=e.queryType,this._errorMessage=e.errorOutput}get name(){return this._name}set name(e){this._name=e}get rawQuery(){return this._rawQuery}set rawQuery(e){this._rawQuery=e}get query(){return this._query}set query(e){this._query=e}get queryType(){return this._queryType}set queryType(e){this._queryType=e}get errorMessage(){return this._errorMessage}set errorMessage(e){this._errorMessage=e}}const i={SPARQL:"sparql",JSON:"json",OTHER:"other"}},136:function(e,t,s){"use strict";s.r(t),s.d(t,"chatMessageModelListMapper",(function(){return i})),s.d(t,"chatItemsModelMapper",(function(){return o})),s.d(t,"chatMessageModelMapper",(function(){return d})),s.d(t,"chatAnswerModelMapper",(function(){return h}));var n=s(79),r=s(83),a=s(108);const i=e=>e?e.map(e=>d(e)):[],o=(e=[])=>{const t=[];let s;return e.forEach(e=>{const a=e.conversationId;n.CHAT_MESSAGE_ROLE.USER===e.role?(s&&t.push(s),s=new r.ChatItemModel(a,d(e))):(s||(s=new r.ChatItemModel(a,null)),s.answers.push(d(e)),s.agentId=e.agentId)}),s&&t.push(s),new r.ChatItemsListModel(t)},d=e=>{if(e)return new n.ChatMessageModel({id:e.id,role:e.role,message:e.message,timestamp:e.timestamp,data:e})},h=e=>{if(e)return new a.ChatAnswerModel({chatId:e.id,chatName:e.name,timestamp:e.timestamp,messages:i(e.messages),continueRunId:e.continueRunId})}},159:function(e,t,s){"use strict";s.r(t),s.d(t,"TtygRestServiceFakeBackend",(function(){return a}));var n=s(31),r=s(79);class a{constructor(){this.conversations=[...i]}getConversations(){return new Promise(e=>{setTimeout(()=>e({data:Object(n.cloneDeep)(this.conversations)}),2e3)})}getConversation(e){return new Promise(t=>{setTimeout(()=>t({data:Object(n.cloneDeep)(this.conversations.find(t=>t.id===e))}),2e3)})}renameConversation(e,t){const s=this.conversations.find(t=>t.id===e);return s&&(s.name=t.name),Promise.resolve({data:Object(n.cloneDeep)(s)})}exportConversation(e){return console.log("Exporting conversation with id: ",e),Promise.resolve()}askQuestion(e){const t={id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe",conversationId:e.conversationId,agentId:null,message:""+e.question,role:r.CHAT_MESSAGE_ROLE.USER,timestamp:Math.floor(Date.now()/1e3)},s=this.conversations.find(t=>t.id===e.conversationId),n={id:e.conversationId,name:s?s.name:"Han Solo is a character in the Star Wars...",timestamp:Math.floor(Date.now()/1e3),messages:[{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNe_"+Date.now(),conversationId:e.conversationId,role:r.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:'Certainly! Here\'s a random example that incorporates code, JSON, and a SPARQL query:\n\n### Code (Python)\n\n```python\ndef greet(name):\n return f"Hello, {name}!"\n\nprint(greet("World"))\n```\n\n### JSON\n\n```json\n{\n "greeting": "Hello",\n "target": "World",\n "language": "English"\n}\n```\n\n### SPARQL Query\n\n```sparql\nSELECT ?person ?name\nWHERE {\n ?person a ex:Person .\n ?person ex:hasName ?name .\n}\nLIMIT 10\n```\n\nThis example demonstrates a simple Python function for greeting, a JSON object representing a greeting structure, and a SPARQL query to retrieve names of persons from a dataset.',timestamp:Math.floor(Date.now()/1e3),name:null},{id:"msg_Bn07kVDCYT1qmgu1G7Zw0KNeс_"+Date.now(),conversationId:e.conversationId,role:r.CHAT_MESSAGE_ROLE.ASSISTANT,agentId:e.agentId,message:`Reply to '${e.question}' It seems there was an error with the query. Let me rectify this and try again.`,timestamp:Math.floor(Date.now()/1e3),name:null}]};return s&&(s.messages.push(t),s.messages.push(...n.messages)),new Promise(e=>setTimeout(()=>e({data:n}),2e3))}continueChatRun(e){alert("continueChatRun() not implemented")}deleteConversation(e){return this.conversations=this.conversations.filter(t=>t.id!==e),new Promise(e=>setTimeout(()=>e(),2e3))}createConversation(e){const t={id:"thread_"+this.conversations.length,name:"Thread "+this.conversations.length,timestamp:Math.floor(Date.now()/1e3),messages:[]};this.conversations.unshift(t);const s=Object(n.cloneDeep)(e);return s.conversationId=t.id,this.askQuestion(s)}getAgents(){return new Promise(e=>setTimeout(()=>e({data:[...o]}),2e3))}getAgent(e){return Promise.resolve({data:Object(n.cloneDeep)(o.find(t=>t.id===e))})}createAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(o.push(e),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}editAgent(e){return"err"===e.name?new Promise((e,t)=>setTimeout(()=>t({status:500,message:"Internal Server Error"}),2e3)):(o=o.map(t=>t.id===e.id?e:t),new Promise(t=>setTimeout(()=>t({data:e}),2e3)))}deleteAgent(e){return o=o.filter(t=>t.id!==e),Promise.resolve()}getAgentDefaultValues(){return Promise.resolve({data:d})}explainAgentSettings(){return Promise.resolve({data:{}})}simulateHttpError(){return Promise.reject({status:500,message:"Internal Server Error"})}explainResponse(e){return Promise.resolve({data:{conversationId:e.conversationId,answerId:e.answerId,queryMethods:[{name:"sparql_query",rawQuery:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'SELECT ?character ?name ?height WHERE {\n ?character a voc:Character;\n rdfs:label ?name;\n voc:height ?height.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:Character' uses an undefined prefix"},{name:"retrieval_search",rawQuery:'{"queries":[{"query":"pilots that work with Luke Skywalker","filter":{"document_id":"https://swapi.co/resource/human/1"},"top_k":3}]}',query:'{\n "queries" : [ {\n "query" : "pilots that work with Luke Skywalker",\n "filter" : {\n "document_id" : "https://swapi.co/resource/human/1"\n },\n "top_k" : 3\n } ]\n}',queryType:"json",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null},{name:"sparql_query",rawQuery:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",query:"SELECT ?height WHERE {\n <https://swapi.co/resource/human/1> voc:height ?height.\n}",queryType:"sparql",errorOutput:"Error: org.eclipse.rdf4j.query.MalformedQueryException: org.eclipse.rdf4j.query.parser.sparql.ast.VisitorException: QName 'voc:height' uses an undefined prefix"},{name:"sparql_query",rawQuery:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',query:'PREFIX voc: <https://swapi.co/vocabulary/>\nSELECT ?name ?height WHERE {\n ?character voc:height ?height;\n rdfs:label ?name.\n FILTER(?name = "Luke Skywalker" || ?name = "Leia Organa")\n}',queryType:"sparql",errorOutput:null},{name:"fts_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"similarity_search",rawQuery:"Second Luke",query:"PREFIX onto: <http://www.ontotext.com/>\nDESCRIBE ?iri {\n\t?x onto:fts '''Second Luke''' .\n\t{\n\t\t?x ?p ?iri .\n\t} union {\n\t\t?iri ?p ?x .\n\t}\n}",queryType:"sparql",errorOutput:null},{name:"iri_discovery",rawQuery:"Luke Skywalker",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX onto: <http://www.ontotext.com/>\nSELECT ?label ?iri {\n ?label onto:fts ('''Luke~ Skywalker~''' '*') .\n ?iri rdfs:label|skos:prefLabel ?label .\n}",queryType:"sparql",errorOutput:null}]}})}}const i=[{id:"thread_jdQBvbkaU6JPoO48oFbC54dA",name:"Very long chat name which does not fit in the sidebar",timestamp:1725235200,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dB",name:"Test chat 2",timestamp:1725238800,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oQaL76dC",name:"Test chat 3",timestamp:1725242400,messages:[]},{id:"thread_jdQBvbkaU6JPoO48oFbC54dD",name:"Test chat 4",timestamp:1697331600,messages:[]}];let o=[{id:"asst_gAPcrHQQ9ZIxD5eXWH2BNFfo",name:"agent-1",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"\n\n",userInstruction:""},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_qMyCpCBmqxV9I2B8UoMfFzc5",name:"agent-2",model:"gpt-4o",temperature:0,topP:0,seed:null,repositoryId:"Non existing repo",instructions:{systemInstruction:"string\n\nstring",userInstruction:"string"},assistantExtractionMethods:[{ftsMethod:"fts_search"}],maxNumberOfTriplesPerCall:null},{id:"asst_Cr0RxobrY07WpOvvyQilEWMI",name:"Databricks-general-unbiased",model:"gpt-4o-2024-08-06",temperature:1,topP:1,seed:null,repositoryId:"starwars",instructions:{systemInstruction:"You are helpful assistant in discovering information regarding diagnostic biomarkers.",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null},{id:"asst_5GxNYTdaOh7Tl6lLl6Pya2aH",name:"Databricks-biomarkers",model:"gpt-3.5-turbo-0125",temperature:1,topP:1,seed:null,repositoryId:"biomarkers",instructions:{systemInstruction:"You're a helpful assistant in discovering new diagnostic biomarkers for given diseases. I'll submit a set of publication abstracts discussing given disease and your task is to find in the abstracts any potential new biomarkers which are not yet listed in the appropriate databases. Each abstract is preceded by identifier - its PubMed id called for short PMID. \n\nReturn the set of biomarkers listed one per row, each marker followed by the | and PMID of the respective abstract if was mentioned in.\n\nExample: \nInput: 36418457\t[Amyotrophic lateral sclerosis (ALS) is a genetically and phenotypically heterogeneous disease results in the loss of motor neurons. Mounting information points to involvement of other systems including cognitive impairment. However, neither the valid biomarker for diagnosis nor effective therapeutic intervention is available for ALS. The present study is aimed at identifying potentially genetic biomarker that improves the diagnosis and treatment of ALS patients based on the data of the Gene Expression Omnibus. We retrieved datasets and conducted a weighted gene co-expression network analysis (WGCNA) to identify ALS-related co-expression genes. Functional enrichment analysis was performed to determine the features and pathways of the main modules. We then constructed an ALS-related model using the least absolute shrinkage and selection operator (LASSO) regression analysis and verified the model by the receiver operating characteristic (ROC) curve. Besides we screened the non-preserved gene modules in FTD and ALS-mimic disorders to distinct ALS-related genes from disorders with overlapping genes and features. Altogether, 4198 common genes between datasets with the most variation were analyzed and 16 distinct modules were identified through WGCNA. Blue module had the most correlation with ALS and functionally enriched in pathways of neurodegeneration-multiple diseases', 'amyotrophic lateral sclerosis', and 'endocytosis' KEGG terms. Further, some of other modules related to ALS were enriched in 'autophagy' and 'amyotrophic lateral sclerosis'. The 30 top of hub genes were recruited to a LASSO regression model and 5 genes (BCLAF1, GNA13, ARL6IP5, ARGLU1, and YPEL5) were identified as potentially diagnostic ALS biomarkers with validating of the ROC curve and AUC value.]\n\nYour response: BCLAF1|36418457\nGNA13|36418457\nARL6IP5|36418457\nARGLU1|36418457\nYPEL5|36418457",userInstruction:null},assistantExtractionMethods:[],maxNumberOfTriplesPerCall:null}];const d={id:"id",name:"Quadro",model:"gpt-4o",temperature:.7,topP:1,seed:0,repositoryId:"test-repository",instructions:{systemInstruction:"You are a helpful, knowledgeable, and friendly assistant. Your goal is to provide clear and accurate information while being polite, respectful, and professional.",userInstruction:"If you need to write a SPARQL query, use only the classes and properties provided in the schema and don't invent or guess any. Always try to return human-readable names or labels and not only the IRIs. If SPARQL fails to provide the necessary information you can try another tool too."},assistantExtractionMethods:[{method:"sparql_search",ontologyGraph:"http://example.com",sparqlQuery:"CONSTRUCT {?s ?p ?o} WHERE {GRAPH <http://example.org/ontology> {?s ?p ?o .}}"},{method:"fts_search",maxNumberOfTriplesPerCall:0},{method:"similarity_search",similarityIndex:"similarity-index",similarityIndexThreshold:.6,maxNumberOfTriplesPerCall:0},{method:"retrieval_search",retrievalConnectorInstance:"retrieval-connector",queryTemplate:'{"query": "string"}',maxNumberOfTriplesPerCall:0}],additionalExtractionMethods:[{method:"iri_discovery_search"}]}},160:function(e,t,s){"use strict";s.r(t),s.d(t,"agentFormModelMapper",(function(){return d})),s.d(t,"agentListMapper",(function(){return c})),s.d(t,"agentModelMapper",(function(){return l}));var n=s(102),r=s(225),a=s(80),i=s(17),o=s(94);const d=(e,t,s)=>{if(!e)return;const n=new r.AgentFormModel;return n.id=e.id||t.id,n.name=e.name||t.name,n.repositoryId=e.repositoryId||t.repositoryId,n.model=e.model||t.model,n.temperature.value=void 0!==e.temperature?e.temperature:t.temperature,n.topP.value=void 0!==e.topP?e.topP:t.topP,n.seed=e.seed||t.seed,n.instructions=h(e.instructions,t.instructions),u(n,s,t.assistantExtractionMethods,e.assistantExtractionMethods),n.additionalExtractionMethods.additionalExtractionMethods.forEach(t=>{t.selected=e.additionalExtractionMethods&&e.additionalExtractionMethods.some(e=>e.method===t.method)}),n},h=(e,t)=>{if(!e&&!t)return;const s=e&&e.systemInstruction||t.systemInstruction,n=e&&e.userInstruction||t.userInstruction;return new r.AgentInstructionsFormModel({systemInstruction:s,userInstruction:n,defaultSystemInstruction:t.systemInstruction,defaultUserInstruction:t.userInstruction})},u=(e,t,s,n=[])=>{const i=s.filter(e=>!n.some(t=>t.method===e.method));[...n,...i].forEach(s=>{const i=n.some(e=>e.method===s.method);let d="";i&&"sparql_search"===s.method&&(o.AGENT_OPERATION.CREATE===t?d="":s.sparqlQuery?d="sparqlQuery":s.ontologyGraph&&(d="ontologyGraph"));const h=t===o.AGENT_OPERATION.EDIT||t===o.AGENT_OPERATION.CLONE,u=new r.ExtractionMethodFormModel({selected:h&&i,method:s.method,sparqlOption:d,ontologyGraph:s.ontologyGraph,addMissingNamespaces:s.addMissingNamespaces,sparqlQuery:s.sparqlQuery&&new a.TextFieldModel({value:s.sparqlQuery,minLength:1,maxLength:2380}),similarityIndex:s.similarityIndex,similarityIndexThreshold:s.similarityIndexThreshold&&new a.NumericRangeModel({value:s.similarityIndexThreshold,minValue:0,maxValue:1,step:.1}),maxNumberOfTriplesPerCall:0===s.maxNumberOfTriplesPerCall?null:s.maxNumberOfTriplesPerCall,queryTemplate:s.queryTemplate&&new a.TextFieldModel({value:s.queryTemplate,minLength:1,maxLength:2380}),retrievalConnectorInstance:s.retrievalConnectorInstance});e.assistantExtractionMethods.setExtractionMethod(u)})},c=(e,t)=>{if(!e)return new n.AgentListModel;const s=e.map(e=>l(e,t));return new n.AgentListModel(s)},l=(e,t)=>{if(!e)return;const s=Object(i.md5HashGenerator)();return new n.AgentModel({id:e.id,name:e.name,repositoryId:e.repositoryId,isRepositoryDeleted:!t.includes(e.repositoryId),model:e.model,temperature:e.temperature,topP:e.topP,seed:e.seed,instructions:f(e.instructions),assistantExtractionMethods:m(e.assistantExtractionMethods),additionalExtractionMethods:g(e.additionalExtractionMethods)},s)},m=e=>{if(e)return e.map(e=>p(e))},p=e=>{if(e)return new n.ExtractionMethodModel({method:e.method,ontologyGraph:e.ontologyGraph,addMissingNamespaces:e.addMissingNamespaces,sparqlQuery:e.sparqlQuery,similarityIndex:e.similarityIndex,similarityIndexThreshold:e.similarityIndexThreshold,maxNumberOfTriplesPerCall:e.maxNumberOfTriplesPerCall,queryTemplate:e.queryTemplate,retrievalConnectorInstance:e.retrievalConnectorInstance})},g=e=>{if(e)return e.map(e=>y(e))},y=e=>{if(e)return new n.AdditionalExtractionMethodModel({method:e.method})},f=e=>{if(e)return new n.AgentInstructionsModel({systemInstruction:e.systemInstruction,userInstruction:e.userInstruction})}},161:function(e,t,s){"use strict";s.r(t),s.d(t,"AgentInstructionsExplain",(function(){return n})),s.d(t,"AgentInstructionsExplainList",(function(){return r}));class n{constructor(e){this._type=e.type,this._content=e.content,this._size=e.size}get size(){return this._size}set size(e){this._size=e}get content(){return this._content}set content(e){this._content=e}get type(){return this._type}set type(e){this._type=e}}class r{constructor(e){this._instructions=e.instructions}get instructions(){return this._instructions}set instructions(e){this._instructions=e}}},223:function(e,t,s){"use strict";s.r(t),s.d(t,"chatsListMapper",(function(){return d})),s.d(t,"chatModelMapper",(function(){return h}));var n=s(98),r=s(17),a=s(136),i=s(83);const o=Object(r.md5HashGenerator)(),d=e=>{if(!e)return new n.ChatsListModel;const t=e.map(e=>h(e));return new n.ChatsListModel(t)},h=e=>{if(e)return new n.ChatModel({id:e.id,name:e.name,timestamp:e.timestamp,chatHistory:e.messages&&e.messages.length?Object(a.chatItemsModelMapper)(e.messages):new i.ChatItemsListModel},o)}},224:function(e,t,s){"use strict";s.r(t);var n=s(159);angular.module("graphdb.framework.rest.ttyg.service",[]).factory("TTYGRestService",r),r.$inject=["$http"];function r(e){new n.TtygRestServiceFakeBackend;return{getConversation:t=>e.get("rest/chat/conversations/"+t),renameConversation:(t,s)=>e.put("rest/chat/conversations/"+t,s),exportConversation:t=>e.get("rest/chat/conversations/export/"+t,{responseType:"blob"}),askQuestion:t=>e.post("rest/chat/conversations",t),continueChatRun:t=>e.post("rest/chat/conversations/continue",t),getConversations:()=>e.get("rest/chat/conversations"),deleteConversation:t=>e.delete("rest/chat/conversations/"+t),createConversation:(t={})=>e.post("rest/chat/conversations",t),getAgents:()=>e.get("rest/chat/agents"),getAgent:t=>e.get("rest/chat/agents/"+t),createAgent:t=>e.post("rest/chat/agents",t),editAgent:t=>e.put("rest/chat/agents",t),deleteAgent:t=>e.delete("rest/chat/agents/"+t),explainResponse:(t={})=>e.post("rest/chat/conversations/explain",t),getAgentDefaultValues:()=>e.get("rest/chat/agents/default"),explainAgentSettings:t=>e.post("rest/chat/agents/explain",t)}}},226:function(e,t,s){"use strict";s.r(t),s.d(t,"explainResponseMapper",(function(){return r})),s.d(t,"explainQueryMethodsListMapper",(function(){return a})),s.d(t,"explainQueryMethodMapper",(function(){return i}));var n=s(118);const r=e=>new n.ExplainResponseModel({chatId:e.conversationId,answerId:e.answerId,queryMethods:a(e.queryMethods)}),a=(e=[])=>new n.ExplainQueryMethodsListModel(e.map(i)),i=e=>new n.ExplainQueryMethodModel(e)},227:function(e,t,s){"use strict";s.r(t),s.d(t,"agentInstructionsExplainMapper",(function(){return r}));var n=s(161);const r=e=>e?e.map(e=>new n.AgentInstructionsExplain(e)):new n.AgentInstructionsExplainList([])},79:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatMessageModel",(function(){return n})),s.d(t,"CHAT_MESSAGE_ROLE",(function(){return r}));class n{constructor(e){this._id=e.id,this._role=e.role,this._message=e.message,this._timestamp=1e3*e.timestamp}get id(){return this._id}set id(e){this._id=e}get role(){return this._role}set role(e){this._role=e}get message(){return this._message}set message(e){this._message=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}}const r={USER:"user",ASSISTANT:"assistant"}},83:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatItemModel",(function(){return r})),s.d(t,"ChatItemsListModel",(function(){return a}));var n=s(79);class r{constructor(e,t){this._chatId=e,this._agentId=void 0,this._question=t,this._answers=[]}get chatId(){return this._chatId}set chatId(e){this._chatId=e}get agentId(){return this._agentId}set agentId(e){this._agentId=e}get question(){return this._question}set question(e){this._question=e}get answers(){return this._answers}set answers(e){this._answers=e}setQuestionMessage(e){this._question||(this._question=new n.ChatMessageModel({role:n.CHAT_MESSAGE_ROLE.USER})),this._question.message=e}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(e){return{conversationId:this._chatId,answerId:e}}}class a{constructor(e=[]){this._items=e}isEmpty(){return 0===this._items.length}appendItem(e){this._items.push(e)}get items(){return this._items}set items(e){this._items=e||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},98:function(e,t,s){"use strict";s.r(t),s.d(t,"ChatModel",(function(){return a})),s.d(t,"ChatByDayModel",(function(){return i})),s.d(t,"ChatsListModel",(function(){return o}));var n=s(83),r=s(17);class a{static getEmptyChat(){const e={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new a(e,Object(r.md5HashGenerator)())}constructor(e,t){this.hashGenerator=t,this._id=e.id,this._name=e.name,this._timestamp=e.timestamp,this._chatHistory=e.chatHistory||new n.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(e){this._id=e}get name(){return this._name}set name(e){this.generateHash(),this._name=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get chatHistory(){return this._chatHistory}set chatHistory(e){this._chatHistory=e||new n.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class i{constructor(e){this._day=e.day,this._timestamp=e.timestamp,this._chats=e.chats}get day(){return this._day}set day(e){this._day=e}get timestamp(){return this._timestamp}set timestamp(e){this._timestamp=e}get chats(){return this._chats}set chats(e){this._chats=e}}class o{constructor(e){this._chats=e||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((e,t)=>t.timestamp-e.timestamp)}updateChatTimestamp(e,t){const s=this._chats.find(t=>t.id===e);s&&(s.timestamp=t,this.sortByTime(),this.updateChatsByDay())}updateChatName(e,t){const s=this._chats.find(t=>t.id===e);s&&(s.name=t)}deleteChat(e){this._chats=this._chats.filter(t=>t.id!==e.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(e=>{const t=new Date(1e3*e.timestamp).toDateString(),s=this._chatsByDay.find(e=>e.day===t);s?s.chats.push(e):this._chatsByDay.push(new i({day:t,timestamp:1e3*e.timestamp,chats:[e]}))})}appendChat(e){this._chats.push(e),this.sortByTime(),this.updateChatsByDay()}replaceChat(e,t){this._chats=this._chats.map(s=>s.id===t.id?e:s),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(e=>{e.selected=!1})}selectChat(e){this.deselectAll(),this._chats.forEach(t=>{t.selected=t.id===e.id})}getChat(e){return this._chats.find(t=>t.id===e)}getNonPersistedChat(){return this._chats.find(e=>!e.id)}renameChat(e){const t=this._chats.find(t=>t.id===e.id);t&&(t.name=e.name)}get chats(){return this._chats}set chats(e){this._chats=e}get chatsByDay(){return this._chatsByDay}set chatsByDay(e){this._chatsByDay=e}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[64,105,265,266],{108:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatAnswerModel",(function(){return n})),s.d(e,"ContinueChatRun",(function(){return i}));class n{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,e){this._chatItem=t,this._runId=e}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},136:function(t,e,s){"use strict";s.r(e),s.d(e,"chatMessageModelListMapper",(function(){return r})),s.d(e,"chatItemsModelMapper",(function(){return h})),s.d(e,"chatMessageModelMapper",(function(){return u})),s.d(e,"chatAnswerModelMapper",(function(){return o}));var n=s(79),i=s(83),a=s(108);const r=t=>t?t.map(t=>u(t)):[],h=(t=[])=>{const e=[];let s;return t.forEach(t=>{const a=t.conversationId;n.CHAT_MESSAGE_ROLE.USER===t.role?(s&&e.push(s),s=new i.ChatItemModel(a,u(t))):(s||(s=new i.ChatItemModel(a,null)),s.answers.push(u(t)),s.agentId=t.agentId)}),s&&e.push(s),new i.ChatItemsListModel(e)},u=t=>{if(t)return new n.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,data:t})},o=t=>{if(t)return new a.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:r(t.messages),continueRunId:t.continueRunId})}},79:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatMessageModel",(function(){return n})),s.d(e,"CHAT_MESSAGE_ROLE",(function(){return i}));class n{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const i={USER:"user",ASSISTANT:"assistant"}},83:function(t,e,s){"use strict";s.r(e),s.d(e,"ChatItemModel",(function(){return i})),s.d(e,"ChatItemsListModel",(function(){return a}));var n=s(79);class i{constructor(t,e){this._chatId=t,this._agentId=void 0,this._question=e,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new n.ChatMessageModel({role:n.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class a{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[70,182,184],{262:function(r,i){function e(r){return{restrict:"A",require:"ngModel",link:function(i,e,t,o){o.$parsers.unshift((function(i){const e=r.isValidIri(i,i.toString());return o.$setValidity("validateUri",e),i}))}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]},263:function(r,i){function e(){return{link:function(r,i,e){r.$watch("file.status",(function(){"IMPORTING"!==r.file.status&&"UPLOADING"!==r.file.status||!$(i).has("object").length>0&&$(i).append('<object width="'+e.size+'" height="'+e.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.0-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[70,182,184],{262:function(r,i){function e(r){return{restrict:"A",require:"ngModel",link:function(i,e,t,o){o.$parsers.unshift((function(i){const e=r.isValidIri(i,i.toString());return o.$setValidity("validateUri",e),i}))}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]},263:function(r,i){function e(){return{link:function(r,i,e){r.$watch("file.status",(function(){"IMPORTING"!==r.file.status&&"UPLOADING"!==r.file.status||!$(i).has("object").length>0&&$(i).append('<object width="'+e.size+'" height="'+e.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.8.0-RC3">{{\'common.loading\' | translate}}</object>')}))}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",e),e.$inject=[]},336:function(r,i,e){"use strict";e.r(i);e(7),e(32),e(250),e(262),e(263),e(301),e(33),e(70),e(71);angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.directives","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.import.directives.validate-uri","graphdb.framework.import.directives.import-progress-indicator","graphdb.framework.import.directives.import-resource-tree"])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[77,105,266],{79:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatMessageModel",(function(){return i})),e.d(s,"CHAT_MESSAGE_ROLE",(function(){return a}));class i{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const a={USER:"user",ASSISTANT:"assistant"}},83:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatItemModel",(function(){return a})),e.d(s,"ChatItemsListModel",(function(){return h}));var i=e(79);class a{constructor(t,s){this._chatId=t,this._agentId=void 0,this._question=s,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class h{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}},98:function(t,s,e){"use strict";e.r(s),e.d(s,"ChatModel",(function(){return h})),e.d(s,"ChatByDayModel",(function(){return n})),e.d(s,"ChatsListModel",(function(){return r}));var i=e(83),a=e(17);class h{static getEmptyChat(){const t={name:"· · ·",timestamp:Math.floor(Date.now()/1e3)};return new h(t,Object(a.md5HashGenerator)())}constructor(t,s){this.hashGenerator=s,this._id=t.id,this._name=t.name,this._timestamp=t.timestamp,this._chatHistory=t.chatHistory||new i.ChatItemsListModel,this.hash=this.generateHash()}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this.generateHash(),this._name=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chatHistory(){return this._chatHistory}set chatHistory(t){this._chatHistory=t||new i.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class n{constructor(t){this._day=t.day,this._timestamp=t.timestamp,this._chats=t.chats}get day(){return this._day}set day(t){this._day=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chats(){return this._chats}set chats(t){this._chats=t}}class r{constructor(t){this._chats=t||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}sortByTime(){this._chats.sort((t,s)=>s.timestamp-t.timestamp)}updateChatTimestamp(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.timestamp=s,this.sortByTime(),this.updateChatsByDay())}updateChatName(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.name=s)}deleteChat(t){this._chats=this._chats.filter(s=>s.id!==t.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(t=>{const s=new Date(1e3*t.timestamp).toDateString(),e=this._chatsByDay.find(t=>t.day===s);e?e.chats.push(t):this._chatsByDay.push(new n({day:s,timestamp:1e3*t.timestamp,chats:[t]}))})}appendChat(t){this._chats.push(t),this.sortByTime(),this.updateChatsByDay()}replaceChat(t,s){this._chats=this._chats.map(e=>e.id===s.id?t:e),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(t=>{t.selected=!1})}selectChat(t){this.deselectAll(),this._chats.forEach(s=>{s.selected=s.id===t.id})}getChat(t){return this._chats.find(s=>s.id===t)}getNonPersistedChat(){return this._chats.find(t=>!t.id)}renameChat(t){const s=this._chats.find(s=>s.id===t.id);s&&(s.name=t.name)}get chats(){return this._chats}set chats(t){this._chats=t}get chatsByDay(){return this._chatsByDay}set chatsByDay(t){this._chatsByDay=t}}}}]);
|