Spaces:
Runtime error
Runtime error
Alex Cabrera
commited on
Commit
•
50018bb
1
Parent(s):
f2cc110
more examples
Browse files- .DS_Store +0 -0
- .gitignore +1 -1
- Dockerfile +0 -5
- evals/.zeno_cache_crossword/OUTPUTgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_crossword/OUTPUTgpt-4.pickle +3 -0
- evals/.zeno_cache_crossword/POSTDISTILLcorrectgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_crossword/POSTDISTILLcorrectgpt-4.pickle +3 -0
- evals/.zeno_cache_crossword/PREDISTILLanswer_length.pickle +3 -0
- evals/.zeno_cache_crossword/PREDISTILLnumber_of_blanks.pickle +3 -0
- evals/.zeno_cache_crossword/PREDISTILLword_freq.pickle +3 -0
- evals/.zeno_cache_crossword/folders.pickle +3 -0
- evals/.zeno_cache_crossword/reports.pickle +3 -0
- evals/.zeno_cache_crossword/slices.pickle +3 -0
- evals/.zeno_cache_crossword/view.mjs +1574 -0
- evals/.zeno_cache_emotional-intelligence/OUTPUTgpt-3_5-turbo-0301.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/OUTPUTgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/POSTDISTILLcorrectgpt-3_5-turbo-0301.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/POSTDISTILLcorrectgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/folders.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/reports.pickle +3 -0
- evals/.zeno_cache_emotional-intelligence/view.mjs +1574 -0
- evals/.zeno_cache_us-tort-law/OUTPUTgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_us-tort-law/POSTDISTILLcorrectgpt-3_5-turbo.pickle +3 -0
- evals/.zeno_cache_us-tort-law/folders.pickle +3 -0
- evals/.zeno_cache_us-tort-law/reports.pickle +3 -0
- evals/.zeno_cache_us-tort-law/view.mjs +1574 -0
- evals/evals.yaml +4 -3
- frontend/public/zeno.png +0 -0
- frontend/src/App.svelte +21 -3
- poetry.lock +0 -0
- pyproject.toml +2 -2
- zeno-evals-hub/frontend/build/assets/main-0a6ed5ae.css +0 -1
- zeno-evals-hub/frontend/build/assets/{main-19fa11f0.js → main-686621b6.js} +14 -15
- zeno-evals-hub/frontend/build/assets/main-a4e88c77.css +1 -0
- zeno-evals-hub/frontend/build/manifest.json +3 -3
- zeno-evals-hub/frontend/build/zeno.png +0 -0
- zeno-evals-hub/frontend/index.html +2 -2
- zeno-evals-hub/main.py +4 -0
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
.gitignore
CHANGED
@@ -127,4 +127,4 @@ dmypy.json
|
|
127 |
# Pyre type checker
|
128 |
.pyre/
|
129 |
|
130 |
-
.zeno_cache*/
|
|
|
127 |
# Pyre type checker
|
128 |
.pyre/
|
129 |
|
130 |
+
# .zeno_cache*/
|
Dockerfile
CHANGED
@@ -12,13 +12,8 @@ ENV HOME=/home/user \
|
|
12 |
WORKDIR $HOME/app
|
13 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
14 |
COPY --chown=user . $HOME/app
|
15 |
-
# ADD --chown=user ./.zeno_cache $HOME/app/.zeno_cache
|
16 |
RUN chown user:user -R $HOME/app
|
17 |
|
18 |
-
# COPY ./requirements.txt /code/requirements.txt
|
19 |
-
|
20 |
-
# RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
21 |
-
|
22 |
RUN pip install .
|
23 |
|
24 |
|
|
|
12 |
WORKDIR $HOME/app
|
13 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
14 |
COPY --chown=user . $HOME/app
|
|
|
15 |
RUN chown user:user -R $HOME/app
|
16 |
|
|
|
|
|
|
|
|
|
17 |
RUN pip install .
|
18 |
|
19 |
|
evals/.zeno_cache_crossword/OUTPUTgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:57a2a801dd60229d50881c5445248e02a2b2e4c506a4410b62838139e98c6762
|
3 |
+
size 5935
|
evals/.zeno_cache_crossword/OUTPUTgpt-4.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49a7da9f9d7d4d8abdd1ba747a43e4060a9f6abe520fe750c3ee65c3c6e96883
|
3 |
+
size 5888
|
evals/.zeno_cache_crossword/POSTDISTILLcorrectgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a31008a6641c33d0800968bceafb3f5cb1bfe4711993b794c2547b841db6eb64
|
3 |
+
size 5159
|
evals/.zeno_cache_crossword/POSTDISTILLcorrectgpt-4.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc3620d157190fa7bb65d63452eb2495179a692a922d294da189b94f35c54231
|
3 |
+
size 5151
|
evals/.zeno_cache_crossword/PREDISTILLanswer_length.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:20bb1475237f88d31443113ff7c659d1ecc8419d909742e24bfe57cf2825d018
|
3 |
+
size 5251
|
evals/.zeno_cache_crossword/PREDISTILLnumber_of_blanks.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b3f6ccd3480e52c29dc474c74ba10eec2d00304dc67caa2d048ea57ead85635
|
3 |
+
size 5254
|
evals/.zeno_cache_crossword/PREDISTILLword_freq.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3290fe2354cce04245d7a9cba7eb51cce88af74128c4d32928a64b8cb5f2b96b
|
3 |
+
size 5947
|
evals/.zeno_cache_crossword/folders.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81ec1380bb1130072632b41ded270294e5b9ff8c0866ade69e3606084ecd1727
|
3 |
+
size 34
|
evals/.zeno_cache_crossword/reports.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ad69482b153868cdce58b83056df03e9184c6065a8dc915b05010b4c070b007
|
3 |
+
size 5052
|
evals/.zeno_cache_crossword/slices.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fd1f52f83055628ab3c8903bc4b06789f62a5f0ebe41acc74811f59afe6c9df4
|
3 |
+
size 4073
|
evals/.zeno_cache_crossword/view.mjs
ADDED
@@ -0,0 +1,1574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function noop() { }
|
2 |
+
function run(fn) {
|
3 |
+
return fn();
|
4 |
+
}
|
5 |
+
function blank_object() {
|
6 |
+
return Object.create(null);
|
7 |
+
}
|
8 |
+
function run_all(fns) {
|
9 |
+
fns.forEach(run);
|
10 |
+
}
|
11 |
+
function is_function(thing) {
|
12 |
+
return typeof thing === 'function';
|
13 |
+
}
|
14 |
+
function safe_not_equal(a, b) {
|
15 |
+
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
16 |
+
}
|
17 |
+
function is_empty(obj) {
|
18 |
+
return Object.keys(obj).length === 0;
|
19 |
+
}
|
20 |
+
function null_to_empty(value) {
|
21 |
+
return value == null ? '' : value;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM
|
25 |
+
// at the end of hydration without touching the remaining nodes.
|
26 |
+
let is_hydrating = false;
|
27 |
+
function start_hydrating() {
|
28 |
+
is_hydrating = true;
|
29 |
+
}
|
30 |
+
function end_hydrating() {
|
31 |
+
is_hydrating = false;
|
32 |
+
}
|
33 |
+
function upper_bound(low, high, key, value) {
|
34 |
+
// Return first index of value larger than input value in the range [low, high)
|
35 |
+
while (low < high) {
|
36 |
+
const mid = low + ((high - low) >> 1);
|
37 |
+
if (key(mid) <= value) {
|
38 |
+
low = mid + 1;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
high = mid;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return low;
|
45 |
+
}
|
46 |
+
function init_hydrate(target) {
|
47 |
+
if (target.hydrate_init)
|
48 |
+
return;
|
49 |
+
target.hydrate_init = true;
|
50 |
+
// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>
|
51 |
+
let children = target.childNodes;
|
52 |
+
// If target is <head>, there may be children without claim_order
|
53 |
+
if (target.nodeName === 'HEAD') {
|
54 |
+
const myChildren = [];
|
55 |
+
for (let i = 0; i < children.length; i++) {
|
56 |
+
const node = children[i];
|
57 |
+
if (node.claim_order !== undefined) {
|
58 |
+
myChildren.push(node);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
children = myChildren;
|
62 |
+
}
|
63 |
+
/*
|
64 |
+
* Reorder claimed children optimally.
|
65 |
+
* We can reorder claimed children optimally by finding the longest subsequence of
|
66 |
+
* nodes that are already claimed in order and only moving the rest. The longest
|
67 |
+
* subsequence of nodes that are claimed in order can be found by
|
68 |
+
* computing the longest increasing subsequence of .claim_order values.
|
69 |
+
*
|
70 |
+
* This algorithm is optimal in generating the least amount of reorder operations
|
71 |
+
* possible.
|
72 |
+
*
|
73 |
+
* Proof:
|
74 |
+
* We know that, given a set of reordering operations, the nodes that do not move
|
75 |
+
* always form an increasing subsequence, since they do not move among each other
|
76 |
+
* meaning that they must be already ordered among each other. Thus, the maximal
|
77 |
+
* set of nodes that do not move form a longest increasing subsequence.
|
78 |
+
*/
|
79 |
+
// Compute longest increasing subsequence
|
80 |
+
// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j
|
81 |
+
const m = new Int32Array(children.length + 1);
|
82 |
+
// Predecessor indices + 1
|
83 |
+
const p = new Int32Array(children.length);
|
84 |
+
m[0] = -1;
|
85 |
+
let longest = 0;
|
86 |
+
for (let i = 0; i < children.length; i++) {
|
87 |
+
const current = children[i].claim_order;
|
88 |
+
// Find the largest subsequence length such that it ends in a value less than our current value
|
89 |
+
// upper_bound returns first greater value, so we subtract one
|
90 |
+
// with fast path for when we are on the current longest subsequence
|
91 |
+
const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;
|
92 |
+
p[i] = m[seqLen] + 1;
|
93 |
+
const newLen = seqLen + 1;
|
94 |
+
// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.
|
95 |
+
m[newLen] = i;
|
96 |
+
longest = Math.max(newLen, longest);
|
97 |
+
}
|
98 |
+
// The longest increasing subsequence of nodes (initially reversed)
|
99 |
+
const lis = [];
|
100 |
+
// The rest of the nodes, nodes that will be moved
|
101 |
+
const toMove = [];
|
102 |
+
let last = children.length - 1;
|
103 |
+
for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {
|
104 |
+
lis.push(children[cur - 1]);
|
105 |
+
for (; last >= cur; last--) {
|
106 |
+
toMove.push(children[last]);
|
107 |
+
}
|
108 |
+
last--;
|
109 |
+
}
|
110 |
+
for (; last >= 0; last--) {
|
111 |
+
toMove.push(children[last]);
|
112 |
+
}
|
113 |
+
lis.reverse();
|
114 |
+
// We sort the nodes being moved to guarantee that their insertion order matches the claim order
|
115 |
+
toMove.sort((a, b) => a.claim_order - b.claim_order);
|
116 |
+
// Finally, we move the nodes
|
117 |
+
for (let i = 0, j = 0; i < toMove.length; i++) {
|
118 |
+
while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {
|
119 |
+
j++;
|
120 |
+
}
|
121 |
+
const anchor = j < lis.length ? lis[j] : null;
|
122 |
+
target.insertBefore(toMove[i], anchor);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
function append(target, node) {
|
126 |
+
target.appendChild(node);
|
127 |
+
}
|
128 |
+
function append_styles(target, style_sheet_id, styles) {
|
129 |
+
const append_styles_to = get_root_for_style(target);
|
130 |
+
if (!append_styles_to.getElementById(style_sheet_id)) {
|
131 |
+
const style = element('style');
|
132 |
+
style.id = style_sheet_id;
|
133 |
+
style.textContent = styles;
|
134 |
+
append_stylesheet(append_styles_to, style);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
function get_root_for_style(node) {
|
138 |
+
if (!node)
|
139 |
+
return document;
|
140 |
+
const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
141 |
+
if (root && root.host) {
|
142 |
+
return root;
|
143 |
+
}
|
144 |
+
return node.ownerDocument;
|
145 |
+
}
|
146 |
+
function append_stylesheet(node, style) {
|
147 |
+
append(node.head || node, style);
|
148 |
+
return style.sheet;
|
149 |
+
}
|
150 |
+
function append_hydration(target, node) {
|
151 |
+
if (is_hydrating) {
|
152 |
+
init_hydrate(target);
|
153 |
+
if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {
|
154 |
+
target.actual_end_child = target.firstChild;
|
155 |
+
}
|
156 |
+
// Skip nodes of undefined ordering
|
157 |
+
while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {
|
158 |
+
target.actual_end_child = target.actual_end_child.nextSibling;
|
159 |
+
}
|
160 |
+
if (node !== target.actual_end_child) {
|
161 |
+
// We only insert if the ordering of this node should be modified or the parent node is not target
|
162 |
+
if (node.claim_order !== undefined || node.parentNode !== target) {
|
163 |
+
target.insertBefore(node, target.actual_end_child);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
else {
|
167 |
+
target.actual_end_child = node.nextSibling;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
else if (node.parentNode !== target || node.nextSibling !== null) {
|
171 |
+
target.appendChild(node);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
function insert_hydration(target, node, anchor) {
|
175 |
+
if (is_hydrating && !anchor) {
|
176 |
+
append_hydration(target, node);
|
177 |
+
}
|
178 |
+
else if (node.parentNode !== target || node.nextSibling != anchor) {
|
179 |
+
target.insertBefore(node, anchor || null);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
function detach(node) {
|
183 |
+
if (node.parentNode) {
|
184 |
+
node.parentNode.removeChild(node);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
function destroy_each(iterations, detaching) {
|
188 |
+
for (let i = 0; i < iterations.length; i += 1) {
|
189 |
+
if (iterations[i])
|
190 |
+
iterations[i].d(detaching);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
function element(name) {
|
194 |
+
return document.createElement(name);
|
195 |
+
}
|
196 |
+
function svg_element(name) {
|
197 |
+
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
198 |
+
}
|
199 |
+
function text(data) {
|
200 |
+
return document.createTextNode(data);
|
201 |
+
}
|
202 |
+
function space() {
|
203 |
+
return text(' ');
|
204 |
+
}
|
205 |
+
function empty() {
|
206 |
+
return text('');
|
207 |
+
}
|
208 |
+
function attr(node, attribute, value) {
|
209 |
+
if (value == null)
|
210 |
+
node.removeAttribute(attribute);
|
211 |
+
else if (node.getAttribute(attribute) !== value)
|
212 |
+
node.setAttribute(attribute, value);
|
213 |
+
}
|
214 |
+
function children(element) {
|
215 |
+
return Array.from(element.childNodes);
|
216 |
+
}
|
217 |
+
function init_claim_info(nodes) {
|
218 |
+
if (nodes.claim_info === undefined) {
|
219 |
+
nodes.claim_info = { last_index: 0, total_claimed: 0 };
|
220 |
+
}
|
221 |
+
}
|
222 |
+
function claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {
|
223 |
+
// Try to find nodes in an order such that we lengthen the longest increasing subsequence
|
224 |
+
init_claim_info(nodes);
|
225 |
+
const resultNode = (() => {
|
226 |
+
// We first try to find an element after the previous one
|
227 |
+
for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {
|
228 |
+
const node = nodes[i];
|
229 |
+
if (predicate(node)) {
|
230 |
+
const replacement = processNode(node);
|
231 |
+
if (replacement === undefined) {
|
232 |
+
nodes.splice(i, 1);
|
233 |
+
}
|
234 |
+
else {
|
235 |
+
nodes[i] = replacement;
|
236 |
+
}
|
237 |
+
if (!dontUpdateLastIndex) {
|
238 |
+
nodes.claim_info.last_index = i;
|
239 |
+
}
|
240 |
+
return node;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
// Otherwise, we try to find one before
|
244 |
+
// We iterate in reverse so that we don't go too far back
|
245 |
+
for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {
|
246 |
+
const node = nodes[i];
|
247 |
+
if (predicate(node)) {
|
248 |
+
const replacement = processNode(node);
|
249 |
+
if (replacement === undefined) {
|
250 |
+
nodes.splice(i, 1);
|
251 |
+
}
|
252 |
+
else {
|
253 |
+
nodes[i] = replacement;
|
254 |
+
}
|
255 |
+
if (!dontUpdateLastIndex) {
|
256 |
+
nodes.claim_info.last_index = i;
|
257 |
+
}
|
258 |
+
else if (replacement === undefined) {
|
259 |
+
// Since we spliced before the last_index, we decrease it
|
260 |
+
nodes.claim_info.last_index--;
|
261 |
+
}
|
262 |
+
return node;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
// If we can't find any matching node, we create a new one
|
266 |
+
return createNode();
|
267 |
+
})();
|
268 |
+
resultNode.claim_order = nodes.claim_info.total_claimed;
|
269 |
+
nodes.claim_info.total_claimed += 1;
|
270 |
+
return resultNode;
|
271 |
+
}
|
272 |
+
function claim_element_base(nodes, name, attributes, create_element) {
|
273 |
+
return claim_node(nodes, (node) => node.nodeName === name, (node) => {
|
274 |
+
const remove = [];
|
275 |
+
for (let j = 0; j < node.attributes.length; j++) {
|
276 |
+
const attribute = node.attributes[j];
|
277 |
+
if (!attributes[attribute.name]) {
|
278 |
+
remove.push(attribute.name);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
remove.forEach(v => node.removeAttribute(v));
|
282 |
+
return undefined;
|
283 |
+
}, () => create_element(name));
|
284 |
+
}
|
285 |
+
function claim_element(nodes, name, attributes) {
|
286 |
+
return claim_element_base(nodes, name, attributes, element);
|
287 |
+
}
|
288 |
+
function claim_svg_element(nodes, name, attributes) {
|
289 |
+
return claim_element_base(nodes, name, attributes, svg_element);
|
290 |
+
}
|
291 |
+
function claim_text(nodes, data) {
|
292 |
+
return claim_node(nodes, (node) => node.nodeType === 3, (node) => {
|
293 |
+
const dataStr = '' + data;
|
294 |
+
if (node.data.startsWith(dataStr)) {
|
295 |
+
if (node.data.length !== dataStr.length) {
|
296 |
+
return node.splitText(dataStr.length);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
node.data = dataStr;
|
301 |
+
}
|
302 |
+
}, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements
|
303 |
+
);
|
304 |
+
}
|
305 |
+
function claim_space(nodes) {
|
306 |
+
return claim_text(nodes, ' ');
|
307 |
+
}
|
308 |
+
function set_data(text, data) {
|
309 |
+
data = '' + data;
|
310 |
+
if (text.wholeText !== data)
|
311 |
+
text.data = data;
|
312 |
+
}
|
313 |
+
|
314 |
+
let current_component;
|
315 |
+
function set_current_component(component) {
|
316 |
+
current_component = component;
|
317 |
+
}
|
318 |
+
|
319 |
+
const dirty_components = [];
|
320 |
+
const binding_callbacks = [];
|
321 |
+
const render_callbacks = [];
|
322 |
+
const flush_callbacks = [];
|
323 |
+
const resolved_promise = Promise.resolve();
|
324 |
+
let update_scheduled = false;
|
325 |
+
function schedule_update() {
|
326 |
+
if (!update_scheduled) {
|
327 |
+
update_scheduled = true;
|
328 |
+
resolved_promise.then(flush);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
function add_render_callback(fn) {
|
332 |
+
render_callbacks.push(fn);
|
333 |
+
}
|
334 |
+
// flush() calls callbacks in this order:
|
335 |
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
336 |
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
337 |
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
338 |
+
// for afterUpdates called during the initial onMount, which are called in
|
339 |
+
// reverse order: children before parents.
|
340 |
+
// Since callbacks might update component values, which could trigger another
|
341 |
+
// call to flush(), the following steps guard against this:
|
342 |
+
// 1. During beforeUpdate, any updated components will be added to the
|
343 |
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
344 |
+
// the flush index is kept outside the function, the reentrant call will pick
|
345 |
+
// up where the earlier call left off and go through all dirty components. The
|
346 |
+
// current_component value is saved and restored so that the reentrant call will
|
347 |
+
// not interfere with the "parent" flush() call.
|
348 |
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
349 |
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
350 |
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
351 |
+
// function, guarantees this behavior.
|
352 |
+
const seen_callbacks = new Set();
|
353 |
+
let flushidx = 0; // Do *not* move this inside the flush() function
|
354 |
+
function flush() {
|
355 |
+
// Do not reenter flush while dirty components are updated, as this can
|
356 |
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
357 |
+
// Reentrancy is ok afterwards for bindings etc.
|
358 |
+
if (flushidx !== 0) {
|
359 |
+
return;
|
360 |
+
}
|
361 |
+
const saved_component = current_component;
|
362 |
+
do {
|
363 |
+
// first, call beforeUpdate functions
|
364 |
+
// and update components
|
365 |
+
try {
|
366 |
+
while (flushidx < dirty_components.length) {
|
367 |
+
const component = dirty_components[flushidx];
|
368 |
+
flushidx++;
|
369 |
+
set_current_component(component);
|
370 |
+
update(component.$$);
|
371 |
+
}
|
372 |
+
}
|
373 |
+
catch (e) {
|
374 |
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
375 |
+
dirty_components.length = 0;
|
376 |
+
flushidx = 0;
|
377 |
+
throw e;
|
378 |
+
}
|
379 |
+
set_current_component(null);
|
380 |
+
dirty_components.length = 0;
|
381 |
+
flushidx = 0;
|
382 |
+
while (binding_callbacks.length)
|
383 |
+
binding_callbacks.pop()();
|
384 |
+
// then, once components are updated, call
|
385 |
+
// afterUpdate functions. This may cause
|
386 |
+
// subsequent updates...
|
387 |
+
for (let i = 0; i < render_callbacks.length; i += 1) {
|
388 |
+
const callback = render_callbacks[i];
|
389 |
+
if (!seen_callbacks.has(callback)) {
|
390 |
+
// ...so guard against infinite loops
|
391 |
+
seen_callbacks.add(callback);
|
392 |
+
callback();
|
393 |
+
}
|
394 |
+
}
|
395 |
+
render_callbacks.length = 0;
|
396 |
+
} while (dirty_components.length);
|
397 |
+
while (flush_callbacks.length) {
|
398 |
+
flush_callbacks.pop()();
|
399 |
+
}
|
400 |
+
update_scheduled = false;
|
401 |
+
seen_callbacks.clear();
|
402 |
+
set_current_component(saved_component);
|
403 |
+
}
|
404 |
+
function update($$) {
|
405 |
+
if ($$.fragment !== null) {
|
406 |
+
$$.update();
|
407 |
+
run_all($$.before_update);
|
408 |
+
const dirty = $$.dirty;
|
409 |
+
$$.dirty = [-1];
|
410 |
+
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
411 |
+
$$.after_update.forEach(add_render_callback);
|
412 |
+
}
|
413 |
+
}
|
414 |
+
const outroing = new Set();
|
415 |
+
let outros;
|
416 |
+
function group_outros() {
|
417 |
+
outros = {
|
418 |
+
r: 0,
|
419 |
+
c: [],
|
420 |
+
p: outros // parent group
|
421 |
+
};
|
422 |
+
}
|
423 |
+
function check_outros() {
|
424 |
+
if (!outros.r) {
|
425 |
+
run_all(outros.c);
|
426 |
+
}
|
427 |
+
outros = outros.p;
|
428 |
+
}
|
429 |
+
function transition_in(block, local) {
|
430 |
+
if (block && block.i) {
|
431 |
+
outroing.delete(block);
|
432 |
+
block.i(local);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
function transition_out(block, local, detach, callback) {
|
436 |
+
if (block && block.o) {
|
437 |
+
if (outroing.has(block))
|
438 |
+
return;
|
439 |
+
outroing.add(block);
|
440 |
+
outros.c.push(() => {
|
441 |
+
outroing.delete(block);
|
442 |
+
if (callback) {
|
443 |
+
if (detach)
|
444 |
+
block.d(1);
|
445 |
+
callback();
|
446 |
+
}
|
447 |
+
});
|
448 |
+
block.o(local);
|
449 |
+
}
|
450 |
+
else if (callback) {
|
451 |
+
callback();
|
452 |
+
}
|
453 |
+
}
|
454 |
+
function create_component(block) {
|
455 |
+
block && block.c();
|
456 |
+
}
|
457 |
+
function claim_component(block, parent_nodes) {
|
458 |
+
block && block.l(parent_nodes);
|
459 |
+
}
|
460 |
+
function mount_component(component, target, anchor, customElement) {
|
461 |
+
const { fragment, after_update } = component.$$;
|
462 |
+
fragment && fragment.m(target, anchor);
|
463 |
+
if (!customElement) {
|
464 |
+
// onMount happens before the initial afterUpdate
|
465 |
+
add_render_callback(() => {
|
466 |
+
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
467 |
+
// if the component was destroyed immediately
|
468 |
+
// it will update the `$$.on_destroy` reference to `null`.
|
469 |
+
// the destructured on_destroy may still reference to the old array
|
470 |
+
if (component.$$.on_destroy) {
|
471 |
+
component.$$.on_destroy.push(...new_on_destroy);
|
472 |
+
}
|
473 |
+
else {
|
474 |
+
// Edge case - component was destroyed immediately,
|
475 |
+
// most likely as a result of a binding initialising
|
476 |
+
run_all(new_on_destroy);
|
477 |
+
}
|
478 |
+
component.$$.on_mount = [];
|
479 |
+
});
|
480 |
+
}
|
481 |
+
after_update.forEach(add_render_callback);
|
482 |
+
}
|
483 |
+
function destroy_component(component, detaching) {
|
484 |
+
const $$ = component.$$;
|
485 |
+
if ($$.fragment !== null) {
|
486 |
+
run_all($$.on_destroy);
|
487 |
+
$$.fragment && $$.fragment.d(detaching);
|
488 |
+
// TODO null out other refs, including component.$$ (but need to
|
489 |
+
// preserve final state?)
|
490 |
+
$$.on_destroy = $$.fragment = null;
|
491 |
+
$$.ctx = [];
|
492 |
+
}
|
493 |
+
}
|
494 |
+
function make_dirty(component, i) {
|
495 |
+
if (component.$$.dirty[0] === -1) {
|
496 |
+
dirty_components.push(component);
|
497 |
+
schedule_update();
|
498 |
+
component.$$.dirty.fill(0);
|
499 |
+
}
|
500 |
+
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
501 |
+
}
|
502 |
+
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
503 |
+
const parent_component = current_component;
|
504 |
+
set_current_component(component);
|
505 |
+
const $$ = component.$$ = {
|
506 |
+
fragment: null,
|
507 |
+
ctx: [],
|
508 |
+
// state
|
509 |
+
props,
|
510 |
+
update: noop,
|
511 |
+
not_equal,
|
512 |
+
bound: blank_object(),
|
513 |
+
// lifecycle
|
514 |
+
on_mount: [],
|
515 |
+
on_destroy: [],
|
516 |
+
on_disconnect: [],
|
517 |
+
before_update: [],
|
518 |
+
after_update: [],
|
519 |
+
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
520 |
+
// everything else
|
521 |
+
callbacks: blank_object(),
|
522 |
+
dirty,
|
523 |
+
skip_bound: false,
|
524 |
+
root: options.target || parent_component.$$.root
|
525 |
+
};
|
526 |
+
append_styles && append_styles($$.root);
|
527 |
+
let ready = false;
|
528 |
+
$$.ctx = instance
|
529 |
+
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
530 |
+
const value = rest.length ? rest[0] : ret;
|
531 |
+
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
532 |
+
if (!$$.skip_bound && $$.bound[i])
|
533 |
+
$$.bound[i](value);
|
534 |
+
if (ready)
|
535 |
+
make_dirty(component, i);
|
536 |
+
}
|
537 |
+
return ret;
|
538 |
+
})
|
539 |
+
: [];
|
540 |
+
$$.update();
|
541 |
+
ready = true;
|
542 |
+
run_all($$.before_update);
|
543 |
+
// `false` as a special case of no DOM component
|
544 |
+
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
545 |
+
if (options.target) {
|
546 |
+
if (options.hydrate) {
|
547 |
+
start_hydrating();
|
548 |
+
const nodes = children(options.target);
|
549 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
550 |
+
$$.fragment && $$.fragment.l(nodes);
|
551 |
+
nodes.forEach(detach);
|
552 |
+
}
|
553 |
+
else {
|
554 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
555 |
+
$$.fragment && $$.fragment.c();
|
556 |
+
}
|
557 |
+
if (options.intro)
|
558 |
+
transition_in(component.$$.fragment);
|
559 |
+
mount_component(component, options.target, options.anchor, options.customElement);
|
560 |
+
end_hydrating();
|
561 |
+
flush();
|
562 |
+
}
|
563 |
+
set_current_component(parent_component);
|
564 |
+
}
|
565 |
+
/**
|
566 |
+
* Base class for Svelte components. Used when dev=false.
|
567 |
+
*/
|
568 |
+
class SvelteComponent {
|
569 |
+
$destroy() {
|
570 |
+
destroy_component(this, 1);
|
571 |
+
this.$destroy = noop;
|
572 |
+
}
|
573 |
+
$on(type, callback) {
|
574 |
+
if (!is_function(callback)) {
|
575 |
+
return noop;
|
576 |
+
}
|
577 |
+
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
578 |
+
callbacks.push(callback);
|
579 |
+
return () => {
|
580 |
+
const index = callbacks.indexOf(callback);
|
581 |
+
if (index !== -1)
|
582 |
+
callbacks.splice(index, 1);
|
583 |
+
};
|
584 |
+
}
|
585 |
+
$set($$props) {
|
586 |
+
if (this.$$set && !is_empty($$props)) {
|
587 |
+
this.$$.skip_bound = true;
|
588 |
+
this.$$set($$props);
|
589 |
+
this.$$.skip_bound = false;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
/* src/AssistantBlock.svelte generated by Svelte v3.55.1 */
|
595 |
+
|
596 |
+
function add_css$3(target) {
|
597 |
+
append_styles(target, "svelte-1e3mbn4", ".model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--logo)}.no-model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--G3)}.model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid var(--logo)}.no-model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid rgba(224, 224, 224, 1)}.box.svelte-1e3mbn4.svelte-1e3mbn4{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1e3mbn4 svg.svelte-1e3mbn4{min-width:24px;width:24px;margin-right:10px;margin-top:7px}.chat.svelte-1e3mbn4.svelte-1e3mbn4{border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
598 |
+
}
|
599 |
+
|
600 |
+
function create_fragment$3(ctx) {
|
601 |
+
let div;
|
602 |
+
let svg;
|
603 |
+
let path;
|
604 |
+
let svg_class_value;
|
605 |
+
let t0;
|
606 |
+
let p;
|
607 |
+
let t1;
|
608 |
+
let p_class_value;
|
609 |
+
|
610 |
+
return {
|
611 |
+
c() {
|
612 |
+
div = element("div");
|
613 |
+
svg = svg_element("svg");
|
614 |
+
path = svg_element("path");
|
615 |
+
t0 = space();
|
616 |
+
p = element("p");
|
617 |
+
t1 = text(/*input*/ ctx[0]);
|
618 |
+
this.h();
|
619 |
+
},
|
620 |
+
l(nodes) {
|
621 |
+
div = claim_element(nodes, "DIV", { class: true });
|
622 |
+
var div_nodes = children(div);
|
623 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
624 |
+
var svg_nodes = children(svg);
|
625 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
626 |
+
children(path).forEach(detach);
|
627 |
+
svg_nodes.forEach(detach);
|
628 |
+
t0 = claim_space(div_nodes);
|
629 |
+
p = claim_element(div_nodes, "P", { class: true });
|
630 |
+
var p_nodes = children(p);
|
631 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
632 |
+
p_nodes.forEach(detach);
|
633 |
+
div_nodes.forEach(detach);
|
634 |
+
this.h();
|
635 |
+
},
|
636 |
+
h() {
|
637 |
+
attr(path, "d", "M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z");
|
638 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
639 |
+
attr(svg, "viewBox", "0 0 640 512");
|
640 |
+
attr(svg, "class", svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"));
|
641 |
+
attr(p, "class", p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4");
|
642 |
+
attr(div, "class", "box svelte-1e3mbn4");
|
643 |
+
},
|
644 |
+
m(target, anchor) {
|
645 |
+
insert_hydration(target, div, anchor);
|
646 |
+
append_hydration(div, svg);
|
647 |
+
append_hydration(svg, path);
|
648 |
+
append_hydration(div, t0);
|
649 |
+
append_hydration(div, p);
|
650 |
+
append_hydration(p, t1);
|
651 |
+
},
|
652 |
+
p(ctx, [dirty]) {
|
653 |
+
if (dirty & /*output*/ 2 && svg_class_value !== (svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"))) {
|
654 |
+
attr(svg, "class", svg_class_value);
|
655 |
+
}
|
656 |
+
|
657 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
658 |
+
|
659 |
+
if (dirty & /*output*/ 2 && p_class_value !== (p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4")) {
|
660 |
+
attr(p, "class", p_class_value);
|
661 |
+
}
|
662 |
+
},
|
663 |
+
i: noop,
|
664 |
+
o: noop,
|
665 |
+
d(detaching) {
|
666 |
+
if (detaching) detach(div);
|
667 |
+
}
|
668 |
+
};
|
669 |
+
}
|
670 |
+
|
671 |
+
function instance$3($$self, $$props, $$invalidate) {
|
672 |
+
let { input } = $$props;
|
673 |
+
let { output = false } = $$props;
|
674 |
+
|
675 |
+
$$self.$$set = $$props => {
|
676 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
677 |
+
if ('output' in $$props) $$invalidate(1, output = $$props.output);
|
678 |
+
};
|
679 |
+
|
680 |
+
return [input, output];
|
681 |
+
}
|
682 |
+
|
683 |
+
class AssistantBlock extends SvelteComponent {
|
684 |
+
constructor(options) {
|
685 |
+
super();
|
686 |
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, { input: 0, output: 1 }, add_css$3);
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
/* src/SystemBlock.svelte generated by Svelte v3.55.1 */
|
691 |
+
|
692 |
+
function add_css$2(target) {
|
693 |
+
append_styles(target, "svelte-18o0ab2", "p.svelte-18o0ab2{margin:0px}");
|
694 |
+
}
|
695 |
+
|
696 |
+
function create_fragment$2(ctx) {
|
697 |
+
let p;
|
698 |
+
let b;
|
699 |
+
let t0;
|
700 |
+
let t1;
|
701 |
+
let span;
|
702 |
+
let t2;
|
703 |
+
|
704 |
+
return {
|
705 |
+
c() {
|
706 |
+
p = element("p");
|
707 |
+
b = element("b");
|
708 |
+
t0 = text("System:");
|
709 |
+
t1 = space();
|
710 |
+
span = element("span");
|
711 |
+
t2 = text(/*input*/ ctx[0]);
|
712 |
+
this.h();
|
713 |
+
},
|
714 |
+
l(nodes) {
|
715 |
+
p = claim_element(nodes, "P", { class: true });
|
716 |
+
var p_nodes = children(p);
|
717 |
+
b = claim_element(p_nodes, "B", {});
|
718 |
+
var b_nodes = children(b);
|
719 |
+
t0 = claim_text(b_nodes, "System:");
|
720 |
+
b_nodes.forEach(detach);
|
721 |
+
t1 = claim_space(p_nodes);
|
722 |
+
span = claim_element(p_nodes, "SPAN", {});
|
723 |
+
var span_nodes = children(span);
|
724 |
+
t2 = claim_text(span_nodes, /*input*/ ctx[0]);
|
725 |
+
span_nodes.forEach(detach);
|
726 |
+
p_nodes.forEach(detach);
|
727 |
+
this.h();
|
728 |
+
},
|
729 |
+
h() {
|
730 |
+
attr(p, "class", "svelte-18o0ab2");
|
731 |
+
},
|
732 |
+
m(target, anchor) {
|
733 |
+
insert_hydration(target, p, anchor);
|
734 |
+
append_hydration(p, b);
|
735 |
+
append_hydration(b, t0);
|
736 |
+
append_hydration(p, t1);
|
737 |
+
append_hydration(p, span);
|
738 |
+
append_hydration(span, t2);
|
739 |
+
},
|
740 |
+
p(ctx, [dirty]) {
|
741 |
+
if (dirty & /*input*/ 1) set_data(t2, /*input*/ ctx[0]);
|
742 |
+
},
|
743 |
+
i: noop,
|
744 |
+
o: noop,
|
745 |
+
d(detaching) {
|
746 |
+
if (detaching) detach(p);
|
747 |
+
}
|
748 |
+
};
|
749 |
+
}
|
750 |
+
|
751 |
+
function instance$2($$self, $$props, $$invalidate) {
|
752 |
+
let { input } = $$props;
|
753 |
+
|
754 |
+
$$self.$$set = $$props => {
|
755 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
756 |
+
};
|
757 |
+
|
758 |
+
return [input];
|
759 |
+
}
|
760 |
+
|
761 |
+
class SystemBlock extends SvelteComponent {
|
762 |
+
constructor(options) {
|
763 |
+
super();
|
764 |
+
init(this, options, instance$2, create_fragment$2, safe_not_equal, { input: 0 }, add_css$2);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
/* src/UserBlock.svelte generated by Svelte v3.55.1 */
|
769 |
+
|
770 |
+
function add_css$1(target) {
|
771 |
+
append_styles(target, "svelte-1lys9p1", ".box.svelte-1lys9p1.svelte-1lys9p1{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1lys9p1 svg.svelte-1lys9p1{min-width:24px;width:24px;margin-right:10px;margin-top:7px;fill:var(--G3)}.chat.svelte-1lys9p1.svelte-1lys9p1{border:1px solid rgba(224, 224, 224, 1);border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
772 |
+
}
|
773 |
+
|
774 |
+
function create_fragment$1(ctx) {
|
775 |
+
let div;
|
776 |
+
let svg;
|
777 |
+
let path;
|
778 |
+
let t0;
|
779 |
+
let p;
|
780 |
+
let t1;
|
781 |
+
|
782 |
+
return {
|
783 |
+
c() {
|
784 |
+
div = element("div");
|
785 |
+
svg = svg_element("svg");
|
786 |
+
path = svg_element("path");
|
787 |
+
t0 = space();
|
788 |
+
p = element("p");
|
789 |
+
t1 = text(/*input*/ ctx[0]);
|
790 |
+
this.h();
|
791 |
+
},
|
792 |
+
l(nodes) {
|
793 |
+
div = claim_element(nodes, "DIV", { class: true });
|
794 |
+
var div_nodes = children(div);
|
795 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
796 |
+
var svg_nodes = children(svg);
|
797 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
798 |
+
children(path).forEach(detach);
|
799 |
+
svg_nodes.forEach(detach);
|
800 |
+
t0 = claim_space(div_nodes);
|
801 |
+
p = claim_element(div_nodes, "P", { class: true });
|
802 |
+
var p_nodes = children(p);
|
803 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
804 |
+
p_nodes.forEach(detach);
|
805 |
+
div_nodes.forEach(detach);
|
806 |
+
this.h();
|
807 |
+
},
|
808 |
+
h() {
|
809 |
+
attr(path, "d", "M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z");
|
810 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
811 |
+
attr(svg, "viewBox", "0 0 448 512");
|
812 |
+
attr(svg, "class", "svelte-1lys9p1");
|
813 |
+
attr(p, "class", "chat svelte-1lys9p1");
|
814 |
+
attr(div, "class", "box svelte-1lys9p1");
|
815 |
+
},
|
816 |
+
m(target, anchor) {
|
817 |
+
insert_hydration(target, div, anchor);
|
818 |
+
append_hydration(div, svg);
|
819 |
+
append_hydration(svg, path);
|
820 |
+
append_hydration(div, t0);
|
821 |
+
append_hydration(div, p);
|
822 |
+
append_hydration(p, t1);
|
823 |
+
},
|
824 |
+
p(ctx, [dirty]) {
|
825 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
826 |
+
},
|
827 |
+
i: noop,
|
828 |
+
o: noop,
|
829 |
+
d(detaching) {
|
830 |
+
if (detaching) detach(div);
|
831 |
+
}
|
832 |
+
};
|
833 |
+
}
|
834 |
+
|
835 |
+
function instance$1($$self, $$props, $$invalidate) {
|
836 |
+
let { input } = $$props;
|
837 |
+
|
838 |
+
$$self.$$set = $$props => {
|
839 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
840 |
+
};
|
841 |
+
|
842 |
+
return [input];
|
843 |
+
}
|
844 |
+
|
845 |
+
class UserBlock extends SvelteComponent {
|
846 |
+
constructor(options) {
|
847 |
+
super();
|
848 |
+
init(this, options, instance$1, create_fragment$1, safe_not_equal, { input: 0 }, add_css$1);
|
849 |
+
}
|
850 |
+
}
|
851 |
+
|
852 |
+
/* src/InstanceView.svelte generated by Svelte v3.55.1 */
|
853 |
+
|
854 |
+
function add_css(target) {
|
855 |
+
append_styles(target, "svelte-eoma5v", "#container.svelte-eoma5v{border:0.5px solid rgb(224, 224, 224);min-width:350px;border-radius:2px;padding:10px}.label.svelte-eoma5v{margin-right:5px;font-weight:700}p.svelte-eoma5v{margin:5px;overflow-wrap:anywhere}");
|
856 |
+
}
|
857 |
+
|
858 |
+
function get_each_context(ctx, list, i) {
|
859 |
+
const child_ctx = ctx.slice();
|
860 |
+
child_ctx[6] = list[i];
|
861 |
+
return child_ctx;
|
862 |
+
}
|
863 |
+
|
864 |
+
// (21:2) {#if entry[dataColumn]}
|
865 |
+
function create_if_block_2(ctx) {
|
866 |
+
let current_block_type_index;
|
867 |
+
let if_block;
|
868 |
+
let if_block_anchor;
|
869 |
+
let current;
|
870 |
+
const if_block_creators = [create_if_block_3, create_else_block];
|
871 |
+
const if_blocks = [];
|
872 |
+
|
873 |
+
function select_block_type(ctx, dirty) {
|
874 |
+
if (typeof /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] === "string") return 0;
|
875 |
+
return 1;
|
876 |
+
}
|
877 |
+
|
878 |
+
current_block_type_index = select_block_type(ctx);
|
879 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
880 |
+
|
881 |
+
return {
|
882 |
+
c() {
|
883 |
+
if_block.c();
|
884 |
+
if_block_anchor = empty();
|
885 |
+
},
|
886 |
+
l(nodes) {
|
887 |
+
if_block.l(nodes);
|
888 |
+
if_block_anchor = empty();
|
889 |
+
},
|
890 |
+
m(target, anchor) {
|
891 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
892 |
+
insert_hydration(target, if_block_anchor, anchor);
|
893 |
+
current = true;
|
894 |
+
},
|
895 |
+
p(ctx, dirty) {
|
896 |
+
let previous_block_index = current_block_type_index;
|
897 |
+
current_block_type_index = select_block_type(ctx);
|
898 |
+
|
899 |
+
if (current_block_type_index === previous_block_index) {
|
900 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
901 |
+
} else {
|
902 |
+
group_outros();
|
903 |
+
|
904 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
905 |
+
if_blocks[previous_block_index] = null;
|
906 |
+
});
|
907 |
+
|
908 |
+
check_outros();
|
909 |
+
if_block = if_blocks[current_block_type_index];
|
910 |
+
|
911 |
+
if (!if_block) {
|
912 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
913 |
+
if_block.c();
|
914 |
+
} else {
|
915 |
+
if_block.p(ctx, dirty);
|
916 |
+
}
|
917 |
+
|
918 |
+
transition_in(if_block, 1);
|
919 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
920 |
+
}
|
921 |
+
},
|
922 |
+
i(local) {
|
923 |
+
if (current) return;
|
924 |
+
transition_in(if_block);
|
925 |
+
current = true;
|
926 |
+
},
|
927 |
+
o(local) {
|
928 |
+
transition_out(if_block);
|
929 |
+
current = false;
|
930 |
+
},
|
931 |
+
d(detaching) {
|
932 |
+
if_blocks[current_block_type_index].d(detaching);
|
933 |
+
if (detaching) detach(if_block_anchor);
|
934 |
+
}
|
935 |
+
};
|
936 |
+
}
|
937 |
+
|
938 |
+
// (24:4) {:else}
|
939 |
+
function create_else_block(ctx) {
|
940 |
+
let each_1_anchor;
|
941 |
+
let current;
|
942 |
+
let each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
943 |
+
let each_blocks = [];
|
944 |
+
|
945 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
946 |
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
947 |
+
}
|
948 |
+
|
949 |
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
950 |
+
each_blocks[i] = null;
|
951 |
+
});
|
952 |
+
|
953 |
+
return {
|
954 |
+
c() {
|
955 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
956 |
+
each_blocks[i].c();
|
957 |
+
}
|
958 |
+
|
959 |
+
each_1_anchor = empty();
|
960 |
+
},
|
961 |
+
l(nodes) {
|
962 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
963 |
+
each_blocks[i].l(nodes);
|
964 |
+
}
|
965 |
+
|
966 |
+
each_1_anchor = empty();
|
967 |
+
},
|
968 |
+
m(target, anchor) {
|
969 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
970 |
+
each_blocks[i].m(target, anchor);
|
971 |
+
}
|
972 |
+
|
973 |
+
insert_hydration(target, each_1_anchor, anchor);
|
974 |
+
current = true;
|
975 |
+
},
|
976 |
+
p(ctx, dirty) {
|
977 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
978 |
+
each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
979 |
+
let i;
|
980 |
+
|
981 |
+
for (i = 0; i < each_value.length; i += 1) {
|
982 |
+
const child_ctx = get_each_context(ctx, each_value, i);
|
983 |
+
|
984 |
+
if (each_blocks[i]) {
|
985 |
+
each_blocks[i].p(child_ctx, dirty);
|
986 |
+
transition_in(each_blocks[i], 1);
|
987 |
+
} else {
|
988 |
+
each_blocks[i] = create_each_block(child_ctx);
|
989 |
+
each_blocks[i].c();
|
990 |
+
transition_in(each_blocks[i], 1);
|
991 |
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
992 |
+
}
|
993 |
+
}
|
994 |
+
|
995 |
+
group_outros();
|
996 |
+
|
997 |
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
998 |
+
out(i);
|
999 |
+
}
|
1000 |
+
|
1001 |
+
check_outros();
|
1002 |
+
}
|
1003 |
+
},
|
1004 |
+
i(local) {
|
1005 |
+
if (current) return;
|
1006 |
+
|
1007 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
1008 |
+
transition_in(each_blocks[i]);
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
current = true;
|
1012 |
+
},
|
1013 |
+
o(local) {
|
1014 |
+
each_blocks = each_blocks.filter(Boolean);
|
1015 |
+
|
1016 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
1017 |
+
transition_out(each_blocks[i]);
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
current = false;
|
1021 |
+
},
|
1022 |
+
d(detaching) {
|
1023 |
+
destroy_each(each_blocks, detaching);
|
1024 |
+
if (detaching) detach(each_1_anchor);
|
1025 |
+
}
|
1026 |
+
};
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
// (22:4) {#if typeof entry[dataColumn] === "string"}
|
1030 |
+
function create_if_block_3(ctx) {
|
1031 |
+
let userblock;
|
1032 |
+
let current;
|
1033 |
+
|
1034 |
+
userblock = new UserBlock({
|
1035 |
+
props: {
|
1036 |
+
input: /*entry*/ ctx[0][/*dataColumn*/ ctx[3]]
|
1037 |
+
}
|
1038 |
+
});
|
1039 |
+
|
1040 |
+
return {
|
1041 |
+
c() {
|
1042 |
+
create_component(userblock.$$.fragment);
|
1043 |
+
},
|
1044 |
+
l(nodes) {
|
1045 |
+
claim_component(userblock.$$.fragment, nodes);
|
1046 |
+
},
|
1047 |
+
m(target, anchor) {
|
1048 |
+
mount_component(userblock, target, anchor);
|
1049 |
+
current = true;
|
1050 |
+
},
|
1051 |
+
p(ctx, dirty) {
|
1052 |
+
const userblock_changes = {};
|
1053 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
1054 |
+
userblock.$set(userblock_changes);
|
1055 |
+
},
|
1056 |
+
i(local) {
|
1057 |
+
if (current) return;
|
1058 |
+
transition_in(userblock.$$.fragment, local);
|
1059 |
+
current = true;
|
1060 |
+
},
|
1061 |
+
o(local) {
|
1062 |
+
transition_out(userblock.$$.fragment, local);
|
1063 |
+
current = false;
|
1064 |
+
},
|
1065 |
+
d(detaching) {
|
1066 |
+
destroy_component(userblock, detaching);
|
1067 |
+
}
|
1068 |
+
};
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
// (30:42)
|
1072 |
+
function create_if_block_6(ctx) {
|
1073 |
+
let userblock;
|
1074 |
+
let current;
|
1075 |
+
|
1076 |
+
userblock = new UserBlock({
|
1077 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1078 |
+
});
|
1079 |
+
|
1080 |
+
return {
|
1081 |
+
c() {
|
1082 |
+
create_component(userblock.$$.fragment);
|
1083 |
+
},
|
1084 |
+
l(nodes) {
|
1085 |
+
claim_component(userblock.$$.fragment, nodes);
|
1086 |
+
},
|
1087 |
+
m(target, anchor) {
|
1088 |
+
mount_component(userblock, target, anchor);
|
1089 |
+
current = true;
|
1090 |
+
},
|
1091 |
+
p(ctx, dirty) {
|
1092 |
+
const userblock_changes = {};
|
1093 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*item*/ ctx[6]["content"];
|
1094 |
+
userblock.$set(userblock_changes);
|
1095 |
+
},
|
1096 |
+
i(local) {
|
1097 |
+
if (current) return;
|
1098 |
+
transition_in(userblock.$$.fragment, local);
|
1099 |
+
current = true;
|
1100 |
+
},
|
1101 |
+
o(local) {
|
1102 |
+
transition_out(userblock.$$.fragment, local);
|
1103 |
+
current = false;
|
1104 |
+
},
|
1105 |
+
d(detaching) {
|
1106 |
+
destroy_component(userblock, detaching);
|
1107 |
+
}
|
1108 |
+
};
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
// (28:47)
|
1112 |
+
function create_if_block_5(ctx) {
|
1113 |
+
let assistantblock;
|
1114 |
+
let current;
|
1115 |
+
|
1116 |
+
assistantblock = new AssistantBlock({
|
1117 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
return {
|
1121 |
+
c() {
|
1122 |
+
create_component(assistantblock.$$.fragment);
|
1123 |
+
},
|
1124 |
+
l(nodes) {
|
1125 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1126 |
+
},
|
1127 |
+
m(target, anchor) {
|
1128 |
+
mount_component(assistantblock, target, anchor);
|
1129 |
+
current = true;
|
1130 |
+
},
|
1131 |
+
p(ctx, dirty) {
|
1132 |
+
const assistantblock_changes = {};
|
1133 |
+
if (dirty & /*entry, dataColumn*/ 9) assistantblock_changes.input = /*item*/ ctx[6]["content"];
|
1134 |
+
assistantblock.$set(assistantblock_changes);
|
1135 |
+
},
|
1136 |
+
i(local) {
|
1137 |
+
if (current) return;
|
1138 |
+
transition_in(assistantblock.$$.fragment, local);
|
1139 |
+
current = true;
|
1140 |
+
},
|
1141 |
+
o(local) {
|
1142 |
+
transition_out(assistantblock.$$.fragment, local);
|
1143 |
+
current = false;
|
1144 |
+
},
|
1145 |
+
d(detaching) {
|
1146 |
+
destroy_component(assistantblock, detaching);
|
1147 |
+
}
|
1148 |
+
};
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
// (26:8) {#if item["role"] === "system"}
|
1152 |
+
function create_if_block_4(ctx) {
|
1153 |
+
let systemblock;
|
1154 |
+
let current;
|
1155 |
+
|
1156 |
+
systemblock = new SystemBlock({
|
1157 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1158 |
+
});
|
1159 |
+
|
1160 |
+
return {
|
1161 |
+
c() {
|
1162 |
+
create_component(systemblock.$$.fragment);
|
1163 |
+
},
|
1164 |
+
l(nodes) {
|
1165 |
+
claim_component(systemblock.$$.fragment, nodes);
|
1166 |
+
},
|
1167 |
+
m(target, anchor) {
|
1168 |
+
mount_component(systemblock, target, anchor);
|
1169 |
+
current = true;
|
1170 |
+
},
|
1171 |
+
p(ctx, dirty) {
|
1172 |
+
const systemblock_changes = {};
|
1173 |
+
if (dirty & /*entry, dataColumn*/ 9) systemblock_changes.input = /*item*/ ctx[6]["content"];
|
1174 |
+
systemblock.$set(systemblock_changes);
|
1175 |
+
},
|
1176 |
+
i(local) {
|
1177 |
+
if (current) return;
|
1178 |
+
transition_in(systemblock.$$.fragment, local);
|
1179 |
+
current = true;
|
1180 |
+
},
|
1181 |
+
o(local) {
|
1182 |
+
transition_out(systemblock.$$.fragment, local);
|
1183 |
+
current = false;
|
1184 |
+
},
|
1185 |
+
d(detaching) {
|
1186 |
+
destroy_component(systemblock, detaching);
|
1187 |
+
}
|
1188 |
+
};
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
// (25:6) {#each entry[dataColumn] as item}
|
1192 |
+
function create_each_block(ctx) {
|
1193 |
+
let current_block_type_index;
|
1194 |
+
let if_block;
|
1195 |
+
let if_block_anchor;
|
1196 |
+
let current;
|
1197 |
+
const if_block_creators = [create_if_block_4, create_if_block_5, create_if_block_6];
|
1198 |
+
const if_blocks = [];
|
1199 |
+
|
1200 |
+
function select_block_type_1(ctx, dirty) {
|
1201 |
+
if (/*item*/ ctx[6]["role"] === "system") return 0;
|
1202 |
+
if (/*item*/ ctx[6]["role"] === "assistant") return 1;
|
1203 |
+
if (/*item*/ ctx[6]["role"] === "user") return 2;
|
1204 |
+
return -1;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
if (~(current_block_type_index = select_block_type_1(ctx))) {
|
1208 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
return {
|
1212 |
+
c() {
|
1213 |
+
if (if_block) if_block.c();
|
1214 |
+
if_block_anchor = empty();
|
1215 |
+
},
|
1216 |
+
l(nodes) {
|
1217 |
+
if (if_block) if_block.l(nodes);
|
1218 |
+
if_block_anchor = empty();
|
1219 |
+
},
|
1220 |
+
m(target, anchor) {
|
1221 |
+
if (~current_block_type_index) {
|
1222 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
insert_hydration(target, if_block_anchor, anchor);
|
1226 |
+
current = true;
|
1227 |
+
},
|
1228 |
+
p(ctx, dirty) {
|
1229 |
+
let previous_block_index = current_block_type_index;
|
1230 |
+
current_block_type_index = select_block_type_1(ctx);
|
1231 |
+
|
1232 |
+
if (current_block_type_index === previous_block_index) {
|
1233 |
+
if (~current_block_type_index) {
|
1234 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
1235 |
+
}
|
1236 |
+
} else {
|
1237 |
+
if (if_block) {
|
1238 |
+
group_outros();
|
1239 |
+
|
1240 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
1241 |
+
if_blocks[previous_block_index] = null;
|
1242 |
+
});
|
1243 |
+
|
1244 |
+
check_outros();
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
if (~current_block_type_index) {
|
1248 |
+
if_block = if_blocks[current_block_type_index];
|
1249 |
+
|
1250 |
+
if (!if_block) {
|
1251 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1252 |
+
if_block.c();
|
1253 |
+
} else {
|
1254 |
+
if_block.p(ctx, dirty);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
transition_in(if_block, 1);
|
1258 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
1259 |
+
} else {
|
1260 |
+
if_block = null;
|
1261 |
+
}
|
1262 |
+
}
|
1263 |
+
},
|
1264 |
+
i(local) {
|
1265 |
+
if (current) return;
|
1266 |
+
transition_in(if_block);
|
1267 |
+
current = true;
|
1268 |
+
},
|
1269 |
+
o(local) {
|
1270 |
+
transition_out(if_block);
|
1271 |
+
current = false;
|
1272 |
+
},
|
1273 |
+
d(detaching) {
|
1274 |
+
if (~current_block_type_index) {
|
1275 |
+
if_blocks[current_block_type_index].d(detaching);
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
if (detaching) detach(if_block_anchor);
|
1279 |
+
}
|
1280 |
+
};
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
// (36:2) {#if entry[modelColumn]}
|
1284 |
+
function create_if_block_1(ctx) {
|
1285 |
+
let assistantblock;
|
1286 |
+
let current;
|
1287 |
+
|
1288 |
+
assistantblock = new AssistantBlock({
|
1289 |
+
props: {
|
1290 |
+
input: /*entry*/ ctx[0][/*modelColumn*/ ctx[1]],
|
1291 |
+
output: true
|
1292 |
+
}
|
1293 |
+
});
|
1294 |
+
|
1295 |
+
return {
|
1296 |
+
c() {
|
1297 |
+
create_component(assistantblock.$$.fragment);
|
1298 |
+
},
|
1299 |
+
l(nodes) {
|
1300 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1301 |
+
},
|
1302 |
+
m(target, anchor) {
|
1303 |
+
mount_component(assistantblock, target, anchor);
|
1304 |
+
current = true;
|
1305 |
+
},
|
1306 |
+
p(ctx, dirty) {
|
1307 |
+
const assistantblock_changes = {};
|
1308 |
+
if (dirty & /*entry, modelColumn*/ 3) assistantblock_changes.input = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]];
|
1309 |
+
assistantblock.$set(assistantblock_changes);
|
1310 |
+
},
|
1311 |
+
i(local) {
|
1312 |
+
if (current) return;
|
1313 |
+
transition_in(assistantblock.$$.fragment, local);
|
1314 |
+
current = true;
|
1315 |
+
},
|
1316 |
+
o(local) {
|
1317 |
+
transition_out(assistantblock.$$.fragment, local);
|
1318 |
+
current = false;
|
1319 |
+
},
|
1320 |
+
d(detaching) {
|
1321 |
+
destroy_component(assistantblock, detaching);
|
1322 |
+
}
|
1323 |
+
};
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
// (39:2) {#if entry[labelColumn]}
|
1327 |
+
function create_if_block(ctx) {
|
1328 |
+
let p;
|
1329 |
+
let span;
|
1330 |
+
let t0;
|
1331 |
+
let t1;
|
1332 |
+
let t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "";
|
1333 |
+
let t2;
|
1334 |
+
|
1335 |
+
return {
|
1336 |
+
c() {
|
1337 |
+
p = element("p");
|
1338 |
+
span = element("span");
|
1339 |
+
t0 = text("Expected:");
|
1340 |
+
t1 = space();
|
1341 |
+
t2 = text(t2_value);
|
1342 |
+
this.h();
|
1343 |
+
},
|
1344 |
+
l(nodes) {
|
1345 |
+
p = claim_element(nodes, "P", { class: true });
|
1346 |
+
var p_nodes = children(p);
|
1347 |
+
span = claim_element(p_nodes, "SPAN", { class: true });
|
1348 |
+
var span_nodes = children(span);
|
1349 |
+
t0 = claim_text(span_nodes, "Expected:");
|
1350 |
+
span_nodes.forEach(detach);
|
1351 |
+
t1 = claim_space(p_nodes);
|
1352 |
+
t2 = claim_text(p_nodes, t2_value);
|
1353 |
+
p_nodes.forEach(detach);
|
1354 |
+
this.h();
|
1355 |
+
},
|
1356 |
+
h() {
|
1357 |
+
attr(span, "class", "label svelte-eoma5v");
|
1358 |
+
attr(p, "class", "svelte-eoma5v");
|
1359 |
+
},
|
1360 |
+
m(target, anchor) {
|
1361 |
+
insert_hydration(target, p, anchor);
|
1362 |
+
append_hydration(p, span);
|
1363 |
+
append_hydration(span, t0);
|
1364 |
+
append_hydration(p, t1);
|
1365 |
+
append_hydration(p, t2);
|
1366 |
+
},
|
1367 |
+
p(ctx, dirty) {
|
1368 |
+
if (dirty & /*entry, labelColumn*/ 5 && t2_value !== (t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "")) set_data(t2, t2_value);
|
1369 |
+
},
|
1370 |
+
d(detaching) {
|
1371 |
+
if (detaching) detach(p);
|
1372 |
+
}
|
1373 |
+
};
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
function create_fragment(ctx) {
|
1377 |
+
let div;
|
1378 |
+
let t0;
|
1379 |
+
let t1;
|
1380 |
+
let current;
|
1381 |
+
let if_block0 = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] && create_if_block_2(ctx);
|
1382 |
+
let if_block1 = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] && create_if_block_1(ctx);
|
1383 |
+
let if_block2 = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] && create_if_block(ctx);
|
1384 |
+
|
1385 |
+
return {
|
1386 |
+
c() {
|
1387 |
+
div = element("div");
|
1388 |
+
if (if_block0) if_block0.c();
|
1389 |
+
t0 = space();
|
1390 |
+
if (if_block1) if_block1.c();
|
1391 |
+
t1 = space();
|
1392 |
+
if (if_block2) if_block2.c();
|
1393 |
+
this.h();
|
1394 |
+
},
|
1395 |
+
l(nodes) {
|
1396 |
+
div = claim_element(nodes, "DIV", { id: true, class: true });
|
1397 |
+
var div_nodes = children(div);
|
1398 |
+
if (if_block0) if_block0.l(div_nodes);
|
1399 |
+
t0 = claim_space(div_nodes);
|
1400 |
+
if (if_block1) if_block1.l(div_nodes);
|
1401 |
+
t1 = claim_space(div_nodes);
|
1402 |
+
if (if_block2) if_block2.l(div_nodes);
|
1403 |
+
div_nodes.forEach(detach);
|
1404 |
+
this.h();
|
1405 |
+
},
|
1406 |
+
h() {
|
1407 |
+
attr(div, "id", "container");
|
1408 |
+
attr(div, "class", "svelte-eoma5v");
|
1409 |
+
},
|
1410 |
+
m(target, anchor) {
|
1411 |
+
insert_hydration(target, div, anchor);
|
1412 |
+
if (if_block0) if_block0.m(div, null);
|
1413 |
+
append_hydration(div, t0);
|
1414 |
+
if (if_block1) if_block1.m(div, null);
|
1415 |
+
append_hydration(div, t1);
|
1416 |
+
if (if_block2) if_block2.m(div, null);
|
1417 |
+
current = true;
|
1418 |
+
},
|
1419 |
+
p(ctx, [dirty]) {
|
1420 |
+
if (/*entry*/ ctx[0][/*dataColumn*/ ctx[3]]) {
|
1421 |
+
if (if_block0) {
|
1422 |
+
if_block0.p(ctx, dirty);
|
1423 |
+
|
1424 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
1425 |
+
transition_in(if_block0, 1);
|
1426 |
+
}
|
1427 |
+
} else {
|
1428 |
+
if_block0 = create_if_block_2(ctx);
|
1429 |
+
if_block0.c();
|
1430 |
+
transition_in(if_block0, 1);
|
1431 |
+
if_block0.m(div, t0);
|
1432 |
+
}
|
1433 |
+
} else if (if_block0) {
|
1434 |
+
group_outros();
|
1435 |
+
|
1436 |
+
transition_out(if_block0, 1, 1, () => {
|
1437 |
+
if_block0 = null;
|
1438 |
+
});
|
1439 |
+
|
1440 |
+
check_outros();
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
if (/*entry*/ ctx[0][/*modelColumn*/ ctx[1]]) {
|
1444 |
+
if (if_block1) {
|
1445 |
+
if_block1.p(ctx, dirty);
|
1446 |
+
|
1447 |
+
if (dirty & /*entry, modelColumn*/ 3) {
|
1448 |
+
transition_in(if_block1, 1);
|
1449 |
+
}
|
1450 |
+
} else {
|
1451 |
+
if_block1 = create_if_block_1(ctx);
|
1452 |
+
if_block1.c();
|
1453 |
+
transition_in(if_block1, 1);
|
1454 |
+
if_block1.m(div, t1);
|
1455 |
+
}
|
1456 |
+
} else if (if_block1) {
|
1457 |
+
group_outros();
|
1458 |
+
|
1459 |
+
transition_out(if_block1, 1, 1, () => {
|
1460 |
+
if_block1 = null;
|
1461 |
+
});
|
1462 |
+
|
1463 |
+
check_outros();
|
1464 |
+
}
|
1465 |
+
|
1466 |
+
if (/*entry*/ ctx[0][/*labelColumn*/ ctx[2]]) {
|
1467 |
+
if (if_block2) {
|
1468 |
+
if_block2.p(ctx, dirty);
|
1469 |
+
} else {
|
1470 |
+
if_block2 = create_if_block(ctx);
|
1471 |
+
if_block2.c();
|
1472 |
+
if_block2.m(div, null);
|
1473 |
+
}
|
1474 |
+
} else if (if_block2) {
|
1475 |
+
if_block2.d(1);
|
1476 |
+
if_block2 = null;
|
1477 |
+
}
|
1478 |
+
},
|
1479 |
+
i(local) {
|
1480 |
+
if (current) return;
|
1481 |
+
transition_in(if_block0);
|
1482 |
+
transition_in(if_block1);
|
1483 |
+
current = true;
|
1484 |
+
},
|
1485 |
+
o(local) {
|
1486 |
+
transition_out(if_block0);
|
1487 |
+
transition_out(if_block1);
|
1488 |
+
current = false;
|
1489 |
+
},
|
1490 |
+
d(detaching) {
|
1491 |
+
if (detaching) detach(div);
|
1492 |
+
if (if_block0) if_block0.d();
|
1493 |
+
if (if_block1) if_block1.d();
|
1494 |
+
if (if_block2) if_block2.d();
|
1495 |
+
}
|
1496 |
+
};
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
function instance($$self, $$props, $$invalidate) {
|
1500 |
+
let { options } = $$props;
|
1501 |
+
let { entry } = $$props;
|
1502 |
+
let { modelColumn } = $$props;
|
1503 |
+
let { labelColumn } = $$props;
|
1504 |
+
let { dataColumn } = $$props;
|
1505 |
+
let { idColumn } = $$props;
|
1506 |
+
|
1507 |
+
$$self.$$set = $$props => {
|
1508 |
+
if ('options' in $$props) $$invalidate(4, options = $$props.options);
|
1509 |
+
if ('entry' in $$props) $$invalidate(0, entry = $$props.entry);
|
1510 |
+
if ('modelColumn' in $$props) $$invalidate(1, modelColumn = $$props.modelColumn);
|
1511 |
+
if ('labelColumn' in $$props) $$invalidate(2, labelColumn = $$props.labelColumn);
|
1512 |
+
if ('dataColumn' in $$props) $$invalidate(3, dataColumn = $$props.dataColumn);
|
1513 |
+
if ('idColumn' in $$props) $$invalidate(5, idColumn = $$props.idColumn);
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
return [entry, modelColumn, labelColumn, dataColumn, options, idColumn];
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
class InstanceView extends SvelteComponent {
|
1520 |
+
constructor(options) {
|
1521 |
+
super();
|
1522 |
+
|
1523 |
+
init(
|
1524 |
+
this,
|
1525 |
+
options,
|
1526 |
+
instance,
|
1527 |
+
create_fragment,
|
1528 |
+
safe_not_equal,
|
1529 |
+
{
|
1530 |
+
options: 4,
|
1531 |
+
entry: 0,
|
1532 |
+
modelColumn: 1,
|
1533 |
+
labelColumn: 2,
|
1534 |
+
dataColumn: 3,
|
1535 |
+
idColumn: 5
|
1536 |
+
},
|
1537 |
+
add_css
|
1538 |
+
);
|
1539 |
+
}
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
function getInstance(
|
1543 |
+
div,
|
1544 |
+
viewOptions,
|
1545 |
+
entry,
|
1546 |
+
modelColumn,
|
1547 |
+
labelColumn,
|
1548 |
+
dataColumn,
|
1549 |
+
idColumn
|
1550 |
+
) {
|
1551 |
+
new InstanceView({
|
1552 |
+
target: div,
|
1553 |
+
props: {
|
1554 |
+
entry: entry,
|
1555 |
+
viewOptions: viewOptions,
|
1556 |
+
modelColumn: modelColumn,
|
1557 |
+
labelColumn: labelColumn,
|
1558 |
+
dataColumn: dataColumn,
|
1559 |
+
idColumn: idColumn,
|
1560 |
+
},
|
1561 |
+
hydrate: true,
|
1562 |
+
});
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
// export function getOptions(div, setOptions) {
|
1566 |
+
// new OptionsView({
|
1567 |
+
// target: div,
|
1568 |
+
// props: {
|
1569 |
+
// setOptions,
|
1570 |
+
// },
|
1571 |
+
// });
|
1572 |
+
// }
|
1573 |
+
|
1574 |
+
export { getInstance };
|
evals/.zeno_cache_emotional-intelligence/OUTPUTgpt-3_5-turbo-0301.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:50d21781d11f96809aa7a85b82db56a2668ba6f4720fce63dfae341799ec118a
|
3 |
+
size 31925
|
evals/.zeno_cache_emotional-intelligence/OUTPUTgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ed31ac3196dc06c30dc72699021d213d63ed04f0ae7b3ea57a2cba30bd3674c1
|
3 |
+
size 32133
|
evals/.zeno_cache_emotional-intelligence/POSTDISTILLcorrectgpt-3_5-turbo-0301.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:01b0699b53d72706048d2318a24f37337fc990190ada21e7f2ddae6bb9cdc3b4
|
3 |
+
size 4164
|
evals/.zeno_cache_emotional-intelligence/POSTDISTILLcorrectgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4db6bc007f1e1df5f8f4e02e87e8bd220b745ffe3ad3eca796f525355b9155d1
|
3 |
+
size 4125
|
evals/.zeno_cache_emotional-intelligence/folders.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec0a6ccf9debf1c16781445c4b9106080d00478b0559469336db7c7b7b9711c8
|
3 |
+
size 5
|
evals/.zeno_cache_emotional-intelligence/reports.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec0a6ccf9debf1c16781445c4b9106080d00478b0559469336db7c7b7b9711c8
|
3 |
+
size 5
|
evals/.zeno_cache_emotional-intelligence/view.mjs
ADDED
@@ -0,0 +1,1574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function noop() { }
|
2 |
+
function run(fn) {
|
3 |
+
return fn();
|
4 |
+
}
|
5 |
+
function blank_object() {
|
6 |
+
return Object.create(null);
|
7 |
+
}
|
8 |
+
function run_all(fns) {
|
9 |
+
fns.forEach(run);
|
10 |
+
}
|
11 |
+
function is_function(thing) {
|
12 |
+
return typeof thing === 'function';
|
13 |
+
}
|
14 |
+
function safe_not_equal(a, b) {
|
15 |
+
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
16 |
+
}
|
17 |
+
function is_empty(obj) {
|
18 |
+
return Object.keys(obj).length === 0;
|
19 |
+
}
|
20 |
+
function null_to_empty(value) {
|
21 |
+
return value == null ? '' : value;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM
|
25 |
+
// at the end of hydration without touching the remaining nodes.
|
26 |
+
let is_hydrating = false;
|
27 |
+
function start_hydrating() {
|
28 |
+
is_hydrating = true;
|
29 |
+
}
|
30 |
+
function end_hydrating() {
|
31 |
+
is_hydrating = false;
|
32 |
+
}
|
33 |
+
function upper_bound(low, high, key, value) {
|
34 |
+
// Return first index of value larger than input value in the range [low, high)
|
35 |
+
while (low < high) {
|
36 |
+
const mid = low + ((high - low) >> 1);
|
37 |
+
if (key(mid) <= value) {
|
38 |
+
low = mid + 1;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
high = mid;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return low;
|
45 |
+
}
|
46 |
+
function init_hydrate(target) {
|
47 |
+
if (target.hydrate_init)
|
48 |
+
return;
|
49 |
+
target.hydrate_init = true;
|
50 |
+
// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>
|
51 |
+
let children = target.childNodes;
|
52 |
+
// If target is <head>, there may be children without claim_order
|
53 |
+
if (target.nodeName === 'HEAD') {
|
54 |
+
const myChildren = [];
|
55 |
+
for (let i = 0; i < children.length; i++) {
|
56 |
+
const node = children[i];
|
57 |
+
if (node.claim_order !== undefined) {
|
58 |
+
myChildren.push(node);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
children = myChildren;
|
62 |
+
}
|
63 |
+
/*
|
64 |
+
* Reorder claimed children optimally.
|
65 |
+
* We can reorder claimed children optimally by finding the longest subsequence of
|
66 |
+
* nodes that are already claimed in order and only moving the rest. The longest
|
67 |
+
* subsequence of nodes that are claimed in order can be found by
|
68 |
+
* computing the longest increasing subsequence of .claim_order values.
|
69 |
+
*
|
70 |
+
* This algorithm is optimal in generating the least amount of reorder operations
|
71 |
+
* possible.
|
72 |
+
*
|
73 |
+
* Proof:
|
74 |
+
* We know that, given a set of reordering operations, the nodes that do not move
|
75 |
+
* always form an increasing subsequence, since they do not move among each other
|
76 |
+
* meaning that they must be already ordered among each other. Thus, the maximal
|
77 |
+
* set of nodes that do not move form a longest increasing subsequence.
|
78 |
+
*/
|
79 |
+
// Compute longest increasing subsequence
|
80 |
+
// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j
|
81 |
+
const m = new Int32Array(children.length + 1);
|
82 |
+
// Predecessor indices + 1
|
83 |
+
const p = new Int32Array(children.length);
|
84 |
+
m[0] = -1;
|
85 |
+
let longest = 0;
|
86 |
+
for (let i = 0; i < children.length; i++) {
|
87 |
+
const current = children[i].claim_order;
|
88 |
+
// Find the largest subsequence length such that it ends in a value less than our current value
|
89 |
+
// upper_bound returns first greater value, so we subtract one
|
90 |
+
// with fast path for when we are on the current longest subsequence
|
91 |
+
const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;
|
92 |
+
p[i] = m[seqLen] + 1;
|
93 |
+
const newLen = seqLen + 1;
|
94 |
+
// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.
|
95 |
+
m[newLen] = i;
|
96 |
+
longest = Math.max(newLen, longest);
|
97 |
+
}
|
98 |
+
// The longest increasing subsequence of nodes (initially reversed)
|
99 |
+
const lis = [];
|
100 |
+
// The rest of the nodes, nodes that will be moved
|
101 |
+
const toMove = [];
|
102 |
+
let last = children.length - 1;
|
103 |
+
for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {
|
104 |
+
lis.push(children[cur - 1]);
|
105 |
+
for (; last >= cur; last--) {
|
106 |
+
toMove.push(children[last]);
|
107 |
+
}
|
108 |
+
last--;
|
109 |
+
}
|
110 |
+
for (; last >= 0; last--) {
|
111 |
+
toMove.push(children[last]);
|
112 |
+
}
|
113 |
+
lis.reverse();
|
114 |
+
// We sort the nodes being moved to guarantee that their insertion order matches the claim order
|
115 |
+
toMove.sort((a, b) => a.claim_order - b.claim_order);
|
116 |
+
// Finally, we move the nodes
|
117 |
+
for (let i = 0, j = 0; i < toMove.length; i++) {
|
118 |
+
while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {
|
119 |
+
j++;
|
120 |
+
}
|
121 |
+
const anchor = j < lis.length ? lis[j] : null;
|
122 |
+
target.insertBefore(toMove[i], anchor);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
function append(target, node) {
|
126 |
+
target.appendChild(node);
|
127 |
+
}
|
128 |
+
function append_styles(target, style_sheet_id, styles) {
|
129 |
+
const append_styles_to = get_root_for_style(target);
|
130 |
+
if (!append_styles_to.getElementById(style_sheet_id)) {
|
131 |
+
const style = element('style');
|
132 |
+
style.id = style_sheet_id;
|
133 |
+
style.textContent = styles;
|
134 |
+
append_stylesheet(append_styles_to, style);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
function get_root_for_style(node) {
|
138 |
+
if (!node)
|
139 |
+
return document;
|
140 |
+
const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
141 |
+
if (root && root.host) {
|
142 |
+
return root;
|
143 |
+
}
|
144 |
+
return node.ownerDocument;
|
145 |
+
}
|
146 |
+
function append_stylesheet(node, style) {
|
147 |
+
append(node.head || node, style);
|
148 |
+
return style.sheet;
|
149 |
+
}
|
150 |
+
function append_hydration(target, node) {
|
151 |
+
if (is_hydrating) {
|
152 |
+
init_hydrate(target);
|
153 |
+
if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {
|
154 |
+
target.actual_end_child = target.firstChild;
|
155 |
+
}
|
156 |
+
// Skip nodes of undefined ordering
|
157 |
+
while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {
|
158 |
+
target.actual_end_child = target.actual_end_child.nextSibling;
|
159 |
+
}
|
160 |
+
if (node !== target.actual_end_child) {
|
161 |
+
// We only insert if the ordering of this node should be modified or the parent node is not target
|
162 |
+
if (node.claim_order !== undefined || node.parentNode !== target) {
|
163 |
+
target.insertBefore(node, target.actual_end_child);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
else {
|
167 |
+
target.actual_end_child = node.nextSibling;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
else if (node.parentNode !== target || node.nextSibling !== null) {
|
171 |
+
target.appendChild(node);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
function insert_hydration(target, node, anchor) {
|
175 |
+
if (is_hydrating && !anchor) {
|
176 |
+
append_hydration(target, node);
|
177 |
+
}
|
178 |
+
else if (node.parentNode !== target || node.nextSibling != anchor) {
|
179 |
+
target.insertBefore(node, anchor || null);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
function detach(node) {
|
183 |
+
if (node.parentNode) {
|
184 |
+
node.parentNode.removeChild(node);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
function destroy_each(iterations, detaching) {
|
188 |
+
for (let i = 0; i < iterations.length; i += 1) {
|
189 |
+
if (iterations[i])
|
190 |
+
iterations[i].d(detaching);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
function element(name) {
|
194 |
+
return document.createElement(name);
|
195 |
+
}
|
196 |
+
function svg_element(name) {
|
197 |
+
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
198 |
+
}
|
199 |
+
function text(data) {
|
200 |
+
return document.createTextNode(data);
|
201 |
+
}
|
202 |
+
function space() {
|
203 |
+
return text(' ');
|
204 |
+
}
|
205 |
+
function empty() {
|
206 |
+
return text('');
|
207 |
+
}
|
208 |
+
function attr(node, attribute, value) {
|
209 |
+
if (value == null)
|
210 |
+
node.removeAttribute(attribute);
|
211 |
+
else if (node.getAttribute(attribute) !== value)
|
212 |
+
node.setAttribute(attribute, value);
|
213 |
+
}
|
214 |
+
function children(element) {
|
215 |
+
return Array.from(element.childNodes);
|
216 |
+
}
|
217 |
+
function init_claim_info(nodes) {
|
218 |
+
if (nodes.claim_info === undefined) {
|
219 |
+
nodes.claim_info = { last_index: 0, total_claimed: 0 };
|
220 |
+
}
|
221 |
+
}
|
222 |
+
function claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {
|
223 |
+
// Try to find nodes in an order such that we lengthen the longest increasing subsequence
|
224 |
+
init_claim_info(nodes);
|
225 |
+
const resultNode = (() => {
|
226 |
+
// We first try to find an element after the previous one
|
227 |
+
for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {
|
228 |
+
const node = nodes[i];
|
229 |
+
if (predicate(node)) {
|
230 |
+
const replacement = processNode(node);
|
231 |
+
if (replacement === undefined) {
|
232 |
+
nodes.splice(i, 1);
|
233 |
+
}
|
234 |
+
else {
|
235 |
+
nodes[i] = replacement;
|
236 |
+
}
|
237 |
+
if (!dontUpdateLastIndex) {
|
238 |
+
nodes.claim_info.last_index = i;
|
239 |
+
}
|
240 |
+
return node;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
// Otherwise, we try to find one before
|
244 |
+
// We iterate in reverse so that we don't go too far back
|
245 |
+
for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {
|
246 |
+
const node = nodes[i];
|
247 |
+
if (predicate(node)) {
|
248 |
+
const replacement = processNode(node);
|
249 |
+
if (replacement === undefined) {
|
250 |
+
nodes.splice(i, 1);
|
251 |
+
}
|
252 |
+
else {
|
253 |
+
nodes[i] = replacement;
|
254 |
+
}
|
255 |
+
if (!dontUpdateLastIndex) {
|
256 |
+
nodes.claim_info.last_index = i;
|
257 |
+
}
|
258 |
+
else if (replacement === undefined) {
|
259 |
+
// Since we spliced before the last_index, we decrease it
|
260 |
+
nodes.claim_info.last_index--;
|
261 |
+
}
|
262 |
+
return node;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
// If we can't find any matching node, we create a new one
|
266 |
+
return createNode();
|
267 |
+
})();
|
268 |
+
resultNode.claim_order = nodes.claim_info.total_claimed;
|
269 |
+
nodes.claim_info.total_claimed += 1;
|
270 |
+
return resultNode;
|
271 |
+
}
|
272 |
+
function claim_element_base(nodes, name, attributes, create_element) {
|
273 |
+
return claim_node(nodes, (node) => node.nodeName === name, (node) => {
|
274 |
+
const remove = [];
|
275 |
+
for (let j = 0; j < node.attributes.length; j++) {
|
276 |
+
const attribute = node.attributes[j];
|
277 |
+
if (!attributes[attribute.name]) {
|
278 |
+
remove.push(attribute.name);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
remove.forEach(v => node.removeAttribute(v));
|
282 |
+
return undefined;
|
283 |
+
}, () => create_element(name));
|
284 |
+
}
|
285 |
+
function claim_element(nodes, name, attributes) {
|
286 |
+
return claim_element_base(nodes, name, attributes, element);
|
287 |
+
}
|
288 |
+
function claim_svg_element(nodes, name, attributes) {
|
289 |
+
return claim_element_base(nodes, name, attributes, svg_element);
|
290 |
+
}
|
291 |
+
function claim_text(nodes, data) {
|
292 |
+
return claim_node(nodes, (node) => node.nodeType === 3, (node) => {
|
293 |
+
const dataStr = '' + data;
|
294 |
+
if (node.data.startsWith(dataStr)) {
|
295 |
+
if (node.data.length !== dataStr.length) {
|
296 |
+
return node.splitText(dataStr.length);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
node.data = dataStr;
|
301 |
+
}
|
302 |
+
}, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements
|
303 |
+
);
|
304 |
+
}
|
305 |
+
function claim_space(nodes) {
|
306 |
+
return claim_text(nodes, ' ');
|
307 |
+
}
|
308 |
+
function set_data(text, data) {
|
309 |
+
data = '' + data;
|
310 |
+
if (text.wholeText !== data)
|
311 |
+
text.data = data;
|
312 |
+
}
|
313 |
+
|
314 |
+
let current_component;
|
315 |
+
function set_current_component(component) {
|
316 |
+
current_component = component;
|
317 |
+
}
|
318 |
+
|
319 |
+
const dirty_components = [];
|
320 |
+
const binding_callbacks = [];
|
321 |
+
const render_callbacks = [];
|
322 |
+
const flush_callbacks = [];
|
323 |
+
const resolved_promise = Promise.resolve();
|
324 |
+
let update_scheduled = false;
|
325 |
+
function schedule_update() {
|
326 |
+
if (!update_scheduled) {
|
327 |
+
update_scheduled = true;
|
328 |
+
resolved_promise.then(flush);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
function add_render_callback(fn) {
|
332 |
+
render_callbacks.push(fn);
|
333 |
+
}
|
334 |
+
// flush() calls callbacks in this order:
|
335 |
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
336 |
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
337 |
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
338 |
+
// for afterUpdates called during the initial onMount, which are called in
|
339 |
+
// reverse order: children before parents.
|
340 |
+
// Since callbacks might update component values, which could trigger another
|
341 |
+
// call to flush(), the following steps guard against this:
|
342 |
+
// 1. During beforeUpdate, any updated components will be added to the
|
343 |
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
344 |
+
// the flush index is kept outside the function, the reentrant call will pick
|
345 |
+
// up where the earlier call left off and go through all dirty components. The
|
346 |
+
// current_component value is saved and restored so that the reentrant call will
|
347 |
+
// not interfere with the "parent" flush() call.
|
348 |
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
349 |
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
350 |
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
351 |
+
// function, guarantees this behavior.
|
352 |
+
const seen_callbacks = new Set();
|
353 |
+
let flushidx = 0; // Do *not* move this inside the flush() function
|
354 |
+
function flush() {
|
355 |
+
// Do not reenter flush while dirty components are updated, as this can
|
356 |
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
357 |
+
// Reentrancy is ok afterwards for bindings etc.
|
358 |
+
if (flushidx !== 0) {
|
359 |
+
return;
|
360 |
+
}
|
361 |
+
const saved_component = current_component;
|
362 |
+
do {
|
363 |
+
// first, call beforeUpdate functions
|
364 |
+
// and update components
|
365 |
+
try {
|
366 |
+
while (flushidx < dirty_components.length) {
|
367 |
+
const component = dirty_components[flushidx];
|
368 |
+
flushidx++;
|
369 |
+
set_current_component(component);
|
370 |
+
update(component.$$);
|
371 |
+
}
|
372 |
+
}
|
373 |
+
catch (e) {
|
374 |
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
375 |
+
dirty_components.length = 0;
|
376 |
+
flushidx = 0;
|
377 |
+
throw e;
|
378 |
+
}
|
379 |
+
set_current_component(null);
|
380 |
+
dirty_components.length = 0;
|
381 |
+
flushidx = 0;
|
382 |
+
while (binding_callbacks.length)
|
383 |
+
binding_callbacks.pop()();
|
384 |
+
// then, once components are updated, call
|
385 |
+
// afterUpdate functions. This may cause
|
386 |
+
// subsequent updates...
|
387 |
+
for (let i = 0; i < render_callbacks.length; i += 1) {
|
388 |
+
const callback = render_callbacks[i];
|
389 |
+
if (!seen_callbacks.has(callback)) {
|
390 |
+
// ...so guard against infinite loops
|
391 |
+
seen_callbacks.add(callback);
|
392 |
+
callback();
|
393 |
+
}
|
394 |
+
}
|
395 |
+
render_callbacks.length = 0;
|
396 |
+
} while (dirty_components.length);
|
397 |
+
while (flush_callbacks.length) {
|
398 |
+
flush_callbacks.pop()();
|
399 |
+
}
|
400 |
+
update_scheduled = false;
|
401 |
+
seen_callbacks.clear();
|
402 |
+
set_current_component(saved_component);
|
403 |
+
}
|
404 |
+
function update($$) {
|
405 |
+
if ($$.fragment !== null) {
|
406 |
+
$$.update();
|
407 |
+
run_all($$.before_update);
|
408 |
+
const dirty = $$.dirty;
|
409 |
+
$$.dirty = [-1];
|
410 |
+
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
411 |
+
$$.after_update.forEach(add_render_callback);
|
412 |
+
}
|
413 |
+
}
|
414 |
+
const outroing = new Set();
|
415 |
+
let outros;
|
416 |
+
function group_outros() {
|
417 |
+
outros = {
|
418 |
+
r: 0,
|
419 |
+
c: [],
|
420 |
+
p: outros // parent group
|
421 |
+
};
|
422 |
+
}
|
423 |
+
function check_outros() {
|
424 |
+
if (!outros.r) {
|
425 |
+
run_all(outros.c);
|
426 |
+
}
|
427 |
+
outros = outros.p;
|
428 |
+
}
|
429 |
+
function transition_in(block, local) {
|
430 |
+
if (block && block.i) {
|
431 |
+
outroing.delete(block);
|
432 |
+
block.i(local);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
function transition_out(block, local, detach, callback) {
|
436 |
+
if (block && block.o) {
|
437 |
+
if (outroing.has(block))
|
438 |
+
return;
|
439 |
+
outroing.add(block);
|
440 |
+
outros.c.push(() => {
|
441 |
+
outroing.delete(block);
|
442 |
+
if (callback) {
|
443 |
+
if (detach)
|
444 |
+
block.d(1);
|
445 |
+
callback();
|
446 |
+
}
|
447 |
+
});
|
448 |
+
block.o(local);
|
449 |
+
}
|
450 |
+
else if (callback) {
|
451 |
+
callback();
|
452 |
+
}
|
453 |
+
}
|
454 |
+
function create_component(block) {
|
455 |
+
block && block.c();
|
456 |
+
}
|
457 |
+
function claim_component(block, parent_nodes) {
|
458 |
+
block && block.l(parent_nodes);
|
459 |
+
}
|
460 |
+
function mount_component(component, target, anchor, customElement) {
|
461 |
+
const { fragment, after_update } = component.$$;
|
462 |
+
fragment && fragment.m(target, anchor);
|
463 |
+
if (!customElement) {
|
464 |
+
// onMount happens before the initial afterUpdate
|
465 |
+
add_render_callback(() => {
|
466 |
+
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
467 |
+
// if the component was destroyed immediately
|
468 |
+
// it will update the `$$.on_destroy` reference to `null`.
|
469 |
+
// the destructured on_destroy may still reference to the old array
|
470 |
+
if (component.$$.on_destroy) {
|
471 |
+
component.$$.on_destroy.push(...new_on_destroy);
|
472 |
+
}
|
473 |
+
else {
|
474 |
+
// Edge case - component was destroyed immediately,
|
475 |
+
// most likely as a result of a binding initialising
|
476 |
+
run_all(new_on_destroy);
|
477 |
+
}
|
478 |
+
component.$$.on_mount = [];
|
479 |
+
});
|
480 |
+
}
|
481 |
+
after_update.forEach(add_render_callback);
|
482 |
+
}
|
483 |
+
function destroy_component(component, detaching) {
|
484 |
+
const $$ = component.$$;
|
485 |
+
if ($$.fragment !== null) {
|
486 |
+
run_all($$.on_destroy);
|
487 |
+
$$.fragment && $$.fragment.d(detaching);
|
488 |
+
// TODO null out other refs, including component.$$ (but need to
|
489 |
+
// preserve final state?)
|
490 |
+
$$.on_destroy = $$.fragment = null;
|
491 |
+
$$.ctx = [];
|
492 |
+
}
|
493 |
+
}
|
494 |
+
function make_dirty(component, i) {
|
495 |
+
if (component.$$.dirty[0] === -1) {
|
496 |
+
dirty_components.push(component);
|
497 |
+
schedule_update();
|
498 |
+
component.$$.dirty.fill(0);
|
499 |
+
}
|
500 |
+
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
501 |
+
}
|
502 |
+
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
503 |
+
const parent_component = current_component;
|
504 |
+
set_current_component(component);
|
505 |
+
const $$ = component.$$ = {
|
506 |
+
fragment: null,
|
507 |
+
ctx: [],
|
508 |
+
// state
|
509 |
+
props,
|
510 |
+
update: noop,
|
511 |
+
not_equal,
|
512 |
+
bound: blank_object(),
|
513 |
+
// lifecycle
|
514 |
+
on_mount: [],
|
515 |
+
on_destroy: [],
|
516 |
+
on_disconnect: [],
|
517 |
+
before_update: [],
|
518 |
+
after_update: [],
|
519 |
+
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
520 |
+
// everything else
|
521 |
+
callbacks: blank_object(),
|
522 |
+
dirty,
|
523 |
+
skip_bound: false,
|
524 |
+
root: options.target || parent_component.$$.root
|
525 |
+
};
|
526 |
+
append_styles && append_styles($$.root);
|
527 |
+
let ready = false;
|
528 |
+
$$.ctx = instance
|
529 |
+
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
530 |
+
const value = rest.length ? rest[0] : ret;
|
531 |
+
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
532 |
+
if (!$$.skip_bound && $$.bound[i])
|
533 |
+
$$.bound[i](value);
|
534 |
+
if (ready)
|
535 |
+
make_dirty(component, i);
|
536 |
+
}
|
537 |
+
return ret;
|
538 |
+
})
|
539 |
+
: [];
|
540 |
+
$$.update();
|
541 |
+
ready = true;
|
542 |
+
run_all($$.before_update);
|
543 |
+
// `false` as a special case of no DOM component
|
544 |
+
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
545 |
+
if (options.target) {
|
546 |
+
if (options.hydrate) {
|
547 |
+
start_hydrating();
|
548 |
+
const nodes = children(options.target);
|
549 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
550 |
+
$$.fragment && $$.fragment.l(nodes);
|
551 |
+
nodes.forEach(detach);
|
552 |
+
}
|
553 |
+
else {
|
554 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
555 |
+
$$.fragment && $$.fragment.c();
|
556 |
+
}
|
557 |
+
if (options.intro)
|
558 |
+
transition_in(component.$$.fragment);
|
559 |
+
mount_component(component, options.target, options.anchor, options.customElement);
|
560 |
+
end_hydrating();
|
561 |
+
flush();
|
562 |
+
}
|
563 |
+
set_current_component(parent_component);
|
564 |
+
}
|
565 |
+
/**
|
566 |
+
* Base class for Svelte components. Used when dev=false.
|
567 |
+
*/
|
568 |
+
class SvelteComponent {
|
569 |
+
$destroy() {
|
570 |
+
destroy_component(this, 1);
|
571 |
+
this.$destroy = noop;
|
572 |
+
}
|
573 |
+
$on(type, callback) {
|
574 |
+
if (!is_function(callback)) {
|
575 |
+
return noop;
|
576 |
+
}
|
577 |
+
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
578 |
+
callbacks.push(callback);
|
579 |
+
return () => {
|
580 |
+
const index = callbacks.indexOf(callback);
|
581 |
+
if (index !== -1)
|
582 |
+
callbacks.splice(index, 1);
|
583 |
+
};
|
584 |
+
}
|
585 |
+
$set($$props) {
|
586 |
+
if (this.$$set && !is_empty($$props)) {
|
587 |
+
this.$$.skip_bound = true;
|
588 |
+
this.$$set($$props);
|
589 |
+
this.$$.skip_bound = false;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
/* src/AssistantBlock.svelte generated by Svelte v3.55.1 */
|
595 |
+
|
596 |
+
function add_css$3(target) {
|
597 |
+
append_styles(target, "svelte-1e3mbn4", ".model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--logo)}.no-model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--G3)}.model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid var(--logo)}.no-model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid rgba(224, 224, 224, 1)}.box.svelte-1e3mbn4.svelte-1e3mbn4{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1e3mbn4 svg.svelte-1e3mbn4{min-width:24px;width:24px;margin-right:10px;margin-top:7px}.chat.svelte-1e3mbn4.svelte-1e3mbn4{border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
598 |
+
}
|
599 |
+
|
600 |
+
function create_fragment$3(ctx) {
|
601 |
+
let div;
|
602 |
+
let svg;
|
603 |
+
let path;
|
604 |
+
let svg_class_value;
|
605 |
+
let t0;
|
606 |
+
let p;
|
607 |
+
let t1;
|
608 |
+
let p_class_value;
|
609 |
+
|
610 |
+
return {
|
611 |
+
c() {
|
612 |
+
div = element("div");
|
613 |
+
svg = svg_element("svg");
|
614 |
+
path = svg_element("path");
|
615 |
+
t0 = space();
|
616 |
+
p = element("p");
|
617 |
+
t1 = text(/*input*/ ctx[0]);
|
618 |
+
this.h();
|
619 |
+
},
|
620 |
+
l(nodes) {
|
621 |
+
div = claim_element(nodes, "DIV", { class: true });
|
622 |
+
var div_nodes = children(div);
|
623 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
624 |
+
var svg_nodes = children(svg);
|
625 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
626 |
+
children(path).forEach(detach);
|
627 |
+
svg_nodes.forEach(detach);
|
628 |
+
t0 = claim_space(div_nodes);
|
629 |
+
p = claim_element(div_nodes, "P", { class: true });
|
630 |
+
var p_nodes = children(p);
|
631 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
632 |
+
p_nodes.forEach(detach);
|
633 |
+
div_nodes.forEach(detach);
|
634 |
+
this.h();
|
635 |
+
},
|
636 |
+
h() {
|
637 |
+
attr(path, "d", "M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z");
|
638 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
639 |
+
attr(svg, "viewBox", "0 0 640 512");
|
640 |
+
attr(svg, "class", svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"));
|
641 |
+
attr(p, "class", p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4");
|
642 |
+
attr(div, "class", "box svelte-1e3mbn4");
|
643 |
+
},
|
644 |
+
m(target, anchor) {
|
645 |
+
insert_hydration(target, div, anchor);
|
646 |
+
append_hydration(div, svg);
|
647 |
+
append_hydration(svg, path);
|
648 |
+
append_hydration(div, t0);
|
649 |
+
append_hydration(div, p);
|
650 |
+
append_hydration(p, t1);
|
651 |
+
},
|
652 |
+
p(ctx, [dirty]) {
|
653 |
+
if (dirty & /*output*/ 2 && svg_class_value !== (svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"))) {
|
654 |
+
attr(svg, "class", svg_class_value);
|
655 |
+
}
|
656 |
+
|
657 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
658 |
+
|
659 |
+
if (dirty & /*output*/ 2 && p_class_value !== (p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4")) {
|
660 |
+
attr(p, "class", p_class_value);
|
661 |
+
}
|
662 |
+
},
|
663 |
+
i: noop,
|
664 |
+
o: noop,
|
665 |
+
d(detaching) {
|
666 |
+
if (detaching) detach(div);
|
667 |
+
}
|
668 |
+
};
|
669 |
+
}
|
670 |
+
|
671 |
+
function instance$3($$self, $$props, $$invalidate) {
|
672 |
+
let { input } = $$props;
|
673 |
+
let { output = false } = $$props;
|
674 |
+
|
675 |
+
$$self.$$set = $$props => {
|
676 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
677 |
+
if ('output' in $$props) $$invalidate(1, output = $$props.output);
|
678 |
+
};
|
679 |
+
|
680 |
+
return [input, output];
|
681 |
+
}
|
682 |
+
|
683 |
+
class AssistantBlock extends SvelteComponent {
|
684 |
+
constructor(options) {
|
685 |
+
super();
|
686 |
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, { input: 0, output: 1 }, add_css$3);
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
/* src/SystemBlock.svelte generated by Svelte v3.55.1 */
|
691 |
+
|
692 |
+
function add_css$2(target) {
|
693 |
+
append_styles(target, "svelte-18o0ab2", "p.svelte-18o0ab2{margin:0px}");
|
694 |
+
}
|
695 |
+
|
696 |
+
function create_fragment$2(ctx) {
|
697 |
+
let p;
|
698 |
+
let b;
|
699 |
+
let t0;
|
700 |
+
let t1;
|
701 |
+
let span;
|
702 |
+
let t2;
|
703 |
+
|
704 |
+
return {
|
705 |
+
c() {
|
706 |
+
p = element("p");
|
707 |
+
b = element("b");
|
708 |
+
t0 = text("System:");
|
709 |
+
t1 = space();
|
710 |
+
span = element("span");
|
711 |
+
t2 = text(/*input*/ ctx[0]);
|
712 |
+
this.h();
|
713 |
+
},
|
714 |
+
l(nodes) {
|
715 |
+
p = claim_element(nodes, "P", { class: true });
|
716 |
+
var p_nodes = children(p);
|
717 |
+
b = claim_element(p_nodes, "B", {});
|
718 |
+
var b_nodes = children(b);
|
719 |
+
t0 = claim_text(b_nodes, "System:");
|
720 |
+
b_nodes.forEach(detach);
|
721 |
+
t1 = claim_space(p_nodes);
|
722 |
+
span = claim_element(p_nodes, "SPAN", {});
|
723 |
+
var span_nodes = children(span);
|
724 |
+
t2 = claim_text(span_nodes, /*input*/ ctx[0]);
|
725 |
+
span_nodes.forEach(detach);
|
726 |
+
p_nodes.forEach(detach);
|
727 |
+
this.h();
|
728 |
+
},
|
729 |
+
h() {
|
730 |
+
attr(p, "class", "svelte-18o0ab2");
|
731 |
+
},
|
732 |
+
m(target, anchor) {
|
733 |
+
insert_hydration(target, p, anchor);
|
734 |
+
append_hydration(p, b);
|
735 |
+
append_hydration(b, t0);
|
736 |
+
append_hydration(p, t1);
|
737 |
+
append_hydration(p, span);
|
738 |
+
append_hydration(span, t2);
|
739 |
+
},
|
740 |
+
p(ctx, [dirty]) {
|
741 |
+
if (dirty & /*input*/ 1) set_data(t2, /*input*/ ctx[0]);
|
742 |
+
},
|
743 |
+
i: noop,
|
744 |
+
o: noop,
|
745 |
+
d(detaching) {
|
746 |
+
if (detaching) detach(p);
|
747 |
+
}
|
748 |
+
};
|
749 |
+
}
|
750 |
+
|
751 |
+
function instance$2($$self, $$props, $$invalidate) {
|
752 |
+
let { input } = $$props;
|
753 |
+
|
754 |
+
$$self.$$set = $$props => {
|
755 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
756 |
+
};
|
757 |
+
|
758 |
+
return [input];
|
759 |
+
}
|
760 |
+
|
761 |
+
class SystemBlock extends SvelteComponent {
|
762 |
+
constructor(options) {
|
763 |
+
super();
|
764 |
+
init(this, options, instance$2, create_fragment$2, safe_not_equal, { input: 0 }, add_css$2);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
/* src/UserBlock.svelte generated by Svelte v3.55.1 */
|
769 |
+
|
770 |
+
function add_css$1(target) {
|
771 |
+
append_styles(target, "svelte-1lys9p1", ".box.svelte-1lys9p1.svelte-1lys9p1{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1lys9p1 svg.svelte-1lys9p1{min-width:24px;width:24px;margin-right:10px;margin-top:7px;fill:var(--G3)}.chat.svelte-1lys9p1.svelte-1lys9p1{border:1px solid rgba(224, 224, 224, 1);border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
772 |
+
}
|
773 |
+
|
774 |
+
function create_fragment$1(ctx) {
|
775 |
+
let div;
|
776 |
+
let svg;
|
777 |
+
let path;
|
778 |
+
let t0;
|
779 |
+
let p;
|
780 |
+
let t1;
|
781 |
+
|
782 |
+
return {
|
783 |
+
c() {
|
784 |
+
div = element("div");
|
785 |
+
svg = svg_element("svg");
|
786 |
+
path = svg_element("path");
|
787 |
+
t0 = space();
|
788 |
+
p = element("p");
|
789 |
+
t1 = text(/*input*/ ctx[0]);
|
790 |
+
this.h();
|
791 |
+
},
|
792 |
+
l(nodes) {
|
793 |
+
div = claim_element(nodes, "DIV", { class: true });
|
794 |
+
var div_nodes = children(div);
|
795 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
796 |
+
var svg_nodes = children(svg);
|
797 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
798 |
+
children(path).forEach(detach);
|
799 |
+
svg_nodes.forEach(detach);
|
800 |
+
t0 = claim_space(div_nodes);
|
801 |
+
p = claim_element(div_nodes, "P", { class: true });
|
802 |
+
var p_nodes = children(p);
|
803 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
804 |
+
p_nodes.forEach(detach);
|
805 |
+
div_nodes.forEach(detach);
|
806 |
+
this.h();
|
807 |
+
},
|
808 |
+
h() {
|
809 |
+
attr(path, "d", "M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z");
|
810 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
811 |
+
attr(svg, "viewBox", "0 0 448 512");
|
812 |
+
attr(svg, "class", "svelte-1lys9p1");
|
813 |
+
attr(p, "class", "chat svelte-1lys9p1");
|
814 |
+
attr(div, "class", "box svelte-1lys9p1");
|
815 |
+
},
|
816 |
+
m(target, anchor) {
|
817 |
+
insert_hydration(target, div, anchor);
|
818 |
+
append_hydration(div, svg);
|
819 |
+
append_hydration(svg, path);
|
820 |
+
append_hydration(div, t0);
|
821 |
+
append_hydration(div, p);
|
822 |
+
append_hydration(p, t1);
|
823 |
+
},
|
824 |
+
p(ctx, [dirty]) {
|
825 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
826 |
+
},
|
827 |
+
i: noop,
|
828 |
+
o: noop,
|
829 |
+
d(detaching) {
|
830 |
+
if (detaching) detach(div);
|
831 |
+
}
|
832 |
+
};
|
833 |
+
}
|
834 |
+
|
835 |
+
function instance$1($$self, $$props, $$invalidate) {
|
836 |
+
let { input } = $$props;
|
837 |
+
|
838 |
+
$$self.$$set = $$props => {
|
839 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
840 |
+
};
|
841 |
+
|
842 |
+
return [input];
|
843 |
+
}
|
844 |
+
|
845 |
+
class UserBlock extends SvelteComponent {
|
846 |
+
constructor(options) {
|
847 |
+
super();
|
848 |
+
init(this, options, instance$1, create_fragment$1, safe_not_equal, { input: 0 }, add_css$1);
|
849 |
+
}
|
850 |
+
}
|
851 |
+
|
852 |
+
/* src/InstanceView.svelte generated by Svelte v3.55.1 */
|
853 |
+
|
854 |
+
function add_css(target) {
|
855 |
+
append_styles(target, "svelte-eoma5v", "#container.svelte-eoma5v{border:0.5px solid rgb(224, 224, 224);min-width:350px;border-radius:2px;padding:10px}.label.svelte-eoma5v{margin-right:5px;font-weight:700}p.svelte-eoma5v{margin:5px;overflow-wrap:anywhere}");
|
856 |
+
}
|
857 |
+
|
858 |
+
function get_each_context(ctx, list, i) {
|
859 |
+
const child_ctx = ctx.slice();
|
860 |
+
child_ctx[6] = list[i];
|
861 |
+
return child_ctx;
|
862 |
+
}
|
863 |
+
|
864 |
+
// (21:2) {#if entry[dataColumn]}
|
865 |
+
function create_if_block_2(ctx) {
|
866 |
+
let current_block_type_index;
|
867 |
+
let if_block;
|
868 |
+
let if_block_anchor;
|
869 |
+
let current;
|
870 |
+
const if_block_creators = [create_if_block_3, create_else_block];
|
871 |
+
const if_blocks = [];
|
872 |
+
|
873 |
+
function select_block_type(ctx, dirty) {
|
874 |
+
if (typeof /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] === "string") return 0;
|
875 |
+
return 1;
|
876 |
+
}
|
877 |
+
|
878 |
+
current_block_type_index = select_block_type(ctx);
|
879 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
880 |
+
|
881 |
+
return {
|
882 |
+
c() {
|
883 |
+
if_block.c();
|
884 |
+
if_block_anchor = empty();
|
885 |
+
},
|
886 |
+
l(nodes) {
|
887 |
+
if_block.l(nodes);
|
888 |
+
if_block_anchor = empty();
|
889 |
+
},
|
890 |
+
m(target, anchor) {
|
891 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
892 |
+
insert_hydration(target, if_block_anchor, anchor);
|
893 |
+
current = true;
|
894 |
+
},
|
895 |
+
p(ctx, dirty) {
|
896 |
+
let previous_block_index = current_block_type_index;
|
897 |
+
current_block_type_index = select_block_type(ctx);
|
898 |
+
|
899 |
+
if (current_block_type_index === previous_block_index) {
|
900 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
901 |
+
} else {
|
902 |
+
group_outros();
|
903 |
+
|
904 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
905 |
+
if_blocks[previous_block_index] = null;
|
906 |
+
});
|
907 |
+
|
908 |
+
check_outros();
|
909 |
+
if_block = if_blocks[current_block_type_index];
|
910 |
+
|
911 |
+
if (!if_block) {
|
912 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
913 |
+
if_block.c();
|
914 |
+
} else {
|
915 |
+
if_block.p(ctx, dirty);
|
916 |
+
}
|
917 |
+
|
918 |
+
transition_in(if_block, 1);
|
919 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
920 |
+
}
|
921 |
+
},
|
922 |
+
i(local) {
|
923 |
+
if (current) return;
|
924 |
+
transition_in(if_block);
|
925 |
+
current = true;
|
926 |
+
},
|
927 |
+
o(local) {
|
928 |
+
transition_out(if_block);
|
929 |
+
current = false;
|
930 |
+
},
|
931 |
+
d(detaching) {
|
932 |
+
if_blocks[current_block_type_index].d(detaching);
|
933 |
+
if (detaching) detach(if_block_anchor);
|
934 |
+
}
|
935 |
+
};
|
936 |
+
}
|
937 |
+
|
938 |
+
// (24:4) {:else}
|
939 |
+
function create_else_block(ctx) {
|
940 |
+
let each_1_anchor;
|
941 |
+
let current;
|
942 |
+
let each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
943 |
+
let each_blocks = [];
|
944 |
+
|
945 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
946 |
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
947 |
+
}
|
948 |
+
|
949 |
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
950 |
+
each_blocks[i] = null;
|
951 |
+
});
|
952 |
+
|
953 |
+
return {
|
954 |
+
c() {
|
955 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
956 |
+
each_blocks[i].c();
|
957 |
+
}
|
958 |
+
|
959 |
+
each_1_anchor = empty();
|
960 |
+
},
|
961 |
+
l(nodes) {
|
962 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
963 |
+
each_blocks[i].l(nodes);
|
964 |
+
}
|
965 |
+
|
966 |
+
each_1_anchor = empty();
|
967 |
+
},
|
968 |
+
m(target, anchor) {
|
969 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
970 |
+
each_blocks[i].m(target, anchor);
|
971 |
+
}
|
972 |
+
|
973 |
+
insert_hydration(target, each_1_anchor, anchor);
|
974 |
+
current = true;
|
975 |
+
},
|
976 |
+
p(ctx, dirty) {
|
977 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
978 |
+
each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
979 |
+
let i;
|
980 |
+
|
981 |
+
for (i = 0; i < each_value.length; i += 1) {
|
982 |
+
const child_ctx = get_each_context(ctx, each_value, i);
|
983 |
+
|
984 |
+
if (each_blocks[i]) {
|
985 |
+
each_blocks[i].p(child_ctx, dirty);
|
986 |
+
transition_in(each_blocks[i], 1);
|
987 |
+
} else {
|
988 |
+
each_blocks[i] = create_each_block(child_ctx);
|
989 |
+
each_blocks[i].c();
|
990 |
+
transition_in(each_blocks[i], 1);
|
991 |
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
992 |
+
}
|
993 |
+
}
|
994 |
+
|
995 |
+
group_outros();
|
996 |
+
|
997 |
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
998 |
+
out(i);
|
999 |
+
}
|
1000 |
+
|
1001 |
+
check_outros();
|
1002 |
+
}
|
1003 |
+
},
|
1004 |
+
i(local) {
|
1005 |
+
if (current) return;
|
1006 |
+
|
1007 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
1008 |
+
transition_in(each_blocks[i]);
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
current = true;
|
1012 |
+
},
|
1013 |
+
o(local) {
|
1014 |
+
each_blocks = each_blocks.filter(Boolean);
|
1015 |
+
|
1016 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
1017 |
+
transition_out(each_blocks[i]);
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
current = false;
|
1021 |
+
},
|
1022 |
+
d(detaching) {
|
1023 |
+
destroy_each(each_blocks, detaching);
|
1024 |
+
if (detaching) detach(each_1_anchor);
|
1025 |
+
}
|
1026 |
+
};
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
// (22:4) {#if typeof entry[dataColumn] === "string"}
|
1030 |
+
function create_if_block_3(ctx) {
|
1031 |
+
let userblock;
|
1032 |
+
let current;
|
1033 |
+
|
1034 |
+
userblock = new UserBlock({
|
1035 |
+
props: {
|
1036 |
+
input: /*entry*/ ctx[0][/*dataColumn*/ ctx[3]]
|
1037 |
+
}
|
1038 |
+
});
|
1039 |
+
|
1040 |
+
return {
|
1041 |
+
c() {
|
1042 |
+
create_component(userblock.$$.fragment);
|
1043 |
+
},
|
1044 |
+
l(nodes) {
|
1045 |
+
claim_component(userblock.$$.fragment, nodes);
|
1046 |
+
},
|
1047 |
+
m(target, anchor) {
|
1048 |
+
mount_component(userblock, target, anchor);
|
1049 |
+
current = true;
|
1050 |
+
},
|
1051 |
+
p(ctx, dirty) {
|
1052 |
+
const userblock_changes = {};
|
1053 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
1054 |
+
userblock.$set(userblock_changes);
|
1055 |
+
},
|
1056 |
+
i(local) {
|
1057 |
+
if (current) return;
|
1058 |
+
transition_in(userblock.$$.fragment, local);
|
1059 |
+
current = true;
|
1060 |
+
},
|
1061 |
+
o(local) {
|
1062 |
+
transition_out(userblock.$$.fragment, local);
|
1063 |
+
current = false;
|
1064 |
+
},
|
1065 |
+
d(detaching) {
|
1066 |
+
destroy_component(userblock, detaching);
|
1067 |
+
}
|
1068 |
+
};
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
// (30:42)
|
1072 |
+
function create_if_block_6(ctx) {
|
1073 |
+
let userblock;
|
1074 |
+
let current;
|
1075 |
+
|
1076 |
+
userblock = new UserBlock({
|
1077 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1078 |
+
});
|
1079 |
+
|
1080 |
+
return {
|
1081 |
+
c() {
|
1082 |
+
create_component(userblock.$$.fragment);
|
1083 |
+
},
|
1084 |
+
l(nodes) {
|
1085 |
+
claim_component(userblock.$$.fragment, nodes);
|
1086 |
+
},
|
1087 |
+
m(target, anchor) {
|
1088 |
+
mount_component(userblock, target, anchor);
|
1089 |
+
current = true;
|
1090 |
+
},
|
1091 |
+
p(ctx, dirty) {
|
1092 |
+
const userblock_changes = {};
|
1093 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*item*/ ctx[6]["content"];
|
1094 |
+
userblock.$set(userblock_changes);
|
1095 |
+
},
|
1096 |
+
i(local) {
|
1097 |
+
if (current) return;
|
1098 |
+
transition_in(userblock.$$.fragment, local);
|
1099 |
+
current = true;
|
1100 |
+
},
|
1101 |
+
o(local) {
|
1102 |
+
transition_out(userblock.$$.fragment, local);
|
1103 |
+
current = false;
|
1104 |
+
},
|
1105 |
+
d(detaching) {
|
1106 |
+
destroy_component(userblock, detaching);
|
1107 |
+
}
|
1108 |
+
};
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
// (28:47)
|
1112 |
+
function create_if_block_5(ctx) {
|
1113 |
+
let assistantblock;
|
1114 |
+
let current;
|
1115 |
+
|
1116 |
+
assistantblock = new AssistantBlock({
|
1117 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
return {
|
1121 |
+
c() {
|
1122 |
+
create_component(assistantblock.$$.fragment);
|
1123 |
+
},
|
1124 |
+
l(nodes) {
|
1125 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1126 |
+
},
|
1127 |
+
m(target, anchor) {
|
1128 |
+
mount_component(assistantblock, target, anchor);
|
1129 |
+
current = true;
|
1130 |
+
},
|
1131 |
+
p(ctx, dirty) {
|
1132 |
+
const assistantblock_changes = {};
|
1133 |
+
if (dirty & /*entry, dataColumn*/ 9) assistantblock_changes.input = /*item*/ ctx[6]["content"];
|
1134 |
+
assistantblock.$set(assistantblock_changes);
|
1135 |
+
},
|
1136 |
+
i(local) {
|
1137 |
+
if (current) return;
|
1138 |
+
transition_in(assistantblock.$$.fragment, local);
|
1139 |
+
current = true;
|
1140 |
+
},
|
1141 |
+
o(local) {
|
1142 |
+
transition_out(assistantblock.$$.fragment, local);
|
1143 |
+
current = false;
|
1144 |
+
},
|
1145 |
+
d(detaching) {
|
1146 |
+
destroy_component(assistantblock, detaching);
|
1147 |
+
}
|
1148 |
+
};
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
// (26:8) {#if item["role"] === "system"}
|
1152 |
+
function create_if_block_4(ctx) {
|
1153 |
+
let systemblock;
|
1154 |
+
let current;
|
1155 |
+
|
1156 |
+
systemblock = new SystemBlock({
|
1157 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1158 |
+
});
|
1159 |
+
|
1160 |
+
return {
|
1161 |
+
c() {
|
1162 |
+
create_component(systemblock.$$.fragment);
|
1163 |
+
},
|
1164 |
+
l(nodes) {
|
1165 |
+
claim_component(systemblock.$$.fragment, nodes);
|
1166 |
+
},
|
1167 |
+
m(target, anchor) {
|
1168 |
+
mount_component(systemblock, target, anchor);
|
1169 |
+
current = true;
|
1170 |
+
},
|
1171 |
+
p(ctx, dirty) {
|
1172 |
+
const systemblock_changes = {};
|
1173 |
+
if (dirty & /*entry, dataColumn*/ 9) systemblock_changes.input = /*item*/ ctx[6]["content"];
|
1174 |
+
systemblock.$set(systemblock_changes);
|
1175 |
+
},
|
1176 |
+
i(local) {
|
1177 |
+
if (current) return;
|
1178 |
+
transition_in(systemblock.$$.fragment, local);
|
1179 |
+
current = true;
|
1180 |
+
},
|
1181 |
+
o(local) {
|
1182 |
+
transition_out(systemblock.$$.fragment, local);
|
1183 |
+
current = false;
|
1184 |
+
},
|
1185 |
+
d(detaching) {
|
1186 |
+
destroy_component(systemblock, detaching);
|
1187 |
+
}
|
1188 |
+
};
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
// (25:6) {#each entry[dataColumn] as item}
|
1192 |
+
function create_each_block(ctx) {
|
1193 |
+
let current_block_type_index;
|
1194 |
+
let if_block;
|
1195 |
+
let if_block_anchor;
|
1196 |
+
let current;
|
1197 |
+
const if_block_creators = [create_if_block_4, create_if_block_5, create_if_block_6];
|
1198 |
+
const if_blocks = [];
|
1199 |
+
|
1200 |
+
function select_block_type_1(ctx, dirty) {
|
1201 |
+
if (/*item*/ ctx[6]["role"] === "system") return 0;
|
1202 |
+
if (/*item*/ ctx[6]["role"] === "assistant") return 1;
|
1203 |
+
if (/*item*/ ctx[6]["role"] === "user") return 2;
|
1204 |
+
return -1;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
if (~(current_block_type_index = select_block_type_1(ctx))) {
|
1208 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
return {
|
1212 |
+
c() {
|
1213 |
+
if (if_block) if_block.c();
|
1214 |
+
if_block_anchor = empty();
|
1215 |
+
},
|
1216 |
+
l(nodes) {
|
1217 |
+
if (if_block) if_block.l(nodes);
|
1218 |
+
if_block_anchor = empty();
|
1219 |
+
},
|
1220 |
+
m(target, anchor) {
|
1221 |
+
if (~current_block_type_index) {
|
1222 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
insert_hydration(target, if_block_anchor, anchor);
|
1226 |
+
current = true;
|
1227 |
+
},
|
1228 |
+
p(ctx, dirty) {
|
1229 |
+
let previous_block_index = current_block_type_index;
|
1230 |
+
current_block_type_index = select_block_type_1(ctx);
|
1231 |
+
|
1232 |
+
if (current_block_type_index === previous_block_index) {
|
1233 |
+
if (~current_block_type_index) {
|
1234 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
1235 |
+
}
|
1236 |
+
} else {
|
1237 |
+
if (if_block) {
|
1238 |
+
group_outros();
|
1239 |
+
|
1240 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
1241 |
+
if_blocks[previous_block_index] = null;
|
1242 |
+
});
|
1243 |
+
|
1244 |
+
check_outros();
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
if (~current_block_type_index) {
|
1248 |
+
if_block = if_blocks[current_block_type_index];
|
1249 |
+
|
1250 |
+
if (!if_block) {
|
1251 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1252 |
+
if_block.c();
|
1253 |
+
} else {
|
1254 |
+
if_block.p(ctx, dirty);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
transition_in(if_block, 1);
|
1258 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
1259 |
+
} else {
|
1260 |
+
if_block = null;
|
1261 |
+
}
|
1262 |
+
}
|
1263 |
+
},
|
1264 |
+
i(local) {
|
1265 |
+
if (current) return;
|
1266 |
+
transition_in(if_block);
|
1267 |
+
current = true;
|
1268 |
+
},
|
1269 |
+
o(local) {
|
1270 |
+
transition_out(if_block);
|
1271 |
+
current = false;
|
1272 |
+
},
|
1273 |
+
d(detaching) {
|
1274 |
+
if (~current_block_type_index) {
|
1275 |
+
if_blocks[current_block_type_index].d(detaching);
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
if (detaching) detach(if_block_anchor);
|
1279 |
+
}
|
1280 |
+
};
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
// (36:2) {#if entry[modelColumn]}
|
1284 |
+
function create_if_block_1(ctx) {
|
1285 |
+
let assistantblock;
|
1286 |
+
let current;
|
1287 |
+
|
1288 |
+
assistantblock = new AssistantBlock({
|
1289 |
+
props: {
|
1290 |
+
input: /*entry*/ ctx[0][/*modelColumn*/ ctx[1]],
|
1291 |
+
output: true
|
1292 |
+
}
|
1293 |
+
});
|
1294 |
+
|
1295 |
+
return {
|
1296 |
+
c() {
|
1297 |
+
create_component(assistantblock.$$.fragment);
|
1298 |
+
},
|
1299 |
+
l(nodes) {
|
1300 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1301 |
+
},
|
1302 |
+
m(target, anchor) {
|
1303 |
+
mount_component(assistantblock, target, anchor);
|
1304 |
+
current = true;
|
1305 |
+
},
|
1306 |
+
p(ctx, dirty) {
|
1307 |
+
const assistantblock_changes = {};
|
1308 |
+
if (dirty & /*entry, modelColumn*/ 3) assistantblock_changes.input = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]];
|
1309 |
+
assistantblock.$set(assistantblock_changes);
|
1310 |
+
},
|
1311 |
+
i(local) {
|
1312 |
+
if (current) return;
|
1313 |
+
transition_in(assistantblock.$$.fragment, local);
|
1314 |
+
current = true;
|
1315 |
+
},
|
1316 |
+
o(local) {
|
1317 |
+
transition_out(assistantblock.$$.fragment, local);
|
1318 |
+
current = false;
|
1319 |
+
},
|
1320 |
+
d(detaching) {
|
1321 |
+
destroy_component(assistantblock, detaching);
|
1322 |
+
}
|
1323 |
+
};
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
// (39:2) {#if entry[labelColumn]}
|
1327 |
+
function create_if_block(ctx) {
|
1328 |
+
let p;
|
1329 |
+
let span;
|
1330 |
+
let t0;
|
1331 |
+
let t1;
|
1332 |
+
let t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "";
|
1333 |
+
let t2;
|
1334 |
+
|
1335 |
+
return {
|
1336 |
+
c() {
|
1337 |
+
p = element("p");
|
1338 |
+
span = element("span");
|
1339 |
+
t0 = text("Expected:");
|
1340 |
+
t1 = space();
|
1341 |
+
t2 = text(t2_value);
|
1342 |
+
this.h();
|
1343 |
+
},
|
1344 |
+
l(nodes) {
|
1345 |
+
p = claim_element(nodes, "P", { class: true });
|
1346 |
+
var p_nodes = children(p);
|
1347 |
+
span = claim_element(p_nodes, "SPAN", { class: true });
|
1348 |
+
var span_nodes = children(span);
|
1349 |
+
t0 = claim_text(span_nodes, "Expected:");
|
1350 |
+
span_nodes.forEach(detach);
|
1351 |
+
t1 = claim_space(p_nodes);
|
1352 |
+
t2 = claim_text(p_nodes, t2_value);
|
1353 |
+
p_nodes.forEach(detach);
|
1354 |
+
this.h();
|
1355 |
+
},
|
1356 |
+
h() {
|
1357 |
+
attr(span, "class", "label svelte-eoma5v");
|
1358 |
+
attr(p, "class", "svelte-eoma5v");
|
1359 |
+
},
|
1360 |
+
m(target, anchor) {
|
1361 |
+
insert_hydration(target, p, anchor);
|
1362 |
+
append_hydration(p, span);
|
1363 |
+
append_hydration(span, t0);
|
1364 |
+
append_hydration(p, t1);
|
1365 |
+
append_hydration(p, t2);
|
1366 |
+
},
|
1367 |
+
p(ctx, dirty) {
|
1368 |
+
if (dirty & /*entry, labelColumn*/ 5 && t2_value !== (t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "")) set_data(t2, t2_value);
|
1369 |
+
},
|
1370 |
+
d(detaching) {
|
1371 |
+
if (detaching) detach(p);
|
1372 |
+
}
|
1373 |
+
};
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
function create_fragment(ctx) {
|
1377 |
+
let div;
|
1378 |
+
let t0;
|
1379 |
+
let t1;
|
1380 |
+
let current;
|
1381 |
+
let if_block0 = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] && create_if_block_2(ctx);
|
1382 |
+
let if_block1 = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] && create_if_block_1(ctx);
|
1383 |
+
let if_block2 = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] && create_if_block(ctx);
|
1384 |
+
|
1385 |
+
return {
|
1386 |
+
c() {
|
1387 |
+
div = element("div");
|
1388 |
+
if (if_block0) if_block0.c();
|
1389 |
+
t0 = space();
|
1390 |
+
if (if_block1) if_block1.c();
|
1391 |
+
t1 = space();
|
1392 |
+
if (if_block2) if_block2.c();
|
1393 |
+
this.h();
|
1394 |
+
},
|
1395 |
+
l(nodes) {
|
1396 |
+
div = claim_element(nodes, "DIV", { id: true, class: true });
|
1397 |
+
var div_nodes = children(div);
|
1398 |
+
if (if_block0) if_block0.l(div_nodes);
|
1399 |
+
t0 = claim_space(div_nodes);
|
1400 |
+
if (if_block1) if_block1.l(div_nodes);
|
1401 |
+
t1 = claim_space(div_nodes);
|
1402 |
+
if (if_block2) if_block2.l(div_nodes);
|
1403 |
+
div_nodes.forEach(detach);
|
1404 |
+
this.h();
|
1405 |
+
},
|
1406 |
+
h() {
|
1407 |
+
attr(div, "id", "container");
|
1408 |
+
attr(div, "class", "svelte-eoma5v");
|
1409 |
+
},
|
1410 |
+
m(target, anchor) {
|
1411 |
+
insert_hydration(target, div, anchor);
|
1412 |
+
if (if_block0) if_block0.m(div, null);
|
1413 |
+
append_hydration(div, t0);
|
1414 |
+
if (if_block1) if_block1.m(div, null);
|
1415 |
+
append_hydration(div, t1);
|
1416 |
+
if (if_block2) if_block2.m(div, null);
|
1417 |
+
current = true;
|
1418 |
+
},
|
1419 |
+
p(ctx, [dirty]) {
|
1420 |
+
if (/*entry*/ ctx[0][/*dataColumn*/ ctx[3]]) {
|
1421 |
+
if (if_block0) {
|
1422 |
+
if_block0.p(ctx, dirty);
|
1423 |
+
|
1424 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
1425 |
+
transition_in(if_block0, 1);
|
1426 |
+
}
|
1427 |
+
} else {
|
1428 |
+
if_block0 = create_if_block_2(ctx);
|
1429 |
+
if_block0.c();
|
1430 |
+
transition_in(if_block0, 1);
|
1431 |
+
if_block0.m(div, t0);
|
1432 |
+
}
|
1433 |
+
} else if (if_block0) {
|
1434 |
+
group_outros();
|
1435 |
+
|
1436 |
+
transition_out(if_block0, 1, 1, () => {
|
1437 |
+
if_block0 = null;
|
1438 |
+
});
|
1439 |
+
|
1440 |
+
check_outros();
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
if (/*entry*/ ctx[0][/*modelColumn*/ ctx[1]]) {
|
1444 |
+
if (if_block1) {
|
1445 |
+
if_block1.p(ctx, dirty);
|
1446 |
+
|
1447 |
+
if (dirty & /*entry, modelColumn*/ 3) {
|
1448 |
+
transition_in(if_block1, 1);
|
1449 |
+
}
|
1450 |
+
} else {
|
1451 |
+
if_block1 = create_if_block_1(ctx);
|
1452 |
+
if_block1.c();
|
1453 |
+
transition_in(if_block1, 1);
|
1454 |
+
if_block1.m(div, t1);
|
1455 |
+
}
|
1456 |
+
} else if (if_block1) {
|
1457 |
+
group_outros();
|
1458 |
+
|
1459 |
+
transition_out(if_block1, 1, 1, () => {
|
1460 |
+
if_block1 = null;
|
1461 |
+
});
|
1462 |
+
|
1463 |
+
check_outros();
|
1464 |
+
}
|
1465 |
+
|
1466 |
+
if (/*entry*/ ctx[0][/*labelColumn*/ ctx[2]]) {
|
1467 |
+
if (if_block2) {
|
1468 |
+
if_block2.p(ctx, dirty);
|
1469 |
+
} else {
|
1470 |
+
if_block2 = create_if_block(ctx);
|
1471 |
+
if_block2.c();
|
1472 |
+
if_block2.m(div, null);
|
1473 |
+
}
|
1474 |
+
} else if (if_block2) {
|
1475 |
+
if_block2.d(1);
|
1476 |
+
if_block2 = null;
|
1477 |
+
}
|
1478 |
+
},
|
1479 |
+
i(local) {
|
1480 |
+
if (current) return;
|
1481 |
+
transition_in(if_block0);
|
1482 |
+
transition_in(if_block1);
|
1483 |
+
current = true;
|
1484 |
+
},
|
1485 |
+
o(local) {
|
1486 |
+
transition_out(if_block0);
|
1487 |
+
transition_out(if_block1);
|
1488 |
+
current = false;
|
1489 |
+
},
|
1490 |
+
d(detaching) {
|
1491 |
+
if (detaching) detach(div);
|
1492 |
+
if (if_block0) if_block0.d();
|
1493 |
+
if (if_block1) if_block1.d();
|
1494 |
+
if (if_block2) if_block2.d();
|
1495 |
+
}
|
1496 |
+
};
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
function instance($$self, $$props, $$invalidate) {
|
1500 |
+
let { options } = $$props;
|
1501 |
+
let { entry } = $$props;
|
1502 |
+
let { modelColumn } = $$props;
|
1503 |
+
let { labelColumn } = $$props;
|
1504 |
+
let { dataColumn } = $$props;
|
1505 |
+
let { idColumn } = $$props;
|
1506 |
+
|
1507 |
+
$$self.$$set = $$props => {
|
1508 |
+
if ('options' in $$props) $$invalidate(4, options = $$props.options);
|
1509 |
+
if ('entry' in $$props) $$invalidate(0, entry = $$props.entry);
|
1510 |
+
if ('modelColumn' in $$props) $$invalidate(1, modelColumn = $$props.modelColumn);
|
1511 |
+
if ('labelColumn' in $$props) $$invalidate(2, labelColumn = $$props.labelColumn);
|
1512 |
+
if ('dataColumn' in $$props) $$invalidate(3, dataColumn = $$props.dataColumn);
|
1513 |
+
if ('idColumn' in $$props) $$invalidate(5, idColumn = $$props.idColumn);
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
return [entry, modelColumn, labelColumn, dataColumn, options, idColumn];
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
class InstanceView extends SvelteComponent {
|
1520 |
+
constructor(options) {
|
1521 |
+
super();
|
1522 |
+
|
1523 |
+
init(
|
1524 |
+
this,
|
1525 |
+
options,
|
1526 |
+
instance,
|
1527 |
+
create_fragment,
|
1528 |
+
safe_not_equal,
|
1529 |
+
{
|
1530 |
+
options: 4,
|
1531 |
+
entry: 0,
|
1532 |
+
modelColumn: 1,
|
1533 |
+
labelColumn: 2,
|
1534 |
+
dataColumn: 3,
|
1535 |
+
idColumn: 5
|
1536 |
+
},
|
1537 |
+
add_css
|
1538 |
+
);
|
1539 |
+
}
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
function getInstance(
|
1543 |
+
div,
|
1544 |
+
viewOptions,
|
1545 |
+
entry,
|
1546 |
+
modelColumn,
|
1547 |
+
labelColumn,
|
1548 |
+
dataColumn,
|
1549 |
+
idColumn
|
1550 |
+
) {
|
1551 |
+
new InstanceView({
|
1552 |
+
target: div,
|
1553 |
+
props: {
|
1554 |
+
entry: entry,
|
1555 |
+
viewOptions: viewOptions,
|
1556 |
+
modelColumn: modelColumn,
|
1557 |
+
labelColumn: labelColumn,
|
1558 |
+
dataColumn: dataColumn,
|
1559 |
+
idColumn: idColumn,
|
1560 |
+
},
|
1561 |
+
hydrate: true,
|
1562 |
+
});
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
// export function getOptions(div, setOptions) {
|
1566 |
+
// new OptionsView({
|
1567 |
+
// target: div,
|
1568 |
+
// props: {
|
1569 |
+
// setOptions,
|
1570 |
+
// },
|
1571 |
+
// });
|
1572 |
+
// }
|
1573 |
+
|
1574 |
+
export { getInstance };
|
evals/.zeno_cache_us-tort-law/OUTPUTgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1b18a4e34a0102d22250e128e0ac886438ebc7f4e46dffbf4d2be3e77b79e28
|
3 |
+
size 11707
|
evals/.zeno_cache_us-tort-law/POSTDISTILLcorrectgpt-3_5-turbo.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:795d9469daa1f8e7891e29f5b4e0c1c8c1840fab3c163ea11e18ef996bfb3e48
|
3 |
+
size 9438
|
evals/.zeno_cache_us-tort-law/folders.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec0a6ccf9debf1c16781445c4b9106080d00478b0559469336db7c7b7b9711c8
|
3 |
+
size 5
|
evals/.zeno_cache_us-tort-law/reports.pickle
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ec0a6ccf9debf1c16781445c4b9106080d00478b0559469336db7c7b7b9711c8
|
3 |
+
size 5
|
evals/.zeno_cache_us-tort-law/view.mjs
ADDED
@@ -0,0 +1,1574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function noop() { }
|
2 |
+
function run(fn) {
|
3 |
+
return fn();
|
4 |
+
}
|
5 |
+
function blank_object() {
|
6 |
+
return Object.create(null);
|
7 |
+
}
|
8 |
+
function run_all(fns) {
|
9 |
+
fns.forEach(run);
|
10 |
+
}
|
11 |
+
function is_function(thing) {
|
12 |
+
return typeof thing === 'function';
|
13 |
+
}
|
14 |
+
function safe_not_equal(a, b) {
|
15 |
+
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
16 |
+
}
|
17 |
+
function is_empty(obj) {
|
18 |
+
return Object.keys(obj).length === 0;
|
19 |
+
}
|
20 |
+
function null_to_empty(value) {
|
21 |
+
return value == null ? '' : value;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM
|
25 |
+
// at the end of hydration without touching the remaining nodes.
|
26 |
+
let is_hydrating = false;
|
27 |
+
function start_hydrating() {
|
28 |
+
is_hydrating = true;
|
29 |
+
}
|
30 |
+
function end_hydrating() {
|
31 |
+
is_hydrating = false;
|
32 |
+
}
|
33 |
+
function upper_bound(low, high, key, value) {
|
34 |
+
// Return first index of value larger than input value in the range [low, high)
|
35 |
+
while (low < high) {
|
36 |
+
const mid = low + ((high - low) >> 1);
|
37 |
+
if (key(mid) <= value) {
|
38 |
+
low = mid + 1;
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
high = mid;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
return low;
|
45 |
+
}
|
46 |
+
function init_hydrate(target) {
|
47 |
+
if (target.hydrate_init)
|
48 |
+
return;
|
49 |
+
target.hydrate_init = true;
|
50 |
+
// We know that all children have claim_order values since the unclaimed have been detached if target is not <head>
|
51 |
+
let children = target.childNodes;
|
52 |
+
// If target is <head>, there may be children without claim_order
|
53 |
+
if (target.nodeName === 'HEAD') {
|
54 |
+
const myChildren = [];
|
55 |
+
for (let i = 0; i < children.length; i++) {
|
56 |
+
const node = children[i];
|
57 |
+
if (node.claim_order !== undefined) {
|
58 |
+
myChildren.push(node);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
children = myChildren;
|
62 |
+
}
|
63 |
+
/*
|
64 |
+
* Reorder claimed children optimally.
|
65 |
+
* We can reorder claimed children optimally by finding the longest subsequence of
|
66 |
+
* nodes that are already claimed in order and only moving the rest. The longest
|
67 |
+
* subsequence of nodes that are claimed in order can be found by
|
68 |
+
* computing the longest increasing subsequence of .claim_order values.
|
69 |
+
*
|
70 |
+
* This algorithm is optimal in generating the least amount of reorder operations
|
71 |
+
* possible.
|
72 |
+
*
|
73 |
+
* Proof:
|
74 |
+
* We know that, given a set of reordering operations, the nodes that do not move
|
75 |
+
* always form an increasing subsequence, since they do not move among each other
|
76 |
+
* meaning that they must be already ordered among each other. Thus, the maximal
|
77 |
+
* set of nodes that do not move form a longest increasing subsequence.
|
78 |
+
*/
|
79 |
+
// Compute longest increasing subsequence
|
80 |
+
// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j
|
81 |
+
const m = new Int32Array(children.length + 1);
|
82 |
+
// Predecessor indices + 1
|
83 |
+
const p = new Int32Array(children.length);
|
84 |
+
m[0] = -1;
|
85 |
+
let longest = 0;
|
86 |
+
for (let i = 0; i < children.length; i++) {
|
87 |
+
const current = children[i].claim_order;
|
88 |
+
// Find the largest subsequence length such that it ends in a value less than our current value
|
89 |
+
// upper_bound returns first greater value, so we subtract one
|
90 |
+
// with fast path for when we are on the current longest subsequence
|
91 |
+
const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;
|
92 |
+
p[i] = m[seqLen] + 1;
|
93 |
+
const newLen = seqLen + 1;
|
94 |
+
// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.
|
95 |
+
m[newLen] = i;
|
96 |
+
longest = Math.max(newLen, longest);
|
97 |
+
}
|
98 |
+
// The longest increasing subsequence of nodes (initially reversed)
|
99 |
+
const lis = [];
|
100 |
+
// The rest of the nodes, nodes that will be moved
|
101 |
+
const toMove = [];
|
102 |
+
let last = children.length - 1;
|
103 |
+
for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {
|
104 |
+
lis.push(children[cur - 1]);
|
105 |
+
for (; last >= cur; last--) {
|
106 |
+
toMove.push(children[last]);
|
107 |
+
}
|
108 |
+
last--;
|
109 |
+
}
|
110 |
+
for (; last >= 0; last--) {
|
111 |
+
toMove.push(children[last]);
|
112 |
+
}
|
113 |
+
lis.reverse();
|
114 |
+
// We sort the nodes being moved to guarantee that their insertion order matches the claim order
|
115 |
+
toMove.sort((a, b) => a.claim_order - b.claim_order);
|
116 |
+
// Finally, we move the nodes
|
117 |
+
for (let i = 0, j = 0; i < toMove.length; i++) {
|
118 |
+
while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {
|
119 |
+
j++;
|
120 |
+
}
|
121 |
+
const anchor = j < lis.length ? lis[j] : null;
|
122 |
+
target.insertBefore(toMove[i], anchor);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
function append(target, node) {
|
126 |
+
target.appendChild(node);
|
127 |
+
}
|
128 |
+
function append_styles(target, style_sheet_id, styles) {
|
129 |
+
const append_styles_to = get_root_for_style(target);
|
130 |
+
if (!append_styles_to.getElementById(style_sheet_id)) {
|
131 |
+
const style = element('style');
|
132 |
+
style.id = style_sheet_id;
|
133 |
+
style.textContent = styles;
|
134 |
+
append_stylesheet(append_styles_to, style);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
function get_root_for_style(node) {
|
138 |
+
if (!node)
|
139 |
+
return document;
|
140 |
+
const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
141 |
+
if (root && root.host) {
|
142 |
+
return root;
|
143 |
+
}
|
144 |
+
return node.ownerDocument;
|
145 |
+
}
|
146 |
+
function append_stylesheet(node, style) {
|
147 |
+
append(node.head || node, style);
|
148 |
+
return style.sheet;
|
149 |
+
}
|
150 |
+
function append_hydration(target, node) {
|
151 |
+
if (is_hydrating) {
|
152 |
+
init_hydrate(target);
|
153 |
+
if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {
|
154 |
+
target.actual_end_child = target.firstChild;
|
155 |
+
}
|
156 |
+
// Skip nodes of undefined ordering
|
157 |
+
while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {
|
158 |
+
target.actual_end_child = target.actual_end_child.nextSibling;
|
159 |
+
}
|
160 |
+
if (node !== target.actual_end_child) {
|
161 |
+
// We only insert if the ordering of this node should be modified or the parent node is not target
|
162 |
+
if (node.claim_order !== undefined || node.parentNode !== target) {
|
163 |
+
target.insertBefore(node, target.actual_end_child);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
else {
|
167 |
+
target.actual_end_child = node.nextSibling;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
else if (node.parentNode !== target || node.nextSibling !== null) {
|
171 |
+
target.appendChild(node);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
function insert_hydration(target, node, anchor) {
|
175 |
+
if (is_hydrating && !anchor) {
|
176 |
+
append_hydration(target, node);
|
177 |
+
}
|
178 |
+
else if (node.parentNode !== target || node.nextSibling != anchor) {
|
179 |
+
target.insertBefore(node, anchor || null);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
function detach(node) {
|
183 |
+
if (node.parentNode) {
|
184 |
+
node.parentNode.removeChild(node);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
function destroy_each(iterations, detaching) {
|
188 |
+
for (let i = 0; i < iterations.length; i += 1) {
|
189 |
+
if (iterations[i])
|
190 |
+
iterations[i].d(detaching);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
function element(name) {
|
194 |
+
return document.createElement(name);
|
195 |
+
}
|
196 |
+
function svg_element(name) {
|
197 |
+
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
198 |
+
}
|
199 |
+
function text(data) {
|
200 |
+
return document.createTextNode(data);
|
201 |
+
}
|
202 |
+
function space() {
|
203 |
+
return text(' ');
|
204 |
+
}
|
205 |
+
function empty() {
|
206 |
+
return text('');
|
207 |
+
}
|
208 |
+
function attr(node, attribute, value) {
|
209 |
+
if (value == null)
|
210 |
+
node.removeAttribute(attribute);
|
211 |
+
else if (node.getAttribute(attribute) !== value)
|
212 |
+
node.setAttribute(attribute, value);
|
213 |
+
}
|
214 |
+
function children(element) {
|
215 |
+
return Array.from(element.childNodes);
|
216 |
+
}
|
217 |
+
function init_claim_info(nodes) {
|
218 |
+
if (nodes.claim_info === undefined) {
|
219 |
+
nodes.claim_info = { last_index: 0, total_claimed: 0 };
|
220 |
+
}
|
221 |
+
}
|
222 |
+
function claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {
|
223 |
+
// Try to find nodes in an order such that we lengthen the longest increasing subsequence
|
224 |
+
init_claim_info(nodes);
|
225 |
+
const resultNode = (() => {
|
226 |
+
// We first try to find an element after the previous one
|
227 |
+
for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {
|
228 |
+
const node = nodes[i];
|
229 |
+
if (predicate(node)) {
|
230 |
+
const replacement = processNode(node);
|
231 |
+
if (replacement === undefined) {
|
232 |
+
nodes.splice(i, 1);
|
233 |
+
}
|
234 |
+
else {
|
235 |
+
nodes[i] = replacement;
|
236 |
+
}
|
237 |
+
if (!dontUpdateLastIndex) {
|
238 |
+
nodes.claim_info.last_index = i;
|
239 |
+
}
|
240 |
+
return node;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
// Otherwise, we try to find one before
|
244 |
+
// We iterate in reverse so that we don't go too far back
|
245 |
+
for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {
|
246 |
+
const node = nodes[i];
|
247 |
+
if (predicate(node)) {
|
248 |
+
const replacement = processNode(node);
|
249 |
+
if (replacement === undefined) {
|
250 |
+
nodes.splice(i, 1);
|
251 |
+
}
|
252 |
+
else {
|
253 |
+
nodes[i] = replacement;
|
254 |
+
}
|
255 |
+
if (!dontUpdateLastIndex) {
|
256 |
+
nodes.claim_info.last_index = i;
|
257 |
+
}
|
258 |
+
else if (replacement === undefined) {
|
259 |
+
// Since we spliced before the last_index, we decrease it
|
260 |
+
nodes.claim_info.last_index--;
|
261 |
+
}
|
262 |
+
return node;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
// If we can't find any matching node, we create a new one
|
266 |
+
return createNode();
|
267 |
+
})();
|
268 |
+
resultNode.claim_order = nodes.claim_info.total_claimed;
|
269 |
+
nodes.claim_info.total_claimed += 1;
|
270 |
+
return resultNode;
|
271 |
+
}
|
272 |
+
function claim_element_base(nodes, name, attributes, create_element) {
|
273 |
+
return claim_node(nodes, (node) => node.nodeName === name, (node) => {
|
274 |
+
const remove = [];
|
275 |
+
for (let j = 0; j < node.attributes.length; j++) {
|
276 |
+
const attribute = node.attributes[j];
|
277 |
+
if (!attributes[attribute.name]) {
|
278 |
+
remove.push(attribute.name);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
remove.forEach(v => node.removeAttribute(v));
|
282 |
+
return undefined;
|
283 |
+
}, () => create_element(name));
|
284 |
+
}
|
285 |
+
function claim_element(nodes, name, attributes) {
|
286 |
+
return claim_element_base(nodes, name, attributes, element);
|
287 |
+
}
|
288 |
+
function claim_svg_element(nodes, name, attributes) {
|
289 |
+
return claim_element_base(nodes, name, attributes, svg_element);
|
290 |
+
}
|
291 |
+
function claim_text(nodes, data) {
|
292 |
+
return claim_node(nodes, (node) => node.nodeType === 3, (node) => {
|
293 |
+
const dataStr = '' + data;
|
294 |
+
if (node.data.startsWith(dataStr)) {
|
295 |
+
if (node.data.length !== dataStr.length) {
|
296 |
+
return node.splitText(dataStr.length);
|
297 |
+
}
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
node.data = dataStr;
|
301 |
+
}
|
302 |
+
}, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements
|
303 |
+
);
|
304 |
+
}
|
305 |
+
function claim_space(nodes) {
|
306 |
+
return claim_text(nodes, ' ');
|
307 |
+
}
|
308 |
+
function set_data(text, data) {
|
309 |
+
data = '' + data;
|
310 |
+
if (text.wholeText !== data)
|
311 |
+
text.data = data;
|
312 |
+
}
|
313 |
+
|
314 |
+
let current_component;
|
315 |
+
function set_current_component(component) {
|
316 |
+
current_component = component;
|
317 |
+
}
|
318 |
+
|
319 |
+
const dirty_components = [];
|
320 |
+
const binding_callbacks = [];
|
321 |
+
const render_callbacks = [];
|
322 |
+
const flush_callbacks = [];
|
323 |
+
const resolved_promise = Promise.resolve();
|
324 |
+
let update_scheduled = false;
|
325 |
+
function schedule_update() {
|
326 |
+
if (!update_scheduled) {
|
327 |
+
update_scheduled = true;
|
328 |
+
resolved_promise.then(flush);
|
329 |
+
}
|
330 |
+
}
|
331 |
+
function add_render_callback(fn) {
|
332 |
+
render_callbacks.push(fn);
|
333 |
+
}
|
334 |
+
// flush() calls callbacks in this order:
|
335 |
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
336 |
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
337 |
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
338 |
+
// for afterUpdates called during the initial onMount, which are called in
|
339 |
+
// reverse order: children before parents.
|
340 |
+
// Since callbacks might update component values, which could trigger another
|
341 |
+
// call to flush(), the following steps guard against this:
|
342 |
+
// 1. During beforeUpdate, any updated components will be added to the
|
343 |
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
344 |
+
// the flush index is kept outside the function, the reentrant call will pick
|
345 |
+
// up where the earlier call left off and go through all dirty components. The
|
346 |
+
// current_component value is saved and restored so that the reentrant call will
|
347 |
+
// not interfere with the "parent" flush() call.
|
348 |
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
349 |
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
350 |
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
351 |
+
// function, guarantees this behavior.
|
352 |
+
const seen_callbacks = new Set();
|
353 |
+
let flushidx = 0; // Do *not* move this inside the flush() function
|
354 |
+
function flush() {
|
355 |
+
// Do not reenter flush while dirty components are updated, as this can
|
356 |
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
357 |
+
// Reentrancy is ok afterwards for bindings etc.
|
358 |
+
if (flushidx !== 0) {
|
359 |
+
return;
|
360 |
+
}
|
361 |
+
const saved_component = current_component;
|
362 |
+
do {
|
363 |
+
// first, call beforeUpdate functions
|
364 |
+
// and update components
|
365 |
+
try {
|
366 |
+
while (flushidx < dirty_components.length) {
|
367 |
+
const component = dirty_components[flushidx];
|
368 |
+
flushidx++;
|
369 |
+
set_current_component(component);
|
370 |
+
update(component.$$);
|
371 |
+
}
|
372 |
+
}
|
373 |
+
catch (e) {
|
374 |
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
375 |
+
dirty_components.length = 0;
|
376 |
+
flushidx = 0;
|
377 |
+
throw e;
|
378 |
+
}
|
379 |
+
set_current_component(null);
|
380 |
+
dirty_components.length = 0;
|
381 |
+
flushidx = 0;
|
382 |
+
while (binding_callbacks.length)
|
383 |
+
binding_callbacks.pop()();
|
384 |
+
// then, once components are updated, call
|
385 |
+
// afterUpdate functions. This may cause
|
386 |
+
// subsequent updates...
|
387 |
+
for (let i = 0; i < render_callbacks.length; i += 1) {
|
388 |
+
const callback = render_callbacks[i];
|
389 |
+
if (!seen_callbacks.has(callback)) {
|
390 |
+
// ...so guard against infinite loops
|
391 |
+
seen_callbacks.add(callback);
|
392 |
+
callback();
|
393 |
+
}
|
394 |
+
}
|
395 |
+
render_callbacks.length = 0;
|
396 |
+
} while (dirty_components.length);
|
397 |
+
while (flush_callbacks.length) {
|
398 |
+
flush_callbacks.pop()();
|
399 |
+
}
|
400 |
+
update_scheduled = false;
|
401 |
+
seen_callbacks.clear();
|
402 |
+
set_current_component(saved_component);
|
403 |
+
}
|
404 |
+
function update($$) {
|
405 |
+
if ($$.fragment !== null) {
|
406 |
+
$$.update();
|
407 |
+
run_all($$.before_update);
|
408 |
+
const dirty = $$.dirty;
|
409 |
+
$$.dirty = [-1];
|
410 |
+
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
411 |
+
$$.after_update.forEach(add_render_callback);
|
412 |
+
}
|
413 |
+
}
|
414 |
+
const outroing = new Set();
|
415 |
+
let outros;
|
416 |
+
function group_outros() {
|
417 |
+
outros = {
|
418 |
+
r: 0,
|
419 |
+
c: [],
|
420 |
+
p: outros // parent group
|
421 |
+
};
|
422 |
+
}
|
423 |
+
function check_outros() {
|
424 |
+
if (!outros.r) {
|
425 |
+
run_all(outros.c);
|
426 |
+
}
|
427 |
+
outros = outros.p;
|
428 |
+
}
|
429 |
+
function transition_in(block, local) {
|
430 |
+
if (block && block.i) {
|
431 |
+
outroing.delete(block);
|
432 |
+
block.i(local);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
function transition_out(block, local, detach, callback) {
|
436 |
+
if (block && block.o) {
|
437 |
+
if (outroing.has(block))
|
438 |
+
return;
|
439 |
+
outroing.add(block);
|
440 |
+
outros.c.push(() => {
|
441 |
+
outroing.delete(block);
|
442 |
+
if (callback) {
|
443 |
+
if (detach)
|
444 |
+
block.d(1);
|
445 |
+
callback();
|
446 |
+
}
|
447 |
+
});
|
448 |
+
block.o(local);
|
449 |
+
}
|
450 |
+
else if (callback) {
|
451 |
+
callback();
|
452 |
+
}
|
453 |
+
}
|
454 |
+
function create_component(block) {
|
455 |
+
block && block.c();
|
456 |
+
}
|
457 |
+
function claim_component(block, parent_nodes) {
|
458 |
+
block && block.l(parent_nodes);
|
459 |
+
}
|
460 |
+
function mount_component(component, target, anchor, customElement) {
|
461 |
+
const { fragment, after_update } = component.$$;
|
462 |
+
fragment && fragment.m(target, anchor);
|
463 |
+
if (!customElement) {
|
464 |
+
// onMount happens before the initial afterUpdate
|
465 |
+
add_render_callback(() => {
|
466 |
+
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
467 |
+
// if the component was destroyed immediately
|
468 |
+
// it will update the `$$.on_destroy` reference to `null`.
|
469 |
+
// the destructured on_destroy may still reference to the old array
|
470 |
+
if (component.$$.on_destroy) {
|
471 |
+
component.$$.on_destroy.push(...new_on_destroy);
|
472 |
+
}
|
473 |
+
else {
|
474 |
+
// Edge case - component was destroyed immediately,
|
475 |
+
// most likely as a result of a binding initialising
|
476 |
+
run_all(new_on_destroy);
|
477 |
+
}
|
478 |
+
component.$$.on_mount = [];
|
479 |
+
});
|
480 |
+
}
|
481 |
+
after_update.forEach(add_render_callback);
|
482 |
+
}
|
483 |
+
function destroy_component(component, detaching) {
|
484 |
+
const $$ = component.$$;
|
485 |
+
if ($$.fragment !== null) {
|
486 |
+
run_all($$.on_destroy);
|
487 |
+
$$.fragment && $$.fragment.d(detaching);
|
488 |
+
// TODO null out other refs, including component.$$ (but need to
|
489 |
+
// preserve final state?)
|
490 |
+
$$.on_destroy = $$.fragment = null;
|
491 |
+
$$.ctx = [];
|
492 |
+
}
|
493 |
+
}
|
494 |
+
function make_dirty(component, i) {
|
495 |
+
if (component.$$.dirty[0] === -1) {
|
496 |
+
dirty_components.push(component);
|
497 |
+
schedule_update();
|
498 |
+
component.$$.dirty.fill(0);
|
499 |
+
}
|
500 |
+
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
501 |
+
}
|
502 |
+
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
|
503 |
+
const parent_component = current_component;
|
504 |
+
set_current_component(component);
|
505 |
+
const $$ = component.$$ = {
|
506 |
+
fragment: null,
|
507 |
+
ctx: [],
|
508 |
+
// state
|
509 |
+
props,
|
510 |
+
update: noop,
|
511 |
+
not_equal,
|
512 |
+
bound: blank_object(),
|
513 |
+
// lifecycle
|
514 |
+
on_mount: [],
|
515 |
+
on_destroy: [],
|
516 |
+
on_disconnect: [],
|
517 |
+
before_update: [],
|
518 |
+
after_update: [],
|
519 |
+
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
520 |
+
// everything else
|
521 |
+
callbacks: blank_object(),
|
522 |
+
dirty,
|
523 |
+
skip_bound: false,
|
524 |
+
root: options.target || parent_component.$$.root
|
525 |
+
};
|
526 |
+
append_styles && append_styles($$.root);
|
527 |
+
let ready = false;
|
528 |
+
$$.ctx = instance
|
529 |
+
? instance(component, options.props || {}, (i, ret, ...rest) => {
|
530 |
+
const value = rest.length ? rest[0] : ret;
|
531 |
+
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
532 |
+
if (!$$.skip_bound && $$.bound[i])
|
533 |
+
$$.bound[i](value);
|
534 |
+
if (ready)
|
535 |
+
make_dirty(component, i);
|
536 |
+
}
|
537 |
+
return ret;
|
538 |
+
})
|
539 |
+
: [];
|
540 |
+
$$.update();
|
541 |
+
ready = true;
|
542 |
+
run_all($$.before_update);
|
543 |
+
// `false` as a special case of no DOM component
|
544 |
+
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
545 |
+
if (options.target) {
|
546 |
+
if (options.hydrate) {
|
547 |
+
start_hydrating();
|
548 |
+
const nodes = children(options.target);
|
549 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
550 |
+
$$.fragment && $$.fragment.l(nodes);
|
551 |
+
nodes.forEach(detach);
|
552 |
+
}
|
553 |
+
else {
|
554 |
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
555 |
+
$$.fragment && $$.fragment.c();
|
556 |
+
}
|
557 |
+
if (options.intro)
|
558 |
+
transition_in(component.$$.fragment);
|
559 |
+
mount_component(component, options.target, options.anchor, options.customElement);
|
560 |
+
end_hydrating();
|
561 |
+
flush();
|
562 |
+
}
|
563 |
+
set_current_component(parent_component);
|
564 |
+
}
|
565 |
+
/**
|
566 |
+
* Base class for Svelte components. Used when dev=false.
|
567 |
+
*/
|
568 |
+
class SvelteComponent {
|
569 |
+
$destroy() {
|
570 |
+
destroy_component(this, 1);
|
571 |
+
this.$destroy = noop;
|
572 |
+
}
|
573 |
+
$on(type, callback) {
|
574 |
+
if (!is_function(callback)) {
|
575 |
+
return noop;
|
576 |
+
}
|
577 |
+
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
578 |
+
callbacks.push(callback);
|
579 |
+
return () => {
|
580 |
+
const index = callbacks.indexOf(callback);
|
581 |
+
if (index !== -1)
|
582 |
+
callbacks.splice(index, 1);
|
583 |
+
};
|
584 |
+
}
|
585 |
+
$set($$props) {
|
586 |
+
if (this.$$set && !is_empty($$props)) {
|
587 |
+
this.$$.skip_bound = true;
|
588 |
+
this.$$set($$props);
|
589 |
+
this.$$.skip_bound = false;
|
590 |
+
}
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
/* src/AssistantBlock.svelte generated by Svelte v3.55.1 */
|
595 |
+
|
596 |
+
function add_css$3(target) {
|
597 |
+
append_styles(target, "svelte-1e3mbn4", ".model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--logo)}.no-model.svelte-1e3mbn4.svelte-1e3mbn4{fill:var(--G3)}.model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid var(--logo)}.no-model-border.svelte-1e3mbn4.svelte-1e3mbn4{border:1px solid rgba(224, 224, 224, 1)}.box.svelte-1e3mbn4.svelte-1e3mbn4{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1e3mbn4 svg.svelte-1e3mbn4{min-width:24px;width:24px;margin-right:10px;margin-top:7px}.chat.svelte-1e3mbn4.svelte-1e3mbn4{border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
598 |
+
}
|
599 |
+
|
600 |
+
function create_fragment$3(ctx) {
|
601 |
+
let div;
|
602 |
+
let svg;
|
603 |
+
let path;
|
604 |
+
let svg_class_value;
|
605 |
+
let t0;
|
606 |
+
let p;
|
607 |
+
let t1;
|
608 |
+
let p_class_value;
|
609 |
+
|
610 |
+
return {
|
611 |
+
c() {
|
612 |
+
div = element("div");
|
613 |
+
svg = svg_element("svg");
|
614 |
+
path = svg_element("path");
|
615 |
+
t0 = space();
|
616 |
+
p = element("p");
|
617 |
+
t1 = text(/*input*/ ctx[0]);
|
618 |
+
this.h();
|
619 |
+
},
|
620 |
+
l(nodes) {
|
621 |
+
div = claim_element(nodes, "DIV", { class: true });
|
622 |
+
var div_nodes = children(div);
|
623 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
624 |
+
var svg_nodes = children(svg);
|
625 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
626 |
+
children(path).forEach(detach);
|
627 |
+
svg_nodes.forEach(detach);
|
628 |
+
t0 = claim_space(div_nodes);
|
629 |
+
p = claim_element(div_nodes, "P", { class: true });
|
630 |
+
var p_nodes = children(p);
|
631 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
632 |
+
p_nodes.forEach(detach);
|
633 |
+
div_nodes.forEach(detach);
|
634 |
+
this.h();
|
635 |
+
},
|
636 |
+
h() {
|
637 |
+
attr(path, "d", "M320 0c17.7 0 32 14.3 32 32V96H472c39.8 0 72 32.2 72 72V440c0 39.8-32.2 72-72 72H168c-39.8 0-72-32.2-72-72V168c0-39.8 32.2-72 72-72H288V32c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H208zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H304zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c8.8 0 16-7.2 16-16s-7.2-16-16-16H400zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224H64V416H48c-26.5 0-48-21.5-48-48V272c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H576V224h16z");
|
638 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
639 |
+
attr(svg, "viewBox", "0 0 640 512");
|
640 |
+
attr(svg, "class", svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"));
|
641 |
+
attr(p, "class", p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4");
|
642 |
+
attr(div, "class", "box svelte-1e3mbn4");
|
643 |
+
},
|
644 |
+
m(target, anchor) {
|
645 |
+
insert_hydration(target, div, anchor);
|
646 |
+
append_hydration(div, svg);
|
647 |
+
append_hydration(svg, path);
|
648 |
+
append_hydration(div, t0);
|
649 |
+
append_hydration(div, p);
|
650 |
+
append_hydration(p, t1);
|
651 |
+
},
|
652 |
+
p(ctx, [dirty]) {
|
653 |
+
if (dirty & /*output*/ 2 && svg_class_value !== (svg_class_value = "" + (null_to_empty(/*output*/ ctx[1] ? "model" : "no-model") + " svelte-1e3mbn4"))) {
|
654 |
+
attr(svg, "class", svg_class_value);
|
655 |
+
}
|
656 |
+
|
657 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
658 |
+
|
659 |
+
if (dirty & /*output*/ 2 && p_class_value !== (p_class_value = "chat " + (/*output*/ ctx[1] ? 'model-border' : 'no-model-border') + " svelte-1e3mbn4")) {
|
660 |
+
attr(p, "class", p_class_value);
|
661 |
+
}
|
662 |
+
},
|
663 |
+
i: noop,
|
664 |
+
o: noop,
|
665 |
+
d(detaching) {
|
666 |
+
if (detaching) detach(div);
|
667 |
+
}
|
668 |
+
};
|
669 |
+
}
|
670 |
+
|
671 |
+
function instance$3($$self, $$props, $$invalidate) {
|
672 |
+
let { input } = $$props;
|
673 |
+
let { output = false } = $$props;
|
674 |
+
|
675 |
+
$$self.$$set = $$props => {
|
676 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
677 |
+
if ('output' in $$props) $$invalidate(1, output = $$props.output);
|
678 |
+
};
|
679 |
+
|
680 |
+
return [input, output];
|
681 |
+
}
|
682 |
+
|
683 |
+
class AssistantBlock extends SvelteComponent {
|
684 |
+
constructor(options) {
|
685 |
+
super();
|
686 |
+
init(this, options, instance$3, create_fragment$3, safe_not_equal, { input: 0, output: 1 }, add_css$3);
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
/* src/SystemBlock.svelte generated by Svelte v3.55.1 */
|
691 |
+
|
692 |
+
function add_css$2(target) {
|
693 |
+
append_styles(target, "svelte-18o0ab2", "p.svelte-18o0ab2{margin:0px}");
|
694 |
+
}
|
695 |
+
|
696 |
+
function create_fragment$2(ctx) {
|
697 |
+
let p;
|
698 |
+
let b;
|
699 |
+
let t0;
|
700 |
+
let t1;
|
701 |
+
let span;
|
702 |
+
let t2;
|
703 |
+
|
704 |
+
return {
|
705 |
+
c() {
|
706 |
+
p = element("p");
|
707 |
+
b = element("b");
|
708 |
+
t0 = text("System:");
|
709 |
+
t1 = space();
|
710 |
+
span = element("span");
|
711 |
+
t2 = text(/*input*/ ctx[0]);
|
712 |
+
this.h();
|
713 |
+
},
|
714 |
+
l(nodes) {
|
715 |
+
p = claim_element(nodes, "P", { class: true });
|
716 |
+
var p_nodes = children(p);
|
717 |
+
b = claim_element(p_nodes, "B", {});
|
718 |
+
var b_nodes = children(b);
|
719 |
+
t0 = claim_text(b_nodes, "System:");
|
720 |
+
b_nodes.forEach(detach);
|
721 |
+
t1 = claim_space(p_nodes);
|
722 |
+
span = claim_element(p_nodes, "SPAN", {});
|
723 |
+
var span_nodes = children(span);
|
724 |
+
t2 = claim_text(span_nodes, /*input*/ ctx[0]);
|
725 |
+
span_nodes.forEach(detach);
|
726 |
+
p_nodes.forEach(detach);
|
727 |
+
this.h();
|
728 |
+
},
|
729 |
+
h() {
|
730 |
+
attr(p, "class", "svelte-18o0ab2");
|
731 |
+
},
|
732 |
+
m(target, anchor) {
|
733 |
+
insert_hydration(target, p, anchor);
|
734 |
+
append_hydration(p, b);
|
735 |
+
append_hydration(b, t0);
|
736 |
+
append_hydration(p, t1);
|
737 |
+
append_hydration(p, span);
|
738 |
+
append_hydration(span, t2);
|
739 |
+
},
|
740 |
+
p(ctx, [dirty]) {
|
741 |
+
if (dirty & /*input*/ 1) set_data(t2, /*input*/ ctx[0]);
|
742 |
+
},
|
743 |
+
i: noop,
|
744 |
+
o: noop,
|
745 |
+
d(detaching) {
|
746 |
+
if (detaching) detach(p);
|
747 |
+
}
|
748 |
+
};
|
749 |
+
}
|
750 |
+
|
751 |
+
function instance$2($$self, $$props, $$invalidate) {
|
752 |
+
let { input } = $$props;
|
753 |
+
|
754 |
+
$$self.$$set = $$props => {
|
755 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
756 |
+
};
|
757 |
+
|
758 |
+
return [input];
|
759 |
+
}
|
760 |
+
|
761 |
+
class SystemBlock extends SvelteComponent {
|
762 |
+
constructor(options) {
|
763 |
+
super();
|
764 |
+
init(this, options, instance$2, create_fragment$2, safe_not_equal, { input: 0 }, add_css$2);
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
/* src/UserBlock.svelte generated by Svelte v3.55.1 */
|
769 |
+
|
770 |
+
function add_css$1(target) {
|
771 |
+
append_styles(target, "svelte-1lys9p1", ".box.svelte-1lys9p1.svelte-1lys9p1{margin-top:10px;margin-bottom:10px;display:flex;align-items:start}.box.svelte-1lys9p1 svg.svelte-1lys9p1{min-width:24px;width:24px;margin-right:10px;margin-top:7px;fill:var(--G3)}.chat.svelte-1lys9p1.svelte-1lys9p1{border:1px solid rgba(224, 224, 224, 1);border-radius:5px;margin:0px;padding:10px;overflow-wrap:anywhere}");
|
772 |
+
}
|
773 |
+
|
774 |
+
function create_fragment$1(ctx) {
|
775 |
+
let div;
|
776 |
+
let svg;
|
777 |
+
let path;
|
778 |
+
let t0;
|
779 |
+
let p;
|
780 |
+
let t1;
|
781 |
+
|
782 |
+
return {
|
783 |
+
c() {
|
784 |
+
div = element("div");
|
785 |
+
svg = svg_element("svg");
|
786 |
+
path = svg_element("path");
|
787 |
+
t0 = space();
|
788 |
+
p = element("p");
|
789 |
+
t1 = text(/*input*/ ctx[0]);
|
790 |
+
this.h();
|
791 |
+
},
|
792 |
+
l(nodes) {
|
793 |
+
div = claim_element(nodes, "DIV", { class: true });
|
794 |
+
var div_nodes = children(div);
|
795 |
+
svg = claim_svg_element(div_nodes, "svg", { xmlns: true, viewBox: true, class: true });
|
796 |
+
var svg_nodes = children(svg);
|
797 |
+
path = claim_svg_element(svg_nodes, "path", { d: true });
|
798 |
+
children(path).forEach(detach);
|
799 |
+
svg_nodes.forEach(detach);
|
800 |
+
t0 = claim_space(div_nodes);
|
801 |
+
p = claim_element(div_nodes, "P", { class: true });
|
802 |
+
var p_nodes = children(p);
|
803 |
+
t1 = claim_text(p_nodes, /*input*/ ctx[0]);
|
804 |
+
p_nodes.forEach(detach);
|
805 |
+
div_nodes.forEach(detach);
|
806 |
+
this.h();
|
807 |
+
},
|
808 |
+
h() {
|
809 |
+
attr(path, "d", "M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z");
|
810 |
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
811 |
+
attr(svg, "viewBox", "0 0 448 512");
|
812 |
+
attr(svg, "class", "svelte-1lys9p1");
|
813 |
+
attr(p, "class", "chat svelte-1lys9p1");
|
814 |
+
attr(div, "class", "box svelte-1lys9p1");
|
815 |
+
},
|
816 |
+
m(target, anchor) {
|
817 |
+
insert_hydration(target, div, anchor);
|
818 |
+
append_hydration(div, svg);
|
819 |
+
append_hydration(svg, path);
|
820 |
+
append_hydration(div, t0);
|
821 |
+
append_hydration(div, p);
|
822 |
+
append_hydration(p, t1);
|
823 |
+
},
|
824 |
+
p(ctx, [dirty]) {
|
825 |
+
if (dirty & /*input*/ 1) set_data(t1, /*input*/ ctx[0]);
|
826 |
+
},
|
827 |
+
i: noop,
|
828 |
+
o: noop,
|
829 |
+
d(detaching) {
|
830 |
+
if (detaching) detach(div);
|
831 |
+
}
|
832 |
+
};
|
833 |
+
}
|
834 |
+
|
835 |
+
function instance$1($$self, $$props, $$invalidate) {
|
836 |
+
let { input } = $$props;
|
837 |
+
|
838 |
+
$$self.$$set = $$props => {
|
839 |
+
if ('input' in $$props) $$invalidate(0, input = $$props.input);
|
840 |
+
};
|
841 |
+
|
842 |
+
return [input];
|
843 |
+
}
|
844 |
+
|
845 |
+
class UserBlock extends SvelteComponent {
|
846 |
+
constructor(options) {
|
847 |
+
super();
|
848 |
+
init(this, options, instance$1, create_fragment$1, safe_not_equal, { input: 0 }, add_css$1);
|
849 |
+
}
|
850 |
+
}
|
851 |
+
|
852 |
+
/* src/InstanceView.svelte generated by Svelte v3.55.1 */
|
853 |
+
|
854 |
+
function add_css(target) {
|
855 |
+
append_styles(target, "svelte-eoma5v", "#container.svelte-eoma5v{border:0.5px solid rgb(224, 224, 224);min-width:350px;border-radius:2px;padding:10px}.label.svelte-eoma5v{margin-right:5px;font-weight:700}p.svelte-eoma5v{margin:5px;overflow-wrap:anywhere}");
|
856 |
+
}
|
857 |
+
|
858 |
+
function get_each_context(ctx, list, i) {
|
859 |
+
const child_ctx = ctx.slice();
|
860 |
+
child_ctx[6] = list[i];
|
861 |
+
return child_ctx;
|
862 |
+
}
|
863 |
+
|
864 |
+
// (21:2) {#if entry[dataColumn]}
|
865 |
+
function create_if_block_2(ctx) {
|
866 |
+
let current_block_type_index;
|
867 |
+
let if_block;
|
868 |
+
let if_block_anchor;
|
869 |
+
let current;
|
870 |
+
const if_block_creators = [create_if_block_3, create_else_block];
|
871 |
+
const if_blocks = [];
|
872 |
+
|
873 |
+
function select_block_type(ctx, dirty) {
|
874 |
+
if (typeof /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] === "string") return 0;
|
875 |
+
return 1;
|
876 |
+
}
|
877 |
+
|
878 |
+
current_block_type_index = select_block_type(ctx);
|
879 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
880 |
+
|
881 |
+
return {
|
882 |
+
c() {
|
883 |
+
if_block.c();
|
884 |
+
if_block_anchor = empty();
|
885 |
+
},
|
886 |
+
l(nodes) {
|
887 |
+
if_block.l(nodes);
|
888 |
+
if_block_anchor = empty();
|
889 |
+
},
|
890 |
+
m(target, anchor) {
|
891 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
892 |
+
insert_hydration(target, if_block_anchor, anchor);
|
893 |
+
current = true;
|
894 |
+
},
|
895 |
+
p(ctx, dirty) {
|
896 |
+
let previous_block_index = current_block_type_index;
|
897 |
+
current_block_type_index = select_block_type(ctx);
|
898 |
+
|
899 |
+
if (current_block_type_index === previous_block_index) {
|
900 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
901 |
+
} else {
|
902 |
+
group_outros();
|
903 |
+
|
904 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
905 |
+
if_blocks[previous_block_index] = null;
|
906 |
+
});
|
907 |
+
|
908 |
+
check_outros();
|
909 |
+
if_block = if_blocks[current_block_type_index];
|
910 |
+
|
911 |
+
if (!if_block) {
|
912 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
913 |
+
if_block.c();
|
914 |
+
} else {
|
915 |
+
if_block.p(ctx, dirty);
|
916 |
+
}
|
917 |
+
|
918 |
+
transition_in(if_block, 1);
|
919 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
920 |
+
}
|
921 |
+
},
|
922 |
+
i(local) {
|
923 |
+
if (current) return;
|
924 |
+
transition_in(if_block);
|
925 |
+
current = true;
|
926 |
+
},
|
927 |
+
o(local) {
|
928 |
+
transition_out(if_block);
|
929 |
+
current = false;
|
930 |
+
},
|
931 |
+
d(detaching) {
|
932 |
+
if_blocks[current_block_type_index].d(detaching);
|
933 |
+
if (detaching) detach(if_block_anchor);
|
934 |
+
}
|
935 |
+
};
|
936 |
+
}
|
937 |
+
|
938 |
+
// (24:4) {:else}
|
939 |
+
function create_else_block(ctx) {
|
940 |
+
let each_1_anchor;
|
941 |
+
let current;
|
942 |
+
let each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
943 |
+
let each_blocks = [];
|
944 |
+
|
945 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
946 |
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
947 |
+
}
|
948 |
+
|
949 |
+
const out = i => transition_out(each_blocks[i], 1, 1, () => {
|
950 |
+
each_blocks[i] = null;
|
951 |
+
});
|
952 |
+
|
953 |
+
return {
|
954 |
+
c() {
|
955 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
956 |
+
each_blocks[i].c();
|
957 |
+
}
|
958 |
+
|
959 |
+
each_1_anchor = empty();
|
960 |
+
},
|
961 |
+
l(nodes) {
|
962 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
963 |
+
each_blocks[i].l(nodes);
|
964 |
+
}
|
965 |
+
|
966 |
+
each_1_anchor = empty();
|
967 |
+
},
|
968 |
+
m(target, anchor) {
|
969 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
970 |
+
each_blocks[i].m(target, anchor);
|
971 |
+
}
|
972 |
+
|
973 |
+
insert_hydration(target, each_1_anchor, anchor);
|
974 |
+
current = true;
|
975 |
+
},
|
976 |
+
p(ctx, dirty) {
|
977 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
978 |
+
each_value = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
979 |
+
let i;
|
980 |
+
|
981 |
+
for (i = 0; i < each_value.length; i += 1) {
|
982 |
+
const child_ctx = get_each_context(ctx, each_value, i);
|
983 |
+
|
984 |
+
if (each_blocks[i]) {
|
985 |
+
each_blocks[i].p(child_ctx, dirty);
|
986 |
+
transition_in(each_blocks[i], 1);
|
987 |
+
} else {
|
988 |
+
each_blocks[i] = create_each_block(child_ctx);
|
989 |
+
each_blocks[i].c();
|
990 |
+
transition_in(each_blocks[i], 1);
|
991 |
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
992 |
+
}
|
993 |
+
}
|
994 |
+
|
995 |
+
group_outros();
|
996 |
+
|
997 |
+
for (i = each_value.length; i < each_blocks.length; i += 1) {
|
998 |
+
out(i);
|
999 |
+
}
|
1000 |
+
|
1001 |
+
check_outros();
|
1002 |
+
}
|
1003 |
+
},
|
1004 |
+
i(local) {
|
1005 |
+
if (current) return;
|
1006 |
+
|
1007 |
+
for (let i = 0; i < each_value.length; i += 1) {
|
1008 |
+
transition_in(each_blocks[i]);
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
current = true;
|
1012 |
+
},
|
1013 |
+
o(local) {
|
1014 |
+
each_blocks = each_blocks.filter(Boolean);
|
1015 |
+
|
1016 |
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
1017 |
+
transition_out(each_blocks[i]);
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
current = false;
|
1021 |
+
},
|
1022 |
+
d(detaching) {
|
1023 |
+
destroy_each(each_blocks, detaching);
|
1024 |
+
if (detaching) detach(each_1_anchor);
|
1025 |
+
}
|
1026 |
+
};
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
// (22:4) {#if typeof entry[dataColumn] === "string"}
|
1030 |
+
function create_if_block_3(ctx) {
|
1031 |
+
let userblock;
|
1032 |
+
let current;
|
1033 |
+
|
1034 |
+
userblock = new UserBlock({
|
1035 |
+
props: {
|
1036 |
+
input: /*entry*/ ctx[0][/*dataColumn*/ ctx[3]]
|
1037 |
+
}
|
1038 |
+
});
|
1039 |
+
|
1040 |
+
return {
|
1041 |
+
c() {
|
1042 |
+
create_component(userblock.$$.fragment);
|
1043 |
+
},
|
1044 |
+
l(nodes) {
|
1045 |
+
claim_component(userblock.$$.fragment, nodes);
|
1046 |
+
},
|
1047 |
+
m(target, anchor) {
|
1048 |
+
mount_component(userblock, target, anchor);
|
1049 |
+
current = true;
|
1050 |
+
},
|
1051 |
+
p(ctx, dirty) {
|
1052 |
+
const userblock_changes = {};
|
1053 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]];
|
1054 |
+
userblock.$set(userblock_changes);
|
1055 |
+
},
|
1056 |
+
i(local) {
|
1057 |
+
if (current) return;
|
1058 |
+
transition_in(userblock.$$.fragment, local);
|
1059 |
+
current = true;
|
1060 |
+
},
|
1061 |
+
o(local) {
|
1062 |
+
transition_out(userblock.$$.fragment, local);
|
1063 |
+
current = false;
|
1064 |
+
},
|
1065 |
+
d(detaching) {
|
1066 |
+
destroy_component(userblock, detaching);
|
1067 |
+
}
|
1068 |
+
};
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
// (30:42)
|
1072 |
+
function create_if_block_6(ctx) {
|
1073 |
+
let userblock;
|
1074 |
+
let current;
|
1075 |
+
|
1076 |
+
userblock = new UserBlock({
|
1077 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1078 |
+
});
|
1079 |
+
|
1080 |
+
return {
|
1081 |
+
c() {
|
1082 |
+
create_component(userblock.$$.fragment);
|
1083 |
+
},
|
1084 |
+
l(nodes) {
|
1085 |
+
claim_component(userblock.$$.fragment, nodes);
|
1086 |
+
},
|
1087 |
+
m(target, anchor) {
|
1088 |
+
mount_component(userblock, target, anchor);
|
1089 |
+
current = true;
|
1090 |
+
},
|
1091 |
+
p(ctx, dirty) {
|
1092 |
+
const userblock_changes = {};
|
1093 |
+
if (dirty & /*entry, dataColumn*/ 9) userblock_changes.input = /*item*/ ctx[6]["content"];
|
1094 |
+
userblock.$set(userblock_changes);
|
1095 |
+
},
|
1096 |
+
i(local) {
|
1097 |
+
if (current) return;
|
1098 |
+
transition_in(userblock.$$.fragment, local);
|
1099 |
+
current = true;
|
1100 |
+
},
|
1101 |
+
o(local) {
|
1102 |
+
transition_out(userblock.$$.fragment, local);
|
1103 |
+
current = false;
|
1104 |
+
},
|
1105 |
+
d(detaching) {
|
1106 |
+
destroy_component(userblock, detaching);
|
1107 |
+
}
|
1108 |
+
};
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
// (28:47)
|
1112 |
+
function create_if_block_5(ctx) {
|
1113 |
+
let assistantblock;
|
1114 |
+
let current;
|
1115 |
+
|
1116 |
+
assistantblock = new AssistantBlock({
|
1117 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1118 |
+
});
|
1119 |
+
|
1120 |
+
return {
|
1121 |
+
c() {
|
1122 |
+
create_component(assistantblock.$$.fragment);
|
1123 |
+
},
|
1124 |
+
l(nodes) {
|
1125 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1126 |
+
},
|
1127 |
+
m(target, anchor) {
|
1128 |
+
mount_component(assistantblock, target, anchor);
|
1129 |
+
current = true;
|
1130 |
+
},
|
1131 |
+
p(ctx, dirty) {
|
1132 |
+
const assistantblock_changes = {};
|
1133 |
+
if (dirty & /*entry, dataColumn*/ 9) assistantblock_changes.input = /*item*/ ctx[6]["content"];
|
1134 |
+
assistantblock.$set(assistantblock_changes);
|
1135 |
+
},
|
1136 |
+
i(local) {
|
1137 |
+
if (current) return;
|
1138 |
+
transition_in(assistantblock.$$.fragment, local);
|
1139 |
+
current = true;
|
1140 |
+
},
|
1141 |
+
o(local) {
|
1142 |
+
transition_out(assistantblock.$$.fragment, local);
|
1143 |
+
current = false;
|
1144 |
+
},
|
1145 |
+
d(detaching) {
|
1146 |
+
destroy_component(assistantblock, detaching);
|
1147 |
+
}
|
1148 |
+
};
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
// (26:8) {#if item["role"] === "system"}
|
1152 |
+
function create_if_block_4(ctx) {
|
1153 |
+
let systemblock;
|
1154 |
+
let current;
|
1155 |
+
|
1156 |
+
systemblock = new SystemBlock({
|
1157 |
+
props: { input: /*item*/ ctx[6]["content"] }
|
1158 |
+
});
|
1159 |
+
|
1160 |
+
return {
|
1161 |
+
c() {
|
1162 |
+
create_component(systemblock.$$.fragment);
|
1163 |
+
},
|
1164 |
+
l(nodes) {
|
1165 |
+
claim_component(systemblock.$$.fragment, nodes);
|
1166 |
+
},
|
1167 |
+
m(target, anchor) {
|
1168 |
+
mount_component(systemblock, target, anchor);
|
1169 |
+
current = true;
|
1170 |
+
},
|
1171 |
+
p(ctx, dirty) {
|
1172 |
+
const systemblock_changes = {};
|
1173 |
+
if (dirty & /*entry, dataColumn*/ 9) systemblock_changes.input = /*item*/ ctx[6]["content"];
|
1174 |
+
systemblock.$set(systemblock_changes);
|
1175 |
+
},
|
1176 |
+
i(local) {
|
1177 |
+
if (current) return;
|
1178 |
+
transition_in(systemblock.$$.fragment, local);
|
1179 |
+
current = true;
|
1180 |
+
},
|
1181 |
+
o(local) {
|
1182 |
+
transition_out(systemblock.$$.fragment, local);
|
1183 |
+
current = false;
|
1184 |
+
},
|
1185 |
+
d(detaching) {
|
1186 |
+
destroy_component(systemblock, detaching);
|
1187 |
+
}
|
1188 |
+
};
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
// (25:6) {#each entry[dataColumn] as item}
|
1192 |
+
function create_each_block(ctx) {
|
1193 |
+
let current_block_type_index;
|
1194 |
+
let if_block;
|
1195 |
+
let if_block_anchor;
|
1196 |
+
let current;
|
1197 |
+
const if_block_creators = [create_if_block_4, create_if_block_5, create_if_block_6];
|
1198 |
+
const if_blocks = [];
|
1199 |
+
|
1200 |
+
function select_block_type_1(ctx, dirty) {
|
1201 |
+
if (/*item*/ ctx[6]["role"] === "system") return 0;
|
1202 |
+
if (/*item*/ ctx[6]["role"] === "assistant") return 1;
|
1203 |
+
if (/*item*/ ctx[6]["role"] === "user") return 2;
|
1204 |
+
return -1;
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
if (~(current_block_type_index = select_block_type_1(ctx))) {
|
1208 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1209 |
+
}
|
1210 |
+
|
1211 |
+
return {
|
1212 |
+
c() {
|
1213 |
+
if (if_block) if_block.c();
|
1214 |
+
if_block_anchor = empty();
|
1215 |
+
},
|
1216 |
+
l(nodes) {
|
1217 |
+
if (if_block) if_block.l(nodes);
|
1218 |
+
if_block_anchor = empty();
|
1219 |
+
},
|
1220 |
+
m(target, anchor) {
|
1221 |
+
if (~current_block_type_index) {
|
1222 |
+
if_blocks[current_block_type_index].m(target, anchor);
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
insert_hydration(target, if_block_anchor, anchor);
|
1226 |
+
current = true;
|
1227 |
+
},
|
1228 |
+
p(ctx, dirty) {
|
1229 |
+
let previous_block_index = current_block_type_index;
|
1230 |
+
current_block_type_index = select_block_type_1(ctx);
|
1231 |
+
|
1232 |
+
if (current_block_type_index === previous_block_index) {
|
1233 |
+
if (~current_block_type_index) {
|
1234 |
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
1235 |
+
}
|
1236 |
+
} else {
|
1237 |
+
if (if_block) {
|
1238 |
+
group_outros();
|
1239 |
+
|
1240 |
+
transition_out(if_blocks[previous_block_index], 1, 1, () => {
|
1241 |
+
if_blocks[previous_block_index] = null;
|
1242 |
+
});
|
1243 |
+
|
1244 |
+
check_outros();
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
if (~current_block_type_index) {
|
1248 |
+
if_block = if_blocks[current_block_type_index];
|
1249 |
+
|
1250 |
+
if (!if_block) {
|
1251 |
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
1252 |
+
if_block.c();
|
1253 |
+
} else {
|
1254 |
+
if_block.p(ctx, dirty);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
transition_in(if_block, 1);
|
1258 |
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
1259 |
+
} else {
|
1260 |
+
if_block = null;
|
1261 |
+
}
|
1262 |
+
}
|
1263 |
+
},
|
1264 |
+
i(local) {
|
1265 |
+
if (current) return;
|
1266 |
+
transition_in(if_block);
|
1267 |
+
current = true;
|
1268 |
+
},
|
1269 |
+
o(local) {
|
1270 |
+
transition_out(if_block);
|
1271 |
+
current = false;
|
1272 |
+
},
|
1273 |
+
d(detaching) {
|
1274 |
+
if (~current_block_type_index) {
|
1275 |
+
if_blocks[current_block_type_index].d(detaching);
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
if (detaching) detach(if_block_anchor);
|
1279 |
+
}
|
1280 |
+
};
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
// (36:2) {#if entry[modelColumn]}
|
1284 |
+
function create_if_block_1(ctx) {
|
1285 |
+
let assistantblock;
|
1286 |
+
let current;
|
1287 |
+
|
1288 |
+
assistantblock = new AssistantBlock({
|
1289 |
+
props: {
|
1290 |
+
input: /*entry*/ ctx[0][/*modelColumn*/ ctx[1]],
|
1291 |
+
output: true
|
1292 |
+
}
|
1293 |
+
});
|
1294 |
+
|
1295 |
+
return {
|
1296 |
+
c() {
|
1297 |
+
create_component(assistantblock.$$.fragment);
|
1298 |
+
},
|
1299 |
+
l(nodes) {
|
1300 |
+
claim_component(assistantblock.$$.fragment, nodes);
|
1301 |
+
},
|
1302 |
+
m(target, anchor) {
|
1303 |
+
mount_component(assistantblock, target, anchor);
|
1304 |
+
current = true;
|
1305 |
+
},
|
1306 |
+
p(ctx, dirty) {
|
1307 |
+
const assistantblock_changes = {};
|
1308 |
+
if (dirty & /*entry, modelColumn*/ 3) assistantblock_changes.input = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]];
|
1309 |
+
assistantblock.$set(assistantblock_changes);
|
1310 |
+
},
|
1311 |
+
i(local) {
|
1312 |
+
if (current) return;
|
1313 |
+
transition_in(assistantblock.$$.fragment, local);
|
1314 |
+
current = true;
|
1315 |
+
},
|
1316 |
+
o(local) {
|
1317 |
+
transition_out(assistantblock.$$.fragment, local);
|
1318 |
+
current = false;
|
1319 |
+
},
|
1320 |
+
d(detaching) {
|
1321 |
+
destroy_component(assistantblock, detaching);
|
1322 |
+
}
|
1323 |
+
};
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
// (39:2) {#if entry[labelColumn]}
|
1327 |
+
function create_if_block(ctx) {
|
1328 |
+
let p;
|
1329 |
+
let span;
|
1330 |
+
let t0;
|
1331 |
+
let t1;
|
1332 |
+
let t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "";
|
1333 |
+
let t2;
|
1334 |
+
|
1335 |
+
return {
|
1336 |
+
c() {
|
1337 |
+
p = element("p");
|
1338 |
+
span = element("span");
|
1339 |
+
t0 = text("Expected:");
|
1340 |
+
t1 = space();
|
1341 |
+
t2 = text(t2_value);
|
1342 |
+
this.h();
|
1343 |
+
},
|
1344 |
+
l(nodes) {
|
1345 |
+
p = claim_element(nodes, "P", { class: true });
|
1346 |
+
var p_nodes = children(p);
|
1347 |
+
span = claim_element(p_nodes, "SPAN", { class: true });
|
1348 |
+
var span_nodes = children(span);
|
1349 |
+
t0 = claim_text(span_nodes, "Expected:");
|
1350 |
+
span_nodes.forEach(detach);
|
1351 |
+
t1 = claim_space(p_nodes);
|
1352 |
+
t2 = claim_text(p_nodes, t2_value);
|
1353 |
+
p_nodes.forEach(detach);
|
1354 |
+
this.h();
|
1355 |
+
},
|
1356 |
+
h() {
|
1357 |
+
attr(span, "class", "label svelte-eoma5v");
|
1358 |
+
attr(p, "class", "svelte-eoma5v");
|
1359 |
+
},
|
1360 |
+
m(target, anchor) {
|
1361 |
+
insert_hydration(target, p, anchor);
|
1362 |
+
append_hydration(p, span);
|
1363 |
+
append_hydration(span, t0);
|
1364 |
+
append_hydration(p, t1);
|
1365 |
+
append_hydration(p, t2);
|
1366 |
+
},
|
1367 |
+
p(ctx, dirty) {
|
1368 |
+
if (dirty & /*entry, labelColumn*/ 5 && t2_value !== (t2_value = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] + "")) set_data(t2, t2_value);
|
1369 |
+
},
|
1370 |
+
d(detaching) {
|
1371 |
+
if (detaching) detach(p);
|
1372 |
+
}
|
1373 |
+
};
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
function create_fragment(ctx) {
|
1377 |
+
let div;
|
1378 |
+
let t0;
|
1379 |
+
let t1;
|
1380 |
+
let current;
|
1381 |
+
let if_block0 = /*entry*/ ctx[0][/*dataColumn*/ ctx[3]] && create_if_block_2(ctx);
|
1382 |
+
let if_block1 = /*entry*/ ctx[0][/*modelColumn*/ ctx[1]] && create_if_block_1(ctx);
|
1383 |
+
let if_block2 = /*entry*/ ctx[0][/*labelColumn*/ ctx[2]] && create_if_block(ctx);
|
1384 |
+
|
1385 |
+
return {
|
1386 |
+
c() {
|
1387 |
+
div = element("div");
|
1388 |
+
if (if_block0) if_block0.c();
|
1389 |
+
t0 = space();
|
1390 |
+
if (if_block1) if_block1.c();
|
1391 |
+
t1 = space();
|
1392 |
+
if (if_block2) if_block2.c();
|
1393 |
+
this.h();
|
1394 |
+
},
|
1395 |
+
l(nodes) {
|
1396 |
+
div = claim_element(nodes, "DIV", { id: true, class: true });
|
1397 |
+
var div_nodes = children(div);
|
1398 |
+
if (if_block0) if_block0.l(div_nodes);
|
1399 |
+
t0 = claim_space(div_nodes);
|
1400 |
+
if (if_block1) if_block1.l(div_nodes);
|
1401 |
+
t1 = claim_space(div_nodes);
|
1402 |
+
if (if_block2) if_block2.l(div_nodes);
|
1403 |
+
div_nodes.forEach(detach);
|
1404 |
+
this.h();
|
1405 |
+
},
|
1406 |
+
h() {
|
1407 |
+
attr(div, "id", "container");
|
1408 |
+
attr(div, "class", "svelte-eoma5v");
|
1409 |
+
},
|
1410 |
+
m(target, anchor) {
|
1411 |
+
insert_hydration(target, div, anchor);
|
1412 |
+
if (if_block0) if_block0.m(div, null);
|
1413 |
+
append_hydration(div, t0);
|
1414 |
+
if (if_block1) if_block1.m(div, null);
|
1415 |
+
append_hydration(div, t1);
|
1416 |
+
if (if_block2) if_block2.m(div, null);
|
1417 |
+
current = true;
|
1418 |
+
},
|
1419 |
+
p(ctx, [dirty]) {
|
1420 |
+
if (/*entry*/ ctx[0][/*dataColumn*/ ctx[3]]) {
|
1421 |
+
if (if_block0) {
|
1422 |
+
if_block0.p(ctx, dirty);
|
1423 |
+
|
1424 |
+
if (dirty & /*entry, dataColumn*/ 9) {
|
1425 |
+
transition_in(if_block0, 1);
|
1426 |
+
}
|
1427 |
+
} else {
|
1428 |
+
if_block0 = create_if_block_2(ctx);
|
1429 |
+
if_block0.c();
|
1430 |
+
transition_in(if_block0, 1);
|
1431 |
+
if_block0.m(div, t0);
|
1432 |
+
}
|
1433 |
+
} else if (if_block0) {
|
1434 |
+
group_outros();
|
1435 |
+
|
1436 |
+
transition_out(if_block0, 1, 1, () => {
|
1437 |
+
if_block0 = null;
|
1438 |
+
});
|
1439 |
+
|
1440 |
+
check_outros();
|
1441 |
+
}
|
1442 |
+
|
1443 |
+
if (/*entry*/ ctx[0][/*modelColumn*/ ctx[1]]) {
|
1444 |
+
if (if_block1) {
|
1445 |
+
if_block1.p(ctx, dirty);
|
1446 |
+
|
1447 |
+
if (dirty & /*entry, modelColumn*/ 3) {
|
1448 |
+
transition_in(if_block1, 1);
|
1449 |
+
}
|
1450 |
+
} else {
|
1451 |
+
if_block1 = create_if_block_1(ctx);
|
1452 |
+
if_block1.c();
|
1453 |
+
transition_in(if_block1, 1);
|
1454 |
+
if_block1.m(div, t1);
|
1455 |
+
}
|
1456 |
+
} else if (if_block1) {
|
1457 |
+
group_outros();
|
1458 |
+
|
1459 |
+
transition_out(if_block1, 1, 1, () => {
|
1460 |
+
if_block1 = null;
|
1461 |
+
});
|
1462 |
+
|
1463 |
+
check_outros();
|
1464 |
+
}
|
1465 |
+
|
1466 |
+
if (/*entry*/ ctx[0][/*labelColumn*/ ctx[2]]) {
|
1467 |
+
if (if_block2) {
|
1468 |
+
if_block2.p(ctx, dirty);
|
1469 |
+
} else {
|
1470 |
+
if_block2 = create_if_block(ctx);
|
1471 |
+
if_block2.c();
|
1472 |
+
if_block2.m(div, null);
|
1473 |
+
}
|
1474 |
+
} else if (if_block2) {
|
1475 |
+
if_block2.d(1);
|
1476 |
+
if_block2 = null;
|
1477 |
+
}
|
1478 |
+
},
|
1479 |
+
i(local) {
|
1480 |
+
if (current) return;
|
1481 |
+
transition_in(if_block0);
|
1482 |
+
transition_in(if_block1);
|
1483 |
+
current = true;
|
1484 |
+
},
|
1485 |
+
o(local) {
|
1486 |
+
transition_out(if_block0);
|
1487 |
+
transition_out(if_block1);
|
1488 |
+
current = false;
|
1489 |
+
},
|
1490 |
+
d(detaching) {
|
1491 |
+
if (detaching) detach(div);
|
1492 |
+
if (if_block0) if_block0.d();
|
1493 |
+
if (if_block1) if_block1.d();
|
1494 |
+
if (if_block2) if_block2.d();
|
1495 |
+
}
|
1496 |
+
};
|
1497 |
+
}
|
1498 |
+
|
1499 |
+
function instance($$self, $$props, $$invalidate) {
|
1500 |
+
let { options } = $$props;
|
1501 |
+
let { entry } = $$props;
|
1502 |
+
let { modelColumn } = $$props;
|
1503 |
+
let { labelColumn } = $$props;
|
1504 |
+
let { dataColumn } = $$props;
|
1505 |
+
let { idColumn } = $$props;
|
1506 |
+
|
1507 |
+
$$self.$$set = $$props => {
|
1508 |
+
if ('options' in $$props) $$invalidate(4, options = $$props.options);
|
1509 |
+
if ('entry' in $$props) $$invalidate(0, entry = $$props.entry);
|
1510 |
+
if ('modelColumn' in $$props) $$invalidate(1, modelColumn = $$props.modelColumn);
|
1511 |
+
if ('labelColumn' in $$props) $$invalidate(2, labelColumn = $$props.labelColumn);
|
1512 |
+
if ('dataColumn' in $$props) $$invalidate(3, dataColumn = $$props.dataColumn);
|
1513 |
+
if ('idColumn' in $$props) $$invalidate(5, idColumn = $$props.idColumn);
|
1514 |
+
};
|
1515 |
+
|
1516 |
+
return [entry, modelColumn, labelColumn, dataColumn, options, idColumn];
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
class InstanceView extends SvelteComponent {
|
1520 |
+
constructor(options) {
|
1521 |
+
super();
|
1522 |
+
|
1523 |
+
init(
|
1524 |
+
this,
|
1525 |
+
options,
|
1526 |
+
instance,
|
1527 |
+
create_fragment,
|
1528 |
+
safe_not_equal,
|
1529 |
+
{
|
1530 |
+
options: 4,
|
1531 |
+
entry: 0,
|
1532 |
+
modelColumn: 1,
|
1533 |
+
labelColumn: 2,
|
1534 |
+
dataColumn: 3,
|
1535 |
+
idColumn: 5
|
1536 |
+
},
|
1537 |
+
add_css
|
1538 |
+
);
|
1539 |
+
}
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
function getInstance(
|
1543 |
+
div,
|
1544 |
+
viewOptions,
|
1545 |
+
entry,
|
1546 |
+
modelColumn,
|
1547 |
+
labelColumn,
|
1548 |
+
dataColumn,
|
1549 |
+
idColumn
|
1550 |
+
) {
|
1551 |
+
new InstanceView({
|
1552 |
+
target: div,
|
1553 |
+
props: {
|
1554 |
+
entry: entry,
|
1555 |
+
viewOptions: viewOptions,
|
1556 |
+
modelColumn: modelColumn,
|
1557 |
+
labelColumn: labelColumn,
|
1558 |
+
dataColumn: dataColumn,
|
1559 |
+
idColumn: idColumn,
|
1560 |
+
},
|
1561 |
+
hydrate: true,
|
1562 |
+
});
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
// export function getOptions(div, setOptions) {
|
1566 |
+
// new OptionsView({
|
1567 |
+
// target: div,
|
1568 |
+
// props: {
|
1569 |
+
// setOptions,
|
1570 |
+
// },
|
1571 |
+
// });
|
1572 |
+
// }
|
1573 |
+
|
1574 |
+
export { getInstance };
|
evals/evals.yaml
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
- us-tort-law:
|
7 |
results-file: ./us-tort-law/us-tort-law-turbo.jsonl
|
8 |
link: https://github.com/openai/evals/tree/main/evals/registry/data/us-tort-law
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
6 |
- us-tort-law:
|
7 |
results-file: ./us-tort-law/us-tort-law-turbo.jsonl
|
8 |
link: https://github.com/openai/evals/tree/main/evals/registry/data/us-tort-law
|
9 |
+
- emotional-intelligence:
|
10 |
+
results-file: ./emotional-intelligence/emotional-intelligence-turbo.jsonl
|
11 |
+
second-results-file: ./emotional-intelligence/emotional-intelligence-0301.jsonl
|
12 |
+
link: https://github.com/openai/evals/tree/main/evals/registry/data/emotional-intelligence
|
frontend/public/zeno.png
ADDED
frontend/src/App.svelte
CHANGED
@@ -16,12 +16,26 @@
|
|
16 |
<a href="https://github.com/openai/evals">
|
17 |
<b>OpenAI Evals </b>
|
18 |
</a>
|
19 |
-
|
20 |
<img class="open_ai" src="./build/zeno.png" alt="Zeno logo" />
|
21 |
-
<b
|
|
|
|
|
|
|
|
|
22 |
</div>
|
23 |
<br />
|
24 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
<!-- table with links to zeno sites. -->
|
26 |
<div id="container">
|
27 |
<div id="table-background">
|
@@ -77,6 +91,9 @@
|
|
77 |
</main>
|
78 |
|
79 |
<style>
|
|
|
|
|
|
|
80 |
#container {
|
81 |
margin: 50px 20px;
|
82 |
display: flex;
|
@@ -141,6 +158,7 @@
|
|
141 |
margin-left: 5px;
|
142 |
}
|
143 |
.tagline {
|
|
|
144 |
text-align: center;
|
145 |
display: flex;
|
146 |
justify-content: center;
|
|
|
16 |
<a href="https://github.com/openai/evals">
|
17 |
<b>OpenAI Evals </b>
|
18 |
</a>
|
19 |
+
with
|
20 |
<img class="open_ai" src="./build/zeno.png" alt="Zeno logo" />
|
21 |
+
<b
|
22 |
+
><a style:color="var(--logo)" href="https://github.com/zeno-ml/zeno/stargazers"
|
23 |
+
>Zeno</a
|
24 |
+
></b
|
25 |
+
>
|
26 |
</div>
|
27 |
<br />
|
28 |
+
<div class="tagline">
|
29 |
+
Submit a PR to add new evals to this page!
|
30 |
+
<iframe
|
31 |
+
src="https://ghbtns.com/github-btn.html?user=zeno-ml&repo=zeno-evals-hub&type=fork&count=true"
|
32 |
+
frameborder="0"
|
33 |
+
scrolling="0"
|
34 |
+
width="150"
|
35 |
+
height="20"
|
36 |
+
title="GitHub"
|
37 |
+
/>
|
38 |
+
</div>
|
39 |
<!-- table with links to zeno sites. -->
|
40 |
<div id="container">
|
41 |
<div id="table-background">
|
|
|
91 |
</main>
|
92 |
|
93 |
<style>
|
94 |
+
iframe {
|
95 |
+
margin-left: 10px;
|
96 |
+
}
|
97 |
#container {
|
98 |
margin: 50px 20px;
|
99 |
display: flex;
|
|
|
158 |
margin-left: 5px;
|
159 |
}
|
160 |
.tagline {
|
161 |
+
font-size: 18px;
|
162 |
text-align: center;
|
163 |
display: flex;
|
164 |
justify-content: center;
|
poetry.lock
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
pyproject.toml
CHANGED
@@ -8,11 +8,11 @@ packages = [{ include = "zeno-evals-hub" }]
|
|
8 |
include = ["zeno-evals-hub/frontend/**/*"]
|
9 |
|
10 |
[tool.poetry.dependencies]
|
11 |
-
zenoml = "^0.4.
|
12 |
python = "^3.9.0,<=3.11"
|
13 |
fastapi = "^0.95.0"
|
14 |
uvicorn = "^0.21.1"
|
15 |
-
zeno-evals = "^0.1.
|
16 |
pyyaml = "^6.0"
|
17 |
wordfreq = "^3.0.3"
|
18 |
|
|
|
8 |
include = ["zeno-evals-hub/frontend/**/*"]
|
9 |
|
10 |
[tool.poetry.dependencies]
|
11 |
+
zenoml = "^0.4.10"
|
12 |
python = "^3.9.0,<=3.11"
|
13 |
fastapi = "^0.95.0"
|
14 |
uvicorn = "^0.21.1"
|
15 |
+
zeno-evals = "^0.1.10"
|
16 |
pyyaml = "^6.0"
|
17 |
wordfreq = "^3.0.3"
|
18 |
|
zeno-evals-hub/frontend/build/assets/main-0a6ed5ae.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#container.svelte-1wzojyp.svelte-1wzojyp{margin:50px 20px;display:flex;justify-content:center}#table-background.svelte-1wzojyp.svelte-1wzojyp{width:900px;padding:20px;border-radius:20px}.name-wrap.svelte-1wzojyp.svelte-1wzojyp{border:1px solid transparent;border-radius:10px;font-weight:500;color:var(--logo)}.name-wrap.svelte-1wzojyp.svelte-1wzojyp:hover{color:var(--P2)}table.svelte-1wzojyp.svelte-1wzojyp{border-collapse:collapse;text-align:left;cursor:default;margin-left:auto;margin-right:auto}table.svelte-1wzojyp thead tr th.svelte-1wzojyp{border-bottom:.5px solid grey}table.svelte-1wzojyp th.svelte-1wzojyp,table.svelte-1wzojyp td.svelte-1wzojyp{padding:4px 25px}table.svelte-1wzojyp td.svelte-1wzojyp:first-child,table.svelte-1wzojyp th.svelte-1wzojyp:first-child{border-radius:20px 0 0 20px}table.svelte-1wzojyp td.svelte-1wzojyp:last-child,table.svelte-1wzojyp th.svelte-1wzojyp:last-child{border-radius:0 20px 20px 0}tbody.svelte-1wzojyp.svelte-1wzojyp:before{content:"@";display:block;line-height:10px;text-indent:-99999px}thead.svelte-1wzojyp tr.svelte-1wzojyp{color:#213547}tbody.svelte-1wzojyp tr.svelte-1wzojyp{opacity:.9;height:70px}.open_ai.svelte-1wzojyp.svelte-1wzojyp{width:20px;margin-left:5px}.tagline.svelte-1wzojyp.svelte-1wzojyp{text-align:center;display:flex;justify-content:center;align-items:center}.tagline.svelte-1wzojyp b.svelte-1wzojyp{margin-right:5px;margin-left:5px}header.svelte-1wzojyp.svelte-1wzojyp{display:flex;align-items:center;justify-content:center}
|
|
|
|
zeno-evals-hub/frontend/build/assets/{main-19fa11f0.js → main-686621b6.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function at(t){return t()}function Ie(){return Object.create(null)}function Q(t){t.forEach(at)}function oe(t){return typeof t=="function"}function N(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function mt(t){return Object.keys(t).length===0}function _e(t,e,n,i){if(t){const a=rt(t,e,n,i);return t[0](a)}}function rt(t,e,n,i){return t[1]&&i?O(n.ctx.slice(),t[1](i(e))):n.ctx}function ge(t,e,n,i){if(t[2]&&i){const a=t[2](i(n));if(e.dirty===void 0)return a;if(typeof a=="object"){const s=[],l=Math.max(e.dirty.length,a.length);for(let r=0;r<l;r+=1)s[r]=e.dirty[r]|a[r];return s}return e.dirty|a}return e.dirty}function ve(t,e,n,i,a,s){if(a){const l=rt(e,n,i,s);t.p(l,a)}}function be(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function ne(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function P(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function ie(t){return t&&oe(t.destroy)?t.destroy:L}function C(t,e){t.appendChild(e)}function M(t,e,n){t.insertBefore(e,n||null)}function k(t){t.parentNode&&t.parentNode.removeChild(t)}function Me(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function D(t){return document.createElement(t)}function ht(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function G(){return Z(" ")}function T(){return Z("")}function Ge(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function pt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function _t(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function z(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function gt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set?t[i]=e[i]:z(t,i,e[i])}function Pe(t,e){for(const n in e)z(t,n,e[n])}function vt(t,e){Object.keys(e).forEach(n=>{bt(t,n,e[n])})}function bt(t,e,n){e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:z(t,e,n)}function je(t){return/-/.test(t)?vt:gt}function yt(t){return Array.from(t.childNodes)}function ae(t,e){return new t(e)}let he;function W(t){he=t}function Y(){if(!he)throw new Error("Function called outside component initialization");return he}function Xe(t,e){return Y().$$.context.set(t,e),e}function pe(t){return Y().$$.context.get(t)}function At(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const ee=[],K=[];let te=[];const qe=[],wt=Promise.resolve();let Ee=!1;function kt(){Ee||(Ee=!0,wt.then(Oe))}function Ue(t){te.push(t)}const ze=new Set;let x=0;function Oe(){if(x!==0)return;const t=he;do{try{for(;x<ee.length;){const e=ee[x];x++,W(e),St(e.$$)}}catch(e){throw ee.length=0,x=0,e}for(W(null),ee.length=0,x=0;K.length;)K.pop()();for(let e=0;e<te.length;e+=1){const n=te[e];ze.has(n)||(ze.add(n),n())}te.length=0}while(ee.length);for(;qe.length;)qe.pop()();Ee=!1,ze.clear(),W(t)}function St(t){if(t.fragment!==null){t.update(),Q(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ue)}}function Ct(t){const e=[],n=[];te.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),te=e}const De=new Set;let $;function le(){$={r:0,c:[],p:$}}function ue(){$.r||Q($.c),$=$.p}function j(t,e){t&&t.i&&(De.delete(t),t.i(e))}function E(t,e,n,i){if(t&&t.o){if(De.has(t))return;De.add(t),$.c.push(()=>{De.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function Mt(t,e){const n=e.token={};function i(a,s,l,r){if(e.token!==n)return;e.resolved=r;let o=e.ctx;l!==void 0&&(o=o.slice(),o[l]=r);const u=a&&(e.current=a)(o);let c=!1;e.block&&(e.blocks?e.blocks.forEach((f,p)=>{p!==s&&f&&(le(),E(f,1,1,()=>{e.blocks[p]===f&&(e.blocks[p]=null)}),ue())}):e.block.d(1),u.c(),j(u,1),u.m(e.mount(),e.anchor),c=!0),e.block=u,e.blocks&&(e.blocks[s]=u),c&&Oe()}if(dt(t)){const a=Y();if(t.then(s=>{W(a),i(e.then,1,e.value,s),W(null)},s=>{if(W(a),i(e.catch,2,e.error,s),W(null),!e.hasCatch)throw s}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,t),!0;e.resolved=t}}function Dt(t,e,n){const i=e.slice(),{resolved:a}=t;t.current===t.then&&(i[t.value]=a),t.current===t.catch&&(i[t.error]=a),t.block.p(i,n)}function ce(t,e){const n={},i={},a={$$scope:1};let s=t.length;for(;s--;){const l=t[s],r=e[s];if(r){for(const o in l)o in r||(i[o]=1);for(const o in r)a[o]||(n[o]=r[o],a[o]=1);t[s]=r}else for(const o in l)a[o]=1}for(const l in i)l in n||(n[l]=void 0);return n}function J(t){return typeof t=="object"&&t!==null?t:{}}function V(t){t&&t.c()}function X(t,e,n,i){const{fragment:a,after_update:s}=t.$$;a&&a.m(e,n),i||Ue(()=>{const l=t.$$.on_mount.map(at).filter(oe);t.$$.on_destroy?t.$$.on_destroy.push(...l):Q(l),t.$$.on_mount=[]}),s.forEach(Ue)}function q(t,e){const n=t.$$;n.fragment!==null&&(Ct(n.after_update),Q(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function jt(t,e){t.$$.dirty[0]===-1&&(ee.push(t),kt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function fe(t,e,n,i,a,s,l,r=[-1]){const o=he;W(t);const u=t.$$={fragment:null,ctx:[],props:s,update:L,not_equal:a,bound:Ie(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:Ie(),dirty:r,skip_bound:!1,root:e.target||o.$$.root};l&&l(u.root);let c=!1;if(u.ctx=n?n(t,e.props||{},(f,p,...w)=>{const m=w.length?w[0]:p;return u.ctx&&a(u.ctx[f],u.ctx[f]=m)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](m),c&&jt(t,f)),p}):[],u.update(),c=!0,Q(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const f=yt(e.target);u.fragment&&u.fragment.l(f),f.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&j(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),Oe()}W(o)}class de{$destroy(){q(this,1),this.$destroy=L}$on(e,n){if(!oe(n))return L;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const a=i.indexOf(n);a!==-1&&i.splice(a,1)}}$set(e){this.$$set&&!mt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function re(t){return Object.entries(t).filter(([e,n])=>e!==""&&n).map(([e])=>e).join(" ")}function Rt(t,e,n,i={bubbles:!0},a=!1){if(typeof Event>"u")throw new Error("Event not defined.");if(!t)throw new Error("Tried to dipatch event without element.");const s=new CustomEvent(e,Object.assign(Object.assign({},i),{detail:n}));if(t?.dispatchEvent(s),a&&e.startsWith("SMUI")){const l=new CustomEvent(e.replace(/^SMUI/g,()=>"MDC"),Object.assign(Object.assign({},i),{detail:n}));t?.dispatchEvent(l),l.defaultPrevented&&s.preventDefault()}return s}const We=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,zt=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function ye(t){let e,n=[];t.$on=(a,s)=>{let l=a,r=()=>{};return e?r=e(l,s):n.push([l,s]),l.match(We)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',l),()=>{r()}};function i(a){At(t,a)}return a=>{const s=[],l={};e=(r,o)=>{let u=r,c=o,f=!1;const p=u.match(We),w=u.match(zt),m=p||w;if(u.match(/^SMUI:\w+:/)){const h=u.split(":");let _="";for(let y=0;y<h.length;y++)_+=y===h.length-1?":"+h[y]:h[y].split("-").map(U=>U.slice(0,1).toUpperCase()+U.slice(1)).join("");console.warn(`The event ${u.split("$")[0]} has been renamed to ${_.split("$")[0]}.`),u=_}if(m){const h=u.split(p?":":"$");u=h[0];const _=h.slice(1).reduce((y,U)=>(y[U]=!0,y),{});_.passive&&(f=f||{},f.passive=!0),_.nonpassive&&(f=f||{},f.passive=!1),_.capture&&(f=f||{},f.capture=!0),_.once&&(f=f||{},f.once=!0),_.preventDefault&&(c=pt(c)),_.stopPropagation&&(c=_t(c))}const v=Ge(a,u,c,f),R=()=>{v();const h=s.indexOf(R);h>-1&&s.splice(h,1)};return s.push(R),u in l||(l[u]=Ge(a,u,i)),R};for(let r=0;r<n.length;r++)e(n[r][0],n[r][1]);return{destroy:()=>{for(let r=0;r<s.length;r++)s[r]();for(let r of Object.entries(l))r[1]()}}}}function Be(t,e){let n=[];if(e)for(let i=0;i<e.length;i++){const a=e[i],s=Array.isArray(a)?a[0]:a;Array.isArray(a)&&a.length>1?n.push(s(t,a[1])):n.push(s(t))}return{update(i){if((i&&i.length||0)!=n.length)throw new Error("You must not change the length of an actions array.");if(i)for(let a=0;a<i.length;a++){const s=n[a];if(s&&s.update){const l=i[a];Array.isArray(l)&&l.length>1?s.update(l[1]):s.update()}}},destroy(){for(let i=0;i<n.length;i++){const a=n[i];a&&a.destroy&&a.destroy()}}}}var we;function Ft(t,e){e===void 0&&(e=!1);var n=t.CSS,i=we;if(typeof we=="boolean"&&!e)return we;var a=n&&typeof n.supports=="function";if(!a)return!1;var s=n.supports("--css-vars","yes"),l=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=s||l,e||(we=i),i}function Ht(t,e,n){if(!t)return{x:0,y:0};var i=e.x,a=e.y,s=i+n.left,l=a+n.top,r,o;if(t.type==="touchstart"){var u=t;r=u.changedTouches[0].pageX-s,o=u.changedTouches[0].pageY-l}else{var c=t;r=c.pageX-s,o=c.pageY-l}return{x:r,y:o}}var Le=function(t,e){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},Le(t,e)};function Et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Le(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},me.apply(this,arguments)};function ke(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}/**
|
2 |
* @license
|
3 |
* Copyright 2016 Google Inc.
|
4 |
*
|
@@ -19,7 +19,7 @@ function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t)
|
|
19 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 |
* THE SOFTWARE.
|
22 |
-
*/var
|
23 |
* @license
|
24 |
* Copyright 2019 Google Inc.
|
25 |
*
|
@@ -40,7 +40,7 @@ function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t)
|
|
40 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
41 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
42 |
* THE SOFTWARE.
|
43 |
-
*/function
|
44 |
* @license
|
45 |
* Copyright 2018 Google Inc.
|
46 |
*
|
@@ -61,7 +61,7 @@ function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t)
|
|
61 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
62 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
63 |
* THE SOFTWARE.
|
64 |
-
*/function
|
65 |
* @license
|
66 |
* Copyright 2016 Google Inc.
|
67 |
*
|
@@ -82,7 +82,7 @@ function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t)
|
|
82 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
83 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
84 |
* THE SOFTWARE.
|
85 |
-
*/var
|
86 |
* @license
|
87 |
* Copyright 2016 Google Inc.
|
88 |
*
|
@@ -103,13 +103,12 @@ function L(){}function O(t,e){for(const n in e)t[n]=e[n];return t}function dt(t)
|
|
103 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
104 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
105 |
* THE SOFTWARE.
|
106 |
-
*/var Ve=["touchstart","pointerdown","mousedown","keydown"],Je=["touchend","pointerup","mouseup","contextmenu"],Se=[],Wt=function(t){Et(e,t);function e(n){var i=t.call(this,me(me({},e.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(a){i.activateImpl(a)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return Object.defineProperty(e,"cssClasses",{get:function(){return Xt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return qt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ze},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var n=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var a=e.cssClasses,s=a.ROOT,l=a.UNBOUNDED;requestAnimationFrame(function(){n.adapter.addClass(s),n.adapter.isUnbounded()&&(n.adapter.addClass(l),n.layoutInternal())})}},e.prototype.destroy=function(){var n=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,a=i.ROOT,s=i.UNBOUNDED;requestAnimationFrame(function(){n.adapter.removeClass(a),n.adapter.removeClass(s),n.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(n){this.activateImpl(n)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var n=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){n.layoutInternal(),n.layoutFrame=0})},e.prototype.setUnbounded=function(n){var i=e.cssClasses.UNBOUNDED;n?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var n=this;requestAnimationFrame(function(){return n.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var n=this;requestAnimationFrame(function(){return n.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(n){var i,a;if(n){try{for(var s=ke(Ve),l=s.next();!l.done;l=s.next()){var r=l.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(o){i={error:o}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(n){var i,a;if(n.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var s=ke(Je),l=s.next();!l.done;l=s.next()){var r=l.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(o){i={error:o}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},e.prototype.deregisterRootHandlers=function(){var n,i;try{for(var a=ke(Ve),s=a.next();!s.done;s=a.next()){var l=s.value;this.adapter.deregisterInteractionHandler(l,this.activateHandler)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var n,i;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var a=ke(Je),s=a.next();!s.done;s=a.next()){var l=s.value;this.adapter.deregisterDocumentInteractionHandler(l,this.deactivateHandler)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.removeCssVars=function(){var n=this,i=e.strings,a=Object.keys(i);a.forEach(function(s){s.indexOf("VAR_")===0&&n.adapter.updateCssVariable(i[s],null)})},e.prototype.activateImpl=function(n){var i=this;if(!this.adapter.isSurfaceDisabled()){var a=this.activationState;if(!a.isActivated){var s=this.previousActivationEvent,l=s&&n!==void 0&&s.type!==n.type;if(!l){a.isActivated=!0,a.isProgrammatic=n===void 0,a.activationEvent=n,a.wasActivatedByPointer=a.isProgrammatic?!1:n!==void 0&&(n.type==="mousedown"||n.type==="touchstart"||n.type==="pointerdown");var r=n!==void 0&&Se.length>0&&Se.some(function(o){return i.adapter.containsEventTarget(o)});if(r){this.resetActivationState();return}n!==void 0&&(Se.push(n.target),this.registerDeactivationHandlers(n)),a.wasElementMadeActive=this.checkElementMadeActive(n),a.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){Se=[],!a.wasElementMadeActive&&n!==void 0&&(n.key===" "||n.keyCode===32)&&(a.wasElementMadeActive=i.checkElementMadeActive(n),a.wasElementMadeActive&&i.animateActivation()),a.wasElementMadeActive||(i.activationState=i.defaultActivationState())})}}}},e.prototype.checkElementMadeActive=function(n){return n!==void 0&&n.type==="keydown"?this.adapter.isSurfaceActive():!0},e.prototype.animateActivation=function(){var n=this,i=e.strings,a=i.VAR_FG_TRANSLATE_START,s=i.VAR_FG_TRANSLATE_END,l=e.cssClasses,r=l.FG_DEACTIVATION,o=l.FG_ACTIVATION,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",f="";if(!this.adapter.isUnbounded()){var p=this.getFgTranslationCoordinates(),w=p.startPoint,m=p.endPoint;c=w.x+"px, "+w.y+"px",f=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(a,c),this.adapter.updateCssVariable(s,f),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(r),this.adapter.computeBoundingRect(),this.adapter.addClass(o),this.activationTimer=setTimeout(function(){n.activationTimerCallback()},u)},e.prototype.getFgTranslationCoordinates=function(){var n=this.activationState,i=n.activationEvent,a=n.wasActivatedByPointer,s;a?s=Ht(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):s={x:this.frame.width/2,y:this.frame.height/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2};var l={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:s,endPoint:l}},e.prototype.runDeactivationUXLogicIfReady=function(){var n=this,i=e.cssClasses.FG_DEACTIVATION,a=this.activationState,s=a.hasDeactivationUXRun,l=a.isActivated,r=s||!l;r&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout(function(){n.adapter.removeClass(i)},Ze.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var n=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(n),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var n=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return n.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var n=this,i=this.activationState;if(i.isActivated){var a=me({},i);i.isProgrammatic?(requestAnimationFrame(function(){n.animateDeactivation(a)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){n.activationState.hasDeactivationUXRun=!0,n.animateDeactivation(a),n.resetActivationState()}))}},e.prototype.animateDeactivation=function(n){var i=n.wasActivatedByPointer,a=n.wasElementMadeActive;(i||a)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var n=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width),a=function(){var l=Math.sqrt(Math.pow(n.frame.width,2)+Math.pow(n.frame.height,2));return l+e.numbers.PADDING};this.maxRadius=this.adapter.isUnbounded()?i:a();var s=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&s%2!==0?this.initialSize=s-1:this.initialSize=s,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var n=e.strings,i=n.VAR_FG_SIZE,a=n.VAR_LEFT,s=n.VAR_TOP,l=n.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(l,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(a,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(s,this.unboundedCoords.top+"px"))},e}(Ut);const{applyPassive:Ce}=Bt,{matches:Zt}=Pt;function Ke(t,{ripple:e=!0,surface:n=!1,unbounded:i=!1,disabled:a=!1,color:s,active:l,rippleElement:r,eventTarget:o,activeTarget:u,addClass:c=m=>t.classList.add(m),removeClass:f=m=>t.classList.remove(m),addStyle:p=(m,v)=>t.style.setProperty(m,v),initPromise:w=Promise.resolve()}={}){let m,v=pe("SMUI:addLayoutListener"),R,h=l,_=o,y=u;function U(){n?(c("mdc-ripple-surface"),s==="primary"?(c("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")):s==="secondary"?(f("smui-ripple-surface--primary"),c("smui-ripple-surface--secondary")):(f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary"))):(f("mdc-ripple-surface"),f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")),m&&h!==l&&(h=l,l?m.activate():l===!1&&m.deactivate()),e&&!m?(m=new Wt({addClass:c,browserSupportsCssVars:()=>Ft(window),computeBoundingRect:()=>(r||t).getBoundingClientRect(),containsEventTarget:S=>t.contains(S),deregisterDocumentInteractionHandler:(S,A)=>document.documentElement.removeEventListener(S,A,Ce()),deregisterInteractionHandler:(S,A)=>(o||t).removeEventListener(S,A,Ce()),deregisterResizeHandler:S=>window.removeEventListener("resize",S),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>l??Zt(u||t,":active"),isSurfaceDisabled:()=>!!a,isUnbounded:()=>!!i,registerDocumentInteractionHandler:(S,A)=>document.documentElement.addEventListener(S,A,Ce()),registerInteractionHandler:(S,A)=>(o||t).addEventListener(S,A,Ce()),registerResizeHandler:S=>window.addEventListener("resize",S),removeClass:f,updateCssVariable:p}),w.then(()=>{m&&(m.init(),m.setUnbounded(i))})):m&&!e&&w.then(()=>{m&&(m.destroy(),m=void 0)}),m&&(_!==o||y!==u)&&(_=o,y=u,m.destroy(),requestAnimationFrame(()=>{m&&(m.init(),m.setUnbounded(i))})),!e&&i&&c("mdc-ripple-upgraded--unbounded")}U(),v&&(R=v(F));function F(){m&&m.layout()}return{update(S){({ripple:e,surface:n,unbounded:i,disabled:a,color:s,active:l,rippleElement:r,eventTarget:o,activeTarget:u,addClass:c,removeClass:f,addStyle:p,initPromise:w}=Object.assign({ripple:!0,surface:!1,unbounded:!1,disabled:!1,color:void 0,active:void 0,rippleElement:void 0,eventTarget:void 0,activeTarget:void 0,addClass:A=>t.classList.add(A),removeClass:A=>t.classList.remove(A),addStyle:(A,d)=>t.style.setProperty(A,d),initPromise:Promise.resolve()},S)),U()},destroy(){m&&(m.destroy(),m=void 0,f("mdc-ripple-surface"),f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")),R&&R()}}}function Vt(t){let e;const n=t[10].default,i=_e(n,t,t[12],null);return{c(){i&&i.c()},m(a,s){i&&i.m(a,s),e=!0},p(a,s){i&&i.p&&(!e||s&4096)&&ve(i,n,a,a[12],e?ge(n,a[12],s,null):be(a[12]),null)},i(a){e||(j(i,a),e=!0)},o(a){E(i,a),e=!1},d(a){i&&i.d(a)}}}function Jt(t){let e,n,i;const a=[{tag:t[3]},{use:[t[5],...t[0]]},{class:re({[t[1]]:!0,"mdc-button__label":t[6]==="button","mdc-fab__label":t[6]==="fab","mdc-tab__text-label":t[6]==="tab","mdc-image-list__label":t[6]==="image-list","mdc-snackbar__label":t[6]==="snackbar","mdc-banner__text":t[6]==="banner","mdc-segmented-button__label":t[6]==="segmented-button","mdc-data-table__pagination-rows-per-page-label":t[6]==="data-table:pagination","mdc-data-table__header-cell-label":t[6]==="data-table:sortable-header-cell"})},t[6]==="snackbar"?{"aria-atomic":"false"}:{},{tabindex:t[7]},t[8]];var s=t[2];function l(r){let o={$$slots:{default:[Vt]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=O(o,a[u]);return{props:o}}return s&&(e=ae(s,l(t)),t[11](e)),{c(){e&&V(e.$$.fragment),n=T()},m(r,o){e&&X(e,r,o),M(r,n,o),i=!0},p(r,[o]){const u=o&491?ce(a,[o&8&&{tag:r[3]},o&33&&{use:[r[5],...r[0]]},o&66&&{class:re({[r[1]]:!0,"mdc-button__label":r[6]==="button","mdc-fab__label":r[6]==="fab","mdc-tab__text-label":r[6]==="tab","mdc-image-list__label":r[6]==="image-list","mdc-snackbar__label":r[6]==="snackbar","mdc-banner__text":r[6]==="banner","mdc-segmented-button__label":r[6]==="segmented-button","mdc-data-table__pagination-rows-per-page-label":r[6]==="data-table:pagination","mdc-data-table__header-cell-label":r[6]==="data-table:sortable-header-cell"})},o&64&&J(r[6]==="snackbar"?{"aria-atomic":"false"}:{}),o&128&&{tabindex:r[7]},o&256&&J(r[8])]):{};if(o&4096&&(u.$$scope={dirty:o,ctx:r}),o&4&&s!==(s=r[2])){if(e){le();const c=e;E(c.$$.fragment,1,0,()=>{q(c,1)}),ue()}s?(e=ae(s,l(r)),r[11](e),V(e.$$.fragment),j(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&j(e.$$.fragment,r),i=!0)},o(r){e&&E(e.$$.fragment,r),i=!1},d(r){t[11](null),r&&k(n),e&&q(e,r)}}}function Kt(t,e,n){const i=["use","class","component","tag","getElement"];let a=P(e,i),{$$slots:s={},$$scope:l}=e;const r=ye(Y());let{use:o=[]}=e,{class:u=""}=e,c,{component:f=se}=e,{tag:p=f===se?"span":void 0}=e;const w=pe("SMUI:label:context"),m=pe("SMUI:label:tabindex");function v(){return c.getElement()}function R(h){K[h?"unshift":"push"](()=>{c=h,n(4,c)})}return t.$$set=h=>{e=O(O({},e),ne(h)),n(8,a=P(e,i)),"use"in h&&n(0,o=h.use),"class"in h&&n(1,u=h.class),"component"in h&&n(2,f=h.component),"tag"in h&&n(3,p=h.tag),"$$scope"in h&&n(12,l=h.$$scope)},[o,u,f,p,c,r,w,m,a,v,s,R,l]}class Qt extends de{constructor(e){super(),fe(this,e,Kt,Jt,N,{use:0,class:1,component:2,tag:3,getElement:9})}get getElement(){return this.$$.ctx[9]}}function Nt(t){let e;const n=t[11].default,i=_e(n,t,t[13],null);return{c(){i&&i.c()},m(a,s){i&&i.m(a,s),e=!0},p(a,s){i&&i.p&&(!e||s&8192)&&ve(i,n,a,a[13],e?ge(n,a[13],s,null):be(a[13]),null)},i(a){e||(j(i,a),e=!0)},o(a){E(i,a),e=!1},d(a){i&&i.d(a)}}}function Tt(t){let e,n,i;const a=[{tag:t[4]},{use:[t[6],...t[0]]},{class:re({[t[1]]:!0,"mdc-button__icon":t[8]==="button","mdc-fab__icon":t[8]==="fab","mdc-icon-button__icon":t[8]==="icon-button","mdc-icon-button__icon--on":t[8]==="icon-button"&&t[2],"mdc-tab__icon":t[8]==="tab","mdc-banner__icon":t[8]==="banner","mdc-segmented-button__icon":t[8]==="segmented-button"})},{"aria-hidden":"true"},t[7]?{focusable:"false",tabindex:"-1"}:{},t[9]];var s=t[3];function l(r){let o={$$slots:{default:[Nt]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=O(o,a[u]);return{props:o}}return s&&(e=ae(s,l(t)),t[12](e)),{c(){e&&V(e.$$.fragment),n=T()},m(r,o){e&&X(e,r,o),M(r,n,o),i=!0},p(r,[o]){const u=o&983?ce(a,[o&16&&{tag:r[4]},o&65&&{use:[r[6],...r[0]]},o&262&&{class:re({[r[1]]:!0,"mdc-button__icon":r[8]==="button","mdc-fab__icon":r[8]==="fab","mdc-icon-button__icon":r[8]==="icon-button","mdc-icon-button__icon--on":r[8]==="icon-button"&&r[2],"mdc-tab__icon":r[8]==="tab","mdc-banner__icon":r[8]==="banner","mdc-segmented-button__icon":r[8]==="segmented-button"})},a[3],o&128&&J(r[7]?{focusable:"false",tabindex:"-1"}:{}),o&512&&J(r[9])]):{};if(o&8192&&(u.$$scope={dirty:o,ctx:r}),o&8&&s!==(s=r[3])){if(e){le();const c=e;E(c.$$.fragment,1,0,()=>{q(c,1)}),ue()}s?(e=ae(s,l(r)),r[12](e),V(e.$$.fragment),j(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&j(e.$$.fragment,r),i=!0)},o(r){e&&E(e.$$.fragment,r),i=!1},d(r){t[12](null),r&&k(n),e&&q(e,r)}}}function Yt(t,e,n){const i=["use","class","on","component","tag","getElement"];let a=P(e,i),{$$slots:s={},$$scope:l}=e;const r=ye(Y());let{use:o=[]}=e,{class:u=""}=e,{on:c=!1}=e,f,{component:p=se}=e,{tag:w=p===se?"i":void 0}=e;const m=p===sn,v=pe("SMUI:icon:context");function R(){return f.getElement()}function h(_){K[_?"unshift":"push"](()=>{f=_,n(5,f)})}return t.$$set=_=>{e=O(O({},e),ne(_)),n(9,a=P(e,i)),"use"in _&&n(0,o=_.use),"class"in _&&n(1,u=_.class),"on"in _&&n(2,c=_.on),"component"in _&&n(3,p=_.component),"tag"in _&&n(4,w=_.tag),"$$scope"in _&&n(13,l=_.$$scope)},[o,u,c,p,w,f,r,m,v,a,R,s,h,l]}class $t extends de{constructor(e){super(),fe(this,e,Yt,Tt,N,{use:0,class:1,on:2,component:3,tag:4,getElement:10})}get getElement(){return this.$$.ctx[10]}}function xt(t){let e=t[1],n,i,a=t[1]&&Fe(t);return{c(){a&&a.c(),n=T()},m(s,l){a&&a.m(s,l),M(s,n,l),i=!0},p(s,l){s[1]?e?N(e,s[1])?(a.d(1),a=Fe(s),e=s[1],a.c(),a.m(n.parentNode,n)):a.p(s,l):(a=Fe(s),e=s[1],a.c(),a.m(n.parentNode,n)):e&&(a.d(1),a=null,e=s[1])},i(s){i||(j(a),i=!0)},o(s){E(a),i=!1},d(s){s&&k(n),a&&a.d(s)}}}function en(t){let e=t[1],n,i=t[1]&&He(t);return{c(){i&&i.c(),n=T()},m(a,s){i&&i.m(a,s),M(a,n,s)},p(a,s){a[1]?e?N(e,a[1])?(i.d(1),i=He(a),e=a[1],i.c(),i.m(n.parentNode,n)):i.p(a,s):(i=He(a),e=a[1],i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=a[1])},i:L,o:L,d(a){a&&k(n),i&&i.d(a)}}}function Fe(t){let e,n,i,a,s;const l=t[8].default,r=_e(l,t,t[7],null);let o=[t[5]],u={};for(let c=0;c<o.length;c+=1)u=O(u,o[c]);return{c(){e=D(t[1]),r&&r.c(),je(t[1])(e,u)},m(c,f){M(c,e,f),r&&r.m(e,null),t[10](e),i=!0,a||(s=[ie(n=Be.call(null,e,t[0])),ie(t[4].call(null,e))],a=!0)},p(c,f){r&&r.p&&(!i||f&128)&&ve(r,l,c,c[7],i?ge(l,c[7],f,null):be(c[7]),null),je(c[1])(e,u=ce(o,[f&32&&c[5]])),n&&oe(n.update)&&f&1&&n.update.call(null,c[0])},i(c){i||(j(r,c),i=!0)},o(c){E(r,c),i=!1},d(c){c&&k(e),r&&r.d(c),t[10](null),a=!1,Q(s)}}}function He(t){let e,n,i,a,s=[t[5]],l={};for(let r=0;r<s.length;r+=1)l=O(l,s[r]);return{c(){e=D(t[1]),je(t[1])(e,l)},m(r,o){M(r,e,o),t[9](e),i||(a=[ie(n=Be.call(null,e,t[0])),ie(t[4].call(null,e))],i=!0)},p(r,o){je(r[1])(e,l=ce(s,[o&32&&r[5]])),n&&oe(n.update)&&o&1&&n.update.call(null,r[0])},d(r){r&&k(e),t[9](null),i=!1,Q(a)}}}function tn(t){let e,n,i,a;const s=[en,xt],l=[];function r(o,u){return o[3]?0:1}return e=r(t),n=l[e]=s[e](t),{c(){n.c(),i=T()},m(o,u){l[e].m(o,u),M(o,i,u),a=!0},p(o,[u]){let c=e;e=r(o),e===c?l[e].p(o,u):(le(),E(l[c],1,1,()=>{l[c]=null}),ue(),n=l[e],n?n.p(o,u):(n=l[e]=s[e](o),n.c()),j(n,1),n.m(i.parentNode,i))},i(o){a||(j(n),a=!0)},o(o){E(n),a=!1},d(o){l[e].d(o),o&&k(i)}}}function nn(t,e,n){let i;const a=["use","tag","getElement"];let s=P(e,a),{$$slots:l={},$$scope:r}=e,{use:o=[]}=e,{tag:u}=e;const c=ye(Y());let f;function p(){return f}function w(v){K[v?"unshift":"push"](()=>{f=v,n(2,f)})}function m(v){K[v?"unshift":"push"](()=>{f=v,n(2,f)})}return t.$$set=v=>{e=O(O({},e),ne(v)),n(5,s=P(e,a)),"use"in v&&n(0,o=v.use),"tag"in v&&n(1,u=v.tag),"$$scope"in v&&n(7,r=v.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(u)>-1)},[o,u,f,i,c,s,p,r,l,w,m]}class se extends de{constructor(e){super(),fe(this,e,nn,tn,N,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}function an(t){let e,n,i,a,s;const l=t[6].default,r=_e(l,t,t[5],null);let o=[t[3]],u={};for(let c=0;c<o.length;c+=1)u=O(u,o[c]);return{c(){e=ht("svg"),r&&r.c(),Pe(e,u)},m(c,f){M(c,e,f),r&&r.m(e,null),t[7](e),i=!0,a||(s=[ie(n=Be.call(null,e,t[0])),ie(t[2].call(null,e))],a=!0)},p(c,[f]){r&&r.p&&(!i||f&32)&&ve(r,l,c,c[5],i?ge(l,c[5],f,null):be(c[5]),null),Pe(e,u=ce(o,[f&8&&c[3]])),n&&oe(n.update)&&f&1&&n.update.call(null,c[0])},i(c){i||(j(r,c),i=!0)},o(c){E(r,c),i=!1},d(c){c&&k(e),r&&r.d(c),t[7](null),a=!1,Q(s)}}}function rn(t,e,n){const i=["use","getElement"];let a=P(e,i),{$$slots:s={},$$scope:l}=e,{use:r=[]}=e;const o=ye(Y());let u;function c(){return u}function f(p){K[p?"unshift":"push"](()=>{u=p,n(1,u)})}return t.$$set=p=>{e=O(O({},e),ne(p)),n(3,a=P(e,i)),"use"in p&&n(0,r=p.use),"$$scope"in p&&n(5,l=p.$$scope)},[r,u,o,a,c,l,s,f]}class sn extends de{constructor(e){super(),fe(this,e,rn,an,N,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}}function Qe(t){let e;return{c(){e=D("div"),z(e,"class","mdc-button__touch")},m(n,i){M(n,e,i)},d(n){n&&k(e)}}}function on(t){let e,n,i,a;const s=t[28].default,l=_e(s,t,t[30],null);let r=t[6]&&Qe();return{c(){e=D("div"),n=G(),l&&l.c(),r&&r.c(),i=T(),z(e,"class","mdc-button__ripple")},m(o,u){M(o,e,u),M(o,n,u),l&&l.m(o,u),r&&r.m(o,u),M(o,i,u),a=!0},p(o,u){l&&l.p&&(!a||u[0]&1073741824)&&ve(l,s,o,o[30],a?ge(s,o[30],u,null):be(o[30]),null),o[6]?r||(r=Qe(),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null)},i(o){a||(j(l,o),a=!0)},o(o){E(l,o),a=!1},d(o){o&&k(e),o&&k(n),l&&l.d(o),r&&r.d(o),o&&k(i)}}}function ln(t){let e,n,i;const a=[{tag:t[10]},{use:[[Ke,{ripple:t[3],unbounded:!1,color:t[4],disabled:!!t[23].disabled,addClass:t[19],removeClass:t[20],addStyle:t[21]}],t[17],...t[0]]},{class:re({[t[1]]:!0,"mdc-button":!0,"mdc-button--raised":t[5]==="raised","mdc-button--unelevated":t[5]==="unelevated","mdc-button--outlined":t[5]==="outlined","smui-button--color-secondary":t[4]==="secondary","mdc-button--touch":t[6],"mdc-card__action":t[18]==="card:action","mdc-card__action--button":t[18]==="card:action","mdc-dialog__button":t[18]==="dialog:action","mdc-top-app-bar__navigation-icon":t[18]==="top-app-bar:navigation","mdc-top-app-bar__action-item":t[18]==="top-app-bar:action","mdc-snackbar__action":t[18]==="snackbar:actions","mdc-banner__secondary-action":t[18]==="banner"&&t[8],"mdc-banner__primary-action":t[18]==="banner"&&!t[8],"mdc-tooltip__action":t[18]==="tooltip:rich-actions",...t[12]})},{style:Object.entries(t[13]).map(Ne).concat([t[2]]).join(" ")},t[16],t[15],t[14],{href:t[7]},t[23]];var s=t[9];function l(r){let o={$$slots:{default:[on]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=O(o,a[u]);return{props:o}}return s&&(e=ae(s,l(t)),t[29](e),e.$on("click",t[22])),{c(){e&&V(e.$$.fragment),n=T()},m(r,o){e&&X(e,r,o),M(r,n,o),i=!0},p(r,o){const u=o[0]&12580351?ce(a,[o[0]&1024&&{tag:r[10]},o[0]&12189721&&{use:[[Ke,{ripple:r[3],unbounded:!1,color:r[4],disabled:!!r[23].disabled,addClass:r[19],removeClass:r[20],addStyle:r[21]}],r[17],...r[0]]},o[0]&266610&&{class:re({[r[1]]:!0,"mdc-button":!0,"mdc-button--raised":r[5]==="raised","mdc-button--unelevated":r[5]==="unelevated","mdc-button--outlined":r[5]==="outlined","smui-button--color-secondary":r[4]==="secondary","mdc-button--touch":r[6],"mdc-card__action":r[18]==="card:action","mdc-card__action--button":r[18]==="card:action","mdc-dialog__button":r[18]==="dialog:action","mdc-top-app-bar__navigation-icon":r[18]==="top-app-bar:navigation","mdc-top-app-bar__action-item":r[18]==="top-app-bar:action","mdc-snackbar__action":r[18]==="snackbar:actions","mdc-banner__secondary-action":r[18]==="banner"&&r[8],"mdc-banner__primary-action":r[18]==="banner"&&!r[8],"mdc-tooltip__action":r[18]==="tooltip:rich-actions",...r[12]})},o[0]&8196&&{style:Object.entries(r[13]).map(Ne).concat([r[2]]).join(" ")},o[0]&65536&&J(r[16]),o[0]&32768&&J(r[15]),o[0]&16384&&J(r[14]),o[0]&128&&{href:r[7]},o[0]&8388608&&J(r[23])]):{};if(o[0]&1073741888&&(u.$$scope={dirty:o,ctx:r}),o[0]&512&&s!==(s=r[9])){if(e){le();const c=e;E(c.$$.fragment,1,0,()=>{q(c,1)}),ue()}s?(e=ae(s,l(r)),r[29](e),e.$on("click",r[22]),V(e.$$.fragment),j(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&j(e.$$.fragment,r),i=!0)},o(r){e&&E(e.$$.fragment,r),i=!1},d(r){t[29](null),r&&k(n),e&&q(e,r)}}}const Ne=([t,e])=>`${t}: ${e};`;function un(t,e,n){let i,a,s;const l=["use","class","style","ripple","color","variant","touch","href","action","defaultAction","secondary","component","tag","getElement"];let r=P(e,l),{$$slots:o={},$$scope:u}=e;const c=ye(Y());let{use:f=[]}=e,{class:p=""}=e,{style:w=""}=e,{ripple:m=!0}=e,{color:v="primary"}=e,{variant:R="text"}=e,{touch:h=!1}=e,{href:_=void 0}=e,{action:y="close"}=e,{defaultAction:U=!1}=e,{secondary:F=!1}=e,S,A={},d={},B=pe("SMUI:button:context"),{component:H=se}=e,{tag:b=H===se?_==null?"button":"a":void 0}=e,I=r.disabled;Xe("SMUI:label:context","button"),Xe("SMUI:icon:context","button");function ot(g){A[g]||n(12,A[g]=!0,A)}function lt(g){(!(g in A)||A[g])&&n(12,A[g]=!1,A)}function ut(g,Ae){d[g]!=Ae&&(Ae===""||Ae==null?(delete d[g],n(13,d)):n(13,d[g]=Ae,d))}function ct(){B==="banner"&&Rt(Re(),F?"SMUIBannerButton:secondaryActionClick":"SMUIBannerButton:primaryActionClick")}function Re(){return S.getElement()}function ft(g){K[g?"unshift":"push"](()=>{S=g,n(11,S)})}return t.$$set=g=>{n(31,e=O(O({},e),ne(g))),n(23,r=P(e,l)),"use"in g&&n(0,f=g.use),"class"in g&&n(1,p=g.class),"style"in g&&n(2,w=g.style),"ripple"in g&&n(3,m=g.ripple),"color"in g&&n(4,v=g.color),"variant"in g&&n(5,R=g.variant),"touch"in g&&n(6,h=g.touch),"href"in g&&n(7,_=g.href),"action"in g&&n(24,y=g.action),"defaultAction"in g&&n(25,U=g.defaultAction),"secondary"in g&&n(8,F=g.secondary),"component"in g&&n(9,H=g.component),"tag"in g&&n(10,b=g.tag),"$$scope"in g&&n(30,u=g.$$scope)},t.$$.update=()=>{if(n(16,i=B==="dialog:action"&&y!=null?{"data-mdc-dialog-action":y}:{action:e.action}),n(15,a=B==="dialog:action"&&U?{"data-mdc-dialog-button-default":""}:{default:e.default}),n(14,s=B==="banner"?{}:{secondary:e.secondary}),I!==r.disabled){const g=Re();"blur"in g&&g.blur(),n(27,I=r.disabled)}},e=ne(e),[f,p,w,m,v,R,h,_,F,H,b,S,A,d,s,a,i,c,B,ot,lt,ut,ct,r,y,U,Re,I,o,ft,u]}class cn extends de{constructor(e){super(),fe(this,e,un,ln,N,{use:0,class:1,style:2,ripple:3,color:4,variant:5,touch:6,href:7,action:24,defaultAction:25,secondary:8,component:9,tag:10,getElement:26},null,[-1,-1])}get getElement(){return this.$$.ctx[26]}}function Te(t,e,n){const i=t.slice();i[3]=e[n];const a=Object.keys(i[3])[0];return i[4]=a,i}function Ye(t,e,n){const i=t.slice();return i[7]=e[n],i}function $e(t,e,n){const i=t.slice();return i[10]=e[n],i}function xe(t,e,n){const i=t.slice();return i[13]=e[n],i}function fn(t){return{c:L,m:L,p:L,i:L,o:L,d:L}}function dn(t){let e,n,i=t[2],a=[];for(let l=0;l<i.length;l+=1)a[l]=it(Te(t,i,l));const s=l=>E(a[l],1,1,()=>{a[l]=null});return{c(){for(let l=0;l<a.length;l+=1)a[l].c();e=T()},m(l,r){for(let o=0;o<a.length;o+=1)a[o]&&a[o].m(l,r);M(l,e,r),n=!0},p(l,r){if(r&3){i=l[2];let o;for(o=0;o<i.length;o+=1){const u=Te(l,i,o);a[o]?(a[o].p(u,r),j(a[o],1)):(a[o]=it(u),a[o].c(),j(a[o],1),a[o].m(e.parentNode,e))}for(le(),o=i.length;o<a.length;o+=1)s(o);ue()}},i(l){if(!n){for(let r=0;r<i.length;r+=1)j(a[r]);n=!0}},o(l){a=a.filter(Boolean);for(let r=0;r<a.length;r+=1)E(a[r]);n=!1},d(l){Me(a,l),l&&k(e)}}}function et(t){let e=t[13]+"",n,i;return{c(){n=Z(e),i=D("br")},m(a,s){M(a,n,s),M(a,i,s)},p:L,d(a){a&&k(n),a&&k(i)}}}function tt(t){let e=t[10].toFixed(2)+"",n,i,a;return{c(){n=Z(e),i=Z("%"),a=D("br")},m(s,l){M(s,n,l),M(s,i,l),M(s,a,l)},p:L,d(s){s&&k(n),s&&k(i),s&&k(a)}}}function nt(t){let e=t[7]+"",n,i;return{c(){n=Z(e),i=D("br")},m(a,s){M(a,n,s),M(a,i,s)},p:L,d(a){a&&k(n),a&&k(i)}}}function mn(t){let e;return{c(){e=Z("rocket")},m(n,i){M(n,e,i)},d(n){n&&k(e)}}}function hn(t){let e;return{c(){e=Z("Open")},m(n,i){M(n,e,i)},d(n){n&&k(e)}}}function pn(t){let e,n,i,a;return e=new $t({props:{class:"material-icons",$$slots:{default:[mn]},$$scope:{ctx:t}}}),i=new Qt({props:{$$slots:{default:[hn]},$$scope:{ctx:t}}}),{c(){V(e.$$.fragment),n=G(),V(i.$$.fragment)},m(s,l){X(e,s,l),M(s,n,l),X(i,s,l),a=!0},p(s,l){const r={};l&65536&&(r.$$scope={dirty:l,ctx:s}),e.$set(r);const o={};l&65536&&(o.$$scope={dirty:l,ctx:s}),i.$set(o)},i(s){a||(j(e.$$.fragment,s),j(i.$$.fragment,s),a=!0)},o(s){E(e.$$.fragment,s),E(i.$$.fragment,s),a=!1},d(s){q(e,s),s&&k(n),q(i,s)}}}function it(t){let e,n,i,a,s=t[4]+"",l,r,o,u,c,f,p,w,m,v,R,h,_=t[3][t[4]].models,y=[];for(let d=0;d<_.length;d+=1)y[d]=et(xe(t,_,d));let U=t[3][t[4]].accuracy,F=[];for(let d=0;d<U.length;d+=1)F[d]=tt($e(t,U,d));let S=t[3][t[4]].events,A=[];for(let d=0;d<S.length;d+=1)A[d]=nt(Ye(t,S,d));return v=new cn({props:{href:"/"+t[4]+"/",ripple:!1,variant:"unelevated",color:"primary",$$slots:{default:[pn]},$$scope:{ctx:t}}}),v.$on("mouseleave",t[1]),v.$on("focusout",t[1]),{c(){e=D("tr"),n=D("td"),i=D("a"),a=D("span"),l=Z(s),r=G(),o=D("td");for(let d=0;d<y.length;d+=1)y[d].c();u=G(),c=D("td");for(let d=0;d<F.length;d+=1)F[d].c();f=G(),p=D("td");for(let d=0;d<A.length;d+=1)A[d].c();w=G(),m=D("td"),V(v.$$.fragment),R=G(),z(a,"class","name-wrap svelte-1wzojyp"),z(i,"href",t[3][t[4]].link),z(n,"class","svelte-1wzojyp"),z(o,"class","svelte-1wzojyp"),z(c,"class","svelte-1wzojyp"),z(p,"class","svelte-1wzojyp"),z(m,"class","svelte-1wzojyp"),z(e,"class","svelte-1wzojyp")},m(d,B){M(d,e,B),C(e,n),C(n,i),C(i,a),C(a,l),C(e,r),C(e,o);for(let H=0;H<y.length;H+=1)y[H]&&y[H].m(o,null);C(e,u),C(e,c);for(let H=0;H<F.length;H+=1)F[H]&&F[H].m(c,null);C(e,f),C(e,p);for(let H=0;H<A.length;H+=1)A[H]&&A[H].m(p,null);C(e,w),C(e,m),X(v,m,null),C(e,R),h=!0},p(d,B){if(B&1){_=d[3][d[4]].models;let b;for(b=0;b<_.length;b+=1){const I=xe(d,_,b);y[b]?y[b].p(I,B):(y[b]=et(I),y[b].c(),y[b].m(o,null))}for(;b<y.length;b+=1)y[b].d(1);y.length=_.length}if(B&1){U=d[3][d[4]].accuracy;let b;for(b=0;b<U.length;b+=1){const I=$e(d,U,b);F[b]?F[b].p(I,B):(F[b]=tt(I),F[b].c(),F[b].m(c,null))}for(;b<F.length;b+=1)F[b].d(1);F.length=U.length}if(B&1){S=d[3][d[4]].events;let b;for(b=0;b<S.length;b+=1){const I=Ye(d,S,b);A[b]?A[b].p(I,B):(A[b]=nt(I),A[b].c(),A[b].m(p,null))}for(;b<A.length;b+=1)A[b].d(1);A.length=S.length}const H={};B&65536&&(H.$$scope={dirty:B,ctx:d}),v.$set(H)},i(d){h||(j(v.$$.fragment,d),h=!0)},o(d){E(v.$$.fragment,d),h=!1},d(d){d&&k(e),Me(y,d),Me(F,d),Me(A,d),q(v)}}}function _n(t){let e;return{c(){e=D("p"),e.textContent="loading"},m(n,i){M(n,e,i)},p:L,i:L,o:L,d(n){n&&k(e)}}}function gn(t){let e,n,i,a,s,l,r,o,u,c,f,p,w,m,v,R,h={ctx:t,current:null,token:null,hasCatch:!1,pending:_n,then:dn,catch:fn,value:2,blocks:[,,,]};return Mt(t[0],h),{c(){e=D("main"),n=D("header"),n.innerHTML="<h1>Zeno Evals Hub</h1>",i=G(),a=D("div"),a.innerHTML=`Explore and compare the results of
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
<
|
111 |
-
|
112 |
-
<th class="svelte-
|
113 |
-
<th class="svelte-
|
114 |
-
<th class="svelte-
|
115 |
-
<th class="svelte-1wzojyp"></th></tr>`,m=G(),v=D("tbody"),h.block.c(),z(n,"class","svelte-1wzojyp"),z(a,"class","tagline svelte-1wzojyp"),z(w,"class","svelte-1wzojyp"),z(v,"class","svelte-1wzojyp"),z(p,"class","svelte-1wzojyp"),z(f,"id","table-background"),z(f,"class","svelte-1wzojyp"),z(c,"id","container"),z(c,"class","svelte-1wzojyp")},m(_,y){M(_,e,y),C(e,n),C(e,i),C(e,a),C(e,s),C(e,l),C(e,r),C(e,o),C(e,u),C(e,c),C(c,f),C(f,p),C(p,w),C(p,m),C(p,v),h.block.m(v,h.anchor=null),h.mount=()=>v,h.anchor=null,R=!0},p(_,[y]){t=_,Dt(h,t,y)},i(_){R||(j(h.block),R=!0)},o(_){for(let y=0;y<3;y+=1){const U=h.blocks[y];E(U)}R=!1},d(_){_&&k(e),h.block.d(),h.token=null,h=null}}}function vn(t){return[fetch("/args").then(i=>i.json()),function(i){i.target.blur()}]}class bn extends de{constructor(e){super(),fe(this,e,vn,gn,N,{})}}new bn({target:document.getElementById("app")});
|
|
|
1 |
+
function B(){}function I(t,e){for(const n in e)t[n]=e[n];return t}function ht(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ut(t){return t()}function Xe(){return Object.create(null)}function T(t){t.forEach(ut)}function ue(t){return typeof t=="function"}function Y(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let we;function We(t,e){return we||(we=document.createElement("a")),we.href=e,t===we.href}function pt(t){return Object.keys(t).length===0}function ve(t,e,n,i){if(t){const a=ct(t,e,n,i);return t[0](a)}}function ct(t,e,n,i){return t[1]&&i?I(n.ctx.slice(),t[1](i(e))):n.ctx}function be(t,e,n,i){if(t[2]&&i){const a=t[2](i(n));if(e.dirty===void 0)return a;if(typeof a=="object"){const s=[],l=Math.max(e.dirty.length,a.length);for(let r=0;r<l;r+=1)s[r]=e.dirty[r]|a[r];return s}return e.dirty|a}return e.dirty}function ye(t,e,n,i,a,s){if(a){const l=ct(e,n,i,s);t.p(l,a)}}function Ae(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function ae(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function q(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function re(t){return t&&ue(t.destroy)?t.destroy:B}function k(t,e){t.appendChild(e)}function R(t,e,n){t.insertBefore(e,n||null)}function M(t){t.parentNode&&t.parentNode.removeChild(t)}function He(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function C(t){return document.createElement(t)}function _t(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function P(t){return document.createTextNode(t)}function G(){return P(" ")}function $(){return P("")}function Ze(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function gt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function vt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function w(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function bt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set?t[i]=e[i]:w(t,i,e[i])}function Ve(t,e){for(const n in e)w(t,n,e[n])}function yt(t,e){Object.keys(e).forEach(n=>{At(t,n,e[n])})}function At(t,e,n){e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:w(t,e,n)}function Fe(t){return/-/.test(t)?yt:bt}function kt(t){return Array.from(t.childNodes)}function St(t,e,n,i){n===null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function se(t,e){return new t(e)}let _e;function J(t){_e=t}function x(){if(!_e)throw new Error("Function called outside component initialization");return _e}function Je(t,e){return x().$$.context.set(t,e),e}function ge(t){return x().$$.context.get(t)}function wt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const ne=[],N=[];let ie=[];const Ke=[],Ct=Promise.resolve();let Be=!1;function Mt(){Be||(Be=!0,Ct.then(Pe))}function Ie(t){ie.push(t)}const Le=new Set;let te=0;function Pe(){if(te!==0)return;const t=_e;do{try{for(;te<ne.length;){const e=ne[te];te++,J(e),Dt(e.$$)}}catch(e){throw ne.length=0,te=0,e}for(J(null),ne.length=0,te=0;N.length;)N.pop()();for(let e=0;e<ie.length;e+=1){const n=ie[e];Le.has(n)||(Le.add(n),n())}ie.length=0}while(ne.length);for(;Ke.length;)Ke.pop()();Be=!1,Le.clear(),J(t)}function Dt(t){if(t.fragment!==null){t.update(),T(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Ie)}}function zt(t){const e=[],n=[];ie.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),ie=e}const Re=new Set;let ee;function ce(){ee={r:0,c:[],p:ee}}function fe(){ee.r||T(ee.c),ee=ee.p}function E(t,e){t&&t.i&&(Re.delete(t),t.i(e))}function L(t,e,n,i){if(t&&t.o){if(Re.has(t))return;Re.add(t),ee.c.push(()=>{Re.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function Ht(t,e){const n=e.token={};function i(a,s,l,r){if(e.token!==n)return;e.resolved=r;let o=e.ctx;l!==void 0&&(o=o.slice(),o[l]=r);const u=a&&(e.current=a)(o);let c=!1;e.block&&(e.blocks?e.blocks.forEach((f,h)=>{h!==s&&f&&(ce(),L(f,1,1,()=>{e.blocks[h]===f&&(e.blocks[h]=null)}),fe())}):e.block.d(1),u.c(),E(u,1),u.m(e.mount(),e.anchor),c=!0),e.block=u,e.blocks&&(e.blocks[s]=u),c&&Pe()}if(ht(t)){const a=x();if(t.then(s=>{J(a),i(e.then,1,e.value,s),J(null)},s=>{if(J(a),i(e.catch,2,e.error,s),J(null),!e.hasCatch)throw s}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,t),!0;e.resolved=t}}function Rt(t,e,n){const i=e.slice(),{resolved:a}=t;t.current===t.then&&(i[t.value]=a),t.current===t.catch&&(i[t.error]=a),t.block.p(i,n)}function de(t,e){const n={},i={},a={$$scope:1};let s=t.length;for(;s--;){const l=t[s],r=e[s];if(r){for(const o in l)o in r||(i[o]=1);for(const o in r)a[o]||(n[o]=r[o],a[o]=1);t[s]=r}else for(const o in l)a[o]=1}for(const l in i)l in n||(n[l]=void 0);return n}function Q(t){return typeof t=="object"&&t!==null?t:{}}function K(t){t&&t.c()}function X(t,e,n,i){const{fragment:a,after_update:s}=t.$$;a&&a.m(e,n),i||Ie(()=>{const l=t.$$.on_mount.map(ut).filter(ue);t.$$.on_destroy?t.$$.on_destroy.push(...l):T(l),t.$$.on_mount=[]}),s.forEach(Ie)}function W(t,e){const n=t.$$;n.fragment!==null&&(zt(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Ft(t,e){t.$$.dirty[0]===-1&&(ne.push(t),Mt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function me(t,e,n,i,a,s,l,r=[-1]){const o=_e;J(t);const u=t.$$={fragment:null,ctx:[],props:s,update:B,not_equal:a,bound:Xe(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(o?o.$$.context:[])),callbacks:Xe(),dirty:r,skip_bound:!1,root:e.target||o.$$.root};l&&l(u.root);let c=!1;if(u.ctx=n?n(t,e.props||{},(f,h,...D)=>{const m=D.length?D[0]:h;return u.ctx&&a(u.ctx[f],u.ctx[f]=m)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](m),c&&Ft(t,f)),h}):[],u.update(),c=!0,T(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const f=kt(e.target);u.fragment&&u.fragment.l(f),f.forEach(M)}else u.fragment&&u.fragment.c();e.intro&&E(t.$$.fragment),X(t,e.target,e.anchor,e.customElement),Pe()}J(o)}class he{$destroy(){W(this,1),this.$destroy=B}$on(e,n){if(!ue(n))return B;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const a=i.indexOf(n);a!==-1&&i.splice(a,1)}}$set(e){this.$$set&&!pt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function oe(t){return Object.entries(t).filter(([e,n])=>e!==""&&n).map(([e])=>e).join(" ")}function Et(t,e,n,i={bubbles:!0},a=!1){if(typeof Event>"u")throw new Error("Event not defined.");if(!t)throw new Error("Tried to dipatch event without element.");const s=new CustomEvent(e,Object.assign(Object.assign({},i),{detail:n}));if(t?.dispatchEvent(s),a&&e.startsWith("SMUI")){const l=new CustomEvent(e.replace(/^SMUI/g,()=>"MDC"),Object.assign(Object.assign({},i),{detail:n}));t?.dispatchEvent(l),l.defaultPrevented&&s.preventDefault()}return s}const Qe=/^[a-z]+(?::(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/,Ut=/^[^$]+(?:\$(?:preventDefault|stopPropagation|passive|nonpassive|capture|once|self))+$/;function ke(t){let e,n=[];t.$on=(a,s)=>{let l=a,r=()=>{};return e?r=e(l,s):n.push([l,s]),l.match(Qe)&&console&&console.warn('Event modifiers in SMUI now use "$" instead of ":", so that all events can be bound with modifiers. Please update your event binding: ',l),()=>{r()}};function i(a){wt(t,a)}return a=>{const s=[],l={};e=(r,o)=>{let u=r,c=o,f=!1;const h=u.match(Qe),D=u.match(Ut),m=h||D;if(u.match(/^SMUI:\w+:/)){const y=u.split(":");let v="";for(let A=0;A<y.length;A++)v+=A===y.length-1?":"+y[A]:y[A].split("-").map(U=>U.slice(0,1).toUpperCase()+U.slice(1)).join("");console.warn(`The event ${u.split("$")[0]} has been renamed to ${v.split("$")[0]}.`),u=v}if(m){const y=u.split(h?":":"$");u=y[0];const v=y.slice(1).reduce((A,U)=>(A[U]=!0,A),{});v.passive&&(f=f||{},f.passive=!0),v.nonpassive&&(f=f||{},f.passive=!1),v.capture&&(f=f||{},f.capture=!0),v.once&&(f=f||{},f.once=!0),v.preventDefault&&(c=gt(c)),v.stopPropagation&&(c=vt(c))}const b=Ze(a,u,c,f),O=()=>{b();const y=s.indexOf(O);y>-1&&s.splice(y,1)};return s.push(O),u in l||(l[u]=Ze(a,u,i)),O};for(let r=0;r<n.length;r++)e(n[r][0],n[r][1]);return{destroy:()=>{for(let r=0;r<s.length;r++)s[r]();for(let r of Object.entries(l))r[1]()}}}}function qe(t,e){let n=[];if(e)for(let i=0;i<e.length;i++){const a=e[i],s=Array.isArray(a)?a[0]:a;Array.isArray(a)&&a.length>1?n.push(s(t,a[1])):n.push(s(t))}return{update(i){if((i&&i.length||0)!=n.length)throw new Error("You must not change the length of an actions array.");if(i)for(let a=0;a<i.length;a++){const s=n[a];if(s&&s.update){const l=i[a];Array.isArray(l)&&l.length>1?s.update(l[1]):s.update()}}},destroy(){for(let i=0;i<n.length;i++){const a=n[i];a&&a.destroy&&a.destroy()}}}}var Ce;function Lt(t,e){e===void 0&&(e=!1);var n=t.CSS,i=Ce;if(typeof Ce=="boolean"&&!e)return Ce;var a=n&&typeof n.supports=="function";if(!a)return!1;var s=n.supports("--css-vars","yes"),l=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=s||l,e||(Ce=i),i}function Ot(t,e,n){if(!t)return{x:0,y:0};var i=e.x,a=e.y,s=i+n.left,l=a+n.top,r,o;if(t.type==="touchstart"){var u=t;r=u.changedTouches[0].pageX-s,o=u.changedTouches[0].pageY-l}else{var c=t;r=c.pageX-s,o=c.pageY-l}return{x:r,y:o}}var Ge=function(t,e){return Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},Ge(t,e)};function jt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ge(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var pe=function(){return pe=Object.assign||function(e){for(var n,i=1,a=arguments.length;i<a;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},pe.apply(this,arguments)};function Me(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}/**
|
2 |
* @license
|
3 |
* Copyright 2016 Google Inc.
|
4 |
*
|
|
|
19 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 |
* THE SOFTWARE.
|
22 |
+
*/var Bt=function(){function t(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}();/**
|
23 |
* @license
|
24 |
* Copyright 2019 Google Inc.
|
25 |
*
|
|
|
40 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
41 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
42 |
* THE SOFTWARE.
|
43 |
+
*/function It(t){return t===void 0&&(t=window),Gt(t)?{passive:!0}:!1}function Gt(t){t===void 0&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch{e=!1}return e}const Pt=Object.freeze(Object.defineProperty({__proto__:null,applyPassive:It},Symbol.toStringTag,{value:"Module"}));/**
|
44 |
* @license
|
45 |
* Copyright 2018 Google Inc.
|
46 |
*
|
|
|
61 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
62 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
63 |
* THE SOFTWARE.
|
64 |
+
*/function qt(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(ft(n,e))return n;n=n.parentElement}return null}function ft(t,e){var n=t.matches||t.webkitMatchesSelector||t.msMatchesSelector;return n.call(t,e)}function Xt(t){var e=t;if(e.offsetParent!==null)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}const Wt=Object.freeze(Object.defineProperty({__proto__:null,closest:qt,estimateScrollWidth:Xt,matches:ft},Symbol.toStringTag,{value:"Module"}));/**
|
65 |
* @license
|
66 |
* Copyright 2016 Google Inc.
|
67 |
*
|
|
|
82 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
83 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
84 |
* THE SOFTWARE.
|
85 |
+
*/var Zt={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},Vt={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},Ne={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};/**
|
86 |
* @license
|
87 |
* Copyright 2016 Google Inc.
|
88 |
*
|
|
|
103 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
104 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
105 |
* THE SOFTWARE.
|
106 |
+
*/var Te=["touchstart","pointerdown","mousedown","keydown"],Ye=["touchend","pointerup","mouseup","contextmenu"],De=[],Jt=function(t){jt(e,t);function e(n){var i=t.call(this,pe(pe({},e.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(a){i.activateImpl(a)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return Object.defineProperty(e,"cssClasses",{get:function(){return Zt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Ne},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var n=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var a=e.cssClasses,s=a.ROOT,l=a.UNBOUNDED;requestAnimationFrame(function(){n.adapter.addClass(s),n.adapter.isUnbounded()&&(n.adapter.addClass(l),n.layoutInternal())})}},e.prototype.destroy=function(){var n=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,a=i.ROOT,s=i.UNBOUNDED;requestAnimationFrame(function(){n.adapter.removeClass(a),n.adapter.removeClass(s),n.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(n){this.activateImpl(n)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var n=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){n.layoutInternal(),n.layoutFrame=0})},e.prototype.setUnbounded=function(n){var i=e.cssClasses.UNBOUNDED;n?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var n=this;requestAnimationFrame(function(){return n.adapter.addClass(e.cssClasses.BG_FOCUSED)})},e.prototype.handleBlur=function(){var n=this;requestAnimationFrame(function(){return n.adapter.removeClass(e.cssClasses.BG_FOCUSED)})},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(n){var i,a;if(n){try{for(var s=Me(Te),l=s.next();!l.done;l=s.next()){var r=l.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(o){i={error:o}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(n){var i,a;if(n.type==="keydown")this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var s=Me(Ye),l=s.next();!l.done;l=s.next()){var r=l.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(o){i={error:o}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},e.prototype.deregisterRootHandlers=function(){var n,i;try{for(var a=Me(Te),s=a.next();!s.done;s=a.next()){var l=s.value;this.adapter.deregisterInteractionHandler(l,this.activateHandler)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var n,i;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var a=Me(Ye),s=a.next();!s.done;s=a.next()){var l=s.value;this.adapter.deregisterDocumentInteractionHandler(l,this.deactivateHandler)}}catch(r){n={error:r}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.removeCssVars=function(){var n=this,i=e.strings,a=Object.keys(i);a.forEach(function(s){s.indexOf("VAR_")===0&&n.adapter.updateCssVariable(i[s],null)})},e.prototype.activateImpl=function(n){var i=this;if(!this.adapter.isSurfaceDisabled()){var a=this.activationState;if(!a.isActivated){var s=this.previousActivationEvent,l=s&&n!==void 0&&s.type!==n.type;if(!l){a.isActivated=!0,a.isProgrammatic=n===void 0,a.activationEvent=n,a.wasActivatedByPointer=a.isProgrammatic?!1:n!==void 0&&(n.type==="mousedown"||n.type==="touchstart"||n.type==="pointerdown");var r=n!==void 0&&De.length>0&&De.some(function(o){return i.adapter.containsEventTarget(o)});if(r){this.resetActivationState();return}n!==void 0&&(De.push(n.target),this.registerDeactivationHandlers(n)),a.wasElementMadeActive=this.checkElementMadeActive(n),a.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){De=[],!a.wasElementMadeActive&&n!==void 0&&(n.key===" "||n.keyCode===32)&&(a.wasElementMadeActive=i.checkElementMadeActive(n),a.wasElementMadeActive&&i.animateActivation()),a.wasElementMadeActive||(i.activationState=i.defaultActivationState())})}}}},e.prototype.checkElementMadeActive=function(n){return n!==void 0&&n.type==="keydown"?this.adapter.isSurfaceActive():!0},e.prototype.animateActivation=function(){var n=this,i=e.strings,a=i.VAR_FG_TRANSLATE_START,s=i.VAR_FG_TRANSLATE_END,l=e.cssClasses,r=l.FG_DEACTIVATION,o=l.FG_ACTIVATION,u=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",f="";if(!this.adapter.isUnbounded()){var h=this.getFgTranslationCoordinates(),D=h.startPoint,m=h.endPoint;c=D.x+"px, "+D.y+"px",f=m.x+"px, "+m.y+"px"}this.adapter.updateCssVariable(a,c),this.adapter.updateCssVariable(s,f),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(r),this.adapter.computeBoundingRect(),this.adapter.addClass(o),this.activationTimer=setTimeout(function(){n.activationTimerCallback()},u)},e.prototype.getFgTranslationCoordinates=function(){var n=this.activationState,i=n.activationEvent,a=n.wasActivatedByPointer,s;a?s=Ot(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):s={x:this.frame.width/2,y:this.frame.height/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2};var l={x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2};return{startPoint:s,endPoint:l}},e.prototype.runDeactivationUXLogicIfReady=function(){var n=this,i=e.cssClasses.FG_DEACTIVATION,a=this.activationState,s=a.hasDeactivationUXRun,l=a.isActivated,r=s||!l;r&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout(function(){n.adapter.removeClass(i)},Ne.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var n=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(n),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var n=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return n.previousActivationEvent=void 0},e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var n=this,i=this.activationState;if(i.isActivated){var a=pe({},i);i.isProgrammatic?(requestAnimationFrame(function(){n.animateDeactivation(a)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){n.activationState.hasDeactivationUXRun=!0,n.animateDeactivation(a),n.resetActivationState()}))}},e.prototype.animateDeactivation=function(n){var i=n.wasActivatedByPointer,a=n.wasElementMadeActive;(i||a)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var n=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width),a=function(){var l=Math.sqrt(Math.pow(n.frame.width,2)+Math.pow(n.frame.height,2));return l+e.numbers.PADDING};this.maxRadius=this.adapter.isUnbounded()?i:a();var s=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&s%2!==0?this.initialSize=s-1:this.initialSize=s,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var n=e.strings,i=n.VAR_FG_SIZE,a=n.VAR_LEFT,s=n.VAR_TOP,l=n.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(l,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(a,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(s,this.unboundedCoords.top+"px"))},e}(Bt);const{applyPassive:ze}=Pt,{matches:Kt}=Wt;function $e(t,{ripple:e=!0,surface:n=!1,unbounded:i=!1,disabled:a=!1,color:s,active:l,rippleElement:r,eventTarget:o,activeTarget:u,addClass:c=m=>t.classList.add(m),removeClass:f=m=>t.classList.remove(m),addStyle:h=(m,b)=>t.style.setProperty(m,b),initPromise:D=Promise.resolve()}={}){let m,b=ge("SMUI:addLayoutListener"),O,y=l,v=o,A=u;function U(){n?(c("mdc-ripple-surface"),s==="primary"?(c("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")):s==="secondary"?(f("smui-ripple-surface--primary"),c("smui-ripple-surface--secondary")):(f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary"))):(f("mdc-ripple-surface"),f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")),m&&y!==l&&(y=l,l?m.activate():l===!1&&m.deactivate()),e&&!m?(m=new Jt({addClass:c,browserSupportsCssVars:()=>Lt(window),computeBoundingRect:()=>(r||t).getBoundingClientRect(),containsEventTarget:S=>t.contains(S),deregisterDocumentInteractionHandler:(S,g)=>document.documentElement.removeEventListener(S,g,ze()),deregisterInteractionHandler:(S,g)=>(o||t).removeEventListener(S,g,ze()),deregisterResizeHandler:S=>window.removeEventListener("resize",S),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset}),isSurfaceActive:()=>l??Kt(u||t,":active"),isSurfaceDisabled:()=>!!a,isUnbounded:()=>!!i,registerDocumentInteractionHandler:(S,g)=>document.documentElement.addEventListener(S,g,ze()),registerInteractionHandler:(S,g)=>(o||t).addEventListener(S,g,ze()),registerResizeHandler:S=>window.addEventListener("resize",S),removeClass:f,updateCssVariable:h}),D.then(()=>{m&&(m.init(),m.setUnbounded(i))})):m&&!e&&D.then(()=>{m&&(m.destroy(),m=void 0)}),m&&(v!==o||A!==u)&&(v=o,A=u,m.destroy(),requestAnimationFrame(()=>{m&&(m.init(),m.setUnbounded(i))})),!e&&i&&c("mdc-ripple-upgraded--unbounded")}U(),b&&(O=b(z));function z(){m&&m.layout()}return{update(S){({ripple:e,surface:n,unbounded:i,disabled:a,color:s,active:l,rippleElement:r,eventTarget:o,activeTarget:u,addClass:c,removeClass:f,addStyle:h,initPromise:D}=Object.assign({ripple:!0,surface:!1,unbounded:!1,disabled:!1,color:void 0,active:void 0,rippleElement:void 0,eventTarget:void 0,activeTarget:void 0,addClass:g=>t.classList.add(g),removeClass:g=>t.classList.remove(g),addStyle:(g,d)=>t.style.setProperty(g,d),initPromise:Promise.resolve()},S)),U()},destroy(){m&&(m.destroy(),m=void 0,f("mdc-ripple-surface"),f("smui-ripple-surface--primary"),f("smui-ripple-surface--secondary")),O&&O()}}}function Qt(t){let e;const n=t[10].default,i=ve(n,t,t[12],null);return{c(){i&&i.c()},m(a,s){i&&i.m(a,s),e=!0},p(a,s){i&&i.p&&(!e||s&4096)&&ye(i,n,a,a[12],e?be(n,a[12],s,null):Ae(a[12]),null)},i(a){e||(E(i,a),e=!0)},o(a){L(i,a),e=!1},d(a){i&&i.d(a)}}}function Nt(t){let e,n,i;const a=[{tag:t[3]},{use:[t[5],...t[0]]},{class:oe({[t[1]]:!0,"mdc-button__label":t[6]==="button","mdc-fab__label":t[6]==="fab","mdc-tab__text-label":t[6]==="tab","mdc-image-list__label":t[6]==="image-list","mdc-snackbar__label":t[6]==="snackbar","mdc-banner__text":t[6]==="banner","mdc-segmented-button__label":t[6]==="segmented-button","mdc-data-table__pagination-rows-per-page-label":t[6]==="data-table:pagination","mdc-data-table__header-cell-label":t[6]==="data-table:sortable-header-cell"})},t[6]==="snackbar"?{"aria-atomic":"false"}:{},{tabindex:t[7]},t[8]];var s=t[2];function l(r){let o={$$slots:{default:[Qt]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=I(o,a[u]);return{props:o}}return s&&(e=se(s,l(t)),t[11](e)),{c(){e&&K(e.$$.fragment),n=$()},m(r,o){e&&X(e,r,o),R(r,n,o),i=!0},p(r,[o]){const u=o&491?de(a,[o&8&&{tag:r[3]},o&33&&{use:[r[5],...r[0]]},o&66&&{class:oe({[r[1]]:!0,"mdc-button__label":r[6]==="button","mdc-fab__label":r[6]==="fab","mdc-tab__text-label":r[6]==="tab","mdc-image-list__label":r[6]==="image-list","mdc-snackbar__label":r[6]==="snackbar","mdc-banner__text":r[6]==="banner","mdc-segmented-button__label":r[6]==="segmented-button","mdc-data-table__pagination-rows-per-page-label":r[6]==="data-table:pagination","mdc-data-table__header-cell-label":r[6]==="data-table:sortable-header-cell"})},o&64&&Q(r[6]==="snackbar"?{"aria-atomic":"false"}:{}),o&128&&{tabindex:r[7]},o&256&&Q(r[8])]):{};if(o&4096&&(u.$$scope={dirty:o,ctx:r}),o&4&&s!==(s=r[2])){if(e){ce();const c=e;L(c.$$.fragment,1,0,()=>{W(c,1)}),fe()}s?(e=se(s,l(r)),r[11](e),K(e.$$.fragment),E(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){t[11](null),r&&M(n),e&&W(e,r)}}}function Tt(t,e,n){const i=["use","class","component","tag","getElement"];let a=q(e,i),{$$slots:s={},$$scope:l}=e;const r=ke(x());let{use:o=[]}=e,{class:u=""}=e,c,{component:f=le}=e,{tag:h=f===le?"span":void 0}=e;const D=ge("SMUI:label:context"),m=ge("SMUI:label:tabindex");function b(){return c.getElement()}function O(y){N[y?"unshift":"push"](()=>{c=y,n(4,c)})}return t.$$set=y=>{e=I(I({},e),ae(y)),n(8,a=q(e,i)),"use"in y&&n(0,o=y.use),"class"in y&&n(1,u=y.class),"component"in y&&n(2,f=y.component),"tag"in y&&n(3,h=y.tag),"$$scope"in y&&n(12,l=y.$$scope)},[o,u,f,h,c,r,D,m,a,b,s,O,l]}class Yt extends he{constructor(e){super(),me(this,e,Tt,Nt,Y,{use:0,class:1,component:2,tag:3,getElement:9})}get getElement(){return this.$$.ctx[9]}}function $t(t){let e;const n=t[11].default,i=ve(n,t,t[13],null);return{c(){i&&i.c()},m(a,s){i&&i.m(a,s),e=!0},p(a,s){i&&i.p&&(!e||s&8192)&&ye(i,n,a,a[13],e?be(n,a[13],s,null):Ae(a[13]),null)},i(a){e||(E(i,a),e=!0)},o(a){L(i,a),e=!1},d(a){i&&i.d(a)}}}function xt(t){let e,n,i;const a=[{tag:t[4]},{use:[t[6],...t[0]]},{class:oe({[t[1]]:!0,"mdc-button__icon":t[8]==="button","mdc-fab__icon":t[8]==="fab","mdc-icon-button__icon":t[8]==="icon-button","mdc-icon-button__icon--on":t[8]==="icon-button"&&t[2],"mdc-tab__icon":t[8]==="tab","mdc-banner__icon":t[8]==="banner","mdc-segmented-button__icon":t[8]==="segmented-button"})},{"aria-hidden":"true"},t[7]?{focusable:"false",tabindex:"-1"}:{},t[9]];var s=t[3];function l(r){let o={$$slots:{default:[$t]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=I(o,a[u]);return{props:o}}return s&&(e=se(s,l(t)),t[12](e)),{c(){e&&K(e.$$.fragment),n=$()},m(r,o){e&&X(e,r,o),R(r,n,o),i=!0},p(r,[o]){const u=o&983?de(a,[o&16&&{tag:r[4]},o&65&&{use:[r[6],...r[0]]},o&262&&{class:oe({[r[1]]:!0,"mdc-button__icon":r[8]==="button","mdc-fab__icon":r[8]==="fab","mdc-icon-button__icon":r[8]==="icon-button","mdc-icon-button__icon--on":r[8]==="icon-button"&&r[2],"mdc-tab__icon":r[8]==="tab","mdc-banner__icon":r[8]==="banner","mdc-segmented-button__icon":r[8]==="segmented-button"})},a[3],o&128&&Q(r[7]?{focusable:"false",tabindex:"-1"}:{}),o&512&&Q(r[9])]):{};if(o&8192&&(u.$$scope={dirty:o,ctx:r}),o&8&&s!==(s=r[3])){if(e){ce();const c=e;L(c.$$.fragment,1,0,()=>{W(c,1)}),fe()}s?(e=se(s,l(r)),r[12](e),K(e.$$.fragment),E(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){t[12](null),r&&M(n),e&&W(e,r)}}}function en(t,e,n){const i=["use","class","on","component","tag","getElement"];let a=q(e,i),{$$slots:s={},$$scope:l}=e;const r=ke(x());let{use:o=[]}=e,{class:u=""}=e,{on:c=!1}=e,f,{component:h=le}=e,{tag:D=h===le?"i":void 0}=e;const m=h===un,b=ge("SMUI:icon:context");function O(){return f.getElement()}function y(v){N[v?"unshift":"push"](()=>{f=v,n(5,f)})}return t.$$set=v=>{e=I(I({},e),ae(v)),n(9,a=q(e,i)),"use"in v&&n(0,o=v.use),"class"in v&&n(1,u=v.class),"on"in v&&n(2,c=v.on),"component"in v&&n(3,h=v.component),"tag"in v&&n(4,D=v.tag),"$$scope"in v&&n(13,l=v.$$scope)},[o,u,c,h,D,f,r,m,b,a,O,s,y,l]}class tn extends he{constructor(e){super(),me(this,e,en,xt,Y,{use:0,class:1,on:2,component:3,tag:4,getElement:10})}get getElement(){return this.$$.ctx[10]}}function nn(t){let e=t[1],n,i,a=t[1]&&Oe(t);return{c(){a&&a.c(),n=$()},m(s,l){a&&a.m(s,l),R(s,n,l),i=!0},p(s,l){s[1]?e?Y(e,s[1])?(a.d(1),a=Oe(s),e=s[1],a.c(),a.m(n.parentNode,n)):a.p(s,l):(a=Oe(s),e=s[1],a.c(),a.m(n.parentNode,n)):e&&(a.d(1),a=null,e=s[1])},i(s){i||(E(a),i=!0)},o(s){L(a),i=!1},d(s){s&&M(n),a&&a.d(s)}}}function an(t){let e=t[1],n,i=t[1]&&je(t);return{c(){i&&i.c(),n=$()},m(a,s){i&&i.m(a,s),R(a,n,s)},p(a,s){a[1]?e?Y(e,a[1])?(i.d(1),i=je(a),e=a[1],i.c(),i.m(n.parentNode,n)):i.p(a,s):(i=je(a),e=a[1],i.c(),i.m(n.parentNode,n)):e&&(i.d(1),i=null,e=a[1])},i:B,o:B,d(a){a&&M(n),i&&i.d(a)}}}function Oe(t){let e,n,i,a,s;const l=t[8].default,r=ve(l,t,t[7],null);let o=[t[5]],u={};for(let c=0;c<o.length;c+=1)u=I(u,o[c]);return{c(){e=C(t[1]),r&&r.c(),Fe(t[1])(e,u)},m(c,f){R(c,e,f),r&&r.m(e,null),t[10](e),i=!0,a||(s=[re(n=qe.call(null,e,t[0])),re(t[4].call(null,e))],a=!0)},p(c,f){r&&r.p&&(!i||f&128)&&ye(r,l,c,c[7],i?be(l,c[7],f,null):Ae(c[7]),null),Fe(c[1])(e,u=de(o,[f&32&&c[5]])),n&&ue(n.update)&&f&1&&n.update.call(null,c[0])},i(c){i||(E(r,c),i=!0)},o(c){L(r,c),i=!1},d(c){c&&M(e),r&&r.d(c),t[10](null),a=!1,T(s)}}}function je(t){let e,n,i,a,s=[t[5]],l={};for(let r=0;r<s.length;r+=1)l=I(l,s[r]);return{c(){e=C(t[1]),Fe(t[1])(e,l)},m(r,o){R(r,e,o),t[9](e),i||(a=[re(n=qe.call(null,e,t[0])),re(t[4].call(null,e))],i=!0)},p(r,o){Fe(r[1])(e,l=de(s,[o&32&&r[5]])),n&&ue(n.update)&&o&1&&n.update.call(null,r[0])},d(r){r&&M(e),t[9](null),i=!1,T(a)}}}function rn(t){let e,n,i,a;const s=[an,nn],l=[];function r(o,u){return o[3]?0:1}return e=r(t),n=l[e]=s[e](t),{c(){n.c(),i=$()},m(o,u){l[e].m(o,u),R(o,i,u),a=!0},p(o,[u]){let c=e;e=r(o),e===c?l[e].p(o,u):(ce(),L(l[c],1,1,()=>{l[c]=null}),fe(),n=l[e],n?n.p(o,u):(n=l[e]=s[e](o),n.c()),E(n,1),n.m(i.parentNode,i))},i(o){a||(E(n),a=!0)},o(o){L(n),a=!1},d(o){l[e].d(o),o&&M(i)}}}function sn(t,e,n){let i;const a=["use","tag","getElement"];let s=q(e,a),{$$slots:l={},$$scope:r}=e,{use:o=[]}=e,{tag:u}=e;const c=ke(x());let f;function h(){return f}function D(b){N[b?"unshift":"push"](()=>{f=b,n(2,f)})}function m(b){N[b?"unshift":"push"](()=>{f=b,n(2,f)})}return t.$$set=b=>{e=I(I({},e),ae(b)),n(5,s=q(e,a)),"use"in b&&n(0,o=b.use),"tag"in b&&n(1,u=b.tag),"$$scope"in b&&n(7,r=b.$$scope)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"].indexOf(u)>-1)},[o,u,f,i,c,s,h,r,l,D,m]}class le extends he{constructor(e){super(),me(this,e,sn,rn,Y,{use:0,tag:1,getElement:6})}get getElement(){return this.$$.ctx[6]}}function on(t){let e,n,i,a,s;const l=t[6].default,r=ve(l,t,t[5],null);let o=[t[3]],u={};for(let c=0;c<o.length;c+=1)u=I(u,o[c]);return{c(){e=_t("svg"),r&&r.c(),Ve(e,u)},m(c,f){R(c,e,f),r&&r.m(e,null),t[7](e),i=!0,a||(s=[re(n=qe.call(null,e,t[0])),re(t[2].call(null,e))],a=!0)},p(c,[f]){r&&r.p&&(!i||f&32)&&ye(r,l,c,c[5],i?be(l,c[5],f,null):Ae(c[5]),null),Ve(e,u=de(o,[f&8&&c[3]])),n&&ue(n.update)&&f&1&&n.update.call(null,c[0])},i(c){i||(E(r,c),i=!0)},o(c){L(r,c),i=!1},d(c){c&&M(e),r&&r.d(c),t[7](null),a=!1,T(s)}}}function ln(t,e,n){const i=["use","getElement"];let a=q(e,i),{$$slots:s={},$$scope:l}=e,{use:r=[]}=e;const o=ke(x());let u;function c(){return u}function f(h){N[h?"unshift":"push"](()=>{u=h,n(1,u)})}return t.$$set=h=>{e=I(I({},e),ae(h)),n(3,a=q(e,i)),"use"in h&&n(0,r=h.use),"$$scope"in h&&n(5,l=h.$$scope)},[r,u,o,a,c,l,s,f]}class un extends he{constructor(e){super(),me(this,e,ln,on,Y,{use:0,getElement:4})}get getElement(){return this.$$.ctx[4]}}function xe(t){let e;return{c(){e=C("div"),w(e,"class","mdc-button__touch")},m(n,i){R(n,e,i)},d(n){n&&M(e)}}}function cn(t){let e,n,i,a;const s=t[28].default,l=ve(s,t,t[30],null);let r=t[6]&&xe();return{c(){e=C("div"),n=G(),l&&l.c(),r&&r.c(),i=$(),w(e,"class","mdc-button__ripple")},m(o,u){R(o,e,u),R(o,n,u),l&&l.m(o,u),r&&r.m(o,u),R(o,i,u),a=!0},p(o,u){l&&l.p&&(!a||u[0]&1073741824)&&ye(l,s,o,o[30],a?be(s,o[30],u,null):Ae(o[30]),null),o[6]?r||(r=xe(),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null)},i(o){a||(E(l,o),a=!0)},o(o){L(l,o),a=!1},d(o){o&&M(e),o&&M(n),l&&l.d(o),r&&r.d(o),o&&M(i)}}}function fn(t){let e,n,i;const a=[{tag:t[10]},{use:[[$e,{ripple:t[3],unbounded:!1,color:t[4],disabled:!!t[23].disabled,addClass:t[19],removeClass:t[20],addStyle:t[21]}],t[17],...t[0]]},{class:oe({[t[1]]:!0,"mdc-button":!0,"mdc-button--raised":t[5]==="raised","mdc-button--unelevated":t[5]==="unelevated","mdc-button--outlined":t[5]==="outlined","smui-button--color-secondary":t[4]==="secondary","mdc-button--touch":t[6],"mdc-card__action":t[18]==="card:action","mdc-card__action--button":t[18]==="card:action","mdc-dialog__button":t[18]==="dialog:action","mdc-top-app-bar__navigation-icon":t[18]==="top-app-bar:navigation","mdc-top-app-bar__action-item":t[18]==="top-app-bar:action","mdc-snackbar__action":t[18]==="snackbar:actions","mdc-banner__secondary-action":t[18]==="banner"&&t[8],"mdc-banner__primary-action":t[18]==="banner"&&!t[8],"mdc-tooltip__action":t[18]==="tooltip:rich-actions",...t[12]})},{style:Object.entries(t[13]).map(et).concat([t[2]]).join(" ")},t[16],t[15],t[14],{href:t[7]},t[23]];var s=t[9];function l(r){let o={$$slots:{default:[cn]},$$scope:{ctx:r}};for(let u=0;u<a.length;u+=1)o=I(o,a[u]);return{props:o}}return s&&(e=se(s,l(t)),t[29](e),e.$on("click",t[22])),{c(){e&&K(e.$$.fragment),n=$()},m(r,o){e&&X(e,r,o),R(r,n,o),i=!0},p(r,o){const u=o[0]&12580351?de(a,[o[0]&1024&&{tag:r[10]},o[0]&12189721&&{use:[[$e,{ripple:r[3],unbounded:!1,color:r[4],disabled:!!r[23].disabled,addClass:r[19],removeClass:r[20],addStyle:r[21]}],r[17],...r[0]]},o[0]&266610&&{class:oe({[r[1]]:!0,"mdc-button":!0,"mdc-button--raised":r[5]==="raised","mdc-button--unelevated":r[5]==="unelevated","mdc-button--outlined":r[5]==="outlined","smui-button--color-secondary":r[4]==="secondary","mdc-button--touch":r[6],"mdc-card__action":r[18]==="card:action","mdc-card__action--button":r[18]==="card:action","mdc-dialog__button":r[18]==="dialog:action","mdc-top-app-bar__navigation-icon":r[18]==="top-app-bar:navigation","mdc-top-app-bar__action-item":r[18]==="top-app-bar:action","mdc-snackbar__action":r[18]==="snackbar:actions","mdc-banner__secondary-action":r[18]==="banner"&&r[8],"mdc-banner__primary-action":r[18]==="banner"&&!r[8],"mdc-tooltip__action":r[18]==="tooltip:rich-actions",...r[12]})},o[0]&8196&&{style:Object.entries(r[13]).map(et).concat([r[2]]).join(" ")},o[0]&65536&&Q(r[16]),o[0]&32768&&Q(r[15]),o[0]&16384&&Q(r[14]),o[0]&128&&{href:r[7]},o[0]&8388608&&Q(r[23])]):{};if(o[0]&1073741888&&(u.$$scope={dirty:o,ctx:r}),o[0]&512&&s!==(s=r[9])){if(e){ce();const c=e;L(c.$$.fragment,1,0,()=>{W(c,1)}),fe()}s?(e=se(s,l(r)),r[29](e),e.$on("click",r[22]),K(e.$$.fragment),E(e.$$.fragment,1),X(e,n.parentNode,n)):e=null}else s&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){t[29](null),r&&M(n),e&&W(e,r)}}}const et=([t,e])=>`${t}: ${e};`;function dn(t,e,n){let i,a,s;const l=["use","class","style","ripple","color","variant","touch","href","action","defaultAction","secondary","component","tag","getElement"];let r=q(e,l),{$$slots:o={},$$scope:u}=e;const c=ke(x());let{use:f=[]}=e,{class:h=""}=e,{style:D=""}=e,{ripple:m=!0}=e,{color:b="primary"}=e,{variant:O="text"}=e,{touch:y=!1}=e,{href:v=void 0}=e,{action:A="close"}=e,{defaultAction:U=!1}=e,{secondary:z=!1}=e,S,g={},d={},j=ge("SMUI:button:context"),{component:H=le}=e,{tag:p=H===le?v==null?"button":"a":void 0}=e,F=r.disabled;Je("SMUI:label:context","button"),Je("SMUI:icon:context","button");function Z(_){g[_]||n(12,g[_]=!0,g)}function V(_){(!(_ in g)||g[_])&&n(12,g[_]=!1,g)}function Ee(_,Se){d[_]!=Se&&(Se===""||Se==null?(delete d[_],n(13,d)):n(13,d[_]=Se,d))}function dt(){j==="banner"&&Et(Ue(),z?"SMUIBannerButton:secondaryActionClick":"SMUIBannerButton:primaryActionClick")}function Ue(){return S.getElement()}function mt(_){N[_?"unshift":"push"](()=>{S=_,n(11,S)})}return t.$$set=_=>{n(31,e=I(I({},e),ae(_))),n(23,r=q(e,l)),"use"in _&&n(0,f=_.use),"class"in _&&n(1,h=_.class),"style"in _&&n(2,D=_.style),"ripple"in _&&n(3,m=_.ripple),"color"in _&&n(4,b=_.color),"variant"in _&&n(5,O=_.variant),"touch"in _&&n(6,y=_.touch),"href"in _&&n(7,v=_.href),"action"in _&&n(24,A=_.action),"defaultAction"in _&&n(25,U=_.defaultAction),"secondary"in _&&n(8,z=_.secondary),"component"in _&&n(9,H=_.component),"tag"in _&&n(10,p=_.tag),"$$scope"in _&&n(30,u=_.$$scope)},t.$$.update=()=>{if(n(16,i=j==="dialog:action"&&A!=null?{"data-mdc-dialog-action":A}:{action:e.action}),n(15,a=j==="dialog:action"&&U?{"data-mdc-dialog-button-default":""}:{default:e.default}),n(14,s=j==="banner"?{}:{secondary:e.secondary}),F!==r.disabled){const _=Ue();"blur"in _&&_.blur(),n(27,F=r.disabled)}},e=ae(e),[f,h,D,m,b,O,y,v,z,H,p,S,g,d,s,a,i,c,j,Z,V,Ee,dt,r,A,U,Ue,F,o,mt,u]}class mn extends he{constructor(e){super(),me(this,e,dn,fn,Y,{use:0,class:1,style:2,ripple:3,color:4,variant:5,touch:6,href:7,action:24,defaultAction:25,secondary:8,component:9,tag:10,getElement:26},null,[-1,-1])}get getElement(){return this.$$.ctx[26]}}function tt(t,e,n){const i=t.slice();i[3]=e[n];const a=Object.keys(i[3])[0];return i[4]=a,i}function nt(t,e,n){const i=t.slice();return i[7]=e[n],i}function it(t,e,n){const i=t.slice();return i[10]=e[n],i}function at(t,e,n){const i=t.slice();return i[13]=e[n],i}function hn(t){return{c:B,m:B,p:B,i:B,o:B,d:B}}function pn(t){let e,n,i=t[2],a=[];for(let l=0;l<i.length;l+=1)a[l]=lt(tt(t,i,l));const s=l=>L(a[l],1,1,()=>{a[l]=null});return{c(){for(let l=0;l<a.length;l+=1)a[l].c();e=$()},m(l,r){for(let o=0;o<a.length;o+=1)a[o]&&a[o].m(l,r);R(l,e,r),n=!0},p(l,r){if(r&3){i=l[2];let o;for(o=0;o<i.length;o+=1){const u=tt(l,i,o);a[o]?(a[o].p(u,r),E(a[o],1)):(a[o]=lt(u),a[o].c(),E(a[o],1),a[o].m(e.parentNode,e))}for(ce(),o=i.length;o<a.length;o+=1)s(o);fe()}},i(l){if(!n){for(let r=0;r<i.length;r+=1)E(a[r]);n=!0}},o(l){a=a.filter(Boolean);for(let r=0;r<a.length;r+=1)L(a[r]);n=!1},d(l){He(a,l),l&&M(e)}}}function rt(t){let e=t[13]+"",n,i;return{c(){n=P(e),i=C("br")},m(a,s){R(a,n,s),R(a,i,s)},p:B,d(a){a&&M(n),a&&M(i)}}}function st(t){let e=t[10].toFixed(2)+"",n,i,a;return{c(){n=P(e),i=P("%"),a=C("br")},m(s,l){R(s,n,l),R(s,i,l),R(s,a,l)},p:B,d(s){s&&M(n),s&&M(i),s&&M(a)}}}function ot(t){let e=t[7]+"",n,i;return{c(){n=P(e),i=C("br")},m(a,s){R(a,n,s),R(a,i,s)},p:B,d(a){a&&M(n),a&&M(i)}}}function _n(t){let e;return{c(){e=P("rocket")},m(n,i){R(n,e,i)},d(n){n&&M(e)}}}function gn(t){let e;return{c(){e=P("Open")},m(n,i){R(n,e,i)},d(n){n&&M(e)}}}function vn(t){let e,n,i,a;return e=new tn({props:{class:"material-icons",$$slots:{default:[_n]},$$scope:{ctx:t}}}),i=new Yt({props:{$$slots:{default:[gn]},$$scope:{ctx:t}}}),{c(){K(e.$$.fragment),n=G(),K(i.$$.fragment)},m(s,l){X(e,s,l),R(s,n,l),X(i,s,l),a=!0},p(s,l){const r={};l&65536&&(r.$$scope={dirty:l,ctx:s}),e.$set(r);const o={};l&65536&&(o.$$scope={dirty:l,ctx:s}),i.$set(o)},i(s){a||(E(e.$$.fragment,s),E(i.$$.fragment,s),a=!0)},o(s){L(e.$$.fragment,s),L(i.$$.fragment,s),a=!1},d(s){W(e,s),s&&M(n),W(i,s)}}}function lt(t){let e,n,i,a,s=t[4]+"",l,r,o,u,c,f,h,D,m,b,O,y,v=t[3][t[4]].models,A=[];for(let d=0;d<v.length;d+=1)A[d]=rt(at(t,v,d));let U=t[3][t[4]].accuracy,z=[];for(let d=0;d<U.length;d+=1)z[d]=st(it(t,U,d));let S=t[3][t[4]].events,g=[];for(let d=0;d<S.length;d+=1)g[d]=ot(nt(t,S,d));return b=new mn({props:{href:"/"+t[4]+"/",ripple:!1,variant:"unelevated",color:"primary",$$slots:{default:[vn]},$$scope:{ctx:t}}}),b.$on("mouseleave",t[1]),b.$on("focusout",t[1]),{c(){e=C("tr"),n=C("td"),i=C("a"),a=C("span"),l=P(s),r=G(),o=C("td");for(let d=0;d<A.length;d+=1)A[d].c();u=G(),c=C("td");for(let d=0;d<z.length;d+=1)z[d].c();f=G(),h=C("td");for(let d=0;d<g.length;d+=1)g[d].c();D=G(),m=C("td"),K(b.$$.fragment),O=G(),w(a,"class","name-wrap svelte-zod464"),w(i,"href",t[3][t[4]].link),w(n,"class","svelte-zod464"),w(o,"class","svelte-zod464"),w(c,"class","svelte-zod464"),w(h,"class","svelte-zod464"),w(m,"class","svelte-zod464"),w(e,"class","svelte-zod464")},m(d,j){R(d,e,j),k(e,n),k(n,i),k(i,a),k(a,l),k(e,r),k(e,o);for(let H=0;H<A.length;H+=1)A[H]&&A[H].m(o,null);k(e,u),k(e,c);for(let H=0;H<z.length;H+=1)z[H]&&z[H].m(c,null);k(e,f),k(e,h);for(let H=0;H<g.length;H+=1)g[H]&&g[H].m(h,null);k(e,D),k(e,m),X(b,m,null),k(e,O),y=!0},p(d,j){if(j&1){v=d[3][d[4]].models;let p;for(p=0;p<v.length;p+=1){const F=at(d,v,p);A[p]?A[p].p(F,j):(A[p]=rt(F),A[p].c(),A[p].m(o,null))}for(;p<A.length;p+=1)A[p].d(1);A.length=v.length}if(j&1){U=d[3][d[4]].accuracy;let p;for(p=0;p<U.length;p+=1){const F=it(d,U,p);z[p]?z[p].p(F,j):(z[p]=st(F),z[p].c(),z[p].m(c,null))}for(;p<z.length;p+=1)z[p].d(1);z.length=U.length}if(j&1){S=d[3][d[4]].events;let p;for(p=0;p<S.length;p+=1){const F=nt(d,S,p);g[p]?g[p].p(F,j):(g[p]=ot(F),g[p].c(),g[p].m(h,null))}for(;p<g.length;p+=1)g[p].d(1);g.length=S.length}const H={};j&65536&&(H.$$scope={dirty:j,ctx:d}),b.$set(H)},i(d){y||(E(b.$$.fragment,d),y=!0)},o(d){L(b.$$.fragment,d),y=!1},d(d){d&&M(e),He(A,d),He(z,d),He(g,d),W(b)}}}function bn(t){let e;return{c(){e=C("p"),e.textContent="loading"},m(n,i){R(n,e,i)},p:B,i:B,o:B,d(n){n&&M(e)}}}function yn(t){let e,n,i,a,s,l,r,o,u,c,f,h,D,m,b,O,y,v,A,U,z,S,g,d,j,H,p,F={ctx:t,current:null,token:null,hasCatch:!1,pending:bn,then:pn,catch:hn,value:2,blocks:[,,,]};return Ht(t[0],F),{c(){e=C("main"),n=C("header"),n.innerHTML="<h1>Zeno Evals Hub</h1>",i=G(),a=C("div"),s=P(`Explore and compare the results of
|
107 |
+
`),l=C("img"),o=G(),u=C("a"),u.innerHTML='<b class="svelte-zod464">OpenAI Evals</b>',c=P(`
|
108 |
+
with
|
109 |
+
`),f=C("img"),D=G(),m=C("b"),b=C("a"),b.textContent="Zeno",O=G(),y=C("br"),v=G(),A=C("div"),A.innerHTML=`Submit a PR to add new evals to this page!
|
110 |
+
<iframe src="https://ghbtns.com/github-btn.html?user=zeno-ml&repo=zeno-evals-hub&type=fork&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub" class="svelte-zod464"></iframe>`,U=G(),z=C("div"),S=C("div"),g=C("table"),d=C("thead"),d.innerHTML=`<tr class="svelte-zod464"><th class="svelte-zod464">evaluation</th>
|
111 |
+
<th class="svelte-zod464">models</th>
|
112 |
+
<th class="svelte-zod464">accuracy</th>
|
113 |
+
<th class="svelte-zod464">instances</th>
|
114 |
+
<th class="svelte-zod464"></th></tr>`,j=G(),H=C("tbody"),F.block.c(),w(n,"class","svelte-zod464"),w(l,"class","open_ai svelte-zod464"),We(l.src,r="./build/openai.svg")||w(l,"src",r),w(l,"alt","OpenAI logo"),w(u,"href","https://github.com/openai/evals"),w(f,"class","open_ai svelte-zod464"),We(f.src,h="./build/zeno.png")||w(f,"src",h),w(f,"alt","Zeno logo"),w(b,"href","https://github.com/zeno-ml/zeno/stargazers"),St(b,"color","var(--logo)"),w(m,"class","svelte-zod464"),w(a,"class","tagline svelte-zod464"),w(A,"class","tagline svelte-zod464"),w(d,"class","svelte-zod464"),w(H,"class","svelte-zod464"),w(g,"class","svelte-zod464"),w(S,"id","table-background"),w(S,"class","svelte-zod464"),w(z,"id","container"),w(z,"class","svelte-zod464")},m(Z,V){R(Z,e,V),k(e,n),k(e,i),k(e,a),k(a,s),k(a,l),k(a,o),k(a,u),k(a,c),k(a,f),k(a,D),k(a,m),k(m,b),k(e,O),k(e,y),k(e,v),k(e,A),k(e,U),k(e,z),k(z,S),k(S,g),k(g,d),k(g,j),k(g,H),F.block.m(H,F.anchor=null),F.mount=()=>H,F.anchor=null,p=!0},p(Z,[V]){t=Z,Rt(F,t,V)},i(Z){p||(E(F.block),p=!0)},o(Z){for(let V=0;V<3;V+=1){const Ee=F.blocks[V];L(Ee)}p=!1},d(Z){Z&&M(e),F.block.d(),F.token=null,F=null}}}function An(t){return[fetch("/args").then(i=>i.json()),function(i){i.target.blur()}]}class kn extends he{constructor(e){super(),me(this,e,An,yn,Y,{})}}new kn({target:document.getElementById("app")});
|
|
zeno-evals-hub/frontend/build/assets/main-a4e88c77.css
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
iframe.svelte-zod464.svelte-zod464{margin-left:10px}#container.svelte-zod464.svelte-zod464{margin:50px 20px;display:flex;justify-content:center}#table-background.svelte-zod464.svelte-zod464{width:900px;padding:20px;border-radius:20px}.name-wrap.svelte-zod464.svelte-zod464{border:1px solid transparent;border-radius:10px;font-weight:500;color:var(--logo)}.name-wrap.svelte-zod464.svelte-zod464:hover{color:var(--P2)}table.svelte-zod464.svelte-zod464{border-collapse:collapse;text-align:left;cursor:default;margin-left:auto;margin-right:auto}table.svelte-zod464 thead tr th.svelte-zod464{border-bottom:.5px solid grey}table.svelte-zod464 th.svelte-zod464,table.svelte-zod464 td.svelte-zod464{padding:4px 25px}table.svelte-zod464 td.svelte-zod464:first-child,table.svelte-zod464 th.svelte-zod464:first-child{border-radius:20px 0 0 20px}table.svelte-zod464 td.svelte-zod464:last-child,table.svelte-zod464 th.svelte-zod464:last-child{border-radius:0 20px 20px 0}tbody.svelte-zod464.svelte-zod464:before{content:"@";display:block;line-height:10px;text-indent:-99999px}thead.svelte-zod464 tr.svelte-zod464{color:#213547}tbody.svelte-zod464 tr.svelte-zod464{opacity:.9;height:70px}.open_ai.svelte-zod464.svelte-zod464{width:20px;margin-left:5px}.tagline.svelte-zod464.svelte-zod464{font-size:18px;text-align:center;display:flex;justify-content:center;align-items:center}.tagline.svelte-zod464 b.svelte-zod464{margin-right:5px;margin-left:5px}header.svelte-zod464.svelte-zod464{display:flex;align-items:center;justify-content:center}
|
zeno-evals-hub/frontend/build/manifest.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
{
|
2 |
"src/main.css": {
|
3 |
-
"file": "assets/main-
|
4 |
"src": "src/main.css"
|
5 |
},
|
6 |
"src/main.ts": {
|
7 |
"css": [
|
8 |
-
"assets/main-
|
9 |
],
|
10 |
-
"file": "assets/main-
|
11 |
"isEntry": true,
|
12 |
"src": "src/main.ts"
|
13 |
}
|
|
|
1 |
{
|
2 |
"src/main.css": {
|
3 |
+
"file": "assets/main-a4e88c77.css",
|
4 |
"src": "src/main.css"
|
5 |
},
|
6 |
"src/main.ts": {
|
7 |
"css": [
|
8 |
+
"assets/main-a4e88c77.css"
|
9 |
],
|
10 |
+
"file": "assets/main-686621b6.js",
|
11 |
"isEntry": true,
|
12 |
"src": "src/main.ts"
|
13 |
}
|
zeno-evals-hub/frontend/build/zeno.png
ADDED
zeno-evals-hub/frontend/index.html
CHANGED
@@ -19,12 +19,12 @@
|
|
19 |
/>
|
20 |
<!-- Roboto Mono -->
|
21 |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono" />
|
22 |
-
<link rel="stylesheet" href="./build/assets/main-
|
23 |
</head>
|
24 |
<body>
|
25 |
<div id="app"></div>
|
26 |
<!-- <script type="module" src="http://localhost:5173/src/main.ts"></script> -->
|
27 |
-
<script type="module" src="./build/assets/main-
|
28 |
</body>
|
29 |
</html>
|
30 |
<style>
|
|
|
19 |
/>
|
20 |
<!-- Roboto Mono -->
|
21 |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono" />
|
22 |
+
<link rel="stylesheet" href="./build/assets/main-a4e88c77.css" />
|
23 |
</head>
|
24 |
<body>
|
25 |
<div id="app"></div>
|
26 |
<!-- <script type="module" src="http://localhost:5173/src/main.ts"></script> -->
|
27 |
+
<script type="module" src="./build/assets/main-686621b6.js"></script>
|
28 |
</body>
|
29 |
</html>
|
30 |
<style>
|
zeno-evals-hub/main.py
CHANGED
@@ -80,6 +80,10 @@ def command_line():
|
|
80 |
|
81 |
config.serve = False
|
82 |
config.cache_path = "./.zeno_cache_" + name
|
|
|
|
|
|
|
|
|
83 |
|
84 |
zeno_obj = zeno(config)
|
85 |
if zeno_obj is None:
|
|
|
80 |
|
81 |
config.serve = False
|
82 |
config.cache_path = "./.zeno_cache_" + name
|
83 |
+
config.multiprocessing = False
|
84 |
+
port_arg = os.getenv("PORT")
|
85 |
+
if port_arg is not None:
|
86 |
+
config.editable = False
|
87 |
|
88 |
zeno_obj = zeno(config)
|
89 |
if zeno_obj is None:
|