0.0.7 relevant documents and graph
Browse files- app.py +100 -30
- docs/images/all_papers_wordcloud.png +0 -0
- graph.html +250 -0
- lib/bindings/utils.js +189 -0
- lib/tom-select/tom-select.complete.min.js +356 -0
- lib/tom-select/tom-select.css +334 -0
- lib/vis-9.1.2/vis-network.css +0 -0
- lib/vis-9.1.2/vis-network.min.js +0 -0
- requirements.txt +1 -0
app.py
CHANGED
@@ -3,6 +3,7 @@ import streamlit as st
|
|
3 |
import os
|
4 |
import re
|
5 |
import sys
|
|
|
6 |
import base64
|
7 |
import logging
|
8 |
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
|
@@ -66,6 +67,8 @@ f'''
|
|
66 |
###### Concepts on the edge are what few are doing. Are we considering that? Why? Why not?
|
67 |
'''
|
68 |
)
|
|
|
|
|
69 |
st.write(
|
70 |
f'''
|
71 |
#### How can <what most are doing> help with <what few are doing>?
|
@@ -223,8 +226,10 @@ def clear_question(query_model):
|
|
223 |
st.session_state.question_answered = False
|
224 |
st.session_state.answer = ''
|
225 |
st.session_state.answer_rating = 3
|
|
|
226 |
st.session_state.prev_model = query_model
|
227 |
|
|
|
228 |
|
229 |
initial_query = ''
|
230 |
|
@@ -232,16 +237,17 @@ if 'question' not in st.session_state:
|
|
232 |
st.session_state.question = ''
|
233 |
|
234 |
if __spaces__ :
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
else :
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
|
|
245 |
|
246 |
if answer_model == 'openai/text-davinci-003':
|
247 |
print(answer_model)
|
@@ -283,31 +289,95 @@ def submit():
|
|
283 |
st.session_state.question_input = ''
|
284 |
st.session_state.question_answered = False
|
285 |
|
286 |
-
|
287 |
-
st.
|
288 |
-
question = st.text_input("Enter a question, e.g. What benchmarks can we use for QA?", key='question_input', on_change=submit )
|
289 |
|
290 |
if(st.session_state.question):
|
291 |
-
|
292 |
-
with col1:
|
293 |
-
|
294 |
|
295 |
try :
|
296 |
-
|
297 |
-
|
298 |
-
st.session_state.
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
except Exception as e:
|
312 |
#print(f'{type(e)}, {e}')
|
313 |
answer_str = f'{type(e)}, {e}'
|
|
|
3 |
import os
|
4 |
import re
|
5 |
import sys
|
6 |
+
import time
|
7 |
import base64
|
8 |
import logging
|
9 |
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
|
|
|
67 |
###### Concepts on the edge are what few are doing. Are we considering that? Why? Why not?
|
68 |
'''
|
69 |
)
|
70 |
+
st.caption('''###### corpus by [@[email protected]](https://sigmoid.social/@ArxivHealthcareNLP)''')
|
71 |
+
st.caption('''###### KG Questions by [arylwen](https://github.com/arylwen/mlk8s)''')
|
72 |
st.write(
|
73 |
f'''
|
74 |
#### How can <what most are doing> help with <what few are doing>?
|
|
|
226 |
st.session_state.question_answered = False
|
227 |
st.session_state.answer = ''
|
228 |
st.session_state.answer_rating = 3
|
229 |
+
st.session_state.elapsed = 0
|
230 |
st.session_state.prev_model = query_model
|
231 |
|
232 |
+
query, measurable, explainable, ethical = st.tabs(["Query", "Measurable", "Explainable", "Ethical"])
|
233 |
|
234 |
initial_query = ''
|
235 |
|
|
|
237 |
st.session_state.question = ''
|
238 |
|
239 |
if __spaces__ :
|
240 |
+
with query:
|
241 |
+
answer_model = st.radio(
|
242 |
+
"Choose the model used for inference:",
|
243 |
+
('baseten/Camel-5b', 'cohere/command','hf/tiiuae/falcon-7b-instruct', 'openai/text-davinci-003') #TODO start hf inference container on demand
|
244 |
+
)
|
245 |
else :
|
246 |
+
with query:
|
247 |
+
answer_model = st.radio(
|
248 |
+
"Choose the model used for inference:",
|
249 |
+
('Local-Camel', 'HF-TKI', 'hf/tiiuae/falcon-7b-instruct', 'openai/text-davinci-003')
|
250 |
+
)
|
251 |
|
252 |
if answer_model == 'openai/text-davinci-003':
|
253 |
print(answer_model)
|
|
|
289 |
st.session_state.question_input = ''
|
290 |
st.session_state.question_answered = False
|
291 |
|
292 |
+
with query:
|
293 |
+
st.caption(f'''###### Model, question, answer and rating are logged to improve KG Questions.''')
|
294 |
+
question = st.text_input("Enter a question, e.g. What benchmarks can we use for QA?", key='question_input', on_change=submit )
|
295 |
|
296 |
if(st.session_state.question):
|
297 |
+
|
298 |
+
#with col1:
|
299 |
+
# st.write(f'Answering: {st.session_state.question} with {query_model}.')
|
300 |
|
301 |
try :
|
302 |
+
with query:
|
303 |
+
col1, col2 = st.columns([2, 2])
|
304 |
+
if not st.session_state.question_answered:
|
305 |
+
with st.spinner(f'Answering: {st.session_state.question} with {query_model}.'):
|
306 |
+
start = time.time()
|
307 |
+
answer = query_engine.query(st.session_state.question)
|
308 |
+
st.session_state.answer = answer
|
309 |
+
st.session_state.question_answered = True
|
310 |
+
end = time.time()
|
311 |
+
st.session_state.elapsed = (end-start)
|
312 |
+
else:
|
313 |
+
answer = st.session_state.answer
|
314 |
+
answer_str = format_response(answer)
|
315 |
+
with col1:
|
316 |
+
if answer_str:
|
317 |
+
elapsed = '{:.2f}'.format(st.session_state.elapsed)
|
318 |
+
st.write(f'Answered: {st.session_state.question} with {query_model} in {elapsed}s. Please rate this answer.')
|
319 |
+
with col2:
|
320 |
+
from streamlit_star_rating import st_star_rating
|
321 |
+
stars = st_star_rating("", maxValue=5, defaultValue=3, key="answer_rating")
|
322 |
+
st.write(answer_str)
|
323 |
+
|
324 |
+
with measurable:
|
325 |
+
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
|
326 |
+
import matplotlib.pyplot as plt
|
327 |
+
from PIL import Image
|
328 |
+
wc_all, wq_question = st.columns([2, 2])
|
329 |
+
wordcloud = WordCloud(max_font_size=50, max_words=1000, background_color="white").generate(answer_str)
|
330 |
+
with wc_all:
|
331 |
+
#st.write('''### Corpus''')
|
332 |
+
image = Image.open('docs/images/all_papers_wordcloud.png')
|
333 |
+
st.image(image)
|
334 |
+
st.caption('''###### Corpus word frequecy.''')
|
335 |
+
with wq_question:
|
336 |
+
#st.write('''### Question''')
|
337 |
+
st.image(wordcloud.to_array())
|
338 |
+
st.caption('''###### Query word frequecy.''')
|
339 |
+
with explainable:
|
340 |
+
#st.write(answer.source_nodes)
|
341 |
+
from pyvis.network import Network
|
342 |
+
graph = Network(height="450px", width="100%")
|
343 |
+
sources_table = []
|
344 |
+
for nodewithscore in answer.source_nodes:
|
345 |
+
node = nodewithscore.node
|
346 |
+
from llama_index.schema import NodeRelationship
|
347 |
+
if NodeRelationship.SOURCE in node.relationships:
|
348 |
+
#st.write(node.relationships[NodeRelationship.SOURCE].node_id)
|
349 |
+
#st.write(node.text)
|
350 |
+
node_id = node.relationships[NodeRelationship.SOURCE].node_id
|
351 |
+
node_id = node_id.split('/')[-1]
|
352 |
+
title = node_id.split('.')[2].replace('_', ' ')
|
353 |
+
sources_table.extend([[title, node.text]])
|
354 |
+
else:
|
355 |
+
#st.write(node.metadata['kg_rel_map'])
|
356 |
+
#st.write(node.text) TODO
|
357 |
+
rel_map = node.metadata['kg_rel_map']
|
358 |
+
for concept in rel_map.keys():
|
359 |
+
#st.write(concept)
|
360 |
+
graph.add_node(concept, concept, title=concept)
|
361 |
+
rels = rel_map[concept]
|
362 |
+
for rel in rels:
|
363 |
+
graph.add_node(rel[1], rel[1], title=rel[1])
|
364 |
+
graph.add_edge(concept, rel[1], title=rel[0])
|
365 |
+
st.session_state.graph_name = 'graph.html'
|
366 |
+
graph.save_graph(st.session_state.graph_name)
|
367 |
+
import streamlit.components.v1 as components
|
368 |
+
graphHtml = open(st.session_state.graph_name, 'r', encoding='utf-8')
|
369 |
+
source_code = graphHtml.read()
|
370 |
+
#print(source_code)
|
371 |
+
components.html(source_code, height = 500)
|
372 |
+
import pandas as pd
|
373 |
+
df = pd.DataFrame(sources_table)
|
374 |
+
df.columns = ['paper', 'relevant text']
|
375 |
+
st.markdown(""" <style> .font {
|
376 |
+
font-size:8px;}
|
377 |
+
</style> """, unsafe_allow_html=True)
|
378 |
+
st.table(df)
|
379 |
+
#st.write(answer.source_nodes[0].node)
|
380 |
+
|
381 |
except Exception as e:
|
382 |
#print(f'{type(e)}, {e}')
|
383 |
answer_str = f'{type(e)}, {e}'
|
docs/images/all_papers_wordcloud.png
ADDED
![]() |
graph.html
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<head>
|
3 |
+
<meta charset="utf-8">
|
4 |
+
|
5 |
+
<script src="lib/bindings/utils.js"></script>
|
6 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
7 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
8 |
+
|
9 |
+
|
10 |
+
<center>
|
11 |
+
<h1></h1>
|
12 |
+
</center>
|
13 |
+
|
14 |
+
<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
|
15 |
+
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
|
16 |
+
<link
|
17 |
+
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
|
18 |
+
rel="stylesheet"
|
19 |
+
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
|
20 |
+
crossorigin="anonymous"
|
21 |
+
/>
|
22 |
+
<script
|
23 |
+
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
|
24 |
+
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
|
25 |
+
crossorigin="anonymous"
|
26 |
+
></script>
|
27 |
+
|
28 |
+
|
29 |
+
<center>
|
30 |
+
<h1></h1>
|
31 |
+
</center>
|
32 |
+
<style type="text/css">
|
33 |
+
|
34 |
+
#mynetwork {
|
35 |
+
width: 100%;
|
36 |
+
height: 450px;
|
37 |
+
background-color: #ffffff;
|
38 |
+
border: 1px solid lightgray;
|
39 |
+
position: relative;
|
40 |
+
float: left;
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
#loadingBar {
|
45 |
+
position:absolute;
|
46 |
+
top:0px;
|
47 |
+
left:0px;
|
48 |
+
width: 100%;
|
49 |
+
height: 450px;
|
50 |
+
background-color:rgba(200,200,200,0.8);
|
51 |
+
-webkit-transition: all 0.5s ease;
|
52 |
+
-moz-transition: all 0.5s ease;
|
53 |
+
-ms-transition: all 0.5s ease;
|
54 |
+
-o-transition: all 0.5s ease;
|
55 |
+
transition: all 0.5s ease;
|
56 |
+
opacity:1;
|
57 |
+
}
|
58 |
+
|
59 |
+
#bar {
|
60 |
+
position:absolute;
|
61 |
+
top:0px;
|
62 |
+
left:0px;
|
63 |
+
width:20px;
|
64 |
+
height:20px;
|
65 |
+
margin:auto auto auto auto;
|
66 |
+
border-radius:11px;
|
67 |
+
border:2px solid rgba(30,30,30,0.05);
|
68 |
+
background: rgb(0, 173, 246); /* Old browsers */
|
69 |
+
box-shadow: 2px 0px 4px rgba(0,0,0,0.4);
|
70 |
+
}
|
71 |
+
|
72 |
+
#border {
|
73 |
+
position:absolute;
|
74 |
+
top:10px;
|
75 |
+
left:10px;
|
76 |
+
width:500px;
|
77 |
+
height:23px;
|
78 |
+
margin:auto auto auto auto;
|
79 |
+
box-shadow: 0px 0px 4px rgba(0,0,0,0.2);
|
80 |
+
border-radius:10px;
|
81 |
+
}
|
82 |
+
|
83 |
+
#text {
|
84 |
+
position:absolute;
|
85 |
+
top:8px;
|
86 |
+
left:530px;
|
87 |
+
width:30px;
|
88 |
+
height:50px;
|
89 |
+
margin:auto auto auto auto;
|
90 |
+
font-size:22px;
|
91 |
+
color: #000000;
|
92 |
+
}
|
93 |
+
|
94 |
+
div.outerBorder {
|
95 |
+
position:relative;
|
96 |
+
top:400px;
|
97 |
+
width:600px;
|
98 |
+
height:44px;
|
99 |
+
margin:auto auto auto auto;
|
100 |
+
border:8px solid rgba(0,0,0,0.1);
|
101 |
+
background: rgb(252,252,252); /* Old browsers */
|
102 |
+
background: -moz-linear-gradient(top, rgba(252,252,252,1) 0%, rgba(237,237,237,1) 100%); /* FF3.6+ */
|
103 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(252,252,252,1)), color-stop(100%,rgba(237,237,237,1))); /* Chrome,Safari4+ */
|
104 |
+
background: -webkit-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Chrome10+,Safari5.1+ */
|
105 |
+
background: -o-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* Opera 11.10+ */
|
106 |
+
background: -ms-linear-gradient(top, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* IE10+ */
|
107 |
+
background: linear-gradient(to bottom, rgba(252,252,252,1) 0%,rgba(237,237,237,1) 100%); /* W3C */
|
108 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfcfc', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
|
109 |
+
border-radius:72px;
|
110 |
+
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
|
111 |
+
}
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
</style>
|
118 |
+
</head>
|
119 |
+
|
120 |
+
|
121 |
+
<body>
|
122 |
+
<div class="card" style="width: 100%">
|
123 |
+
|
124 |
+
|
125 |
+
<div id="mynetwork" class="card-body"></div>
|
126 |
+
</div>
|
127 |
+
|
128 |
+
|
129 |
+
<div id="loadingBar">
|
130 |
+
<div class="outerBorder">
|
131 |
+
<div id="text">0%</div>
|
132 |
+
<div id="border">
|
133 |
+
<div id="bar"></div>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
<script type="text/javascript">
|
141 |
+
|
142 |
+
// initialize global variables.
|
143 |
+
var edges;
|
144 |
+
var nodes;
|
145 |
+
var allNodes;
|
146 |
+
var allEdges;
|
147 |
+
var nodeColors;
|
148 |
+
var originalNodes;
|
149 |
+
var network;
|
150 |
+
var container;
|
151 |
+
var options, data;
|
152 |
+
var filter = {
|
153 |
+
item : '',
|
154 |
+
property : '',
|
155 |
+
value : []
|
156 |
+
};
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
// This method is responsible for drawing the graph, returns the drawn network
|
163 |
+
function drawGraph() {
|
164 |
+
var container = document.getElementById('mynetwork');
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
// parsing and collecting nodes and edges from the python
|
169 |
+
nodes = new vis.DataSet([{"color": "#97c2fc", "id": "medical services", "label": "medical services", "shape": "dot", "title": "medical services"}, {"color": "#97c2fc", "id": "Statistical", "label": "Statistical", "shape": "dot", "title": "Statistical"}, {"color": "#97c2fc", "id": "medical referrals", "label": "medical referrals", "shape": "dot", "title": "medical referrals"}, {"color": "#97c2fc", "id": "Diseases", "label": "Diseases", "shape": "dot", "title": "Diseases"}, {"color": "#97c2fc", "id": "analysis", "label": "analysis", "shape": "dot", "title": "analysis"}, {"color": "#97c2fc", "id": "clinical notes", "label": "clinical notes", "shape": "dot", "title": "clinical notes"}, {"color": "#97c2fc", "id": "performance improvement", "label": "performance improvement", "shape": "dot", "title": "performance improvement"}, {"color": "#97c2fc", "id": "Topor Topscorer", "label": "Topor Topscorer", "shape": "dot", "title": "Topor Topscorer"}, {"color": "#97c2fc", "id": "model performance", "label": "model performance", "shape": "dot", "title": "model performance"}, {"color": "#97c2fc", "id": "more detailed descriptions", "label": "more detailed descriptions", "shape": "dot", "title": "more detailed descriptions"}, {"color": "#97c2fc", "id": "SDOH", "label": "SDOH", "shape": "dot", "title": "SDOH"}, {"color": "#97c2fc", "id": "more detailed SDOH descriptions", "label": "more detailed SDOH descriptions", "shape": "dot", "title": "more detailed SDOH descriptions"}, {"color": "#97c2fc", "id": "PubMed abstracts", "label": "PubMed abstracts", "shape": "dot", "title": "PubMed abstracts"}, {"color": "#97c2fc", "id": "original columns", "label": "original columns", "shape": "dot", "title": "original columns"}, {"color": "#97c2fc", "id": "descriptive columns", "label": "descriptive columns", "shape": "dot", "title": "descriptive columns"}, {"color": "#97c2fc", "id": "Sent I", "label": "Sent I", "shape": "dot", "title": "Sent I"}, {"color": "#97c2fc", "id": "Sent I O", "label": "Sent I O", "shape": "dot", "title": "Sent I O"}, {"color": "#97c2fc", "id": "Sent I O O", "label": "Sent I O O", "shape": "dot", "title": "Sent I O O"}, {"color": "#97c2fc", "id": "Sent I O O O", "label": "Sent I O O O", "shape": "dot", "title": "Sent I O O O"}, {"color": "#97c2fc", "id": "Sent I O O O O", "label": "Sent I O O O O", "shape": "dot", "title": "Sent I O O O O"}, {"color": "#97c2fc", "id": "Sent I O O O O O", "label": "Sent I O O O O O", "shape": "dot", "title": "Sent I O O O O O"}, {"color": "#97c2fc", "id": "Sent I O O O O O O", "label": "Sent I O O O O O O", "shape": "dot", "title": "Sent I O O O O O O"}, {"color": "#97c2fc", "id": "medical examinations", "label": "medical examinations", "shape": "dot", "title": "medical examinations"}, {"color": "#97c2fc", "id": "care", "label": "care", "shape": "dot", "title": "care"}, {"color": "#97c2fc", "id": "Health", "label": "Health", "shape": "dot", "title": "Health"}, {"color": "#97c2fc", "id": "classification", "label": "classification", "shape": "dot", "title": "classification"}, {"color": "#97c2fc", "id": "framing", "label": "framing", "shape": "dot", "title": "framing"}, {"color": "#97c2fc", "id": "social media posts", "label": "social media posts", "shape": "dot", "title": "social media posts"}, {"color": "#97c2fc", "id": "several challenges", "label": "several challenges", "shape": "dot", "title": "several challenges"}, {"color": "#97c2fc", "id": "I", "label": "I", "shape": "dot", "title": "I"}, {"color": "#97c2fc", "id": "EXAMPLE", "label": "EXAMPLE", "shape": "dot", "title": "EXAMPLE"}, {"color": "#97c2fc", "id": "RESULTS", "label": "RESULTS", "shape": "dot", "title": "RESULTS"}, {"color": "#97c2fc", "id": "QUERY", "label": "QUERY", "shape": "dot", "title": "QUERY"}, {"color": "#97c2fc", "id": "SYMPTOMS", "label": "SYMPTOMS", "shape": "dot", "title": "SYMPTOMS"}, {"color": "#97c2fc", "id": "thank", "label": "thank", "shape": "dot", "title": "thank"}, {"color": "#97c2fc", "id": "thank co-supervisor", "label": "thank co-supervisor", "shape": "dot", "title": "thank co-supervisor"}, {"color": "#97c2fc", "id": "thank members of Ph. thesis review committee", "label": "thank members of Ph. thesis review committee", "shape": "dot", "title": "thank members of Ph. thesis review committee"}, {"color": "#97c2fc", "id": "thank Prof. Yukihiro Motoyama", "label": "thank Prof. Yukihiro Motoyama", "shape": "dot", "title": "thank Prof. Yukihiro Motoyama"}, {"color": "#97c2fc", "id": "thank Prof. Norimichi Ukita", "label": "thank Prof. Norimichi Ukita", "shape": "dot", "title": "thank Prof. Norimichi Ukita"}, {"color": "#97c2fc", "id": "thank Prof. Yoshimasa Tsu", "label": "thank Prof. Yoshimasa Tsu", "shape": "dot", "title": "thank Prof. Yoshimasa Tsu"}, {"color": "#97c2fc", "id": "K", "label": "K", "shape": "dot", "title": "K"}, {"color": "#97c2fc", "id": "statement", "label": "statement", "shape": "dot", "title": "statement"}, {"color": "#97c2fc", "id": "a big test", "label": "a big test", "shape": "dot", "title": "a big test"}, {"color": "#97c2fc", "id": "having", "label": "having", "shape": "dot", "title": "having"}, {"color": "#97c2fc", "id": "specific name of drug", "label": "specific name of drug", "shape": "dot", "title": "specific name of drug"}, {"color": "#97c2fc", "id": "osteoporosis", "label": "osteoporosis", "shape": "dot", "title": "osteoporosis"}, {"color": "#97c2fc", "id": "bisphosphonate preparations", "label": "bisphosphonate preparations", "shape": "dot", "title": "bisphosphonate preparations"}, {"color": "#97c2fc", "id": "medication regimen", "label": "medication regimen", "shape": "dot", "title": "medication regimen"}, {"color": "#97c2fc", "id": "hospitalization", "label": "hospitalization", "shape": "dot", "title": "hospitalization"}, {"color": "#97c2fc", "id": "long-term observation and monitoring", "label": "long-term observation and monitoring", "shape": "dot", "title": "long-term observation and monitoring"}, {"color": "#97c2fc", "id": "costs", "label": "costs", "shape": "dot", "title": "costs"}, {"color": "#97c2fc", "id": "hospitalization costs", "label": "hospitalization costs", "shape": "dot", "title": "hospitalization costs"}, {"color": "#97c2fc", "id": "long-term observation and monitoring costs", "label": "long-term observation and monitoring costs", "shape": "dot", "title": "long-term observation and monitoring costs"}, {"color": "#97c2fc", "id": "a fever", "label": "a fever", "shape": "dot", "title": "a fever"}, {"color": "#97c2fc", "id": "so tired", "label": "so tired", "shape": "dot", "title": "so tired"}, {"color": "#97c2fc", "id": "unable to do", "label": "unable to do", "shape": "dot", "title": "unable to do"}, {"color": "#97c2fc", "id": "stuck in bed", "label": "stuck in bed", "shape": "dot", "title": "stuck in bed"}, {"color": "#97c2fc", "id": "like", "label": "like", "shape": "dot", "title": "like"}, {"color": "#97c2fc", "id": "severe itching", "label": "severe itching", "shape": "dot", "title": "severe itching"}, {"color": "#97c2fc", "id": "one or both eyes", "label": "one or both eyes", "shape": "dot", "title": "one or both eyes"}, {"color": "#97c2fc", "id": "Asperger\u2019", "label": "Asperger\u2019", "shape": "dot", "title": "Asperger\u2019"}, {"color": "#97c2fc", "id": "OCD", "label": "OCD", "shape": "dot", "title": "OCD"}, {"color": "#97c2fc", "id": "Major depressive", "label": "Major depressive", "shape": "dot", "title": "Major depressive"}, {"color": "#97c2fc", "id": "PTSD", "label": "PTSD", "shape": "dot", "title": "PTSD"}, {"color": "#97c2fc", "id": "days", "label": "days", "shape": "dot", "title": "days"}, {"color": "#97c2fc", "id": "homicidal thoughts and urges", "label": "homicidal thoughts and urges", "shape": "dot", "title": "homicidal thoughts and urges"}, {"color": "#97c2fc", "id": "others who did nothing wrong", "label": "others who did nothing wrong", "shape": "dot", "title": "others who did nothing wrong"}, {"color": "#97c2fc", "id": "providers", "label": "providers", "shape": "dot", "title": "providers"}, {"color": "#97c2fc", "id": "medical classification systems", "label": "medical classification systems", "shape": "dot", "title": "medical classification systems"}, {"color": "#97c2fc", "id": "data", "label": "data", "shape": "dot", "title": "data"}, {"color": "#97c2fc", "id": "deep learning models", "label": "deep learning models", "shape": "dot", "title": "deep learning models"}, {"color": "#97c2fc", "id": "NLP tasks", "label": "NLP tasks", "shape": "dot", "title": "NLP tasks"}, {"color": "#97c2fc", "id": "patient outcomes prediction", "label": "patient outcomes prediction", "shape": "dot", "title": "patient outcomes prediction"}, {"color": "#97c2fc", "id": "post-discharge readmissions", "label": "post-discharge readmissions", "shape": "dot", "title": "post-discharge readmissions"}, {"color": "#97c2fc", "id": "information", "label": "information", "shape": "dot", "title": "information"}, {"color": "#97c2fc", "id": "tabular and unstructured", "label": "tabular and unstructured", "shape": "dot", "title": "tabular and unstructured"}, {"color": "#97c2fc", "id": "enrich", "label": "enrich", "shape": "dot", "title": "enrich"}, {"color": "#97c2fc", "id": "BERT base tokenizer", "label": "BERT base tokenizer", "shape": "dot", "title": "BERT base tokenizer"}, {"color": "#97c2fc", "id": "BERT variant models", "label": "BERT variant models", "shape": "dot", "title": "BERT variant models"}, {"color": "#97c2fc", "id": "BERT variants in medical domain", "label": "BERT variants in medical domain", "shape": "dot", "title": "BERT variants in medical domain"}, {"color": "#97c2fc", "id": "approach", "label": "approach", "shape": "dot", "title": "approach"}, {"color": "#97c2fc", "id": "mixed structured and free text EHR data", "label": "mixed structured and free text EHR data", "shape": "dot", "title": "mixed structured and free text EHR data"}, {"color": "#97c2fc", "id": "biomedical", "label": "biomedical", "shape": "dot", "title": "biomedical"}, {"color": "#97c2fc", "id": "center", "label": "center", "shape": "dot", "title": "center"}, {"color": "#97c2fc", "id": "at", "label": "at", "shape": "dot", "title": "at"}, {"color": "#97c2fc", "id": "similarity", "label": "similarity", "shape": "dot", "title": "similarity"}, {"color": "#97c2fc", "id": "multimodal", "label": "multimodal", "shape": "dot", "title": "multimodal"}, {"color": "#97c2fc", "id": "instruction", "label": "instruction", "shape": "dot", "title": "instruction"}, {"color": "#97c2fc", "id": "responses", "label": "responses", "shape": "dot", "title": "responses"}, {"color": "#97c2fc", "id": "visual", "label": "visual", "shape": "dot", "title": "visual"}, {"color": "#97c2fc", "id": "chat", "label": "chat", "shape": "dot", "title": "chat"}, {"color": "#97c2fc", "id": "medical", "label": "medical", "shape": "dot", "title": "medical"}, {"color": "#97c2fc", "id": "report", "label": "report", "shape": "dot", "title": "report"}, {"color": "#97c2fc", "id": "alignment", "label": "alignment", "shape": "dot", "title": "alignment"}, {"color": "#97c2fc", "id": "directions", "label": "directions", "shape": "dot", "title": "directions"}, {"color": "#97c2fc", "id": "frames", "label": "frames", "shape": "dot", "title": "frames"}, {"color": "#97c2fc", "id": "fastalign", "label": "fastalign", "shape": "dot", "title": "fastalign"}, {"color": "#97c2fc", "id": "awesome-align", "label": "awesome-align", "shape": "dot", "title": "awesome-align"}, {"color": "#97c2fc", "id": "tuning", "label": "tuning", "shape": "dot", "title": "tuning"}, {"color": "#97c2fc", "id": "epochs", "label": "epochs", "shape": "dot", "title": "epochs"}, {"color": "#97c2fc", "id": "samples", "label": "samples", "shape": "dot", "title": "samples"}, {"color": "#97c2fc", "id": "hours", "label": "hours", "shape": "dot", "title": "hours"}, {"color": "#97c2fc", "id": "downstrea", "label": "downstrea", "shape": "dot", "title": "downstrea"}, {"color": "#97c2fc", "id": "in HKGs", "label": "in HKGs", "shape": "dot", "title": "in HKGs"}, {"color": "#97c2fc", "id": "HKGs", "label": "HKGs", "shape": "dot", "title": "HKGs"}, {"color": "#97c2fc", "id": "medical concepts", "label": "medical concepts", "shape": "dot", "title": "medical concepts"}, {"color": "#97c2fc", "id": "medical literature", "label": "medical literature", "shape": "dot", "title": "medical literature"}, {"color": "#97c2fc", "id": "clinical trials", "label": "clinical trials", "shape": "dot", "title": "clinical trials"}, {"color": "#97c2fc", "id": "patientgenerated data", "label": "patientgenerated data", "shape": "dot", "title": "patientgenerated data"}, {"color": "#97c2fc", "id": "medical entities", "label": "medical entities", "shape": "dot", "title": "medical entities"}, {"color": "#97c2fc", "id": "relationships", "label": "relationships", "shape": "dot", "title": "relationships"}, {"color": "#97c2fc", "id": "to structured format", "label": "to structured format", "shape": "dot", "title": "to structured format"}, {"color": "#97c2fc", "id": "entities and relationships", "label": "entities and relationships", "shape": "dot", "title": "entities and relationships"}, {"color": "#97c2fc", "id": "to chosen ontologies", "label": "to chosen ontologies", "shape": "dot", "title": "to chosen ontologies"}, {"color": "#97c2fc", "id": "PubMed", "label": "PubMed", "shape": "dot", "title": "PubMed"}, {"color": "#97c2fc", "id": "database", "label": "database", "shape": "dot", "title": "database"}, {"color": "#97c2fc", "id": "drug", "label": "drug", "shape": "dot", "title": "drug"}, {"color": "#97c2fc", "id": "protein", "label": "protein", "shape": "dot", "title": "protein"}, {"color": "#97c2fc", "id": "category", "label": "category", "shape": "dot", "title": "category"}, {"color": "#97c2fc", "id": "ATC pathway.", "label": "ATC pathway.", "shape": "dot", "title": "ATC pathway."}, {"color": "#97c2fc", "id": "navigational queries", "label": "navigational queries", "shape": "dot", "title": "navigational queries"}, {"color": "#97c2fc", "id": "Field Sensor", "label": "Field Sensor", "shape": "dot", "title": "Field Sensor"}, {"color": "#97c2fc", "id": "removed articles", "label": "removed articles", "shape": "dot", "title": "removed articles"}, {"color": "#97c2fc", "id": "articles without titles or abstracts", "label": "articles without titles or abstracts", "shape": "dot", "title": "articles without titles or abstracts"}, {"color": "#97c2fc", "id": "medical consultations", "label": "medical consultations", "shape": "dot", "title": "medical consultations"}, {"color": "#97c2fc", "id": "data analysis", "label": "data analysis", "shape": "dot", "title": "data analysis"}, {"color": "#97c2fc", "id": "overlap", "label": "overlap", "shape": "dot", "title": "overlap"}, {"color": "#97c2fc", "id": "population entities", "label": "population entities", "shape": "dot", "title": "population entities"}, {"color": "#97c2fc", "id": "chemical names", "label": "chemical names", "shape": "dot", "title": "chemical names"}, {"color": "#97c2fc", "id": "medical research", "label": "medical research", "shape": "dot", "title": "medical research"}, {"color": "#97c2fc", "id": "terminology", "label": "terminology", "shape": "dot", "title": "terminology"}, {"color": "#97c2fc", "id": "emergencies", "label": "emergencies", "shape": "dot", "title": "emergencies"}, {"color": "#97c2fc", "id": "supplies", "label": "supplies", "shape": "dot", "title": "supplies"}, {"color": "#97c2fc", "id": "medical treatments", "label": "medical treatments", "shape": "dot", "title": "medical treatments"}, {"color": "#97c2fc", "id": "medical terminology", "label": "medical terminology", "shape": "dot", "title": "medical terminology"}, {"color": "#97c2fc", "id": "health insurance", "label": "health insurance", "shape": "dot", "title": "health insurance"}, {"color": "#97c2fc", "id": "medical coding systems", "label": "medical coding systems", "shape": "dot", "title": "medical coding systems"}, {"color": "#97c2fc", "id": "statistics", "label": "statistics", "shape": "dot", "title": "statistics"}, {"color": "#97c2fc", "id": "insurance", "label": "insurance", "shape": "dot", "title": "insurance"}, {"color": "#97c2fc", "id": "medical equipment", "label": "medical equipment", "shape": "dot", "title": "medical equipment"}, {"color": "#97c2fc", "id": "examinations", "label": "examinations", "shape": "dot", "title": "examinations"}, {"color": "#97c2fc", "id": "treatment", "label": "treatment", "shape": "dot", "title": "treatment"}, {"color": "#97c2fc", "id": "for", "label": "for", "shape": "dot", "title": "for"}, {"color": "#97c2fc", "id": "research", "label": "research", "shape": "dot", "title": "research"}, {"color": "#97c2fc", "id": "medical procedures", "label": "medical procedures", "shape": "dot", "title": "medical procedures"}, {"color": "#97c2fc", "id": "admissions", "label": "admissions", "shape": "dot", "title": "admissions"}, {"color": "#97c2fc", "id": "Problems", "label": "Problems", "shape": "dot", "title": "Problems"}, {"color": "#97c2fc", "id": "transfer", "label": "transfer", "shape": "dot", "title": "transfer"}, {"color": "#97c2fc", "id": "multi-task", "label": "multi-task", "shape": "dot", "title": "multi-task"}, {"color": "#97c2fc", "id": "framework", "label": "framework", "shape": "dot", "title": "framework"}, {"color": "#97c2fc", "id": "execution accuracy", "label": "execution accuracy", "shape": "dot", "title": "execution accuracy"}, {"color": "#97c2fc", "id": "improve", "label": "improve", "shape": "dot", "title": "improve"}, {"color": "#97c2fc", "id": "International", "label": "International", "shape": "dot", "title": "International"}, {"color": "#97c2fc", "id": "medical devices", "label": "medical devices", "shape": "dot", "title": "medical devices"}, {"color": "#97c2fc", "id": "coding", "label": "coding", "shape": "dot", "title": "coding"}, {"color": "#97c2fc", "id": "medical coding", "label": "medical coding", "shape": "dot", "title": "medical coding"}, {"color": "#97c2fc", "id": "medical evaluations", "label": "medical evaluations", "shape": "dot", "title": "medical evaluations"}, {"color": "#97c2fc", "id": "services", "label": "services", "shape": "dot", "title": "services"}, {"color": "#97c2fc", "id": "patient care", "label": "patient care", "shape": "dot", "title": "patient care"}, {"color": "#97c2fc", "id": "therapies", "label": "therapies", "shape": "dot", "title": "therapies"}, {"color": "#97c2fc", "id": "interventions", "label": "interventions", "shape": "dot", "title": "interventions"}, {"color": "#97c2fc", "id": "medical admissions", "label": "medical admissions", "shape": "dot", "title": "medical admissions"}, {"color": "#97c2fc", "id": "medical software", "label": "medical software", "shape": "dot", "title": "medical software"}, {"color": "#97c2fc", "id": "patient", "label": "patient", "shape": "dot", "title": "patient"}, {"color": "#97c2fc", "id": "some", "label": "some", "shape": "dot", "title": "some"}, {"color": "#97c2fc", "id": "on", "label": "on", "shape": "dot", "title": "on"}, {"color": "#97c2fc", "id": "any", "label": "any", "shape": "dot", "title": "any"}, {"color": "#97c2fc", "id": "normal", "label": "normal", "shape": "dot", "title": "normal"}, {"color": "#97c2fc", "id": "prescribed", "label": "prescribed", "shape": "dot", "title": "prescribed"}, {"color": "#97c2fc", "id": "ditems.label", "label": "ditems.label", "shape": "dot", "title": "ditems.label"}, {"color": "#97c2fc", "id": "uniquepid", "label": "uniquepid", "shape": "dot", "title": "uniquepid"}, {"color": "#97c2fc", "id": "chronic", "label": "chronic", "shape": "dot", "title": "chronic"}, {"color": "#97c2fc", "id": "both", "label": "both", "shape": "dot", "title": "both"}, {"color": "#97c2fc", "id": "require", "label": "require", "shape": "dot", "title": "require"}, {"color": "#97c2fc", "id": "ICD names", "label": "ICD names", "shape": "dot", "title": "ICD names"}, {"color": "#97c2fc", "id": "a model", "label": "a model", "shape": "dot", "title": "a model"}, {"color": "#97c2fc", "id": "through", "label": "through", "shape": "dot", "title": "through"}, {"color": "#97c2fc", "id": "more", "label": "more", "shape": "dot", "title": "more"}, {"color": "#97c2fc", "id": "concave left atrial appendage", "label": "concave left atrial appendage", "shape": "dot", "title": "concave left atrial appendage"}, {"color": "#97c2fc", "id": "third molar sign", "label": "third molar sign", "shape": "dot", "title": "third molar sign"}, {"color": "#97c2fc", "id": "superiordisplacement of left main stem bronchus", "label": "superiordisplacement of left main stem bronchus", "shape": "dot", "title": "superiordisplacement of left main stem bronchus"}, {"color": "#97c2fc", "id": "rounded cardiac apex", "label": "rounded cardiac apex", "shape": "dot", "title": "rounded cardiac apex"}, {"color": "#97c2fc", "id": "shmoosign", "label": "shmoosign", "shape": "dot", "title": "shmoosign"}, {"color": "#97c2fc", "id": "Hoffman-Riglersign", "label": "Hoffman-Riglersign", "shape": "dot", "title": "Hoffman-Riglersign"}, {"color": "#97c2fc", "id": "tag", "label": "tag", "shape": "dot", "title": "tag"}, {"color": "#97c2fc", "id": "year-old man", "label": "year-old man", "shape": "dot", "title": "year-old man"}, {"color": "#97c2fc", "id": "increasing", "label": "increasing", "shape": "dot", "title": "increasing"}, {"color": "#97c2fc", "id": "past months", "label": "past months", "shape": "dot", "title": "past months"}, {"color": "#97c2fc", "id": "has", "label": "has", "shape": "dot", "title": "has"}, {"color": "#97c2fc", "id": "preoperative evaluation", "label": "preoperative evaluation", "shape": "dot", "title": "preoperative evaluation"}, {"color": "#97c2fc", "id": "heartburn", "label": "heartburn", "shape": "dot", "title": "heartburn"}, {"color": "#97c2fc", "id": "difficulty swallowing", "label": "difficulty swallowing", "shape": "dot", "title": "difficulty swallowing"}, {"color": "#97c2fc", "id": "relieves discomfort", "label": "relieves discomfort", "shape": "dot", "title": "relieves discomfort"}, {"color": "#97c2fc", "id": "blood in urine", "label": "blood in urine", "shape": "dot", "title": "blood in urine"}, {"color": "#97c2fc", "id": "blood in his urine", "label": "blood in his urine", "shape": "dot", "title": "blood in his urine"}, {"color": "#97c2fc", "id": "flame burn", "label": "flame burn", "shape": "dot", "title": "flame burn"}, {"color": "#97c2fc", "id": "polymers", "label": "polymers", "shape": "dot", "title": "polymers"}, {"color": "#97c2fc", "id": "combustion", "label": "combustion", "shape": "dot", "title": "combustion"}, {"color": "#97c2fc", "id": "type diabetes mellitus", "label": "type diabetes mellitus", "shape": "dot", "title": "type diabetes mellitus"}, {"color": "#97c2fc", "id": "metformin and vildagliptin", "label": "metformin and vildagliptin", "shape": "dot", "title": "metformin and vildagliptin"}, {"color": "#97c2fc", "id": "smoked cigarettes daily", "label": "smoked cigarettes daily", "shape": "dot", "title": "smoked cigarettes daily"}, {"color": "#97c2fc", "id": "no family history", "label": "no family history", "shape": "dot", "title": "no family history"}, {"color": "#97c2fc", "id": "moderate abdominal obesity", "label": "moderate abdominal obesity", "shape": "dot", "title": "moderate abdominal obesity"}, {"color": "#97c2fc", "id": "sub-Saharan Africa", "label": "sub-Saharan Africa", "shape": "dot", "title": "sub-Saharan Africa"}, {"color": "#97c2fc", "id": "graduate school", "label": "graduate school", "shape": "dot", "title": "graduate school"}, {"color": "#97c2fc", "id": "USA", "label": "USA", "shape": "dot", "title": "USA"}, {"color": "#97c2fc", "id": "migraine", "label": "migraine", "shape": "dot", "title": "migraine"}, {"color": "#97c2fc", "id": "surgeon", "label": "surgeon", "shape": "dot", "title": "surgeon"}, {"color": "#97c2fc", "id": "adrenalectomy", "label": "adrenalectomy", "shape": "dot", "title": "adrenalectomy"}, {"color": "#97c2fc", "id": "physical examination", "label": "physical examination", "shape": "dot", "title": "physical examination"}, {"color": "#97c2fc", "id": "items", "label": "items", "shape": "dot", "title": "items"}, {"color": "#97c2fc", "id": "Consultation Checklist", "label": "Consultation Checklist", "shape": "dot", "title": "Consultation Checklist"}, {"color": "#97c2fc", "id": "Summarization Content Units", "label": "Summarization Content Units", "shape": "dot", "title": "Summarization Content Units"}, {"color": "#97c2fc", "id": "patientweight", "label": "patientweight", "shape": "dot", "title": "patientweight"}, {"color": "#97c2fc", "id": "patientagegroup", "label": "patientagegroup", "shape": "dot", "title": "patientagegroup"}, {"color": "#97c2fc", "id": "patientsex", "label": "patientsex", "shape": "dot", "title": "patientsex"}, {"color": "#97c2fc", "id": "MedDRA", "label": "MedDRA", "shape": "dot", "title": "MedDRA"}, {"color": "#97c2fc", "id": "fever", "label": "fever", "shape": "dot", "title": "fever"}, {"color": "#97c2fc", "id": "shortness of breath", "label": "shortness of breath", "shape": "dot", "title": "shortness of breath"}, {"color": "#97c2fc", "id": "patient with a history of coronary artery disease", "label": "patient with a history of coronary artery disease", "shape": "dot", "title": "patient with a history of coronary artery disease"}, {"color": "#97c2fc", "id": "lower GI bleed", "label": "lower GI bleed", "shape": "dot", "title": "lower GI bleed"}, {"color": "#97c2fc", "id": "PT evaluation", "label": "PT evaluation", "shape": "dot", "title": "PT evaluation"}, {"color": "#97c2fc", "id": "without difficulty", "label": "without difficulty", "shape": "dot", "title": "without difficulty"}, {"color": "#97c2fc", "id": "with her husband", "label": "with her husband", "shape": "dot", "title": "with her husband"}, {"color": "#97c2fc", "id": "medical transfers", "label": "medical transfers", "shape": "dot", "title": "medical transfers"}, {"color": "#97c2fc", "id": "diagnosis", "label": "diagnosis", "shape": "dot", "title": "diagnosis"}, {"color": "#97c2fc", "id": "prescriptions", "label": "prescriptions", "shape": "dot", "title": "prescriptions"}, {"color": "#97c2fc", "id": "doctor", "label": "doctor", "shape": "dot", "title": "doctor"}, {"color": "#97c2fc", "id": "possible diagnoses", "label": "possible diagnoses", "shape": "dot", "title": "possible diagnoses"}, {"color": "#97c2fc", "id": "software", "label": "software", "shape": "dot", "title": "software"}, {"color": "#97c2fc", "id": "parts of body", "label": "parts of body", "shape": "dot", "title": "parts of body"}, {"color": "#97c2fc", "id": "patellofemoral joint", "label": "patellofemoral joint", "shape": "dot", "title": "patellofemoral joint"}, {"color": "#97c2fc", "id": "intercondylar", "label": "intercondylar", "shape": "dot", "title": "intercondylar"}, {"color": "#97c2fc", "id": "damage to cartilage", "label": "damage to cartilage", "shape": "dot", "title": "damage to cartilage"}, {"color": "#97c2fc", "id": "swelling", "label": "swelling", "shape": "dot", "title": "swelling"}, {"color": "#97c2fc", "id": "damage to ligaments", "label": "damage to ligaments", "shape": "dot", "title": "damage to ligaments"}, {"color": "#97c2fc", "id": "meniscus", "label": "meniscus", "shape": "dot", "title": "meniscus"}, {"color": "#97c2fc", "id": "tear in semimembranosus muscle", "label": "tear in semimembranosus muscle", "shape": "dot", "title": "tear in semimembranosus muscle"}, {"color": "#97c2fc", "id": "may", "label": "may", "shape": "dot", "title": "may"}, {"color": "#97c2fc", "id": "ligaments", "label": "ligaments", "shape": "dot", "title": "ligaments"}, {"color": "#97c2fc", "id": "completely torn", "label": "completely torn", "shape": "dot", "title": "completely torn"}, {"color": "#97c2fc", "id": "other", "label": "other", "shape": "dot", "title": "other"}, {"color": "#97c2fc", "id": "okay", "label": "okay", "shape": "dot", "title": "okay"}, {"color": "#97c2fc", "id": "there", "label": "there", "shape": "dot", "title": "there"}, {"color": "#97c2fc", "id": "no evidence", "label": "no evidence", "shape": "dot", "title": "no evidence"}, {"color": "#97c2fc", "id": "glioblastoma", "label": "glioblastoma", "shape": "dot", "title": "glioblastoma"}, {"color": "#97c2fc", "id": "contrast-enhancing mass", "label": "contrast-enhancing mass", "shape": "dot", "title": "contrast-enhancing mass"}, {"color": "#97c2fc", "id": "swelling around mass", "label": "swelling around mass", "shape": "dot", "title": "swelling around mass"}, {"color": "#97c2fc", "id": "there is no new mass", "label": "there is no new mass", "shape": "dot", "title": "there is no new mass"}, {"color": "#97c2fc", "id": "there are no signs of problems with blood \ufb02ow to brain", "label": "there are no signs of problems with blood \ufb02ow to brain", "shape": "dot", "title": "there are no signs of problems with blood \ufb02ow to brain"}, {"color": "#97c2fc", "id": "there are no signs of problems with \ufb02uid that surrounds brain", "label": "there are no signs of problems with \ufb02uid that surrounds brain", "shape": "dot", "title": "there are no signs of problems with \ufb02uid that surrounds brain"}, {"color": "#97c2fc", "id": "doctors have concluded", "label": "doctors have concluded", "shape": "dot", "title": "doctors have concluded"}, {"color": "#97c2fc", "id": "the mass on back of head is likely a type of brain tumor called a glioblastoma", "label": "the mass on back of head is likely a type of brain tumor called a glioblastoma", "shape": "dot", "title": "the mass on back of head is likely a type of brain tumor called a glioblastoma"}, {"color": "#97c2fc", "id": "the mass on front of head is not new", "label": "the mass on front of head is not new", "shape": "dot", "title": "the mass on front of head is not new"}, {"color": "#97c2fc", "id": "CT scans", "label": "CT scans", "shape": "dot", "title": "CT scans"}, {"color": "#97c2fc", "id": "some scans", "label": "some scans", "shape": "dot", "title": "some scans"}, {"color": "#97c2fc", "id": "different parts", "label": "different parts", "shape": "dot", "title": "different parts"}, {"color": "#97c2fc", "id": "infection", "label": "infection", "shape": "dot", "title": "infection"}, {"color": "#97c2fc", "id": "thyroid gland", "label": "thyroid gland", "shape": "dot", "title": "thyroid gland"}, {"color": "#97c2fc", "id": "chest or belly", "label": "chest or belly", "shape": "dot", "title": "chest or belly"}, {"color": "#97c2fc", "id": "liver", "label": "liver", "shape": "dot", "title": "liver"}, {"color": "#97c2fc", "id": "gallbladder", "label": "gallbladder", "shape": "dot", "title": "gallbladder"}, {"color": "#97c2fc", "id": "pancreas", "label": "pancreas", "shape": "dot", "title": "pancreas"}, {"color": "#97c2fc", "id": "kidneys", "label": "kidneys", "shape": "dot", "title": "kidneys"}, {"color": "#97c2fc", "id": "bones", "label": "bones", "shape": "dot", "title": "bones"}, {"color": "#97c2fc", "id": "cancer has come back", "label": "cancer has come back", "shape": "dot", "title": "cancer has come back"}, {"color": "#97c2fc", "id": "person has cancer", "label": "person has cancer", "shape": "dot", "title": "person has cancer"}, {"color": "#97c2fc", "id": "treatment is working", "label": "treatment is working", "shape": "dot", "title": "treatment is working"}, {"color": "#97c2fc", "id": "no evidence of cancer spreading", "label": "no evidence of cancer spreading", "shape": "dot", "title": "no evidence of cancer spreading"}, {"color": "#97c2fc", "id": "normal heart", "label": "normal heart", "shape": "dot", "title": "normal heart"}, {"color": "#97c2fc", "id": "bigger thyroid gland", "label": "bigger thyroid gland", "shape": "dot", "title": "bigger thyroid gland"}, {"color": "#97c2fc", "id": "no extra \ufb02uid", "label": "no extra \ufb02uid", "shape": "dot", "title": "no extra \ufb02uid"}, {"color": "#97c2fc", "id": "no infection in lungs", "label": "no infection in lungs", "shape": "dot", "title": "no infection in lungs"}, {"color": "#97c2fc", "id": "consultations", "label": "consultations", "shape": "dot", "title": "consultations"}, {"color": "#97c2fc", "id": "treatments", "label": "treatments", "shape": "dot", "title": "treatments"}, {"color": "#97c2fc", "id": "include", "label": "include", "shape": "dot", "title": "include"}, {"color": "#97c2fc", "id": "non-pharmacological therapies", "label": "non-pharmacological therapies", "shape": "dot", "title": "non-pharmacological therapies"}, {"color": "#97c2fc", "id": "medical emergencies", "label": "medical emergencies", "shape": "dot", "title": "medical emergencies"}, {"color": "#97c2fc", "id": "medical databases", "label": "medical databases", "shape": "dot", "title": "medical databases"}, {"color": "#97c2fc", "id": "databases", "label": "databases", "shape": "dot", "title": "databases"}, {"color": "#97c2fc", "id": "records", "label": "records", "shape": "dot", "title": "records"}, {"color": "#97c2fc", "id": "Related", "label": "Related", "shape": "dot", "title": "Related"}, {"color": "#97c2fc", "id": "transfers", "label": "transfers", "shape": "dot", "title": "transfers"}, {"color": "#97c2fc", "id": "systems", "label": "systems", "shape": "dot", "title": "systems"}, {"color": "#97c2fc", "id": "to shared task leaderboard", "label": "to shared task leaderboard", "shape": "dot", "title": "to shared task leaderboard"}, {"color": "#97c2fc", "id": "procedures", "label": "procedures", "shape": "dot", "title": "procedures"}, {"color": "#97c2fc", "id": "evaluations", "label": "evaluations", "shape": "dot", "title": "evaluations"}, {"color": "#97c2fc", "id": "medical records", "label": "medical records", "shape": "dot", "title": "medical records"}, {"color": "#97c2fc", "id": "medical tests", "label": "medical tests", "shape": "dot", "title": "medical tests"}, {"color": "#97c2fc", "id": "devices", "label": "devices", "shape": "dot", "title": "devices"}, {"color": "#97c2fc", "id": "medical supplies", "label": "medical supplies", "shape": "dot", "title": "medical supplies"}, {"color": "#97c2fc", "id": "medical interventions", "label": "medical interventions", "shape": "dot", "title": "medical interventions"}, {"color": "#97c2fc", "id": "billing", "label": "billing", "shape": "dot", "title": "billing"}, {"color": "#97c2fc", "id": "referrals", "label": "referrals", "shape": "dot", "title": "referrals"}, {"color": "#97c2fc", "id": "\"unspecific consultation\"", "label": "\"unspecific consultation\"", "shape": "dot", "title": "\"unspecific consultation\""}, {"color": "#97c2fc", "id": "International Statistical Classification of Diseases and Related Health Problems", "label": "International Statistical Classification of Diseases and Related Health Problems", "shape": "dot", "title": "International Statistical Classification of Diseases and Related Health Problems"}, {"color": "#97c2fc", "id": "tests", "label": "tests", "shape": "dot", "title": "tests"}, {"color": "#97c2fc", "id": "taking pictures", "label": "taking pictures", "shape": "dot", "title": "taking pictures"}, {"color": "#97c2fc", "id": "medical billing", "label": "medical billing", "shape": "dot", "title": "medical billing"}, {"color": "#97c2fc", "id": "medical therapies", "label": "medical therapies", "shape": "dot", "title": "medical therapies"}, {"color": "#97c2fc", "id": "discharges", "label": "discharges", "shape": "dot", "title": "discharges"}, {"color": "#97c2fc", "id": "Classification", "label": "Classification", "shape": "dot", "title": "Classification"}, {"color": "#97c2fc", "id": "PRX", "label": "PRX", "shape": "dot", "title": "PRX"}, {"color": "#97c2fc", "id": "healthcare", "label": "healthcare", "shape": "dot", "title": "healthcare"}, {"color": "#97c2fc", "id": "distinct challenges", "label": "distinct challenges", "shape": "dot", "title": "distinct challenges"}, {"color": "#97c2fc", "id": "specialized medical terminology", "label": "specialized medical terminology", "shape": "dot", "title": "specialized medical terminology"}, {"color": "#97c2fc", "id": "ambiguity and variability", "label": "ambiguity and variability", "shape": "dot", "title": "ambiguity and variability"}, {"color": "#97c2fc", "id": "reliability and accuracy", "label": "reliability and accuracy", "shape": "dot", "title": "reliability and accuracy"}, {"color": "#97c2fc", "id": "has seen", "label": "has seen", "shape": "dot", "title": "has seen"}, {"color": "#97c2fc", "id": "many", "label": "many", "shape": "dot", "title": "many"}, {"color": "#97c2fc", "id": "have explored", "label": "have explored", "shape": "dot", "title": "have explored"}, {"color": "#97c2fc", "id": "to", "label": "to", "shape": "dot", "title": "to"}, {"color": "#97c2fc", "id": "challenges", "label": "challenges", "shape": "dot", "title": "challenges"}, {"color": "#97c2fc", "id": "pronounced", "label": "pronounced", "shape": "dot", "title": "pronounced"}, {"color": "#97c2fc", "id": "CHQs", "label": "CHQs", "shape": "dot", "title": "CHQs"}, {"color": "#97c2fc", "id": "by", "label": "by", "shape": "dot", "title": "by"}, {"color": "#97c2fc", "id": "manual", "label": "manual", "shape": "dot", "title": "manual"}, {"color": "#97c2fc", "id": "automated", "label": "automated", "shape": "dot", "title": "automated"}, {"color": "#97c2fc", "id": "ICD", "label": "ICD", "shape": "dot", "title": "ICD"}, {"color": "#97c2fc", "id": "description", "label": "description", "shape": "dot", "title": "description"}, {"color": "#97c2fc", "id": "DISCUSSION AND CONCLUSION", "label": "DISCUSSION AND CONCLUSION", "shape": "dot", "title": "DISCUSSION AND CONCLUSION"}, {"color": "#97c2fc", "id": "diseases", "label": "diseases", "shape": "dot", "title": "diseases"}, {"color": "#97c2fc", "id": "heart diseases", "label": "heart diseases", "shape": "dot", "title": "heart diseases"}, {"color": "#97c2fc", "id": "a fully digitised tool", "label": "a fully digitised tool", "shape": "dot", "title": "a fully digitised tool"}, {"color": "#97c2fc", "id": "of", "label": "of", "shape": "dot", "title": "of"}, {"color": "#97c2fc", "id": "in", "label": "in", "shape": "dot", "title": "in"}, {"color": "#97c2fc", "id": "in automated ICD coding", "label": "in automated ICD coding", "shape": "dot", "title": "in automated ICD coding"}, {"color": "#97c2fc", "id": "ICD-labeled", "label": "ICD-labeled", "shape": "dot", "title": "ICD-labeled"}, {"color": "#97c2fc", "id": "discharge summaries", "label": "discharge summaries", "shape": "dot", "title": "discharge summaries"}, {"color": "#97c2fc", "id": "code", "label": "code", "shape": "dot", "title": "code"}, {"color": "#97c2fc", "id": "ICD coding", "label": "ICD coding", "shape": "dot", "title": "ICD coding"}, {"color": "#97c2fc", "id": "health", "label": "health", "shape": "dot", "title": "health"}, {"color": "#97c2fc", "id": "medical discharges", "label": "medical discharges", "shape": "dot", "title": "medical discharges"}, {"color": "#97c2fc", "id": "equipment", "label": "equipment", "shape": "dot", "title": "equipment"}]);
|
170 |
+
edges = new vis.DataSet([{"from": "Diseases", "title": "are an essential part of", "to": "analysis"}, {"from": "Diseases", "title": "are an essential part of", "to": "clinical notes"}, {"from": "Diseases", "title": "in dataset", "to": "performance improvement"}, {"from": "Diseases", "title": "in dataset", "to": "Topor Topscorer"}, {"from": "Diseases", "title": "in dataset", "to": "model performance"}, {"from": "Diseases", "title": "contain", "to": "more detailed descriptions"}, {"from": "Diseases", "title": "contain", "to": "SDOH"}, {"from": "Diseases", "title": "contain", "to": "more detailed SDOH descriptions"}, {"from": "Diseases", "title": "radiology reports", "to": "PubMed abstracts"}, {"from": "Diseases", "title": "MIMIC-IV-ED dataset", "to": "original columns"}, {"from": "Diseases", "title": "MIMIC-IV-ED dataset", "to": "descriptive columns"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O O"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O O O"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O O O O"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O O O O O"}, {"from": "Diseases", "title": "Aggregated", "to": "Sent I O O O O O O"}, {"from": "Health", "title": "mention", "to": "classification"}, {"from": "Health", "title": "problem", "to": "framing"}, {"from": "Health", "title": "mention", "to": "social media posts"}, {"from": "Health", "title": "introduce", "to": "several challenges"}, {"from": "Health", "title": "mentions", "to": "I"}, {"from": "Health", "title": "LITERATURE RETRIEVAL", "to": "EXAMPLE"}, {"from": "Health", "title": "LITERATURE RETRIEVAL", "to": "RESULTS"}, {"from": "Health", "title": "LITERATURE RETRIEVAL", "to": "QUERY"}, {"from": "Health", "title": "LITERATURE RETRIEVAL", "to": "SYMPTOMS"}, {"from": "Health", "title": "would like to", "to": "thank"}, {"from": "Health", "title": "would like to", "to": "thank co-supervisor"}, {"from": "Health", "title": "would like to", "to": "thank members of Ph. thesis review committee"}, {"from": "Health", "title": "would like to", "to": "thank Prof. Yukihiro Motoyama"}, {"from": "Health", "title": "would like to", "to": "thank Prof. Norimichi Ukita"}, {"from": "Health", "title": "would like to", "to": "thank Prof. Yoshimasa Tsu"}, {"from": "Health", "title": "has", "to": "K"}, {"from": "Health", "title": "Author", "to": "statement"}, {"from": "Health", "title": "have", "to": "a big test"}, {"from": "Health", "title": "am", "to": "having"}, {"from": "Health", "title": "am not sure about", "to": "specific name of drug"}, {"from": "Health", "title": "am not sure about", "to": "osteoporosis"}, {"from": "Health", "title": "am not sure about", "to": "bisphosphonate preparations"}, {"from": "Health", "title": "am not sure about", "to": "medication regimen"}, {"from": "Health", "title": "am not sure about", "to": "hospitalization"}, {"from": "Health", "title": "am not sure about", "to": "long-term observation and monitoring"}, {"from": "Health", "title": "am not sure about", "to": "costs"}, {"from": "Health", "title": "am not sure about", "to": "hospitalization costs"}, {"from": "Health", "title": "am not sure about", "to": "long-term observation and monitoring costs"}, {"from": "Health", "title": "have", "to": "a fever"}, {"from": "Health", "title": "am", "to": "so tired"}, {"from": "Health", "title": "am", "to": "unable to do"}, {"from": "Health", "title": "am", "to": "stuck in bed"}, {"from": "Health", "title": "feel", "to": "like"}, {"from": "Health", "title": "have", "to": "severe itching"}, {"from": "Health", "title": "have", "to": "one or both eyes"}, {"from": "Health", "title": "was diagnosed with", "to": "Asperger\u2019"}, {"from": "Health", "title": "was diagnosed with", "to": "OCD"}, {"from": "Health", "title": "was diagnosed with", "to": "Major depressive"}, {"from": "Health", "title": "was diagnosed with", "to": "PTSD"}, {"from": "Health", "title": "was inpatient for", "to": "days"}, {"from": "Health", "title": "was inpatient for", "to": "homicidal thoughts and urges"}, {"from": "Health", "title": "was inpatient for", "to": "others who did nothing wrong"}, {"from": "Health", "title": "problems", "to": "providers"}, {"from": "data", "title": "limitation", "to": "deep learning models"}, {"from": "data", "title": "transformer architecture", "to": "NLP tasks"}, {"from": "data", "title": "shortage", "to": "patient outcomes prediction"}, {"from": "data", "title": "imbalance", "to": "post-discharge readmissions"}, {"from": "data", "title": "contains", "to": "information"}, {"from": "data", "title": "mix", "to": "tabular and unstructured"}, {"from": "data", "title": "and", "to": "enrich"}, {"from": "data", "title": "tokenized using", "to": "BERT base tokenizer"}, {"from": "data", "title": "IOB tagging scheme", "to": "BERT variant models"}, {"from": "data", "title": "CRF layer as tag encoding", "to": "BERT variants in medical domain"}, {"from": "data", "title": "augmentation", "to": "approach"}, {"from": "data", "title": "using", "to": "mixed structured and free text EHR data"}, {"from": "data", "title": "statistics", "to": "biomedical"}, {"from": "data", "title": "informatics", "to": "center"}, {"from": "data", "title": "knowledge", "to": "at"}, {"from": "data", "title": "text", "to": "similarity"}, {"from": "data", "title": "statistics", "to": "multimodal"}, {"from": "data", "title": "statistics", "to": "instruction"}, {"from": "data", "title": "statistics", "to": "responses"}, {"from": "data", "title": "statistics", "to": "visual"}, {"from": "data", "title": "statistics", "to": "chat"}, {"from": "data", "title": "statistics", "to": "medical"}, {"from": "data", "title": "terminology", "to": "report"}, {"from": "data", "title": "statistics", "to": "alignment"}, {"from": "data", "title": "process", "to": "directions"}, {"from": "data", "title": "process", "to": "frames"}, {"from": "data", "title": "tools", "to": "fastalign"}, {"from": "data", "title": "tools", "to": "awesome-align"}, {"from": "data", "title": "statistics", "to": "tuning"}, {"from": "data", "title": "statistics", "to": "epochs"}, {"from": "data", "title": "statistics", "to": "samples"}, {"from": "data", "title": "statistics", "to": "hours"}, {"from": "data", "title": "statistics", "to": "downstrea"}, {"from": "data", "title": "heterogeneity", "to": "in HKGs"}, {"from": "data", "title": "in", "to": "HKGs"}, {"from": "data", "title": "in", "to": "medical concepts"}, {"from": "data", "title": "gather", "to": "medical literature"}, {"from": "data", "title": "gather", "to": "clinical trials"}, {"from": "data", "title": "gather", "to": "patientgenerated data"}, {"from": "data", "title": "extract", "to": "medical entities"}, {"from": "data", "title": "extract", "to": "relationships"}, {"from": "data", "title": "transform", "to": "to structured format"}, {"from": "data", "title": "map", "to": "entities and relationships"}, {"from": "data", "title": "map", "to": "to chosen ontologies"}, {"from": "data", "title": "collection", "to": "PubMed"}, {"from": "data", "title": "is", "to": "database"}, {"from": "data", "title": "contains", "to": "drug"}, {"from": "data", "title": "contains", "to": "protein"}, {"from": "data", "title": "contains", "to": "category"}, {"from": "data", "title": "contains", "to": "ATC pathway."}, {"from": "data", "title": "collection", "to": "navigational queries"}, {"from": "data", "title": "collection", "to": "Field Sensor"}, {"from": "data", "title": "collection", "to": "removed articles"}, {"from": "data", "title": "collection", "to": "articles without titles or abstracts"}, {"from": "data analysis", "title": "observed", "to": "overlap"}, {"from": "data analysis", "title": "disease names", "to": "population entities"}, {"from": "data analysis", "title": "interventions", "to": "chemical names"}, {"from": "treatment", "title": "continued", "to": "for"}, {"from": "treatment", "title": "many", "to": "research"}, {"from": "research", "title": "on", "to": "transfer"}, {"from": "research", "title": "on", "to": "multi-task"}, {"from": "research", "title": "Wang et al.", "to": "framework"}, {"from": "research", "title": "Rajkumar et al.", "to": "execution accuracy"}, {"from": "research", "title": "on", "to": "improve"}, {"from": "patient", "title": "had", "to": "some"}, {"from": "patient", "title": "research", "to": "on"}, {"from": "patient", "title": "received", "to": "any"}, {"from": "patient", "title": "been", "to": "normal"}, {"from": "patient", "title": "been", "to": "prescribed"}, {"from": "patient", "title": "gender", "to": "ditems.label"}, {"from": "patient", "title": "subjectid", "to": "uniquepid"}, {"from": "patient", "title": "has", "to": "chronic"}, {"from": "patient", "title": "has", "to": "both"}, {"from": "patient", "title": "approaches", "to": "require"}, {"from": "patient", "title": "disease names", "to": "ICD names"}, {"from": "patient", "title": "via", "to": "a model"}, {"from": "patient", "title": "finetuning", "to": "through"}, {"from": "patient", "title": "has", "to": "more"}, {"from": "patient", "title": "have", "to": "concave left atrial appendage"}, {"from": "patient", "title": "have", "to": "third molar sign"}, {"from": "patient", "title": "have", "to": "superiordisplacement of left main stem bronchus"}, {"from": "patient", "title": "have", "to": "rounded cardiac apex"}, {"from": "patient", "title": "have", "to": "shmoosign"}, {"from": "patient", "title": "have", "to": "Hoffman-Riglersign"}, {"from": "patient", "title": "have", "to": "tag"}, {"from": "patient", "title": "is", "to": "year-old man"}, {"from": "patient", "title": "swelling of legs and face", "to": "increasing"}, {"from": "patient", "title": "swelling of legs and face", "to": "past months"}, {"from": "patient", "title": "comes to office", "to": "has"}, {"from": "patient", "title": "comes to office", "to": "preoperative evaluation"}, {"from": "patient", "title": "comes to physician", "to": "heartburn"}, {"from": "patient", "title": "has", "to": "difficulty swallowing"}, {"from": "patient", "title": "takes over--counter antacids", "to": "relieves discomfort"}, {"from": "patient", "title": "comes to office", "to": "blood in urine"}, {"from": "patient", "title": "comes to office", "to": "blood in his urine"}, {"from": "patient", "title": "total body surface area", "to": "flame burn"}, {"from": "patient", "title": "inhalation injury", "to": "polymers"}, {"from": "patient", "title": "inhalation injury", "to": "combustion"}, {"from": "patient", "title": "has", "to": "type diabetes mellitus"}, {"from": "patient", "title": "has", "to": "metformin and vildagliptin"}, {"from": "patient", "title": "has", "to": "smoked cigarettes daily"}, {"from": "patient", "title": "has", "to": "no family history"}, {"from": "patient", "title": "has", "to": "moderate abdominal obesity"}, {"from": "patient", "title": "lived in", "to": "sub-Saharan Africa"}, {"from": "patient", "title": "came to USA", "to": "graduate school"}, {"from": "patient", "title": "lived", "to": "USA"}, {"from": "patient", "title": "is", "to": "migraine"}, {"from": "patient", "title": "is", "to": "treatment"}, {"from": "patient", "title": "continued", "to": "for"}, {"from": "patient", "title": "referred to", "to": "surgeon"}, {"from": "patient", "title": "recommended", "to": "adrenalectomy"}, {"from": "patient", "title": "no significant findings", "to": "physical examination"}, {"from": "patient", "title": "drug", "to": "items"}, {"from": "patient", "title": "in", "to": "Consultation Checklist"}, {"from": "patient", "title": "similar to", "to": "Summarization Content Units"}, {"from": "patient", "title": "is", "to": "patientweight"}, {"from": "patient", "title": "is", "to": "patientagegroup"}, {"from": "patient", "title": "is", "to": "patientsex"}, {"from": "patient", "title": "as", "to": "MedDRA"}, {"from": "patient", "title": "2-week history", "to": "fever"}, {"from": "patient", "title": "cough", "to": "shortness of breath"}, {"from": "patient", "title": "is", "to": "patient with a history of coronary artery disease"}, {"from": "patient", "title": "experiencing", "to": "lower GI bleed"}, {"from": "patient", "title": "refused", "to": "PT evaluation"}, {"from": "patient", "title": "ambulating independently", "to": "without difficulty"}, {"from": "patient", "title": "discharged to home", "to": "with her husband"}, {"from": "diagnosis", "title": "diagnosisname", "to": "prescriptions"}, {"from": "diagnosis", "title": "is", "to": "doctor"}, {"from": "diagnosis", "title": "should be selected from", "to": "possible diagnoses"}, {"from": "medical", "title": "terminology", "to": "report"}, {"from": "medical", "title": "mentions", "to": "parts of body"}, {"from": "medical", "title": "mentions", "to": "patellofemoral joint"}, {"from": "medical", "title": "mentions", "to": "intercondylar"}, {"from": "medical", "title": "mentions", "to": "damage to cartilage"}, {"from": "medical", "title": "mentions", "to": "swelling"}, {"from": "medical", "title": "mentions", "to": "damage to ligaments"}, {"from": "medical", "title": "mentions", "to": "meniscus"}, {"from": "medical", "title": "mentions", "to": "tear in semimembranosus muscle"}, {"from": "medical", "title": "says", "to": "may"}, {"from": "medical", "title": "says", "to": "ligaments"}, {"from": "medical", "title": "says", "to": "completely torn"}, {"from": "medical", "title": "says", "to": "other"}, {"from": "medical", "title": "says", "to": "okay"}, {"from": "medical", "title": "says", "to": "there"}, {"from": "medical", "title": "mentions", "to": "no evidence"}, {"from": "medical", "title": "shows", "to": "glioblastoma"}, {"from": "medical", "title": "shows", "to": "contrast-enhancing mass"}, {"from": "medical", "title": "shows", "to": "swelling around mass"}, {"from": "medical", "title": "says", "to": "there is no new mass"}, {"from": "medical", "title": "says", "to": "there are no signs of problems with blood \ufb02ow to brain"}, {"from": "medical", "title": "says", "to": "there are no signs of problems with \ufb02uid that surrounds brain"}, {"from": "medical", "title": "says", "to": "doctors have concluded"}, {"from": "medical", "title": "says", "to": "the mass on back of head is likely a type of brain tumor called a glioblastoma"}, {"from": "medical", "title": "says", "to": "the mass on front of head is not new"}, {"from": "medical", "title": "original findings", "to": "CT scans"}, {"from": "medical", "title": "mentions", "to": "some"}, {"from": "medical", "title": "mentions", "to": "some scans"}, {"from": "medical", "title": "mentions", "to": "different parts"}, {"from": "medical", "title": "mentions", "to": "infection"}, {"from": "medical", "title": "mentions", "to": "thyroid gland"}, {"from": "medical", "title": "mentions", "to": "chest or belly"}, {"from": "medical", "title": "mentions", "to": "liver"}, {"from": "medical", "title": "mentions", "to": "gallbladder"}, {"from": "medical", "title": "mentions", "to": "pancreas"}, {"from": "medical", "title": "mentions", "to": "kidneys"}, {"from": "medical", "title": "mentions", "to": "bones"}, {"from": "medical", "title": "no evidence", "to": "cancer has come back"}, {"from": "medical", "title": "says", "to": "person has cancer"}, {"from": "medical", "title": "says", "to": "treatment is working"}, {"from": "medical", "title": "says", "to": "no evidence of cancer spreading"}, {"from": "medical", "title": "says", "to": "normal heart"}, {"from": "medical", "title": "says", "to": "bigger thyroid gland"}, {"from": "medical", "title": "says", "to": "no extra \ufb02uid"}, {"from": "medical", "title": "says", "to": "no infection in lungs"}, {"from": "treatments", "title": "for migraines", "to": "include"}, {"from": "treatments", "title": "include medication", "to": "non-pharmacological therapies"}, {"from": "systems", "title": "submitted", "to": "to shared task leaderboard"}, {"from": "referrals", "title": "text", "to": "\"unspecific consultation\""}, {"from": "tests", "title": "included", "to": "taking pictures"}, {"from": "classification", "title": "problem", "to": "framing"}, {"from": "Classification", "title": "RGN", "to": "PRX"}, {"from": "healthcare", "title": "presents", "to": "distinct challenges"}, {"from": "healthcare", "title": "handling", "to": "specialized medical terminology"}, {"from": "healthcare", "title": "managing", "to": "ambiguity and variability"}, {"from": "healthcare", "title": "high demands", "to": "reliability and accuracy"}, {"from": "healthcare", "title": "industry", "to": "has seen"}, {"from": "healthcare", "title": "has seen", "to": "many"}, {"from": "healthcare", "title": "studies", "to": "have explored"}, {"from": "healthcare", "title": "attempts", "to": "to"}, {"from": "healthcare", "title": "many", "to": "challenges"}, {"from": "healthcare", "title": "even more", "to": "pronounced"}, {"from": "healthcare", "title": "summarization", "to": "CHQs"}, {"from": "healthcare", "title": "posed", "to": "by"}, {"from": "healthcare", "title": "challenges", "to": "manual"}, {"from": "healthcare", "title": "challenges", "to": "automated"}, {"from": "healthcare", "title": "automated", "to": "ICD"}, {"from": "healthcare", "title": "codes", "to": "description"}, {"from": "healthcare", "title": "is a code for", "to": "DISCUSSION AND CONCLUSION"}, {"from": "healthcare", "title": "is a code for", "to": "diseases"}, {"from": "healthcare", "title": "is a code for", "to": "heart diseases"}, {"from": "healthcare", "title": "is", "to": "a fully digitised tool"}, {"from": "healthcare", "title": "planned global implementation", "to": "of"}, {"from": "healthcare", "title": "rapid developments", "to": "in"}, {"from": "healthcare", "title": "a renewed interest", "to": "in automated ICD coding"}, {"from": "healthcare", "title": "for", "to": "ICD-labeled"}, {"from": "healthcare", "title": "labeled", "to": "discharge summaries"}, {"from": "healthcare", "title": "is", "to": "code"}, {"from": "healthcare", "title": "automated", "to": "ICD coding"}]);
|
171 |
+
|
172 |
+
nodeColors = {};
|
173 |
+
allNodes = nodes.get({ returnType: "Object" });
|
174 |
+
for (nodeId in allNodes) {
|
175 |
+
nodeColors[nodeId] = allNodes[nodeId].color;
|
176 |
+
}
|
177 |
+
allEdges = edges.get({ returnType: "Object" });
|
178 |
+
// adding nodes and edges to the graph
|
179 |
+
data = {nodes: nodes, edges: edges};
|
180 |
+
|
181 |
+
var options = {
|
182 |
+
"configure": {
|
183 |
+
"enabled": false
|
184 |
+
},
|
185 |
+
"edges": {
|
186 |
+
"color": {
|
187 |
+
"inherit": true
|
188 |
+
},
|
189 |
+
"smooth": {
|
190 |
+
"enabled": true,
|
191 |
+
"type": "dynamic"
|
192 |
+
}
|
193 |
+
},
|
194 |
+
"interaction": {
|
195 |
+
"dragNodes": true,
|
196 |
+
"hideEdgesOnDrag": false,
|
197 |
+
"hideNodesOnDrag": false
|
198 |
+
},
|
199 |
+
"physics": {
|
200 |
+
"enabled": true,
|
201 |
+
"stabilization": {
|
202 |
+
"enabled": true,
|
203 |
+
"fit": true,
|
204 |
+
"iterations": 1000,
|
205 |
+
"onlyDynamicEdges": false,
|
206 |
+
"updateInterval": 50
|
207 |
+
}
|
208 |
+
}
|
209 |
+
};
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
network = new vis.Network(container, data, options);
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
network.on("stabilizationProgress", function(params) {
|
227 |
+
document.getElementById('loadingBar').removeAttribute("style");
|
228 |
+
var maxWidth = 496;
|
229 |
+
var minWidth = 20;
|
230 |
+
var widthFactor = params.iterations/params.total;
|
231 |
+
var width = Math.max(minWidth,maxWidth * widthFactor);
|
232 |
+
document.getElementById('bar').style.width = width + 'px';
|
233 |
+
document.getElementById('text').innerHTML = Math.round(widthFactor*100) + '%';
|
234 |
+
});
|
235 |
+
network.once("stabilizationIterationsDone", function() {
|
236 |
+
document.getElementById('text').innerHTML = '100%';
|
237 |
+
document.getElementById('bar').style.width = '496px';
|
238 |
+
document.getElementById('loadingBar').style.opacity = 0;
|
239 |
+
// really clean the dom element
|
240 |
+
setTimeout(function () {document.getElementById('loadingBar').style.display = 'none';}, 500);
|
241 |
+
});
|
242 |
+
|
243 |
+
|
244 |
+
return network;
|
245 |
+
|
246 |
+
}
|
247 |
+
drawGraph();
|
248 |
+
</script>
|
249 |
+
</body>
|
250 |
+
</html>
|
lib/bindings/utils.js
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function neighbourhoodHighlight(params) {
|
2 |
+
// console.log("in nieghbourhoodhighlight");
|
3 |
+
allNodes = nodes.get({ returnType: "Object" });
|
4 |
+
// originalNodes = JSON.parse(JSON.stringify(allNodes));
|
5 |
+
// if something is selected:
|
6 |
+
if (params.nodes.length > 0) {
|
7 |
+
highlightActive = true;
|
8 |
+
var i, j;
|
9 |
+
var selectedNode = params.nodes[0];
|
10 |
+
var degrees = 2;
|
11 |
+
|
12 |
+
// mark all nodes as hard to read.
|
13 |
+
for (let nodeId in allNodes) {
|
14 |
+
// nodeColors[nodeId] = allNodes[nodeId].color;
|
15 |
+
allNodes[nodeId].color = "rgba(200,200,200,0.5)";
|
16 |
+
if (allNodes[nodeId].hiddenLabel === undefined) {
|
17 |
+
allNodes[nodeId].hiddenLabel = allNodes[nodeId].label;
|
18 |
+
allNodes[nodeId].label = undefined;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
var connectedNodes = network.getConnectedNodes(selectedNode);
|
22 |
+
var allConnectedNodes = [];
|
23 |
+
|
24 |
+
// get the second degree nodes
|
25 |
+
for (i = 1; i < degrees; i++) {
|
26 |
+
for (j = 0; j < connectedNodes.length; j++) {
|
27 |
+
allConnectedNodes = allConnectedNodes.concat(
|
28 |
+
network.getConnectedNodes(connectedNodes[j])
|
29 |
+
);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
// all second degree nodes get a different color and their label back
|
34 |
+
for (i = 0; i < allConnectedNodes.length; i++) {
|
35 |
+
// allNodes[allConnectedNodes[i]].color = "pink";
|
36 |
+
allNodes[allConnectedNodes[i]].color = "rgba(150,150,150,0.75)";
|
37 |
+
if (allNodes[allConnectedNodes[i]].hiddenLabel !== undefined) {
|
38 |
+
allNodes[allConnectedNodes[i]].label =
|
39 |
+
allNodes[allConnectedNodes[i]].hiddenLabel;
|
40 |
+
allNodes[allConnectedNodes[i]].hiddenLabel = undefined;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// all first degree nodes get their own color and their label back
|
45 |
+
for (i = 0; i < connectedNodes.length; i++) {
|
46 |
+
// allNodes[connectedNodes[i]].color = undefined;
|
47 |
+
allNodes[connectedNodes[i]].color = nodeColors[connectedNodes[i]];
|
48 |
+
if (allNodes[connectedNodes[i]].hiddenLabel !== undefined) {
|
49 |
+
allNodes[connectedNodes[i]].label =
|
50 |
+
allNodes[connectedNodes[i]].hiddenLabel;
|
51 |
+
allNodes[connectedNodes[i]].hiddenLabel = undefined;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
// the main node gets its own color and its label back.
|
56 |
+
// allNodes[selectedNode].color = undefined;
|
57 |
+
allNodes[selectedNode].color = nodeColors[selectedNode];
|
58 |
+
if (allNodes[selectedNode].hiddenLabel !== undefined) {
|
59 |
+
allNodes[selectedNode].label = allNodes[selectedNode].hiddenLabel;
|
60 |
+
allNodes[selectedNode].hiddenLabel = undefined;
|
61 |
+
}
|
62 |
+
} else if (highlightActive === true) {
|
63 |
+
// console.log("highlightActive was true");
|
64 |
+
// reset all nodes
|
65 |
+
for (let nodeId in allNodes) {
|
66 |
+
// allNodes[nodeId].color = "purple";
|
67 |
+
allNodes[nodeId].color = nodeColors[nodeId];
|
68 |
+
// delete allNodes[nodeId].color;
|
69 |
+
if (allNodes[nodeId].hiddenLabel !== undefined) {
|
70 |
+
allNodes[nodeId].label = allNodes[nodeId].hiddenLabel;
|
71 |
+
allNodes[nodeId].hiddenLabel = undefined;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
highlightActive = false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// transform the object into an array
|
78 |
+
var updateArray = [];
|
79 |
+
if (params.nodes.length > 0) {
|
80 |
+
for (let nodeId in allNodes) {
|
81 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
82 |
+
// console.log(allNodes[nodeId]);
|
83 |
+
updateArray.push(allNodes[nodeId]);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
nodes.update(updateArray);
|
87 |
+
} else {
|
88 |
+
// console.log("Nothing was selected");
|
89 |
+
for (let nodeId in allNodes) {
|
90 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
91 |
+
// console.log(allNodes[nodeId]);
|
92 |
+
// allNodes[nodeId].color = {};
|
93 |
+
updateArray.push(allNodes[nodeId]);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
nodes.update(updateArray);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
function filterHighlight(params) {
|
101 |
+
allNodes = nodes.get({ returnType: "Object" });
|
102 |
+
// if something is selected:
|
103 |
+
if (params.nodes.length > 0) {
|
104 |
+
filterActive = true;
|
105 |
+
let selectedNodes = params.nodes;
|
106 |
+
|
107 |
+
// hiding all nodes and saving the label
|
108 |
+
for (let nodeId in allNodes) {
|
109 |
+
allNodes[nodeId].hidden = true;
|
110 |
+
if (allNodes[nodeId].savedLabel === undefined) {
|
111 |
+
allNodes[nodeId].savedLabel = allNodes[nodeId].label;
|
112 |
+
allNodes[nodeId].label = undefined;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
for (let i=0; i < selectedNodes.length; i++) {
|
117 |
+
allNodes[selectedNodes[i]].hidden = false;
|
118 |
+
if (allNodes[selectedNodes[i]].savedLabel !== undefined) {
|
119 |
+
allNodes[selectedNodes[i]].label = allNodes[selectedNodes[i]].savedLabel;
|
120 |
+
allNodes[selectedNodes[i]].savedLabel = undefined;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
} else if (filterActive === true) {
|
125 |
+
// reset all nodes
|
126 |
+
for (let nodeId in allNodes) {
|
127 |
+
allNodes[nodeId].hidden = false;
|
128 |
+
if (allNodes[nodeId].savedLabel !== undefined) {
|
129 |
+
allNodes[nodeId].label = allNodes[nodeId].savedLabel;
|
130 |
+
allNodes[nodeId].savedLabel = undefined;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
filterActive = false;
|
134 |
+
}
|
135 |
+
|
136 |
+
// transform the object into an array
|
137 |
+
var updateArray = [];
|
138 |
+
if (params.nodes.length > 0) {
|
139 |
+
for (let nodeId in allNodes) {
|
140 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
141 |
+
updateArray.push(allNodes[nodeId]);
|
142 |
+
}
|
143 |
+
}
|
144 |
+
nodes.update(updateArray);
|
145 |
+
} else {
|
146 |
+
for (let nodeId in allNodes) {
|
147 |
+
if (allNodes.hasOwnProperty(nodeId)) {
|
148 |
+
updateArray.push(allNodes[nodeId]);
|
149 |
+
}
|
150 |
+
}
|
151 |
+
nodes.update(updateArray);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
function selectNode(nodes) {
|
156 |
+
network.selectNodes(nodes);
|
157 |
+
neighbourhoodHighlight({ nodes: nodes });
|
158 |
+
return nodes;
|
159 |
+
}
|
160 |
+
|
161 |
+
function selectNodes(nodes) {
|
162 |
+
network.selectNodes(nodes);
|
163 |
+
filterHighlight({nodes: nodes});
|
164 |
+
return nodes;
|
165 |
+
}
|
166 |
+
|
167 |
+
function highlightFilter(filter) {
|
168 |
+
let selectedNodes = []
|
169 |
+
let selectedProp = filter['property']
|
170 |
+
if (filter['item'] === 'node') {
|
171 |
+
let allNodes = nodes.get({ returnType: "Object" });
|
172 |
+
for (let nodeId in allNodes) {
|
173 |
+
if (allNodes[nodeId][selectedProp] && filter['value'].includes((allNodes[nodeId][selectedProp]).toString())) {
|
174 |
+
selectedNodes.push(nodeId)
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
else if (filter['item'] === 'edge'){
|
179 |
+
let allEdges = edges.get({returnType: 'object'});
|
180 |
+
// check if the selected property exists for selected edge and select the nodes connected to the edge
|
181 |
+
for (let edge in allEdges) {
|
182 |
+
if (allEdges[edge][selectedProp] && filter['value'].includes((allEdges[edge][selectedProp]).toString())) {
|
183 |
+
selectedNodes.push(allEdges[edge]['from'])
|
184 |
+
selectedNodes.push(allEdges[edge]['to'])
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
selectNodes(selectedNodes)
|
189 |
+
}
|
lib/tom-select/tom-select.complete.min.js
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Tom Select v2.0.0-rc.4
|
3 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
*/
|
5 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TomSelect=t()}(this,(function(){"use strict"
|
6 |
+
function e(e,t){e.split(/\s+/).forEach((e=>{t(e)}))}class t{constructor(){this._events={}}on(t,i){e(t,(e=>{this._events[e]=this._events[e]||[],this._events[e].push(i)}))}off(t,i){var s=arguments.length
|
7 |
+
0!==s?e(t,(e=>{if(1===s)return delete this._events[e]
|
8 |
+
e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(i),1)})):this._events={}}trigger(t,...i){var s=this
|
9 |
+
e(t,(e=>{if(e in s._events!=!1)for(let t of s._events[e])t.apply(s,i)}))}}var i
|
10 |
+
const s="[̀-ͯ·ʾ]",n=new RegExp(s,"g")
|
11 |
+
var o
|
12 |
+
const r={"æ":"ae","ⱥ":"a","ø":"o"},l=new RegExp(Object.keys(r).join("|"),"g"),a=[[67,67],[160,160],[192,438],[452,652],[961,961],[1019,1019],[1083,1083],[1281,1289],[1984,1984],[5095,5095],[7429,7441],[7545,7549],[7680,7935],[8580,8580],[9398,9449],[11360,11391],[42792,42793],[42802,42851],[42873,42897],[42912,42922],[64256,64260],[65313,65338],[65345,65370]],c=e=>e.normalize("NFKD").replace(n,"").toLowerCase().replace(l,(function(e){return r[e]})),d=(e,t="|")=>{if(1==e.length)return e[0]
|
13 |
+
var i=1
|
14 |
+
return e.forEach((e=>{i=Math.max(i,e.length)})),1==i?"["+e.join("")+"]":"(?:"+e.join(t)+")"},p=e=>{if(1===e.length)return[[e]]
|
15 |
+
var t=[]
|
16 |
+
return p(e.substring(1)).forEach((function(i){var s=i.slice(0)
|
17 |
+
s[0]=e.charAt(0)+s[0],t.push(s),(s=i.slice(0)).unshift(e.charAt(0)),t.push(s)})),t},u=e=>{void 0===o&&(o=(()=>{var e={}
|
18 |
+
a.forEach((t=>{for(let s=t[0];s<=t[1];s++){let t=String.fromCharCode(s),n=c(t)
|
19 |
+
if(n!=t.toLowerCase()){n in e||(e[n]=[n])
|
20 |
+
var i=new RegExp(d(e[n]),"iu")
|
21 |
+
t.match(i)||e[n].push(t)}}}))
|
22 |
+
var t=Object.keys(e)
|
23 |
+
t=t.sort(((e,t)=>t.length-e.length)),i=new RegExp("("+d(t)+"[̀-ͯ·ʾ]*)","g")
|
24 |
+
var s={}
|
25 |
+
return t.sort(((e,t)=>e.length-t.length)).forEach((t=>{var i=p(t).map((t=>(t=t.map((t=>e.hasOwnProperty(t)?d(e[t]):t)),d(t,""))))
|
26 |
+
s[t]=d(i)})),s})())
|
27 |
+
return e.normalize("NFKD").toLowerCase().split(i).map((e=>{if(""==e)return""
|
28 |
+
const t=c(e)
|
29 |
+
if(o.hasOwnProperty(t))return o[t]
|
30 |
+
const i=e.normalize("NFC")
|
31 |
+
return i!=e?d([e,i]):e})).join("")},h=(e,t)=>{if(e)return e[t]},g=(e,t)=>{if(e){for(var i,s=t.split(".");(i=s.shift())&&(e=e[i]););return e}},f=(e,t,i)=>{var s,n
|
32 |
+
return e?-1===(n=(e+="").search(t.regex))?0:(s=t.string.length/e.length,0===n&&(s+=.5),s*i):0},v=e=>(e+"").replace(/([\$\(-\+\.\?\[-\^\{-\}])/g,"\\$1"),m=(e,t)=>{var i=e[t]
|
33 |
+
if("function"==typeof i)return i
|
34 |
+
i&&!Array.isArray(i)&&(e[t]=[i])},y=(e,t)=>{if(Array.isArray(e))e.forEach(t)
|
35 |
+
else for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},O=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=c(e+"").toLowerCase())>(t=c(t+"").toLowerCase())?1:t>e?-1:0
|
36 |
+
class b{constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,i){if(!e||!e.length)return[]
|
37 |
+
const s=[],n=e.split(/\s+/)
|
38 |
+
var o
|
39 |
+
return i&&(o=new RegExp("^("+Object.keys(i).map(v).join("|")+"):(.*)$")),n.forEach((e=>{let i,n=null,r=null
|
40 |
+
o&&(i=e.match(o))&&(n=i[1],e=i[2]),e.length>0&&(r=v(e),this.settings.diacritics&&(r=u(r)),t&&(r="\\b"+r)),s.push({string:e,regex:r?new RegExp(r,"iu"):null,field:n})})),s}getScoreFunction(e,t){var i=this.prepareSearch(e,t)
|
41 |
+
return this._getScoreFunction(i)}_getScoreFunction(e){const t=e.tokens,i=t.length
|
42 |
+
if(!i)return function(){return 0}
|
43 |
+
const s=e.options.fields,n=e.weights,o=s.length,r=e.getAttrFn
|
44 |
+
if(!o)return function(){return 1}
|
45 |
+
const l=1===o?function(e,t){const i=s[0].field
|
46 |
+
return f(r(t,i),e,n[i])}:function(e,t){var i=0
|
47 |
+
if(e.field){const s=r(t,e.field)
|
48 |
+
!e.regex&&s?i+=1/o:i+=f(s,e,1)}else y(n,((s,n)=>{i+=f(r(t,n),e,s)}))
|
49 |
+
return i/o}
|
50 |
+
return 1===i?function(e){return l(t[0],e)}:"and"===e.options.conjunction?function(e){for(var s,n=0,o=0;n<i;n++){if((s=l(t[n],e))<=0)return 0
|
51 |
+
o+=s}return o/i}:function(e){var s=0
|
52 |
+
return y(t,(t=>{s+=l(t,e)})),s/i}}getSortFunction(e,t){var i=this.prepareSearch(e,t)
|
53 |
+
return this._getSortFunction(i)}_getSortFunction(e){var t,i,s
|
54 |
+
const n=this,o=e.options,r=!e.query&&o.sort_empty?o.sort_empty:o.sort,l=[],a=[]
|
55 |
+
if("function"==typeof r)return r.bind(this)
|
56 |
+
const c=function(t,i){return"$score"===t?i.score:e.getAttrFn(n.items[i.id],t)}
|
57 |
+
if(r)for(t=0,i=r.length;t<i;t++)(e.query||"$score"!==r[t].field)&&l.push(r[t])
|
58 |
+
if(e.query){for(s=!0,t=0,i=l.length;t<i;t++)if("$score"===l[t].field){s=!1
|
59 |
+
break}s&&l.unshift({field:"$score",direction:"desc"})}else for(t=0,i=l.length;t<i;t++)if("$score"===l[t].field){l.splice(t,1)
|
60 |
+
break}for(t=0,i=l.length;t<i;t++)a.push("desc"===l[t].direction?-1:1)
|
61 |
+
const d=l.length
|
62 |
+
if(d){if(1===d){const e=l[0].field,t=a[0]
|
63 |
+
return function(i,s){return t*O(c(e,i),c(e,s))}}return function(e,t){var i,s,n
|
64 |
+
for(i=0;i<d;i++)if(n=l[i].field,s=a[i]*O(c(n,e),c(n,t)))return s
|
65 |
+
return 0}}return null}prepareSearch(e,t){const i={}
|
66 |
+
var s=Object.assign({},t)
|
67 |
+
if(m(s,"sort"),m(s,"sort_empty"),s.fields){m(s,"fields")
|
68 |
+
const e=[]
|
69 |
+
s.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),i[t.field]="weight"in t?t.weight:1})),s.fields=e}return{options:s,query:e.toLowerCase().trim(),tokens:this.tokenize(e,s.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:s.nesting?g:h}}search(e,t){var i,s,n=this
|
70 |
+
s=this.prepareSearch(e,t),t=s.options,e=s.query
|
71 |
+
const o=t.score||n._getScoreFunction(s)
|
72 |
+
e.length?y(n.items,((e,n)=>{i=o(e),(!1===t.filter||i>0)&&s.items.push({score:i,id:n})})):y(n.items,((e,t)=>{s.items.push({score:1,id:t})}))
|
73 |
+
const r=n._getSortFunction(s)
|
74 |
+
return r&&s.items.sort(r),s.total=s.items.length,"number"==typeof t.limit&&(s.items=s.items.slice(0,t.limit)),s}}const w=e=>{if(e.jquery)return e[0]
|
75 |
+
if(e instanceof HTMLElement)return e
|
76 |
+
if(e.indexOf("<")>-1){let t=document.createElement("div")
|
77 |
+
return t.innerHTML=e.trim(),t.firstChild}return document.querySelector(e)},_=(e,t)=>{var i=document.createEvent("HTMLEvents")
|
78 |
+
i.initEvent(t,!0,!1),e.dispatchEvent(i)},I=(e,t)=>{Object.assign(e.style,t)},C=(e,...t)=>{var i=A(t);(e=x(e)).map((e=>{i.map((t=>{e.classList.add(t)}))}))},S=(e,...t)=>{var i=A(t);(e=x(e)).map((e=>{i.map((t=>{e.classList.remove(t)}))}))},A=e=>{var t=[]
|
79 |
+
return y(e,(e=>{"string"==typeof e&&(e=e.trim().split(/[\11\12\14\15\40]/)),Array.isArray(e)&&(t=t.concat(e))})),t.filter(Boolean)},x=e=>(Array.isArray(e)||(e=[e]),e),k=(e,t,i)=>{if(!i||i.contains(e))for(;e&&e.matches;){if(e.matches(t))return e
|
80 |
+
e=e.parentNode}},F=(e,t=0)=>t>0?e[e.length-1]:e[0],L=(e,t)=>{if(!e)return-1
|
81 |
+
t=t||e.nodeName
|
82 |
+
for(var i=0;e=e.previousElementSibling;)e.matches(t)&&i++
|
83 |
+
return i},P=(e,t)=>{y(t,((t,i)=>{null==t?e.removeAttribute(i):e.setAttribute(i,""+t)}))},E=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},T=(e,t)=>{if(null===t)return
|
84 |
+
if("string"==typeof t){if(!t.length)return
|
85 |
+
t=new RegExp(t,"i")}const i=e=>3===e.nodeType?(e=>{var i=e.data.match(t)
|
86 |
+
if(i&&e.data.length>0){var s=document.createElement("span")
|
87 |
+
s.className="highlight"
|
88 |
+
var n=e.splitText(i.index)
|
89 |
+
n.splitText(i[0].length)
|
90 |
+
var o=n.cloneNode(!0)
|
91 |
+
return s.appendChild(o),E(n,s),1}return 0})(e):((e=>{if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var t=0;t<e.childNodes.length;++t)t+=i(e.childNodes[t])})(e),0)
|
92 |
+
i(e)},V="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey"
|
93 |
+
var j={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}}
|
94 |
+
const q=e=>null==e?null:D(e),D=e=>"boolean"==typeof e?e?"1":"0":e+"",N=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),z=(e,t)=>{var i
|
95 |
+
return function(s,n){var o=this
|
96 |
+
i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[s]=!0,e.call(o,s,n)}),t)}},R=(e,t,i)=>{var s,n=e.trigger,o={}
|
97 |
+
for(s in e.trigger=function(){var i=arguments[0]
|
98 |
+
if(-1===t.indexOf(i))return n.apply(e,arguments)
|
99 |
+
o[i]=arguments},i.apply(e,[]),e.trigger=n,o)n.apply(e,o[s])},H=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},B=(e,t,i,s)=>{e.addEventListener(t,i,s)},K=(e,t)=>!!t&&(!!t[e]&&1===(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0)),M=(e,t)=>{const i=e.getAttribute("id")
|
100 |
+
return i||(e.setAttribute("id",t),t)},Q=e=>e.replace(/[\\"']/g,"\\$&"),G=(e,t)=>{t&&e.append(t)}
|
101 |
+
function U(e,t){var i=Object.assign({},j,t),s=i.dataAttr,n=i.labelField,o=i.valueField,r=i.disabledField,l=i.optgroupField,a=i.optgroupLabelField,c=i.optgroupValueField,d=e.tagName.toLowerCase(),p=e.getAttribute("placeholder")||e.getAttribute("data-placeholder")
|
102 |
+
if(!p&&!i.allowEmptyOption){let t=e.querySelector('option[value=""]')
|
103 |
+
t&&(p=t.textContent)}var u,h,g,f,v,m,O={placeholder:p,options:[],optgroups:[],items:[],maxItems:null}
|
104 |
+
return"select"===d?(h=O.options,g={},f=1,v=e=>{var t=Object.assign({},e.dataset),i=s&&t[s]
|
105 |
+
return"string"==typeof i&&i.length&&(t=Object.assign(t,JSON.parse(i))),t},m=(e,t)=>{var s=q(e.value)
|
106 |
+
if(null!=s&&(s||i.allowEmptyOption)){if(g.hasOwnProperty(s)){if(t){var a=g[s][l]
|
107 |
+
a?Array.isArray(a)?a.push(t):g[s][l]=[a,t]:g[s][l]=t}}else{var c=v(e)
|
108 |
+
c[n]=c[n]||e.textContent,c[o]=c[o]||s,c[r]=c[r]||e.disabled,c[l]=c[l]||t,c.$option=e,g[s]=c,h.push(c)}e.selected&&O.items.push(s)}},O.maxItems=e.hasAttribute("multiple")?null:1,y(e.children,(e=>{var t,i,s
|
109 |
+
"optgroup"===(u=e.tagName.toLowerCase())?((s=v(t=e))[a]=s[a]||t.getAttribute("label")||"",s[c]=s[c]||f++,s[r]=s[r]||t.disabled,O.optgroups.push(s),i=s[c],y(t.children,(e=>{m(e,i)}))):"option"===u&&m(e)}))):(()=>{const t=e.getAttribute(s)
|
110 |
+
if(t)O.options=JSON.parse(t),y(O.options,(e=>{O.items.push(e[o])}))
|
111 |
+
else{var r=e.value.trim()||""
|
112 |
+
if(!i.allowEmptyOption&&!r.length)return
|
113 |
+
const t=r.split(i.delimiter)
|
114 |
+
y(t,(e=>{const t={}
|
115 |
+
t[n]=e,t[o]=e,O.options.push(t)})),O.items=t}})(),Object.assign({},j,O,t)}var W=0
|
116 |
+
class J extends(function(e){return e.plugins={},class extends e{constructor(...e){super(...e),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,i){e.plugins[t]={name:t,fn:i}}initializePlugins(e){var t,i
|
117 |
+
const s=this,n=[]
|
118 |
+
if(Array.isArray(e))e.forEach((e=>{"string"==typeof e?n.push(e):(s.plugins.settings[e.name]=e.options,n.push(e.name))}))
|
119 |
+
else if(e)for(t in e)e.hasOwnProperty(t)&&(s.plugins.settings[t]=e[t],n.push(t))
|
120 |
+
for(;i=n.shift();)s.require(i)}loadPlugin(t){var i=this,s=i.plugins,n=e.plugins[t]
|
121 |
+
if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin')
|
122 |
+
s.requested[t]=!0,s.loaded[t]=n.fn.apply(i,[i.plugins.settings[t]||{}]),s.names.push(t)}require(e){var t=this,i=t.plugins
|
123 |
+
if(!t.plugins.loaded.hasOwnProperty(e)){if(i.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")')
|
124 |
+
t.loadPlugin(e)}return i.loaded[e]}}}(t)){constructor(e,t){var i
|
125 |
+
super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],W++
|
126 |
+
var s=w(e)
|
127 |
+
if(s.tomselect)throw new Error("Tom Select already initialized on this element")
|
128 |
+
s.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(s,null)).getPropertyValue("direction")
|
129 |
+
const n=U(s,t)
|
130 |
+
this.settings=n,this.input=s,this.tabIndex=s.tabIndex||0,this.is_select_tag="select"===s.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=M(s,"tomselect-"+W),this.isRequired=s.required,this.sifter=new b(this.options,{diacritics:n.diacritics}),n.mode=n.mode||(1===n.maxItems?"single":"multi"),"boolean"!=typeof n.hideSelected&&(n.hideSelected="multi"===n.mode),"boolean"!=typeof n.hidePlaceholder&&(n.hidePlaceholder="multi"!==n.mode)
|
131 |
+
var o=n.createFilter
|
132 |
+
"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?n.createFilter=e=>o.test(e):n.createFilter=()=>!0),this.initializePlugins(n.plugins),this.setupCallbacks(),this.setupTemplates()
|
133 |
+
const r=w("<div>"),l=w("<div>"),a=this._render("dropdown"),c=w('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",p=n.mode
|
134 |
+
var u
|
135 |
+
if(C(r,n.wrapperClass,d,p),C(l,n.controlClass),G(r,l),C(a,n.dropdownClass,p),n.copyClassesToDropdown&&C(a,d),C(c,n.dropdownContentClass),G(a,c),w(n.dropdownParent||r).appendChild(a),n.hasOwnProperty("controlInput"))n.controlInput?(u=w(n.controlInput),this.focus_node=u):(u=w("<input/>"),this.focus_node=l)
|
136 |
+
else{u=w('<input type="text" autocomplete="off" size="1" />')
|
137 |
+
y(["autocorrect","autocapitalize","autocomplete"],(e=>{s.getAttribute(e)&&P(u,{[e]:s.getAttribute(e)})})),u.tabIndex=-1,l.appendChild(u),this.focus_node=u}this.wrapper=r,this.dropdown=a,this.dropdown_content=c,this.control=l,this.control_input=u,this.setup()}setup(){const e=this,t=e.settings,i=e.control_input,s=e.dropdown,n=e.dropdown_content,o=e.wrapper,r=e.control,l=e.input,a=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown"
|
138 |
+
P(n,{id:d}),P(a,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d})
|
139 |
+
const p=M(a,e.inputId+"-ts-control"),u="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",h=document.querySelector(u),g=e.focus.bind(e)
|
140 |
+
if(h){B(h,"click",g),P(h,{for:p})
|
141 |
+
const t=M(h,e.inputId+"-ts-label")
|
142 |
+
P(a,{"aria-labelledby":t}),P(n,{"aria-labelledby":t})}if(o.style.width=l.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-")
|
143 |
+
C([o,s],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&P(l,{multiple:"multiple"}),e.settings.placeholder&&P(i,{placeholder:t.placeholder}),!e.settings.splitOn&&e.settings.delimiter&&(e.settings.splitOn=new RegExp("\\s*"+v(e.settings.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=z(t.load,t.loadThrottle)),e.control_input.type=l.type,B(s,"click",(t=>{const i=k(t.target,"[data-selectable]")
|
144 |
+
i&&(e.onOptionSelect(t,i),H(t,!0))})),B(r,"click",(t=>{var s=k(t.target,"[data-ts-item]",r)
|
145 |
+
s&&e.onItemSelect(t,s)?H(t,!0):""==i.value&&(e.onClick(),H(t,!0))})),B(i,"mousedown",(e=>{""!==i.value&&e.stopPropagation()})),B(a,"keydown",(t=>e.onKeyDown(t))),B(i,"keypress",(t=>e.onKeyPress(t))),B(i,"input",(t=>e.onInput(t))),B(a,"resize",(()=>e.positionDropdown()),c),B(a,"blur",(t=>e.onBlur(t))),B(a,"focus",(t=>e.onFocus(t))),B(a,"paste",(t=>e.onPaste(t)))
|
146 |
+
const f=t=>{const i=t.composedPath()[0]
|
147 |
+
if(!o.contains(i)&&!s.contains(i))return e.isFocused&&e.blur(),void e.inputState()
|
148 |
+
H(t,!0)}
|
149 |
+
var m=()=>{e.isOpen&&e.positionDropdown()}
|
150 |
+
B(document,"mousedown",f),B(window,"scroll",m,c),B(window,"resize",m,c),this._destroy=()=>{document.removeEventListener("mousedown",f),window.removeEventListener("sroll",m),window.removeEventListener("resize",m),h&&h.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,B(l,"invalid",(t=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())})),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,l.disabled?e.disable():e.enable(),e.on("change",this.onChange),C(l,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),y(t,(e=>{this.registerOptionGroup(e)}))}setupTemplates(){var e=this,t=e.settings.labelField,i=e.settings.optgroupLabelField,s={optgroup:e=>{let t=document.createElement("div")
|
151 |
+
return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[i])+"</div>",option:(e,i)=>"<div>"+i(e[t])+"</div>",item:(e,i)=>"<div>"+i(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"}
|
152 |
+
e.settings.render=Object.assign({},s,e.settings.render)}setupCallbacks(){var e,t,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"}
|
153 |
+
for(e in i)(t=this.settings[i[e]])&&this.on(e,t)}sync(e=!0){const t=this,i=e?U(t.input,{delimiter:t.settings.delimiter}):t.settings
|
154 |
+
t.setupOptions(i.options,i.optgroups),t.setValue(i.items,!0),t.lastQuery=null}onClick(){var e=this
|
155 |
+
if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus()
|
156 |
+
e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){_(this.input,"input"),_(this.input,"change")}onPaste(e){var t=this
|
157 |
+
t.isFull()||t.isInputHidden||t.isLocked?H(e):t.settings.splitOn&&setTimeout((()=>{var e=t.inputValue()
|
158 |
+
if(e.match(t.settings.splitOn)){var i=e.trim().split(t.settings.splitOn)
|
159 |
+
y(i,(e=>{t.createItem(e)}))}}),0)}onKeyPress(e){var t=this
|
160 |
+
if(!t.isLocked){var i=String.fromCharCode(e.keyCode||e.which)
|
161 |
+
return t.settings.create&&"multi"===t.settings.mode&&i===t.settings.delimiter?(t.createItem(),void H(e)):void 0}H(e)}onKeyDown(e){var t=this
|
162 |
+
if(t.isLocked)9!==e.keyCode&&H(e)
|
163 |
+
else{switch(e.keyCode){case 65:if(K(V,e))return H(e),void t.selectAll()
|
164 |
+
break
|
165 |
+
case 27:return t.isOpen&&(H(e,!0),t.close()),void t.clearActiveItems()
|
166 |
+
case 40:if(!t.isOpen&&t.hasOptions)t.open()
|
167 |
+
else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1)
|
168 |
+
e&&t.setActiveOption(e)}return void H(e)
|
169 |
+
case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1)
|
170 |
+
e&&t.setActiveOption(e)}return void H(e)
|
171 |
+
case 13:return void(t.isOpen&&t.activeOption?(t.onOptionSelect(e,t.activeOption),H(e)):t.settings.create&&t.createItem()&&H(e))
|
172 |
+
case 37:return void t.advanceSelection(-1,e)
|
173 |
+
case 39:return void t.advanceSelection(1,e)
|
174 |
+
case 9:return void(t.settings.selectOnTab&&(t.isOpen&&t.activeOption&&(t.onOptionSelect(e,t.activeOption),H(e)),t.settings.create&&t.createItem()&&H(e)))
|
175 |
+
case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!K(V,e)&&H(e)}}onInput(e){var t=this
|
176 |
+
if(!t.isLocked){var i=t.inputValue()
|
177 |
+
t.lastValue!==i&&(t.lastValue=i,t.settings.shouldLoad.call(t,i)&&t.load(i),t.refreshOptions(),t.trigger("type",i))}}onFocus(e){var t=this,i=t.isFocused
|
178 |
+
if(t.isDisabled)return t.blur(),void H(e)
|
179 |
+
t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),i||t.trigger("focus"),t.activeItems.length||(t.showInput(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this
|
180 |
+
if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1
|
181 |
+
var i=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")}
|
182 |
+
t.settings.create&&t.settings.createOnBlur?t.createItem(null,!1,i):i()}}}onOptionSelect(e,t){var i,s=this
|
183 |
+
t&&(t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?s.createItem(null,!0,(()=>{s.settings.closeAfterSelect&&s.close()})):void 0!==(i=t.dataset.value)&&(s.lastQuery=null,s.addItem(i),s.settings.closeAfterSelect&&s.close(),!s.settings.hideSelected&&e.type&&/click/.test(e.type)&&s.setActiveOption(t))))}onItemSelect(e,t){var i=this
|
184 |
+
return!i.isLocked&&"multi"===i.settings.mode&&(H(e),i.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this
|
185 |
+
if(!t.canLoad(e))return
|
186 |
+
C(t.wrapper,t.settings.loadingClass),t.loading++
|
187 |
+
const i=t.loadCallback.bind(t)
|
188 |
+
t.settings.load.call(t,e,i)}loadCallback(e,t){const i=this
|
189 |
+
i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(e,t),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||S(i.wrapper,i.settings.loadingClass),i.trigger("load",e,t)}preload(){var e=this.wrapper.classList
|
190 |
+
e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input
|
191 |
+
t.value!==e&&(t.value=e,_(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){R(this,t?[]:["change"],(()=>{this.clear(t),this.addItems(e,t)}))}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var i,s,n,o,r,l,a=this
|
192 |
+
if("single"!==a.settings.mode){if(!e)return a.clearActiveItems(),void(a.isFocused&&a.showInput())
|
193 |
+
if("click"===(i=t&&t.type.toLowerCase())&&K("shiftKey",t)&&a.activeItems.length){for(l=a.getLastActive(),(n=Array.prototype.indexOf.call(a.control.children,l))>(o=Array.prototype.indexOf.call(a.control.children,e))&&(r=n,n=o,o=r),s=n;s<=o;s++)e=a.control.children[s],-1===a.activeItems.indexOf(e)&&a.setActiveItemClass(e)
|
194 |
+
H(t)}else"click"===i&&K(V,t)||"keydown"===i&&K("shiftKey",t)?e.classList.contains("active")?a.removeActiveItem(e):a.setActiveItemClass(e):(a.clearActiveItems(),a.setActiveItemClass(e))
|
195 |
+
a.hideInput(),a.isFocused||a.focus()}}setActiveItemClass(e){const t=this,i=t.control.querySelector(".last-active")
|
196 |
+
i&&S(i,"last-active"),C(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e)
|
197 |
+
this.activeItems.splice(t,1),S(e,"active")}clearActiveItems(){S(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,P(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),P(e,{"aria-selected":"true"}),C(e,"active"),this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return
|
198 |
+
const i=this.dropdown_content,s=i.clientHeight,n=i.scrollTop||0,o=e.offsetHeight,r=e.getBoundingClientRect().top-i.getBoundingClientRect().top+n
|
199 |
+
r+o>s+n?this.scroll(r-s+o,t):r<n&&this.scroll(r,t)}scroll(e,t){const i=this.dropdown_content
|
200 |
+
t&&(i.style.scrollBehavior=t),i.scrollTop=e,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(S(this.activeOption,"active"),P(this.activeOption,{"aria-selected":null})),this.activeOption=null,P(this.focus_node,{"aria-activedescendant":null})}selectAll(){if("single"===this.settings.mode)return
|
201 |
+
const e=this.controlChildren()
|
202 |
+
e.length&&(this.hideInput(),this.close(),this.activeItems=e,C(e,"active"))}inputState(){var e=this
|
203 |
+
e.control.contains(e.control_input)&&(P(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&P(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var e=this
|
204 |
+
e.isDisabled||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout((()=>{e.ignoreFocus=!1,e.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField
|
205 |
+
return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,i,s,n=this,o=this.getSearchOptions()
|
206 |
+
if(n.settings.score&&"function"!=typeof(s=n.settings.score.call(n,e)))throw new Error('Tom Select "score" setting must be a function that returns a function')
|
207 |
+
if(e!==n.lastQuery?(n.lastQuery=e,i=n.sifter.search(e,Object.assign(o,{score:s})),n.currentResults=i):i=Object.assign({},n.currentResults),n.settings.hideSelected)for(t=i.items.length-1;t>=0;t--){let e=q(i.items[t].id)
|
208 |
+
e&&-1!==n.items.indexOf(e)&&i.items.splice(t,1)}return i}refreshOptions(e=!0){var t,i,s,n,o,r,l,a,c,d,p
|
209 |
+
const u={},h=[]
|
210 |
+
var g,f=this,v=f.inputValue(),m=f.search(v),O=f.activeOption,b=f.settings.shouldOpen||!1,w=f.dropdown_content
|
211 |
+
for(O&&(c=O.dataset.value,d=O.closest("[data-group]")),n=m.items.length,"number"==typeof f.settings.maxOptions&&(n=Math.min(n,f.settings.maxOptions)),n>0&&(b=!0),t=0;t<n;t++){let e=m.items[t].id,n=f.options[e],l=f.getOption(e,!0)
|
212 |
+
for(f.settings.hideSelected||l.classList.toggle("selected",f.items.includes(e)),o=n[f.settings.optgroupField]||"",i=0,s=(r=Array.isArray(o)?o:[o])&&r.length;i<s;i++)o=r[i],f.optgroups.hasOwnProperty(o)||(o=""),u.hasOwnProperty(o)||(u[o]=document.createDocumentFragment(),h.push(o)),i>0&&(l=l.cloneNode(!0),P(l,{id:n.$id+"-clone-"+i,"aria-selected":null}),l.classList.add("ts-cloned"),S(l,"active")),c==e&&d&&d.dataset.group===o&&(O=l),u[o].appendChild(l)}this.settings.lockOptgroupOrder&&h.sort(((e,t)=>(f.optgroups[e]&&f.optgroups[e].$order||0)-(f.optgroups[t]&&f.optgroups[t].$order||0))),l=document.createDocumentFragment(),y(h,(e=>{if(f.optgroups.hasOwnProperty(e)&&u[e].children.length){let t=document.createDocumentFragment(),i=f.render("optgroup_header",f.optgroups[e])
|
213 |
+
G(t,i),G(t,u[e])
|
214 |
+
let s=f.render("optgroup",{group:f.optgroups[e],options:t})
|
215 |
+
G(l,s)}else G(l,u[e])})),w.innerHTML="",G(w,l),f.settings.highlight&&(g=w.querySelectorAll("span.highlight"),Array.prototype.forEach.call(g,(function(e){var t=e.parentNode
|
216 |
+
t.replaceChild(e.firstChild,e),t.normalize()})),m.query.length&&m.tokens.length&&y(m.tokens,(e=>{T(w,e.regex)})))
|
217 |
+
var _=e=>{let t=f.render(e,{input:v})
|
218 |
+
return t&&(b=!0,w.insertBefore(t,w.firstChild)),t}
|
219 |
+
if(f.loading?_("loading"):f.settings.shouldLoad.call(f,v)?0===m.items.length&&_("no_results"):_("not_loading"),(a=f.canCreate(v))&&(p=_("option_create")),f.hasOptions=m.items.length>0||a,b){if(m.items.length>0){if(!w.contains(O)&&"single"===f.settings.mode&&f.items.length&&(O=f.getOption(f.items[0])),!w.contains(O)){let e=0
|
220 |
+
p&&!f.settings.addPrecedence&&(e=1),O=f.selectable()[e]}}else p&&(O=p)
|
221 |
+
e&&!f.isOpen&&(f.open(),f.scrollToOption(O,"auto")),f.setActiveOption(O)}else f.clearActiveOption(),e&&f.isOpen&&f.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const i=this
|
222 |
+
if(Array.isArray(e))return i.addOptions(e,t),!1
|
223 |
+
const s=q(e[i.settings.valueField])
|
224 |
+
return null!==s&&!i.options.hasOwnProperty(s)&&(e.$order=e.$order||++i.order,e.$id=i.inputId+"-opt-"+e.$order,i.options[s]=e,i.lastQuery=null,t&&(i.userOptions[s]=t,i.trigger("option_add",s,e)),s)}addOptions(e,t=!1){y(e,(e=>{this.addOption(e,t)}))}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=q(e[this.settings.optgroupValueField])
|
225 |
+
return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var i
|
226 |
+
t[this.settings.optgroupValueField]=e,(i=this.registerOptionGroup(t))&&this.trigger("optgroup_add",i,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const i=this
|
227 |
+
var s,n
|
228 |
+
const o=q(e),r=q(t[i.settings.valueField])
|
229 |
+
if(null===o)return
|
230 |
+
if(!i.options.hasOwnProperty(o))return
|
231 |
+
if("string"!=typeof r)throw new Error("Value must be set in option data")
|
232 |
+
const l=i.getOption(o),a=i.getItem(o)
|
233 |
+
if(t.$order=t.$order||i.options[o].$order,delete i.options[o],i.uncacheValue(r),i.options[r]=t,l){if(i.dropdown_content.contains(l)){const e=i._render("option",t)
|
234 |
+
E(l,e),i.activeOption===l&&i.setActiveOption(e)}l.remove()}a&&(-1!==(n=i.items.indexOf(o))&&i.items.splice(n,1,r),s=i._render("item",t),a.classList.contains("active")&&C(s,"active"),E(a,s)),i.lastQuery=null}removeOption(e,t){const i=this
|
235 |
+
e=D(e),i.uncacheValue(e),delete i.userOptions[e],delete i.options[e],i.lastQuery=null,i.trigger("option_remove",e),i.removeItem(e,t)}clearOptions(){this.loadedSearches={},this.userOptions={},this.clearCache()
|
236 |
+
var e={}
|
237 |
+
y(this.options,((t,i)=>{this.items.indexOf(i)>=0&&(e[i]=this.options[i])})),this.options=this.sifter.items=e,this.lastQuery=null,this.trigger("option_clear")}getOption(e,t=!1){const i=q(e)
|
238 |
+
if(null!==i&&this.options.hasOwnProperty(i)){const e=this.options[i]
|
239 |
+
if(e.$div)return e.$div
|
240 |
+
if(t)return this._render("option",e)}return null}getAdjacent(e,t,i="option"){var s
|
241 |
+
if(!e)return null
|
242 |
+
s="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]")
|
243 |
+
for(let i=0;i<s.length;i++)if(s[i]==e)return t>0?s[i+1]:s[i-1]
|
244 |
+
return null}getItem(e){if("object"==typeof e)return e
|
245 |
+
var t=q(e)
|
246 |
+
return null!==t?this.control.querySelector(`[data-value="${Q(t)}"]`):null}addItems(e,t){var i=this,s=Array.isArray(e)?e:[e]
|
247 |
+
for(let e=0,n=(s=s.filter((e=>-1===i.items.indexOf(e)))).length;e<n;e++)i.isPending=e<n-1,i.addItem(s[e],t)}addItem(e,t){R(this,t?[]:["change"],(()=>{var i,s
|
248 |
+
const n=this,o=n.settings.mode,r=q(e)
|
249 |
+
if((!r||-1===n.items.indexOf(r)||("single"===o&&n.close(),"single"!==o&&n.settings.duplicates))&&null!==r&&n.options.hasOwnProperty(r)&&("single"===o&&n.clear(t),"multi"!==o||!n.isFull())){if(i=n._render("item",n.options[r]),n.control.contains(i)&&(i=i.cloneNode(!0)),s=n.isFull(),n.items.splice(n.caretPos,0,r),n.insertAtCaret(i),n.isSetup){if(!n.isPending&&n.settings.hideSelected){let e=n.getOption(r),t=n.getAdjacent(e,1)
|
250 |
+
t&&n.setActiveOption(t)}n.isPending||n.refreshOptions(n.isFocused&&"single"!==o),0!=n.settings.closeAfterSelect&&n.isFull()?n.close():n.isPending||n.positionDropdown(),n.trigger("item_add",r,i),n.isPending||n.updateOriginalInput({silent:t})}(!n.isPending||!s&&n.isFull())&&(n.inputState(),n.refreshState())}}))}removeItem(e=null,t){const i=this
|
251 |
+
if(!(e=i.getItem(e)))return
|
252 |
+
var s,n
|
253 |
+
const o=e.dataset.value
|
254 |
+
s=L(e),e.remove(),e.classList.contains("active")&&(n=i.activeItems.indexOf(e),i.activeItems.splice(n,1),S(e,"active")),i.items.splice(s,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,t),s<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:t}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,e)}createItem(e=null,t=!0,i=(()=>{})){var s,n=this,o=n.caretPos
|
255 |
+
if(e=e||n.inputValue(),!n.canCreate(e))return i(),!1
|
256 |
+
n.lock()
|
257 |
+
var r=!1,l=e=>{if(n.unlock(),!e||"object"!=typeof e)return i()
|
258 |
+
var s=q(e[n.settings.valueField])
|
259 |
+
if("string"!=typeof s)return i()
|
260 |
+
n.setTextboxValue(),n.addOption(e,!0),n.setCaret(o),n.addItem(s),n.refreshOptions(t&&"single"!==n.settings.mode),i(e),r=!0}
|
261 |
+
return s="function"==typeof n.settings.create?n.settings.create.call(this,e,l):{[n.settings.labelField]:e,[n.settings.valueField]:e},r||l(s),!0}refreshItems(){var e=this
|
262 |
+
e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this
|
263 |
+
e.refreshValidityState()
|
264 |
+
const t=e.isFull(),i=e.isLocked
|
265 |
+
e.wrapper.classList.toggle("rtl",e.rtl)
|
266 |
+
const s=e.wrapper.classList
|
267 |
+
var n
|
268 |
+
s.toggle("focus",e.isFocused),s.toggle("disabled",e.isDisabled),s.toggle("required",e.isRequired),s.toggle("invalid",!e.isValid),s.toggle("locked",i),s.toggle("full",t),s.toggle("input-active",e.isFocused&&!e.isInputHidden),s.toggle("dropdown-active",e.isOpen),s.toggle("has-options",(n=e.options,0===Object.keys(n).length)),s.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this
|
269 |
+
e.input.checkValidity&&(e.isValid=e.input.checkValidity(),e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this
|
270 |
+
var i,s
|
271 |
+
const n=t.input.querySelector('option[value=""]')
|
272 |
+
if(t.is_select_tag){const e=[]
|
273 |
+
function o(i,s,o){return i||(i=w('<option value="'+N(s)+'">'+N(o)+"</option>")),i!=n&&t.input.append(i),e.push(i),i.selected=!0,i}t.input.querySelectorAll("option:checked").forEach((e=>{e.selected=!1})),0==t.items.length&&"single"==t.settings.mode?o(n,"",""):t.items.forEach((n=>{if(i=t.options[n],s=i[t.settings.labelField]||"",e.includes(i.$option)){o(t.input.querySelector(`option[value="${Q(n)}"]:not(:checked)`),n,s)}else i.$option=o(i.$option,n,s)}))}else t.input.value=t.getValue()
|
274 |
+
t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this
|
275 |
+
e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,P(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),I(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),I(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,i=t.isOpen
|
276 |
+
e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.hideInput()),t.isOpen=!1,P(t.focus_node,{"aria-expanded":"false"}),I(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),i&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),i=e.offsetHeight+t.top+window.scrollY,s=t.left+window.scrollX
|
277 |
+
I(this.dropdown,{width:t.width+"px",top:i+"px",left:s+"px"})}}clear(e){var t=this
|
278 |
+
if(t.items.length){var i=t.controlChildren()
|
279 |
+
y(i,(e=>{t.removeItem(e,!0)})),t.showInput(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,i=t.caretPos,s=t.control
|
280 |
+
s.insertBefore(e,s.children[i]),t.setCaret(i+1)}deleteSelection(e){var t,i,s,n,o,r=this
|
281 |
+
t=e&&8===e.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)}
|
282 |
+
const l=[]
|
283 |
+
if(r.activeItems.length)n=F(r.activeItems,t),s=L(n),t>0&&s++,y(r.activeItems,(e=>l.push(e)))
|
284 |
+
else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren()
|
285 |
+
t<0&&0===i.start&&0===i.length?l.push(e[r.caretPos-1]):t>0&&i.start===r.inputValue().length&&l.push(e[r.caretPos])}const a=l.map((e=>e.dataset.value))
|
286 |
+
if(!a.length||"function"==typeof r.settings.onDelete&&!1===r.settings.onDelete.call(r,a,e))return!1
|
287 |
+
for(H(e,!0),void 0!==s&&r.setCaret(s);l.length;)r.removeItem(l.pop())
|
288 |
+
return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}advanceSelection(e,t){var i,s,n=this
|
289 |
+
n.rtl&&(e*=-1),n.inputValue().length||(K(V,t)||K("shiftKey",t)?(s=(i=n.getLastActive(e))?i.classList.contains("active")?n.getAdjacent(i,e,"item"):i:e>0?n.control_input.nextElementSibling:n.control_input.previousElementSibling)&&(s.classList.contains("active")&&n.removeActiveItem(i),n.setActiveItemClass(s)):n.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active")
|
290 |
+
if(t)return t
|
291 |
+
var i=this.control.querySelectorAll(".active")
|
292 |
+
return i?F(i,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.close(),this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var e=this
|
293 |
+
e.input.disabled=!0,e.control_input.disabled=!0,e.focus_node.tabIndex=-1,e.isDisabled=!0,e.lock()}enable(){var e=this
|
294 |
+
e.input.disabled=!1,e.control_input.disabled=!1,e.focus_node.tabIndex=e.tabIndex,e.isDisabled=!1,e.unlock()}destroy(){var e=this,t=e.revertSettings
|
295 |
+
e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,S(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){return"function"!=typeof this.settings.render[e]?null:this._render(e,t)}_render(e,t){var i,s,n=""
|
296 |
+
const o=this
|
297 |
+
return"option"!==e&&"item"!=e||(n=D(t[o.settings.valueField])),null==(s=o.settings.render[e].call(this,t,N))||(s=w(s),"option"===e||"option_create"===e?t[o.settings.disabledField]?P(s,{"aria-disabled":"true"}):P(s,{"data-selectable":""}):"optgroup"===e&&(i=t.group[o.settings.optgroupValueField],P(s,{"data-group":i}),t.group[o.settings.disabledField]&&P(s,{"data-disabled":""})),"option"!==e&&"item"!==e||(P(s,{"data-value":n}),"item"===e?(C(s,o.settings.itemClass),P(s,{"data-ts-item":""})):(C(s,o.settings.optionClass),P(s,{role:"option",id:t.$id}),o.options[n].$div=s))),s}clearCache(){y(this.options,((e,t)=>{e.$div&&(e.$div.remove(),delete e.$div)}))}uncacheValue(e){const t=this.getOption(e)
|
298 |
+
t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,i){var s=this,n=s[t]
|
299 |
+
s[t]=function(){var t,o
|
300 |
+
return"after"===e&&(t=n.apply(s,arguments)),o=i.apply(s,arguments),"instead"===e?o:("before"===e&&(t=n.apply(s,arguments)),t)}}}return J.define("change_listener",(function(){B(this.input,"change",(()=>{this.sync()}))})),J.define("checkbox_options",(function(){var e=this,t=e.onOptionSelect
|
301 |
+
e.settings.hideSelected=!1
|
302 |
+
var i=function(e){setTimeout((()=>{var t=e.querySelector("input")
|
303 |
+
e.classList.contains("selected")?t.checked=!0:t.checked=!1}),1)}
|
304 |
+
e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option
|
305 |
+
e.settings.render.option=(i,s)=>{var n=w(t.call(e,i,s)),o=document.createElement("input")
|
306 |
+
o.addEventListener("click",(function(e){H(e)})),o.type="checkbox"
|
307 |
+
const r=q(i[e.settings.valueField])
|
308 |
+
return r&&e.items.indexOf(r)>-1&&(o.checked=!0),n.prepend(o),n}})),e.on("item_remove",(t=>{var s=e.getOption(t)
|
309 |
+
s&&(s.classList.remove("selected"),i(s))})),e.hook("instead","onOptionSelect",((s,n)=>{if(n.classList.contains("selected"))return n.classList.remove("selected"),e.removeItem(n.dataset.value),e.refreshOptions(),void H(s,!0)
|
310 |
+
t.call(e,s,n),i(n)}))})),J.define("clear_button",(function(e){const t=this,i=Object.assign({className:"clear-button",title:"Clear All",html:e=>`<div class="${e.className}" title="${e.title}">×</div>`},e)
|
311 |
+
t.on("initialize",(()=>{var e=w(i.html(i))
|
312 |
+
e.addEventListener("click",(e=>{t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation()})),t.control.appendChild(e)}))})),J.define("drag_drop",(function(){var e=this
|
313 |
+
if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".')
|
314 |
+
if("multi"===e.settings.mode){var t=e.lock,i=e.unlock
|
315 |
+
e.hook("instead","lock",(()=>{var i=$(e.control).data("sortable")
|
316 |
+
return i&&i.disable(),t.call(e)})),e.hook("instead","unlock",(()=>{var t=$(e.control).data("sortable")
|
317 |
+
return t&&t.enable(),i.call(e)})),e.on("initialize",(()=>{var t=$(e.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:(e,i)=>{i.placeholder.css("width",i.helper.css("width")),t.css({overflow:"visible"})},stop:()=>{t.css({overflow:"hidden"})
|
318 |
+
var i=[]
|
319 |
+
t.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),e.setValue(i)}})}))}})),J.define("dropdown_header",(function(e){const t=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">×</a></div></div>'},e)
|
320 |
+
t.on("initialize",(()=>{var e=w(i.html(i)),s=e.querySelector("."+i.closeClass)
|
321 |
+
s&&s.addEventListener("click",(e=>{H(e,!0),t.close()})),t.dropdown.insertBefore(e,t.dropdown.firstChild)}))})),J.define("caret_position",(function(){var e=this
|
322 |
+
e.hook("instead","setCaret",(t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach(((i,s)=>{s<t?e.control_input.insertAdjacentElement("beforebegin",i):e.control.appendChild(i)})):t=e.items.length,e.caretPos=t})),e.hook("instead","moveCaret",(t=>{if(!e.isFocused)return
|
323 |
+
const i=e.getLastActive(t)
|
324 |
+
if(i){const s=L(i)
|
325 |
+
e.setCaret(t>0?s+1:s),e.setActiveItem()}else e.setCaret(e.caretPos+t)}))})),J.define("dropdown_input",(function(){var e=this
|
326 |
+
e.settings.shouldOpen=!0,e.hook("before","setup",(()=>{e.focus_node=e.control,C(e.control_input,"dropdown-input")
|
327 |
+
const t=w('<div class="dropdown-input-wrap">')
|
328 |
+
t.append(e.control_input),e.dropdown.insertBefore(t,e.dropdown.firstChild)})),e.on("initialize",(()=>{e.control_input.addEventListener("keydown",(t=>{switch(t.keyCode){case 27:return e.isOpen&&(H(t,!0),e.close()),void e.clearActiveItems()
|
329 |
+
case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)})),e.on("blur",(()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex})),e.on("dropdown_open",(()=>{e.control_input.focus()}))
|
330 |
+
const t=e.onBlur
|
331 |
+
e.hook("instead","onBlur",(i=>{if(!i||i.relatedTarget!=e.control_input)return t.call(e)})),B(e.control_input,"blur",(()=>e.onBlur())),e.hook("before","close",(()=>{e.isOpen&&e.focus_node.focus()}))}))})),J.define("input_autogrow",(function(){var e=this
|
332 |
+
e.on("initialize",(()=>{var t=document.createElement("span"),i=e.control_input
|
333 |
+
t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t)
|
334 |
+
for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=i.style[e]
|
335 |
+
var s=()=>{e.items.length>0?(t.textContent=i.value,i.style.width=t.clientWidth+"px"):i.style.width=""}
|
336 |
+
s(),e.on("update item_add item_remove",s),B(i,"input",s),B(i,"keyup",s),B(i,"blur",s),B(i,"update",s)}))})),J.define("no_backspace_delete",(function(){var e=this,t=e.deleteSelection
|
337 |
+
this.hook("instead","deleteSelection",(i=>!!e.activeItems.length&&t.call(e,i)))})),J.define("no_active_items",(function(){this.hook("instead","setActiveItem",(()=>{})),this.hook("instead","selectAll",(()=>{}))})),J.define("optgroup_columns",(function(){var e=this,t=e.onKeyDown
|
338 |
+
e.hook("instead","onKeyDown",(i=>{var s,n,o,r
|
339 |
+
if(!e.isOpen||37!==i.keyCode&&39!==i.keyCode)return t.call(e,i)
|
340 |
+
r=k(e.activeOption,"[data-group]"),s=L(e.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(n=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,s)])&&e.setActiveOption(n)}))})),J.define("remove_button",(function(e){const t=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},e)
|
341 |
+
var i=this
|
342 |
+
if(t.append){var s='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+N(t.title)+'">'+t.label+"</a>"
|
343 |
+
i.hook("after","setupTemplates",(()=>{var e=i.settings.render.item
|
344 |
+
i.settings.render.item=(t,n)=>{var o=w(e.call(i,t,n)),r=w(s)
|
345 |
+
return o.appendChild(r),B(r,"mousedown",(e=>{H(e,!0)})),B(r,"click",(e=>{if(H(e,!0),!i.isLocked){var t=o.dataset.value
|
346 |
+
i.removeItem(t),i.refreshOptions(!1)}})),o}}))}})),J.define("restore_on_backspace",(function(e){const t=this,i=Object.assign({text:e=>e[t.settings.labelField]},e)
|
347 |
+
t.on("item_remove",(function(e){if(""===t.control_input.value.trim()){var s=t.options[e]
|
348 |
+
s&&t.setTextboxValue(i.text.call(t,s))}}))})),J.define("virtual_scroll",(function(){const e=this,t=e.canLoad,i=e.clearActiveOption,s=e.loadCallback
|
349 |
+
var n,o={},r=!1
|
350 |
+
if(!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method"
|
351 |
+
function l(t){return!("number"==typeof e.settings.maxOptions&&n.children.length>=e.settings.maxOptions)&&!(!(t in o)||!o[t])}e.settings.sortField=[{field:"$order"},{field:"$score"}],e.setNextUrl=function(e,t){o[e]=t},e.getUrl=function(t){if(t in o){const e=o[t]
|
352 |
+
return o[t]=!1,e}return o={},e.settings.firstUrl(t)},e.hook("instead","clearActiveOption",(()=>{if(!r)return i.call(e)})),e.hook("instead","canLoad",(i=>i in o?l(i):t.call(e,i))),e.hook("instead","loadCallback",((t,i)=>{r||e.clearOptions(),s.call(e,t,i),r=!1})),e.hook("after","refreshOptions",(()=>{const t=e.lastValue
|
353 |
+
var i
|
354 |
+
l(t)?(i=e.render("loading_more",{query:t}))&&i.setAttribute("data-selectable",""):t in o&&!n.querySelector(".no-results")&&(i=e.render("no_more_results",{query:t})),i&&(C(i,e.settings.optionClass),n.append(i))})),e.on("initialize",(()=>{n=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:function(){return'<div class="loading-more-results">Loading more results ... </div>'},no_more_results:function(){return'<div class="no-more-results">No more results</div>'}},e.settings.render),n.addEventListener("scroll",(function(){n.clientHeight/(n.scrollHeight-n.scrollTop)<.95||l(e.lastValue)&&(r||(r=!0,e.load.call(e,e.lastValue)))}))}))})),J}))
|
355 |
+
var tomSelect=function(e,t){return new TomSelect(e,t)}
|
356 |
+
//# sourceMappingURL=tom-select.complete.min.js.map
|
lib/tom-select/tom-select.css
ADDED
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* tom-select.css (v2.0.0-rc.4)
|
3 |
+
* Copyright (c) contributors
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
6 |
+
* file except in compliance with the License. You may obtain a copy of the License at:
|
7 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
*
|
9 |
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
10 |
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
+
* ANY KIND, either express or implied. See the License for the specific language
|
12 |
+
* governing permissions and limitations under the License.
|
13 |
+
*
|
14 |
+
*/
|
15 |
+
.ts-wrapper.plugin-drag_drop.multi > .ts-control > div.ui-sortable-placeholder {
|
16 |
+
visibility: visible !important;
|
17 |
+
background: #f2f2f2 !important;
|
18 |
+
background: rgba(0, 0, 0, 0.06) !important;
|
19 |
+
border: 0 none !important;
|
20 |
+
box-shadow: inset 0 0 12px 4px #fff; }
|
21 |
+
|
22 |
+
.ts-wrapper.plugin-drag_drop .ui-sortable-placeholder::after {
|
23 |
+
content: '!';
|
24 |
+
visibility: hidden; }
|
25 |
+
|
26 |
+
.ts-wrapper.plugin-drag_drop .ui-sortable-helper {
|
27 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
|
28 |
+
|
29 |
+
.plugin-checkbox_options .option input {
|
30 |
+
margin-right: 0.5rem; }
|
31 |
+
|
32 |
+
.plugin-clear_button .ts-control {
|
33 |
+
padding-right: calc( 1em + (3 * 6px)) !important; }
|
34 |
+
|
35 |
+
.plugin-clear_button .clear-button {
|
36 |
+
opacity: 0;
|
37 |
+
position: absolute;
|
38 |
+
top: 8px;
|
39 |
+
right: calc(8px - 6px);
|
40 |
+
margin-right: 0 !important;
|
41 |
+
background: transparent !important;
|
42 |
+
transition: opacity 0.5s;
|
43 |
+
cursor: pointer; }
|
44 |
+
|
45 |
+
.plugin-clear_button.single .clear-button {
|
46 |
+
right: calc(8px - 6px + 2rem); }
|
47 |
+
|
48 |
+
.plugin-clear_button.focus.has-items .clear-button,
|
49 |
+
.plugin-clear_button:hover.has-items .clear-button {
|
50 |
+
opacity: 1; }
|
51 |
+
|
52 |
+
.ts-wrapper .dropdown-header {
|
53 |
+
position: relative;
|
54 |
+
padding: 10px 8px;
|
55 |
+
border-bottom: 1px solid #d0d0d0;
|
56 |
+
background: #f8f8f8;
|
57 |
+
border-radius: 3px 3px 0 0; }
|
58 |
+
|
59 |
+
.ts-wrapper .dropdown-header-close {
|
60 |
+
position: absolute;
|
61 |
+
right: 8px;
|
62 |
+
top: 50%;
|
63 |
+
color: #303030;
|
64 |
+
opacity: 0.4;
|
65 |
+
margin-top: -12px;
|
66 |
+
line-height: 20px;
|
67 |
+
font-size: 20px !important; }
|
68 |
+
|
69 |
+
.ts-wrapper .dropdown-header-close:hover {
|
70 |
+
color: black; }
|
71 |
+
|
72 |
+
.plugin-dropdown_input.focus.dropdown-active .ts-control {
|
73 |
+
box-shadow: none;
|
74 |
+
border: 1px solid #d0d0d0; }
|
75 |
+
|
76 |
+
.plugin-dropdown_input .dropdown-input {
|
77 |
+
border: 1px solid #d0d0d0;
|
78 |
+
border-width: 0 0 1px 0;
|
79 |
+
display: block;
|
80 |
+
padding: 8px 8px;
|
81 |
+
box-shadow: none;
|
82 |
+
width: 100%;
|
83 |
+
background: transparent; }
|
84 |
+
|
85 |
+
.ts-wrapper.plugin-input_autogrow.has-items .ts-control > input {
|
86 |
+
min-width: 0; }
|
87 |
+
|
88 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input {
|
89 |
+
flex: none;
|
90 |
+
min-width: 4px; }
|
91 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-webkit-input-placeholder {
|
92 |
+
color: transparent; }
|
93 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::-ms-input-placeholder {
|
94 |
+
color: transparent; }
|
95 |
+
.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control > input::placeholder {
|
96 |
+
color: transparent; }
|
97 |
+
|
98 |
+
.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content {
|
99 |
+
display: flex; }
|
100 |
+
|
101 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup {
|
102 |
+
border-right: 1px solid #f2f2f2;
|
103 |
+
border-top: 0 none;
|
104 |
+
flex-grow: 1;
|
105 |
+
flex-basis: 0;
|
106 |
+
min-width: 0; }
|
107 |
+
|
108 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup:last-child {
|
109 |
+
border-right: 0 none; }
|
110 |
+
|
111 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup:before {
|
112 |
+
display: none; }
|
113 |
+
|
114 |
+
.ts-dropdown.plugin-optgroup_columns .optgroup-header {
|
115 |
+
border-top: 0 none; }
|
116 |
+
|
117 |
+
.ts-wrapper.plugin-remove_button .item {
|
118 |
+
display: inline-flex;
|
119 |
+
align-items: center;
|
120 |
+
padding-right: 0 !important; }
|
121 |
+
|
122 |
+
.ts-wrapper.plugin-remove_button .item .remove {
|
123 |
+
color: inherit;
|
124 |
+
text-decoration: none;
|
125 |
+
vertical-align: middle;
|
126 |
+
display: inline-block;
|
127 |
+
padding: 2px 6px;
|
128 |
+
border-left: 1px solid #d0d0d0;
|
129 |
+
border-radius: 0 2px 2px 0;
|
130 |
+
box-sizing: border-box;
|
131 |
+
margin-left: 6px; }
|
132 |
+
|
133 |
+
.ts-wrapper.plugin-remove_button .item .remove:hover {
|
134 |
+
background: rgba(0, 0, 0, 0.05); }
|
135 |
+
|
136 |
+
.ts-wrapper.plugin-remove_button .item.active .remove {
|
137 |
+
border-left-color: #cacaca; }
|
138 |
+
|
139 |
+
.ts-wrapper.plugin-remove_button.disabled .item .remove:hover {
|
140 |
+
background: none; }
|
141 |
+
|
142 |
+
.ts-wrapper.plugin-remove_button.disabled .item .remove {
|
143 |
+
border-left-color: white; }
|
144 |
+
|
145 |
+
.ts-wrapper.plugin-remove_button .remove-single {
|
146 |
+
position: absolute;
|
147 |
+
right: 0;
|
148 |
+
top: 0;
|
149 |
+
font-size: 23px; }
|
150 |
+
|
151 |
+
.ts-wrapper {
|
152 |
+
position: relative; }
|
153 |
+
|
154 |
+
.ts-dropdown,
|
155 |
+
.ts-control,
|
156 |
+
.ts-control input {
|
157 |
+
color: #303030;
|
158 |
+
font-family: inherit;
|
159 |
+
font-size: 13px;
|
160 |
+
line-height: 18px;
|
161 |
+
font-smoothing: inherit; }
|
162 |
+
|
163 |
+
.ts-control,
|
164 |
+
.ts-wrapper.single.input-active .ts-control {
|
165 |
+
background: #fff;
|
166 |
+
cursor: text; }
|
167 |
+
|
168 |
+
.ts-control {
|
169 |
+
border: 1px solid #d0d0d0;
|
170 |
+
padding: 8px 8px;
|
171 |
+
width: 100%;
|
172 |
+
overflow: hidden;
|
173 |
+
position: relative;
|
174 |
+
z-index: 1;
|
175 |
+
box-sizing: border-box;
|
176 |
+
box-shadow: none;
|
177 |
+
border-radius: 3px;
|
178 |
+
display: flex;
|
179 |
+
flex-wrap: wrap; }
|
180 |
+
.ts-wrapper.multi.has-items .ts-control {
|
181 |
+
padding: calc( 8px - 2px - 0) 8px calc( 8px - 2px - 3px - 0); }
|
182 |
+
.full .ts-control {
|
183 |
+
background-color: #fff; }
|
184 |
+
.disabled .ts-control,
|
185 |
+
.disabled .ts-control * {
|
186 |
+
cursor: default !important; }
|
187 |
+
.focus .ts-control {
|
188 |
+
box-shadow: none; }
|
189 |
+
.ts-control > * {
|
190 |
+
vertical-align: baseline;
|
191 |
+
display: inline-block; }
|
192 |
+
.ts-wrapper.multi .ts-control > div {
|
193 |
+
cursor: pointer;
|
194 |
+
margin: 0 3px 3px 0;
|
195 |
+
padding: 2px 6px;
|
196 |
+
background: #f2f2f2;
|
197 |
+
color: #303030;
|
198 |
+
border: 0 solid #d0d0d0; }
|
199 |
+
.ts-wrapper.multi .ts-control > div.active {
|
200 |
+
background: #e8e8e8;
|
201 |
+
color: #303030;
|
202 |
+
border: 0 solid #cacaca; }
|
203 |
+
.ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active {
|
204 |
+
color: #7d7c7c;
|
205 |
+
background: white;
|
206 |
+
border: 0 solid white; }
|
207 |
+
.ts-control > input {
|
208 |
+
flex: 1 1 auto;
|
209 |
+
min-width: 7rem;
|
210 |
+
display: inline-block !important;
|
211 |
+
padding: 0 !important;
|
212 |
+
min-height: 0 !important;
|
213 |
+
max-height: none !important;
|
214 |
+
max-width: 100% !important;
|
215 |
+
margin: 0 !important;
|
216 |
+
text-indent: 0 !important;
|
217 |
+
border: 0 none !important;
|
218 |
+
background: none !important;
|
219 |
+
line-height: inherit !important;
|
220 |
+
-webkit-user-select: auto !important;
|
221 |
+
-moz-user-select: auto !important;
|
222 |
+
-ms-user-select: auto !important;
|
223 |
+
user-select: auto !important;
|
224 |
+
box-shadow: none !important; }
|
225 |
+
.ts-control > input::-ms-clear {
|
226 |
+
display: none; }
|
227 |
+
.ts-control > input:focus {
|
228 |
+
outline: none !important; }
|
229 |
+
.has-items .ts-control > input {
|
230 |
+
margin: 0 4px !important; }
|
231 |
+
.ts-control.rtl {
|
232 |
+
text-align: right; }
|
233 |
+
.ts-control.rtl.single .ts-control:after {
|
234 |
+
left: 15px;
|
235 |
+
right: auto; }
|
236 |
+
.ts-control.rtl .ts-control > input {
|
237 |
+
margin: 0 4px 0 -2px !important; }
|
238 |
+
.disabled .ts-control {
|
239 |
+
opacity: 0.5;
|
240 |
+
background-color: #fafafa; }
|
241 |
+
.input-hidden .ts-control > input {
|
242 |
+
opacity: 0;
|
243 |
+
position: absolute;
|
244 |
+
left: -10000px; }
|
245 |
+
|
246 |
+
.ts-dropdown {
|
247 |
+
position: absolute;
|
248 |
+
top: 100%;
|
249 |
+
left: 0;
|
250 |
+
width: 100%;
|
251 |
+
z-index: 10;
|
252 |
+
border: 1px solid #d0d0d0;
|
253 |
+
background: #fff;
|
254 |
+
margin: 0.25rem 0 0 0;
|
255 |
+
border-top: 0 none;
|
256 |
+
box-sizing: border-box;
|
257 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
258 |
+
border-radius: 0 0 3px 3px; }
|
259 |
+
.ts-dropdown [data-selectable] {
|
260 |
+
cursor: pointer;
|
261 |
+
overflow: hidden; }
|
262 |
+
.ts-dropdown [data-selectable] .highlight {
|
263 |
+
background: rgba(125, 168, 208, 0.2);
|
264 |
+
border-radius: 1px; }
|
265 |
+
.ts-dropdown .option,
|
266 |
+
.ts-dropdown .optgroup-header,
|
267 |
+
.ts-dropdown .no-results,
|
268 |
+
.ts-dropdown .create {
|
269 |
+
padding: 5px 8px; }
|
270 |
+
.ts-dropdown .option, .ts-dropdown [data-disabled], .ts-dropdown [data-disabled] [data-selectable].option {
|
271 |
+
cursor: inherit;
|
272 |
+
opacity: 0.5; }
|
273 |
+
.ts-dropdown [data-selectable].option {
|
274 |
+
opacity: 1;
|
275 |
+
cursor: pointer; }
|
276 |
+
.ts-dropdown .optgroup:first-child .optgroup-header {
|
277 |
+
border-top: 0 none; }
|
278 |
+
.ts-dropdown .optgroup-header {
|
279 |
+
color: #303030;
|
280 |
+
background: #fff;
|
281 |
+
cursor: default; }
|
282 |
+
.ts-dropdown .create:hover,
|
283 |
+
.ts-dropdown .option:hover,
|
284 |
+
.ts-dropdown .active {
|
285 |
+
background-color: #f5fafd;
|
286 |
+
color: #495c68; }
|
287 |
+
.ts-dropdown .create:hover.create,
|
288 |
+
.ts-dropdown .option:hover.create,
|
289 |
+
.ts-dropdown .active.create {
|
290 |
+
color: #495c68; }
|
291 |
+
.ts-dropdown .create {
|
292 |
+
color: rgba(48, 48, 48, 0.5); }
|
293 |
+
.ts-dropdown .spinner {
|
294 |
+
display: inline-block;
|
295 |
+
width: 30px;
|
296 |
+
height: 30px;
|
297 |
+
margin: 5px 8px; }
|
298 |
+
.ts-dropdown .spinner:after {
|
299 |
+
content: " ";
|
300 |
+
display: block;
|
301 |
+
width: 24px;
|
302 |
+
height: 24px;
|
303 |
+
margin: 3px;
|
304 |
+
border-radius: 50%;
|
305 |
+
border: 5px solid #d0d0d0;
|
306 |
+
border-color: #d0d0d0 transparent #d0d0d0 transparent;
|
307 |
+
animation: lds-dual-ring 1.2s linear infinite; }
|
308 |
+
|
309 |
+
@keyframes lds-dual-ring {
|
310 |
+
0% {
|
311 |
+
transform: rotate(0deg); }
|
312 |
+
100% {
|
313 |
+
transform: rotate(360deg); } }
|
314 |
+
|
315 |
+
.ts-dropdown-content {
|
316 |
+
overflow-y: auto;
|
317 |
+
overflow-x: hidden;
|
318 |
+
max-height: 200px;
|
319 |
+
overflow-scrolling: touch;
|
320 |
+
scroll-behavior: smooth; }
|
321 |
+
|
322 |
+
.ts-hidden-accessible {
|
323 |
+
border: 0 !important;
|
324 |
+
clip: rect(0 0 0 0) !important;
|
325 |
+
-webkit-clip-path: inset(50%) !important;
|
326 |
+
clip-path: inset(50%) !important;
|
327 |
+
height: 1px !important;
|
328 |
+
overflow: hidden !important;
|
329 |
+
padding: 0 !important;
|
330 |
+
position: absolute !important;
|
331 |
+
width: 1px !important;
|
332 |
+
white-space: nowrap !important; }
|
333 |
+
|
334 |
+
/*# sourceMappingURL=tom-select.css.map */
|
lib/vis-9.1.2/vis-network.css
ADDED
The diff for this file is too large to render.
See raw diff
|
|
lib/vis-9.1.2/vis-network.min.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
requirements.txt
CHANGED
@@ -15,6 +15,7 @@ python-dotenv
|
|
15 |
cohere
|
16 |
baseten
|
17 |
st-star-rating
|
|
|
18 |
amazon-dax-client>=1.1.7
|
19 |
boto3>=1.26.79
|
20 |
pytest>=7.2.1
|
|
|
15 |
cohere
|
16 |
baseten
|
17 |
st-star-rating
|
18 |
+
wordcloud
|
19 |
amazon-dax-client>=1.1.7
|
20 |
boto3>=1.26.79
|
21 |
pytest>=7.2.1
|