ZTWHHH commited on
Commit
248fe57
·
verified ·
1 Parent(s): 2e8938e

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +3 -0
  2. mantis_evalkit/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 +3 -0
  3. mantis_evalkit/lib/python3.10/site-packages/nvidia/curand/__init__.py +0 -0
  4. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/__init__.py +0 -0
  5. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/__pycache__/__init__.cpython-310.pyc +0 -0
  6. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/__init__.py +0 -0
  7. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/__pycache__/__init__.cpython-310.pyc +0 -0
  8. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/cusparse.h +0 -0
  9. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/cusparse_v2.h +54 -0
  10. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/lib/__init__.py +0 -0
  11. mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/lib/__pycache__/__init__.cpython-310.pyc +0 -0
  12. mantis_evalkit/lib/python3.10/site-packages/pyarrow/libparquet.so.1900 +3 -0
  13. moondream/lib/python3.10/site-packages/gradio/__pycache__/chat_interface.cpython-310.pyc +0 -0
  14. moondream/lib/python3.10/site-packages/gradio/__pycache__/component_meta.cpython-310.pyc +0 -0
  15. moondream/lib/python3.10/site-packages/gradio/__pycache__/context.cpython-310.pyc +0 -0
  16. moondream/lib/python3.10/site-packages/gradio/__pycache__/exceptions.cpython-310.pyc +0 -0
  17. moondream/lib/python3.10/site-packages/gradio/__pycache__/external.cpython-310.pyc +0 -0
  18. moondream/lib/python3.10/site-packages/gradio/__pycache__/flagging.cpython-310.pyc +0 -0
  19. moondream/lib/python3.10/site-packages/gradio/__pycache__/helpers.cpython-310.pyc +0 -0
  20. moondream/lib/python3.10/site-packages/gradio/__pycache__/image_utils.cpython-310.pyc +0 -0
  21. moondream/lib/python3.10/site-packages/gradio/__pycache__/interface.cpython-310.pyc +0 -0
  22. moondream/lib/python3.10/site-packages/gradio/__pycache__/ipython_ext.cpython-310.pyc +0 -0
  23. moondream/lib/python3.10/site-packages/gradio/__pycache__/monitoring_dashboard.cpython-310.pyc +0 -0
  24. moondream/lib/python3.10/site-packages/gradio/__pycache__/networking.cpython-310.pyc +0 -0
  25. moondream/lib/python3.10/site-packages/gradio/__pycache__/oauth.cpython-310.pyc +0 -0
  26. moondream/lib/python3.10/site-packages/gradio/__pycache__/pipelines.cpython-310.pyc +0 -0
  27. moondream/lib/python3.10/site-packages/gradio/__pycache__/pipelines_utils.cpython-310.pyc +0 -0
  28. moondream/lib/python3.10/site-packages/gradio/__pycache__/processing_utils.cpython-310.pyc +0 -0
  29. moondream/lib/python3.10/site-packages/gradio/__pycache__/renderable.cpython-310.pyc +0 -0
  30. moondream/lib/python3.10/site-packages/gradio/__pycache__/route_utils.cpython-310.pyc +0 -0
  31. moondream/lib/python3.10/site-packages/gradio/__pycache__/strings.cpython-310.pyc +0 -0
  32. moondream/lib/python3.10/site-packages/gradio/__pycache__/templates.cpython-310.pyc +0 -0
  33. moondream/lib/python3.10/site-packages/gradio/__pycache__/utils.cpython-310.pyc +0 -0
  34. moondream/lib/python3.10/site-packages/gradio/__pycache__/wasm_utils.cpython-310.pyc +0 -0
  35. moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/__init__.cpython-310.pyc +0 -0
  36. moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/column.cpython-310.pyc +0 -0
  37. moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/form.cpython-310.pyc +0 -0
  38. moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/group.cpython-310.pyc +0 -0
  39. moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/tabs.cpython-310.pyc +0 -0
  40. moondream/lib/python3.10/site-packages/gradio/layouts/column.pyi +72 -0
  41. moondream/lib/python3.10/site-packages/gradio/layouts/form.py +44 -0
  42. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Example-CRm1Pmw_.js +2 -0
  43. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Example-CUwox43B.js +2 -0
  44. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-BrtrebwU.css +1 -0
  45. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-Ccnoqff9.css +1 -0
  46. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-DAXYa8US.js +9 -0
  47. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  48. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  49. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  50. moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
.gitattributes CHANGED
@@ -544,3 +544,6 @@ mantis_evalkit/lib/python3.10/site-packages/setuptools/_vendor/more_itertools/__
544
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
545
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
546
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
 
 
 
 
544
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/t64.exe filter=lfs diff=lfs merge=lfs -text
545
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/w64-arm.exe filter=lfs diff=lfs merge=lfs -text
546
  moondream/lib/python3.10/site-packages/pip/_vendor/distlib/w64.exe filter=lfs diff=lfs merge=lfs -text
547
+ mantis_evalkit/lib/python3.10/site-packages/pyarrow/libparquet.so.1900 filter=lfs diff=lfs merge=lfs -text
548
+ parrot/lib/python3.10/site-packages/torch/lib/libtorch_cuda_linalg.so filter=lfs diff=lfs merge=lfs -text
549
+ mantis_evalkit/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 filter=lfs diff=lfs merge=lfs -text
mantis_evalkit/lib/python3.10/site-packages/nvidia/cublas/lib/libnvblas.so.12 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f85e945ef531cc36603989041594f3bb71a1ae22abd7b258bde0c4813aebc561
3
+ size 737048
mantis_evalkit/lib/python3.10/site-packages/nvidia/curand/__init__.py ADDED
File without changes
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/__init__.py ADDED
File without changes
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (175 Bytes). View file
 
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/__init__.py ADDED
File without changes
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (183 Bytes). View file
 
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/cusparse.h ADDED
The diff for this file is too large to render. See raw diff
 
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/include/cusparse_v2.h ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright 1993-2019 NVIDIA Corporation. All rights reserved.
3
+ *
4
+ * NOTICE TO LICENSEE:
5
+ *
6
+ * This source code and/or documentation ("Licensed Deliverables") are
7
+ * subject to NVIDIA intellectual property rights under U.S. and
8
+ * international Copyright laws.
9
+ *
10
+ * These Licensed Deliverables contained herein is PROPRIETARY and
11
+ * CONFIDENTIAL to NVIDIA and is being provided under the terms and
12
+ * conditions of a form of NVIDIA software license agreement by and
13
+ * between NVIDIA and Licensee ("License Agreement") or electronically
14
+ * accepted by Licensee. Notwithstanding any terms or conditions to
15
+ * the contrary in the License Agreement, reproduction or disclosure
16
+ * of the Licensed Deliverables to any third party without the express
17
+ * written consent of NVIDIA is prohibited.
18
+ *
19
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
20
+ * LICENSE AGREEMENT, NVIDIA MAKES NO REPRESENTATION ABOUT THE
21
+ * SUITABILITY OF THESE LICENSED DELIVERABLES FOR ANY PURPOSE. IT IS
22
+ * PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
23
+ * NVIDIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THESE LICENSED
24
+ * DELIVERABLES, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY,
25
+ * NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
26
+ * NOTWITHSTANDING ANY TERMS OR CONDITIONS TO THE CONTRARY IN THE
27
+ * LICENSE AGREEMENT, IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY
28
+ * SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
29
+ * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
31
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
32
+ * OF THESE LICENSED DELIVERABLES.
33
+ *
34
+ * U.S. Government End Users. These Licensed Deliverables are a
35
+ * "commercial item" as that term is defined at 48 C.F.R. 2.101 (OCT
36
+ * 1995), consisting of "commercial computer software" and "commercial
37
+ * computer software documentation" as such terms are used in 48
38
+ * C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government
39
+ * only as a commercial end item. Consistent with 48 C.F.R.12.212 and
40
+ * 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all
41
+ * U.S. Government End Users acquire the Licensed Deliverables with
42
+ * only those rights set forth herein.
43
+ *
44
+ * Any use of the Licensed Deliverables in individual and commercial
45
+ * software must include, in the user documentation and internal
46
+ * comments to the code, the above Disclaimer and U.S. Government End
47
+ * Users Notice.
48
+ */
49
+ #if !defined(CUSPARSE_V2_H_)
50
+ #define CUSPARSE_V2_H_
51
+
52
+ #include "cusparse.h"
53
+
54
+ #endif
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/lib/__init__.py ADDED
File without changes
mantis_evalkit/lib/python3.10/site-packages/nvidia/cusparse/lib/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (179 Bytes). View file
 
mantis_evalkit/lib/python3.10/site-packages/pyarrow/libparquet.so.1900 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29a91ba2fa32a9aa91c4c71bf78db4eecb7c19487cb2a5af7a027a2ec4b1fc00
3
+ size 11105000
moondream/lib/python3.10/site-packages/gradio/__pycache__/chat_interface.cpython-310.pyc ADDED
Binary file (24.1 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/component_meta.cpython-310.pyc ADDED
Binary file (10 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/context.cpython-310.pyc ADDED
Binary file (2.25 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/exceptions.cpython-310.pyc ADDED
Binary file (3.88 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/external.cpython-310.pyc ADDED
Binary file (14.2 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/flagging.cpython-310.pyc ADDED
Binary file (15 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/helpers.cpython-310.pyc ADDED
Binary file (41.8 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/image_utils.cpython-310.pyc ADDED
Binary file (2.31 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/interface.cpython-310.pyc ADDED
Binary file (32 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/ipython_ext.cpython-310.pyc ADDED
Binary file (3.31 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/monitoring_dashboard.cpython-310.pyc ADDED
Binary file (2.67 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/networking.cpython-310.pyc ADDED
Binary file (1.83 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/oauth.cpython-310.pyc ADDED
Binary file (10.1 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/pipelines.cpython-310.pyc ADDED
Binary file (3.13 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/pipelines_utils.cpython-310.pyc ADDED
Binary file (19.7 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/processing_utils.cpython-310.pyc ADDED
Binary file (27.9 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/renderable.cpython-310.pyc ADDED
Binary file (6.66 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/route_utils.cpython-310.pyc ADDED
Binary file (27.1 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/strings.cpython-310.pyc ADDED
Binary file (2.59 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/templates.cpython-310.pyc ADDED
Binary file (14.8 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/utils.cpython-310.pyc ADDED
Binary file (45.1 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/__pycache__/wasm_utils.cpython-310.pyc ADDED
Binary file (1.45 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (474 Bytes). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/column.cpython-310.pyc ADDED
Binary file (3.31 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/form.cpython-310.pyc ADDED
Binary file (1.96 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/group.cpython-310.pyc ADDED
Binary file (1.78 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/__pycache__/tabs.cpython-310.pyc ADDED
Binary file (4.19 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/layouts/column.pyi ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import warnings
4
+ from typing import Literal
5
+
6
+ from gradio_client.documentation import document
7
+
8
+ from gradio.blocks import BlockContext
9
+ from gradio.component_meta import ComponentMeta
10
+
11
+ from gradio.events import Dependency
12
+
13
+ @document()
14
+ class Column(BlockContext, metaclass=ComponentMeta):
15
+ """
16
+ Column is a layout element within Blocks that renders all children vertically. The widths of columns can be set through the `scale` and `min_width` parameters.
17
+ If a certain scale results in a column narrower than min_width, the min_width parameter will win.
18
+ Example:
19
+ with gr.Blocks() as demo:
20
+ with gr.Row():
21
+ with gr.Column(scale=1):
22
+ text1 = gr.Textbox()
23
+ text2 = gr.Textbox()
24
+ with gr.Column(scale=4):
25
+ btn1 = gr.Button("Button 1")
26
+ btn2 = gr.Button("Button 2")
27
+ Guides: controlling-layout
28
+ """
29
+
30
+ EVENTS = []
31
+
32
+ def __init__(
33
+ self,
34
+ *,
35
+ scale: int = 1,
36
+ min_width: int = 320,
37
+ variant: Literal["default", "panel", "compact"] = "default",
38
+ visible: bool = True,
39
+ elem_id: str | None = None,
40
+ elem_classes: list[str] | str | None = None,
41
+ render: bool = True,
42
+ show_progress: bool = False,
43
+ ):
44
+ """
45
+ Parameters:
46
+ scale: relative width compared to adjacent Columns. For example, if Column A has scale=2, and Column B has scale=1, A will be twice as wide as B.
47
+ min_width: minimum pixel width of Column, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in a column narrower than min_width, the min_width parameter will be respected first.
48
+ variant: column type, 'default' (no background), 'panel' (gray background color and rounded corners), or 'compact' (rounded corners and no internal gap).
49
+ visible: If False, column will be hidden.
50
+ elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
51
+ elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.
52
+ render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
53
+ show_progress: If True, shows progress animation when being updated.
54
+ """
55
+ if scale != round(scale):
56
+ warnings.warn(
57
+ f"'scale' value should be an integer. Using {scale} will cause issues."
58
+ )
59
+
60
+ self.scale = scale
61
+ self.min_width = min_width
62
+ self.variant = variant
63
+ if variant == "compact":
64
+ self.allow_expected_parents = False
65
+ self.show_progress = show_progress
66
+ BlockContext.__init__(
67
+ self,
68
+ visible=visible,
69
+ elem_id=elem_id,
70
+ elem_classes=elem_classes,
71
+ render=render,
72
+ )
moondream/lib/python3.10/site-packages/gradio/layouts/form.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from gradio.blocks import BlockContext, Blocks
6
+ from gradio.component_meta import ComponentMeta
7
+ from gradio.layouts.row import Row
8
+
9
+ if TYPE_CHECKING:
10
+ from gradio.blocks import Block
11
+
12
+
13
+ class Form(BlockContext, metaclass=ComponentMeta):
14
+ EVENTS = []
15
+
16
+ def __init__(
17
+ self,
18
+ *,
19
+ scale: int = 0,
20
+ min_width: int = 0,
21
+ render: bool = True,
22
+ ):
23
+ """
24
+ Parameters:
25
+ scale: relative width compared to adjacent Columns. For example, if Column A has scale=2, and Column B has scale=1, A will be twice as wide as B.
26
+ min_width: minimum pixel width of Column, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in a column narrower than min_width, the min_width parameter will be respected first.
27
+ render: If False, this layout will not be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
28
+ """
29
+ self.scale = scale
30
+ self.min_width = min_width
31
+ BlockContext.__init__(
32
+ self,
33
+ render=render,
34
+ )
35
+
36
+ def add_child(self, child: Block):
37
+ if isinstance(self.parent, Row):
38
+ scale = getattr(child, "scale", None)
39
+ self.scale += 1 if scale is None else scale
40
+ self.min_width += getattr(child, "min_width", 0) or 0
41
+ elif isinstance(self.parent, Blocks) and self.parent.fill_height:
42
+ scale = getattr(child, "scale", None)
43
+ self.scale += 0 if scale is None else scale
44
+ BlockContext.add_child(self, child)
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Example-CRm1Pmw_.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const{SvelteComponent:g,attr:o,detach:_,element:m,flush:c,init:y,insert:v,noop:h,safe_not_equal:b,toggle_class:n}=window.__gradio__svelte__internal;function x(i){let e;return{c(){e=m("div"),e.textContent=`${i[2]}`,o(e,"class","svelte-1ayixqk"),n(e,"table",i[0]==="table"),n(e,"gallery",i[0]==="gallery"),n(e,"selected",i[1])},m(t,s){v(t,e,s)},p(t,[s]){s&1&&n(e,"table",t[0]==="table"),s&1&&n(e,"gallery",t[0]==="gallery"),s&2&&n(e,"selected",t[1])},i:h,o:h,d(t){t&&_(e)}}}function q(i,e,t){let{value:s}=e,{type:u}=e,{selected:f=!1}=e,{choices:a}=e,r=s.map(l=>a.find(d=>d[1]===l)?.[0]).filter(l=>l!==void 0).join(", ");return i.$$set=l=>{"value"in l&&t(3,s=l.value),"type"in l&&t(0,u=l.type),"selected"in l&&t(1,f=l.selected),"choices"in l&&t(4,a=l.choices)},[u,f,r,s,a]}class C extends g{constructor(e){super(),y(this,e,q,x,b,{value:3,type:0,selected:1,choices:4})}get value(){return this.$$.ctx[3]}set value(e){this.$$set({value:e}),c()}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),c()}get selected(){return this.$$.ctx[1]}set selected(e){this.$$set({selected:e}),c()}get choices(){return this.$$.ctx[4]}set choices(e){this.$$set({choices:e}),c()}}export{C as default};
2
+ //# sourceMappingURL=Example-CRm1Pmw_.js.map
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Example-CUwox43B.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const{SvelteComponent:g,attr:o,detach:y,element:_,flush:n,init:v,insert:m,noop:f,safe_not_equal:b,toggle_class:a}=window.__gradio__svelte__internal;function x(i){let e;return{c(){e=_("div"),e.textContent=`${i[2]}`,o(e,"class","svelte-1ayixqk"),a(e,"table",i[0]==="table"),a(e,"gallery",i[0]==="gallery"),a(e,"selected",i[1])},m(t,l){m(t,e,l)},p(t,[l]){l&1&&a(e,"table",t[0]==="table"),l&1&&a(e,"gallery",t[0]==="gallery"),l&2&&a(e,"selected",t[1])},i:f,o:f,d(t){t&&y(e)}}}function q(i,e,t){let{value:l}=e,{type:r}=e,{selected:u=!1}=e,{choices:c}=e,h=(l?Array.isArray(l)?l:[l]:[]).map(s=>c.find(d=>d[1]===s)?.[0]).filter(s=>s!==void 0).join(", ");return i.$$set=s=>{"value"in s&&t(3,l=s.value),"type"in s&&t(0,r=s.type),"selected"in s&&t(1,u=s.selected),"choices"in s&&t(4,c=s.choices)},[r,u,h,l,c]}class C extends g{constructor(e){super(),v(this,e,q,x,b,{value:3,type:0,selected:1,choices:4})}get value(){return this.$$.ctx[3]}set value(e){this.$$set({value:e}),n()}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),n()}get selected(){return this.$$.ctx[1]}set selected(e){this.$$set({selected:e}),n()}get choices(){return this.$$.ctx[4]}set choices(e){this.$$set({choices:e}),n()}}export{C as default};
2
+ //# sourceMappingURL=Example-CUwox43B.js.map
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-BrtrebwU.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .wrap.svelte-1sc8eck{display:flex;flex-direction:column;flex-flow:column;margin:0;padding:0;height:100%}.codemirror-wrapper.svelte-1sc8eck{height:100%;overflow:auto}.cm-editor{height:100%}.cm-selectionBackground{background-color:#b9d2ff30!important}.cm-focused{outline:none!important}button.svelte-qi7jcw{position:relative;cursor:pointer;padding:5px;width:22px;height:22px}.check.svelte-qi7jcw{position:absolute;top:0;right:0;z-index:var(--layer-top);background:var(--background-fill-primary);padding:var(--size-1);width:100%;height:100%;color:var(--body-text-color)}.container.svelte-1vwgyfd{position:relative;cursor:pointer;padding:5px;width:22px;height:22px}.check.svelte-1vwgyfd{position:absolute;top:0;right:0;z-index:var(--layer-top);background:var(--background-fill-primary);padding:var(--size-1);width:100%;height:100%;color:var(--body-text-color)}div.svelte-1yin446{display:flex;position:absolute;top:var(--block-label-margin);right:var(--block-label-margin);align-items:center;z-index:var(--layer-2);transition:.15s;box-shadow:var(--shadow-drop);border:1px solid var(--border-color-primary);border-top:none;border-right:none;border-radius:var(--block-label-right-radius);background:var(--block-label-background-fill);overflow:hidden;color:var(--block-label-text-color);font:var(--font);font-size:var(--button-small-text-size)}
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-Ccnoqff9.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .gradio-container-4-38-1{display:flex;position:relative;flex-direction:column;padding:0;min-height:1px;overflow:hidden;color:var(--button-secondary-text-color)}.embed-container.svelte-182fdeq.svelte-182fdeq{margin:var(--size-4) 0px;border:1px solid var(--button-secondary-border-color);border-radius:var(--embed-radius)}.with-info.svelte-182fdeq.svelte-182fdeq{padding-bottom:var(--size-7)}.embed-container.svelte-182fdeq>.main.svelte-182fdeq{padding:var(--size-4)}.app.svelte-182fdeq>.main.svelte-182fdeq{display:flex;flex-grow:1;flex-direction:column}.app.svelte-182fdeq.svelte-182fdeq{position:relative;margin:auto;padding:var(--size-4) var(--size-8);width:100%;height:100%}@media (min-width: 640px){.app.svelte-182fdeq.svelte-182fdeq{max-width:640px}}@media (min-width: 768px){.app.svelte-182fdeq.svelte-182fdeq{max-width:768px}}@media (min-width: 1024px){.app.svelte-182fdeq.svelte-182fdeq{max-width:1024px}}@media (min-width: 1280px){.app.svelte-182fdeq.svelte-182fdeq{max-width:1280px}}@media (min-width: 1536px){.app.svelte-182fdeq.svelte-182fdeq{max-width:1536px}}.info.svelte-182fdeq.svelte-182fdeq{display:flex;position:absolute;bottom:0;justify-content:flex-start;border-top:1px solid var(--button-secondary-border-color);padding:var(--size-1) var(--size-5);width:100%;color:var(--body-text-color-subdued);font-size:var(--text-md);white-space:nowrap}.info.svelte-182fdeq>span.svelte-182fdeq{word-wrap:break-word;-break:keep-all;display:block;word-break:keep-all}.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(1){margin-right:4px;min-width:0px;max-width:max-content;overflow:hidden;color:var(--body-text-color);text-overflow:ellipsis;white-space:nowrap}.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(2){margin-right:3px}.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(2),.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(3){width:max-content}.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(3){align-self:flex-end;justify-self:flex-end;margin-left:auto;text-align:right}.info.svelte-182fdeq>span.svelte-182fdeq:nth-child(1){flex-shrink:9}.hidden-title.svelte-182fdeq.svelte-182fdeq{position:absolute;left:var(--size-5);opacity:0;background:var(--button-secondary-background-fill);padding-right:4px}.info.svelte-182fdeq a.svelte-182fdeq{color:var(--body-text-color)}.title.svelte-182fdeq.svelte-182fdeq{font-size:var(--text-sm);font-family:var(--font-mono)}.hf.svelte-182fdeq.svelte-182fdeq{margin-left:5px}.space-logo.svelte-182fdeq img.svelte-182fdeq{display:inline-block;margin-bottom:4px;height:12px}a.svelte-182fdeq.svelte-182fdeq:hover{text-decoration:underline}svg.svelte-zyxd38.svelte-zyxd38{width:var(--size-20);height:var(--size-20)}svg.svelte-zyxd38 path.svelte-zyxd38{fill:var(--loader-color)}div.svelte-zyxd38.svelte-zyxd38{z-index:var(--layer-2)}.margin.svelte-zyxd38.svelte-zyxd38{margin:var(--size-4)}.block.svelte-12cmxck{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-12cmxck{border-color:var(--color-accent)}.block.border_contrast.svelte-12cmxck{border-color:var(--body-text-color)}.padded.svelte-12cmxck{padding:var(--block-padding)}.hidden.svelte-12cmxck{display:none}.hide-container.svelte-12cmxck{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-e8n7p6{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-1gfkn6j{margin-bottom:var(--spacing-xs)}span.svelte-1gfkn6j:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-1gfkn6j{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-1gfkn6j{margin:0;height:0}label.svelte-1b6s6s{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-1b6s6s{border-top-left-radius:0}label.float.svelte-1b6s6s{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-1b6s6s:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-1b6s6s{height:0}span.svelte-1b6s6s{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-1b6s6s{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-rk35yg{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}button[disabled].svelte-rk35yg{opacity:.5;box-shadow:none}button[disabled].svelte-rk35yg:hover{cursor:not-allowed}.padded.svelte-rk35yg{padding:2px;background:var(--bg-color);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-rk35yg:hover,button.highlight.svelte-rk35yg{cursor:pointer;color:var(--color-accent)}.padded.svelte-rk35yg:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-rk35yg{padding:0 1px;font-size:10px}div.svelte-rk35yg{padding:2px;display:flex;align-items:flex-end}.small.svelte-rk35yg{width:14px;height:14px}.medium.svelte-rk35yg{width:20px;height:20px}.large.svelte-rk35yg{width:22px;height:22px}.pending.svelte-rk35yg{animation:svelte-rk35yg-flash .5s infinite}@keyframes svelte-rk35yg-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.transparent.svelte-rk35yg{background:transparent;border:none;box-shadow:none}.empty.svelte-1oiin9d{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-1oiin9d{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-1oiin9d{min-height:calc(var(--size-32) - 20px)}.large.svelte-1oiin9d{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-1oiin9d{margin-top:0}.small_parent.svelte-1oiin9d{min-height:100%!important}.dropdown-arrow.svelte-xjn76a{fill:currentColor}.wrap.svelte-b0hvie{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-b0hvie{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-b0hvie{width:30px;margin-bottom:var(--spacing-lg)}@media (min-width: 768px){.wrap.svelte-b0hvie{font-size:var(--text-lg)}}.hovered.svelte-b0hvie{color:var(--color-accent)}div.svelte-1ua59x3{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;align-items:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;color:var(--block-label-text-color);flex-shrink:0}.show_border.svelte-1ua59x3{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl);box-shadow:var(--shadow-drop)}.source-selection.svelte-1ebruwp{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto}.icon.svelte-1ebruwp{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-1ebruwp{color:var(--color-accent)}.icon.svelte-1ebruwp:hover,.icon.svelte-1ebruwp:focus{color:var(--color-accent)}.wrap.svelte-au1olv.svelte-au1olv{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-2);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden}.wrap.center.svelte-au1olv.svelte-au1olv{top:0;right:0;left:0}.wrap.default.svelte-au1olv.svelte-au1olv{inset:0}.hide.svelte-au1olv.svelte-au1olv{opacity:0;pointer-events:none}.generating.svelte-au1olv.svelte-au1olv{animation:svelte-au1olv-pulseStart 1s cubic-bezier(.4,0,.6,1),svelte-au1olv-pulse 2s cubic-bezier(.4,0,.6,1) 1s infinite;border:2px solid var(--color-accent);background:transparent;z-index:var(--layer-1);pointer-events:none}.translucent.svelte-au1olv.svelte-au1olv{background:none}@keyframes svelte-au1olv-pulseStart{0%{opacity:0}to{opacity:1}}@keyframes svelte-au1olv-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-au1olv.svelte-au1olv{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-au1olv.svelte-au1olv{position:absolute;inset:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-au1olv.svelte-au1olv{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-au1olv.svelte-au1olv{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-au1olv.svelte-au1olv{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-au1olv.svelte-au1olv{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-au1olv.svelte-au1olv{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-au1olv.svelte-au1olv{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-au1olv.svelte-au1olv{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-au1olv.svelte-au1olv{pointer-events:none}.minimal.svelte-au1olv .progress-text.svelte-au1olv{background:var(--block-background-fill)}.border.svelte-au1olv.svelte-au1olv{border:1px solid var(--border-color-primary)}.clear-status.svelte-au1olv.svelte-au1olv{position:absolute;display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.toast-body.svelte-1qox6b6{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-1qox6b6{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-1qox6b6{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-1qox6b6{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-1qox6b6{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-1qox6b6{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-1qox6b6{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-1qox6b6{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-1qox6b6{color:var(--color-red-700)}.dark .toast-title.error.svelte-1qox6b6{color:var(--color-red-50)}.toast-title.warning.svelte-1qox6b6{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-1qox6b6{color:var(--color-yellow-50)}.toast-title.info.svelte-1qox6b6{color:var(--color-grey-700)}.dark .toast-title.info.svelte-1qox6b6{color:var(--color-grey-50)}.toast-close.svelte-1qox6b6{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-1qox6b6{color:var(--color-red-700)}.dark .toast-close.error.svelte-1qox6b6{color:var(--color-red-500)}.toast-close.warning.svelte-1qox6b6{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-1qox6b6{color:var(--color-yellow-500)}.toast-close.info.svelte-1qox6b6{color:var(--color-grey-700)}.dark .toast-close.info.svelte-1qox6b6{color:var(--color-grey-500)}.toast-text.svelte-1qox6b6{font-size:var(--text-lg)}.toast-text.error.svelte-1qox6b6{color:var(--color-red-700)}.dark .toast-text.error.svelte-1qox6b6{color:var(--color-red-50)}.toast-text.warning.svelte-1qox6b6{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-1qox6b6{color:var(--color-yellow-50)}.toast-text.info.svelte-1qox6b6{color:var(--color-grey-700)}.dark .toast-text.info.svelte-1qox6b6{color:var(--color-grey-50)}.toast-details.svelte-1qox6b6{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-1qox6b6{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-1qox6b6{color:var(--color-red-700)}.dark .toast-icon.error.svelte-1qox6b6{color:var(--color-red-500)}.toast-icon.warning.svelte-1qox6b6{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-1qox6b6{color:var(--color-yellow-500)}.toast-icon.info.svelte-1qox6b6{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-1qox6b6{color:var(--color-grey-500)}@keyframes svelte-1qox6b6-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-1qox6b6{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-1qox6b6-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-1qox6b6{background:var(--color-red-700)}.dark .timer.error.svelte-1qox6b6{background:var(--color-red-500)}.timer.warning.svelte-1qox6b6{background:var(--color-yellow-700)}.dark .timer.warning.svelte-1qox6b6{background:var(--color-yellow-500)}.timer.info.svelte-1qox6b6{background:var(--color-grey-700)}.dark .timer.info.svelte-1qox6b6{background:var(--color-grey-500)}.hidden.svelte-1qox6b6{display:none}.toast-wrap.svelte-pu0yf1{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (min-width: 640px){.toast-wrap.svelte-pu0yf1{width:calc(var(--size-96) + var(--size-10))}}.error.svelte-y6l4b.svelte-y6l4b{position:relative;padding:var(--size-4);color:var(--body-text-color);text-align:center}.error.svelte-y6l4b>.svelte-y6l4b{margin-top:var(--size-4)}a.svelte-y6l4b.svelte-y6l4b{color:var(--link-text-color)}a.svelte-y6l4b.svelte-y6l4b:hover{color:var(--link-text-color-hover);text-decoration:underline}a.svelte-y6l4b.svelte-y6l4b:visited{color:var(--link-text-color-visited)}a.svelte-y6l4b.svelte-y6l4b:active{color:var(--link-text-color-active)}
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/Index-DAXYa8US.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import{C as Mn,S as Bn}from"./Index-HnsngA2K.js";import{u as kt,c as Nn}from"./Blocks-BW0LI6Mk.js";import{d as Zn}from"./index-CnqicUFC.js";import{S as Tn}from"./ShareButton-D7_uro_U.js";import{I as Dn}from"./Image-CI3yPJk1.js";import"./index-DfiasXCI.js";/* empty css */import"./Index.svelte_svelte_type_style_lang-B9OGLCwM.js";import{M as bt}from"./Example.svelte_svelte_type_style_lang-BBW3qUnm.js";import{C as En}from"./Check-Ck0iADAu.js";import{C as Pn}from"./Copy-ZPOKSMtK.js";import{D as Un}from"./DownloadLink-CVlM3uy0.js";import{B as In}from"./Button-DHuQQqcr.js";import{B as Fn}from"./BlockLabel-du95yTCe.js";import"./file-url-YFl-0Cl9.js";import"./svelte/svelte.js";import"./prism-python-CimghR9h.js";const{SvelteComponent:Rn,append:$t,attr:E,detach:Gn,init:On,insert:Yn,noop:lt,safe_not_equal:Jn,svg_element:it}=window.__gradio__svelte__internal;function Kn(l){let e,t,n;return{c(){e=it("svg"),t=it("path"),n=it("path"),E(t,"fill","currentColor"),E(t,"d","M17.74 30L16 29l4-7h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h9v2H6a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4h20a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4h-4.84Z"),E(n,"fill","currentColor"),E(n,"d","M8 10h16v2H8zm0 6h10v2H8z"),E(e,"xmlns","http://www.w3.org/2000/svg"),E(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),E(e,"aria-hidden","true"),E(e,"role","img"),E(e,"class","iconify iconify--carbon"),E(e,"width","100%"),E(e,"height","100%"),E(e,"preserveAspectRatio","xMidYMid meet"),E(e,"viewBox","0 0 32 32")},m(i,s){Yn(i,e,s),$t(e,t),$t(e,n)},p:lt,i:lt,o:lt,d(i){i&&Gn(e)}}}class Qn extends Rn{constructor(e){super(),On(this,e,null,Kn,Jn,{})}}const Wn=async l=>(await Promise.all(l.map(async t=>await Promise.all(t.map(async(n,i)=>{if(n===null)return"";let s=i===0?"😃":"🤖",o="";if(typeof n=="string"){const r={audio:/<audio.*?src="(\/file=.*?)"/g,video:/<video.*?src="(\/file=.*?)"/g,image:/<img.*?src="(\/file=.*?)".*?\/>|!\[.*?\]\((\/file=.*?)\)/g};o=n;for(let[a,f]of Object.entries(r)){let u;for(;(u=f.exec(n))!==null;){const _=u[1]||u[2],b=await kt(_);o=o.replace(_,b)}}}else{if(!n?.url)return"";const r=await kt(n.url);n.mime_type?.includes("audio")?o=`<audio controls src="${r}"></audio>`:n.mime_type?.includes("video")?o=r:n.mime_type?.includes("image")&&(o=`<img src="${r}" />`)}return`${s}: ${o}`}))))).map(t=>t.join(t[0]!==""&&t[1]!==""?`
2
+ `:"")).join(`
3
+ `),dn=(l,e)=>l.replace('src="/file',`src="${e}file`);function Xn(l){return l?l.includes("audio")?"audio":l.includes("video")?"video":l.includes("image")?"image":"file":"file"}function gn(l){const e=Array.isArray(l.file)?l.file[0]:l.file;return{component:Xn(e?.mime_type),value:l.file,alt_text:l.alt_text,constructor_args:{},props:{}}}function xn(l,e){return l===null?l:l.map((t,n)=>typeof t.content=="string"?{role:t.role,metadata:t.metadata,content:dn(t.content,e),type:"text",index:n}:"file"in t.content?{content:gn(t.content),metadata:t.metadata,role:t.role,type:"component",index:n}:{type:"component",...t})}function el(l,e){return l===null?l:l.flatMap((n,i)=>n.map((s,o)=>{if(s==null)return null;const r=o==0?"user":"assistant";return typeof s=="string"?{role:r,type:"text",content:dn(s,e),metadata:{title:null},index:[i,o]}:"file"in s?{content:gn(s),role:r,type:"component",index:[i,o]}:{role:r,content:s,type:"component",index:[i,o]}})).filter(n=>n!=null)}function we(l){return l.type==="component"}const{SvelteComponent:tl,attr:Ue,detach:nl,element:ll,flush:il,init:ol,insert:sl,noop:Ct,safe_not_equal:al,set_style:yt}=window.__gradio__svelte__internal;function rl(l){let e;return{c(){e=ll("div"),e.innerHTML=`<span class="sr-only">Loading content</span> <div class="dot-flashing svelte-1gpwetz"></div>
4
+  
5
+ <div class="dot-flashing svelte-1gpwetz"></div>
6
+  
7
+ <div class="dot-flashing svelte-1gpwetz"></div>`,Ue(e,"class","message pending svelte-1gpwetz"),Ue(e,"role","status"),Ue(e,"aria-label","Loading response"),Ue(e,"aria-live","polite"),yt(e,"border-radius",l[0]==="bubble"?"var(--radius-xxl)":"none")},m(t,n){sl(t,e,n)},p(t,[n]){n&1&&yt(e,"border-radius",t[0]==="bubble"?"var(--radius-xxl)":"none")},i:Ct,o:Ct,d(t){t&&nl(e)}}}function ul(l,e,t){let{layout:n="bubble"}=e;return l.$$set=i=>{"layout"in i&&t(0,n=i.layout)},[n]}class fl extends tl{constructor(e){super(),ol(this,e,ul,rl,al,{layout:0})}get layout(){return this.$$.ctx[0]}set layout(e){this.$$set({layout:e}),il()}}const{SvelteComponent:_l,append:Se,attr:Ne,check_outros:cl,create_slot:ml,detach:bn,element:Ze,flush:hl,get_all_dirty_from_scope:dl,get_slot_changes:gl,group_outros:bl,init:pl,insert:pn,listen:wl,safe_not_equal:vl,set_data:kl,set_style:Ht,space:St,text:$l,transition_in:Fe,transition_out:ht,update_slot_base:Cl}=window.__gradio__svelte__internal;function Vt(l){let e,t;const n=l[4].default,i=ml(n,l,l[3],null);return{c(){e=Ze("div"),i&&i.c(),Ne(e,"class","content svelte-1e60bn1")},m(s,o){pn(s,e,o),i&&i.m(e,null),t=!0},p(s,o){i&&i.p&&(!t||o&8)&&Cl(i,n,s,s[3],t?gl(n,s[3],o,null):dl(s[3]),null)},i(s){t||(Fe(i,s),t=!0)},o(s){ht(i,s),t=!1},d(s){s&&bn(e),i&&i.d(s)}}}function yl(l){let e,t,n,i,s,o,r,a,f,u,_=l[1]&&Vt(l);return{c(){e=Ze("button"),t=Ze("div"),n=Ze("span"),i=$l(l[0]),s=St(),o=Ze("span"),o.textContent="▼",r=St(),_&&_.c(),Ne(n,"class","title-text svelte-1e60bn1"),Ne(o,"class","arrow svelte-1e60bn1"),Ht(o,"transform",l[1]?"rotate(0)":"rotate(90deg)"),Ne(t,"class","title svelte-1e60bn1"),Ne(e,"class","box svelte-1e60bn1")},m(b,g){pn(b,e,g),Se(e,t),Se(t,n),Se(n,i),Se(t,s),Se(t,o),Se(e,r),_&&_.m(e,null),a=!0,f||(u=wl(e,"click",l[2]),f=!0)},p(b,[g]){(!a||g&1)&&kl(i,b[0]),g&2&&Ht(o,"transform",b[1]?"rotate(0)":"rotate(90deg)"),b[1]?_?(_.p(b,g),g&2&&Fe(_,1)):(_=Vt(b),_.c(),Fe(_,1),_.m(e,null)):_&&(bl(),ht(_,1,1,()=>{_=null}),cl())},i(b){a||(Fe(_),a=!0)},o(b){ht(_),a=!1},d(b){b&&bn(e),_&&_.d(),f=!1,u()}}}function Hl(l,e,t){let{$$slots:n={},$$scope:i}=e,s=!1,{title:o}=e;function r(){t(1,s=!s)}return l.$$set=a=>{"title"in a&&t(0,o=a.title),"$$scope"in a&&t(3,i=a.$$scope)},[o,s,r,i,n]}class Sl extends _l{constructor(e){super(),pl(this,e,Hl,yl,vl,{title:0})}get title(){return this.$$.ctx[0]}set title(e){this.$$set({title:e}),hl()}}const{SvelteComponent:Vl,attr:ql,bubble:Ve,check_outros:ke,construct_svelte_component:I,create_component:F,destroy_component:R,detach:_e,element:zl,empty:$e,flush:ee,group_outros:Ce,init:jl,insert:ce,mount_component:G,noop:Ll,safe_not_equal:Al,transition_in:Z,transition_out:T}=window.__gradio__svelte__internal;function Ml(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{value:o[2],show_label:!1,label:"chatbot-image",show_share_button:!0,i18n:o[6],gradio:{dispatch:Ul}}}}return i&&(e=I(i,s(l)),e.$on("load",l[14])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[14]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function Bl(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{value:o[2],show_label:!1,label:"chatbot-image",show_download_button:!1,i18n:o[6]}}}return i&&(e=I(i,s(l)),e.$on("load",l[13])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[13]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function Nl(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{autoplay:!0,value:o[2].video||o[2],show_label:!1,show_share_button:!0,i18n:o[6],upload:o[7],show_download_button:!1,$$slots:{default:[El]},$$scope:{ctx:o}}}}return i&&(e=I(i,s(l)),e.$on("load",l[12])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[12]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2].video||o[2]),r&64&&(a.i18n=o[6]),r&128&&(a.upload=o[7]),r&32768&&(a.$$scope={dirty:r,ctx:o}),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function Zl(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{value:o[2],show_label:!1,show_share_button:!0,i18n:o[6],label:"",waveform_settings:{},waveform_options:{},show_download_button:!1}}}return i&&(e=I(i,s(l)),e.$on("load",l[11])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[11]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function Tl(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{value:o[2],target:o[3],theme_mode:o[4],bokeh_version:o[5].bokeh_version,caption:"",show_actions_button:!0}}}return i&&(e=I(i,s(l)),e.$on("load",l[10])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[10]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&8&&(a.target=o[3]),r&16&&(a.theme_mode=o[4]),r&32&&(a.bokeh_version=o[5].bokeh_version),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function Dl(l){let e,t,n;var i=l[1][l[0]];function s(o,r){return{props:{value:o[2],show_label:!1,i18n:o[6],label:"",_fetch:o[8],allow_preview:!1,interactive:!1,mode:"minimal",fixed_height:1}}}return i&&(e=I(i,s(l)),e.$on("load",l[9])),{c(){e&&F(e.$$.fragment),t=$e()},m(o,r){e&&G(e,o,r),ce(o,t,r),n=!0},p(o,r){if(r&3&&i!==(i=o[1][o[0]])){if(e){Ce();const a=e;T(a.$$.fragment,1,0,()=>{R(a,1)}),ke()}i?(e=I(i,s(o)),e.$on("load",o[9]),F(e.$$.fragment),Z(e.$$.fragment,1),G(e,t.parentNode,t)):e=null}else if(i){const a={};r&4&&(a.value=o[2]),r&64&&(a.i18n=o[6]),r&256&&(a._fetch=o[8]),e.$set(a)}},i(o){n||(e&&Z(e.$$.fragment,o),n=!0)},o(o){e&&T(e.$$.fragment,o),n=!1},d(o){o&&_e(t),e&&R(e,o)}}}function El(l){let e;return{c(){e=zl("track"),ql(e,"kind","captions")},m(t,n){ce(t,e,n)},p:Ll,d(t){t&&_e(e)}}}function Pl(l){let e,t,n,i;const s=[Dl,Tl,Zl,Nl,Bl,Ml],o=[];function r(a,f){return a[0]==="gallery"?0:a[0]==="plot"?1:a[0]==="audio"?2:a[0]==="video"?3:a[0]==="image"?4:a[0]==="html"?5:-1}return~(e=r(l))&&(t=o[e]=s[e](l)),{c(){t&&t.c(),n=$e()},m(a,f){~e&&o[e].m(a,f),ce(a,n,f),i=!0},p(a,[f]){let u=e;e=r(a),e===u?~e&&o[e].p(a,f):(t&&(Ce(),T(o[u],1,1,()=>{o[u]=null}),ke()),~e?(t=o[e],t?t.p(a,f):(t=o[e]=s[e](a),t.c()),Z(t,1),t.m(n.parentNode,n)):t=null)},i(a){i||(Z(t),i=!0)},o(a){T(t),i=!1},d(a){a&&_e(n),~e&&o[e].d(a)}}}const Ul=()=>{};function Il(l,e,t){let{type:n}=e,{components:i}=e,{value:s}=e,{target:o}=e,{theme_mode:r}=e,{props:a}=e,{i18n:f}=e,{upload:u}=e,{_fetch:_}=e;function b(c){Ve.call(this,l,c)}function g(c){Ve.call(this,l,c)}function h(c){Ve.call(this,l,c)}function y(c){Ve.call(this,l,c)}function p(c){Ve.call(this,l,c)}function w(c){Ve.call(this,l,c)}return l.$$set=c=>{"type"in c&&t(0,n=c.type),"components"in c&&t(1,i=c.components),"value"in c&&t(2,s=c.value),"target"in c&&t(3,o=c.target),"theme_mode"in c&&t(4,r=c.theme_mode),"props"in c&&t(5,a=c.props),"i18n"in c&&t(6,f=c.i18n),"upload"in c&&t(7,u=c.upload),"_fetch"in c&&t(8,_=c._fetch)},[n,i,s,o,r,a,f,u,_,b,g,h,y,p,w]}class Fl extends Vl{constructor(e){super(),jl(this,e,Il,Pl,Al,{type:0,components:1,value:2,target:3,theme_mode:4,props:5,i18n:6,upload:7,_fetch:8})}get type(){return this.$$.ctx[0]}set type(e){this.$$set({type:e}),ee()}get components(){return this.$$.ctx[1]}set components(e){this.$$set({components:e}),ee()}get value(){return this.$$.ctx[2]}set value(e){this.$$set({value:e}),ee()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),ee()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),ee()}get props(){return this.$$.ctx[5]}set props(e){this.$$set({props:e}),ee()}get i18n(){return this.$$.ctx[6]}set i18n(e){this.$$set({i18n:e}),ee()}get upload(){return this.$$.ctx[7]}set upload(e){this.$$set({upload:e}),ee()}get _fetch(){return this.$$.ctx[8]}set _fetch(e){this.$$set({_fetch:e}),ee()}}const{SvelteComponent:Rl,append:Gl,attr:he,detach:Ol,init:Yl,insert:Jl,noop:ot,safe_not_equal:Kl,svg_element:qt}=window.__gradio__svelte__internal;function Ql(l){let e,t;return{c(){e=qt("svg"),t=qt("path"),he(t,"d","M11.25 6.61523H9.375V1.36523H11.25V6.61523ZM3.375 1.36523H8.625V6.91636L7.48425 8.62748L7.16737 10.8464C7.14108 11.0248 7.05166 11.1879 6.91535 11.3061C6.77904 11.4242 6.60488 11.4896 6.4245 11.4902H6.375C6.07672 11.4899 5.79075 11.3713 5.57983 11.1604C5.36892 10.9495 5.2503 10.6635 5.25 10.3652V8.11523H2.25C1.85233 8.11474 1.47109 7.95654 1.18989 7.67535C0.908691 7.39415 0.750496 7.01291 0.75 6.61523V3.99023C0.750992 3.29435 1.02787 2.62724 1.51994 2.13517C2.01201 1.64311 2.67911 1.36623 3.375 1.36523Z"),he(t,"fill","currentColor"),he(e,"width","16"),he(e,"height","16"),he(e,"viewBox","0 0 12 12"),he(e,"fill","none"),he(e,"xmlns","http://www.w3.org/2000/svg")},m(n,i){Jl(n,e,i),Gl(e,t)},p:ot,i:ot,o:ot,d(n){n&&Ol(e)}}}class Wl extends Rl{constructor(e){super(),Yl(this,e,null,Ql,Kl,{})}}const{SvelteComponent:Xl,append:xl,attr:de,detach:ei,init:ti,insert:ni,noop:st,safe_not_equal:li,svg_element:zt}=window.__gradio__svelte__internal;function ii(l){let e,t;return{c(){e=zt("svg"),t=zt("path"),de(t,"d","M2.25 8.11523H4.5V10.3652C4.5003 10.6635 4.61892 10.9495 4.82983 11.1604C5.04075 11.3713 5.32672 11.4899 5.625 11.4902H6.42488C6.60519 11.4895 6.77926 11.4241 6.91549 11.3059C7.05172 11.1878 7.14109 11.0248 7.16737 10.8464L7.48425 8.62748L8.82562 6.61523H11.25V1.36523H3.375C2.67911 1.36623 2.01201 1.64311 1.51994 2.13517C1.02787 2.62724 0.750992 3.29435 0.75 3.99023V6.61523C0.750496 7.01291 0.908691 7.39415 1.18989 7.67535C1.47109 7.95654 1.85233 8.11474 2.25 8.11523ZM9 2.11523H10.5V5.86523H9V2.11523ZM1.5 3.99023C1.5006 3.49314 1.69833 3.01657 2.04983 2.66507C2.40133 2.31356 2.8779 2.11583 3.375 2.11523H8.25V6.12661L6.76575 8.35298L6.4245 10.7402H5.625C5.52554 10.7402 5.43016 10.7007 5.35983 10.6304C5.28951 10.5601 5.25 10.4647 5.25 10.3652V7.36523H2.25C2.05118 7.36494 1.86059 7.28582 1.72 7.14524C1.57941 7.00465 1.5003 6.81406 1.5 6.61523V3.99023Z"),de(t,"fill","currentColor"),de(e,"width","16"),de(e,"height","16"),de(e,"viewBox","0 0 12 12"),de(e,"fill","none"),de(e,"xmlns","http://www.w3.org/2000/svg")},m(n,i){ni(n,e,i),xl(e,t)},p:st,i:st,o:st,d(n){n&&ei(e)}}}class oi extends Xl{constructor(e){super(),ti(this,e,null,ii,li,{})}}const{SvelteComponent:si,append:ai,attr:ge,detach:ri,init:ui,insert:fi,noop:at,safe_not_equal:_i,svg_element:jt}=window.__gradio__svelte__internal;function ci(l){let e,t;return{c(){e=jt("svg"),t=jt("path"),ge(t,"d","M0.75 6.24023H2.625V11.4902H0.75V6.24023ZM8.625 11.4902H3.375V5.93911L4.51575 4.22798L4.83263 2.00911C4.85892 1.83065 4.94834 1.66754 5.08465 1.5494C5.22096 1.43125 5.39512 1.36591 5.5755 1.36523H5.625C5.92328 1.36553 6.20925 1.48415 6.42017 1.69507C6.63108 1.90598 6.7497 2.19196 6.75 2.49023V4.74023H9.75C10.1477 4.74073 10.5289 4.89893 10.8101 5.18012C11.0913 5.46132 11.2495 5.84256 11.25 6.24023V8.86523C11.249 9.56112 10.9721 10.2282 10.4801 10.7203C9.98799 11.2124 9.32089 11.4892 8.625 11.4902Z"),ge(t,"fill","currentColor"),ge(e,"width","16"),ge(e,"height","16"),ge(e,"viewBox","0 0 12 12"),ge(e,"fill","none"),ge(e,"xmlns","http://www.w3.org/2000/svg")},m(n,i){fi(n,e,i),ai(e,t)},p:at,i:at,o:at,d(n){n&&ri(e)}}}class mi extends si{constructor(e){super(),ui(this,e,null,ci,_i,{})}}const{SvelteComponent:hi,append:di,attr:be,detach:gi,init:bi,insert:pi,noop:rt,safe_not_equal:wi,svg_element:Lt}=window.__gradio__svelte__internal;function vi(l){let e,t;return{c(){e=Lt("svg"),t=Lt("path"),be(t,"d","M9.75 4.74023H7.5V2.49023C7.4997 2.19196 7.38108 1.90598 7.17017 1.69507C6.95925 1.48415 6.67328 1.36553 6.375 1.36523H5.57512C5.39481 1.366 5.22074 1.43138 5.08451 1.54952C4.94828 1.66766 4.85891 1.83072 4.83262 2.00911L4.51575 4.22798L3.17438 6.24023H0.75V11.4902H8.625C9.32089 11.4892 9.98799 11.2124 10.4801 10.7203C10.9721 10.2282 11.249 9.56112 11.25 8.86523V6.24023C11.2495 5.84256 11.0913 5.46132 10.8101 5.18012C10.5289 4.89893 10.1477 4.74073 9.75 4.74023ZM3 10.7402H1.5V6.99023H3V10.7402ZM10.5 8.86523C10.4994 9.36233 10.3017 9.8389 9.95017 10.1904C9.59867 10.5419 9.1221 10.7396 8.625 10.7402H3.75V6.72886L5.23425 4.50248L5.5755 2.11523H6.375C6.47446 2.11523 6.56984 2.15474 6.64017 2.22507C6.71049 2.2954 6.75 2.39078 6.75 2.49023V5.49023H9.75C9.94882 5.49053 10.1394 5.56965 10.28 5.71023C10.4206 5.85082 10.4997 6.04141 10.5 6.24023V8.86523Z"),be(t,"fill","currentColor"),be(e,"width","16"),be(e,"height","16"),be(e,"viewBox","0 0 12 12"),be(e,"fill","none"),be(e,"xmlns","http://www.w3.org/2000/svg")},m(n,i){pi(n,e,i),di(e,t)},p:rt,i:rt,o:rt,d(n){n&&gi(e)}}}class ki extends hi{constructor(e){super(),bi(this,e,null,vi,wi,{})}}const{SvelteComponent:$i,attr:pe,check_outros:At,create_component:Ye,destroy_component:Je,detach:ut,element:Mt,flush:ft,group_outros:Bt,init:Ci,insert:_t,listen:Nt,mount_component:Ke,run_all:yi,safe_not_equal:Hi,space:Si,toggle_class:oe,transition_in:ue,transition_out:fe}=window.__gradio__svelte__internal;function Vi(l){let e,t;return e=new oi({}),{c(){Ye(e.$$.fragment)},m(n,i){Ke(e,n,i),t=!0},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){fe(e.$$.fragment,n),t=!1},d(n){Je(e,n)}}}function qi(l){let e,t;return e=new Wl({}),{c(){Ye(e.$$.fragment)},m(n,i){Ke(e,n,i),t=!0},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){fe(e.$$.fragment,n),t=!1},d(n){Je(e,n)}}}function zi(l){let e,t;return e=new ki({}),{c(){Ye(e.$$.fragment)},m(n,i){Ke(e,n,i),t=!0},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){fe(e.$$.fragment,n),t=!1},d(n){Je(e,n)}}}function ji(l){let e,t;return e=new mi({}),{c(){Ye(e.$$.fragment)},m(n,i){Ke(e,n,i),t=!0},i(n){t||(ue(e.$$.fragment,n),t=!0)},o(n){fe(e.$$.fragment,n),t=!1},d(n){Je(e,n)}}}function Li(l){let e,t,n,i,s,o,r,a,f,u,_,b,g;const h=[qi,Vi],y=[];function p(k,L){return k[3]==="dislike"?0:1}t=p(l),n=y[t]=h[t](l);const w=[ji,zi],c=[];function v(k,L){return k[3]==="like"?0:1}return a=v(l),f=c[a]=w[a](l),{c(){e=Mt("button"),n.c(),o=Si(),r=Mt("button"),f.c(),pe(e,"aria-label",i=l[3]==="dislike"?"clicked dislike":"dislike"),pe(e,"class",s="dislike-button "+l[2]+" svelte-21g1vy"),oe(e,"padded",l[1]),oe(e,"selected",l[3]==="dislike"),pe(r,"class","like-button svelte-21g1vy"),pe(r,"aria-label",u=l[3]==="like"?"clicked like":"like"),oe(r,"padded",l[1]),oe(r,"selected",l[3]==="like")},m(k,L){_t(k,e,L),y[t].m(e,null),_t(k,o,L),_t(k,r,L),c[a].m(r,null),_=!0,b||(g=[Nt(e,"click",l[4]),Nt(r,"click",l[5])],b=!0)},p(k,[L]){let W=t;t=p(k),t!==W&&(Bt(),fe(y[W],1,1,()=>{y[W]=null}),At(),n=y[t],n||(n=y[t]=h[t](k),n.c()),ue(n,1),n.m(e,null)),(!_||L&8&&i!==(i=k[3]==="dislike"?"clicked dislike":"dislike"))&&pe(e,"aria-label",i),(!_||L&4&&s!==(s="dislike-button "+k[2]+" svelte-21g1vy"))&&pe(e,"class",s),(!_||L&6)&&oe(e,"padded",k[1]),(!_||L&12)&&oe(e,"selected",k[3]==="dislike");let X=a;a=v(k),a!==X&&(Bt(),fe(c[X],1,1,()=>{c[X]=null}),At(),f=c[a],f||(f=c[a]=w[a](k),f.c()),ue(f,1),f.m(r,null)),(!_||L&8&&u!==(u=k[3]==="like"?"clicked like":"like"))&&pe(r,"aria-label",u),(!_||L&2)&&oe(r,"padded",k[1]),(!_||L&8)&&oe(r,"selected",k[3]==="like")},i(k){_||(ue(n),ue(f),_=!0)},o(k){fe(n),fe(f),_=!1},d(k){k&&(ut(e),ut(o),ut(r)),y[t].d(),c[a].d(),b=!1,yi(g)}}}function Ai(l,e,t){let{handle_action:n}=e,{padded:i=!1}=e,{position:s="left"}=e,o=null;const r=()=>{t(3,o="dislike"),n(o)},a=()=>{t(3,o="like"),n(o)};return l.$$set=f=>{"handle_action"in f&&t(0,n=f.handle_action),"padded"in f&&t(1,i=f.padded),"position"in f&&t(2,s=f.position)},[n,i,s,o,r,a]}class Mi extends $i{constructor(e){super(),Ci(this,e,Ai,Li,Hi,{handle_action:0,padded:1,position:2})}get handle_action(){return this.$$.ctx[0]}set handle_action(e){this.$$set({handle_action:e}),ft()}get padded(){return this.$$.ctx[1]}set padded(e){this.$$set({padded:e}),ft()}get position(){return this.$$.ctx[2]}set position(e){this.$$set({position:e}),ft()}}const{SvelteComponent:Bi,append:Ni,attr:Ie,check_outros:Zt,create_component:wn,destroy_component:vn,detach:Zi,element:Ti,flush:Di,group_outros:Tt,init:Ei,insert:Pi,listen:Ui,mount_component:kn,safe_not_equal:Ii,space:Fi,transition_in:ae,transition_out:qe}=window.__gradio__svelte__internal,{onDestroy:Ri}=window.__gradio__svelte__internal;function Dt(l){let e,t;return e=new Pn({}),{c(){wn(e.$$.fragment)},m(n,i){kn(e,n,i),t=!0},i(n){t||(ae(e.$$.fragment,n),t=!0)},o(n){qe(e.$$.fragment,n),t=!1},d(n){vn(e,n)}}}function Et(l){let e,t;return e=new En({}),{c(){wn(e.$$.fragment)},m(n,i){kn(e,n,i),t=!0},i(n){t||(ae(e.$$.fragment,n),t=!0)},o(n){qe(e.$$.fragment,n),t=!1},d(n){vn(e,n)}}}function Gi(l){let e,t,n,i,s,o,r=!l[0]&&Dt(),a=l[0]&&Et();return{c(){e=Ti("button"),r&&r.c(),t=Fi(),a&&a.c(),Ie(e,"class","action svelte-6u540h"),Ie(e,"title","copy"),Ie(e,"aria-label",n=l[0]?"Copied message":"Copy message")},m(f,u){Pi(f,e,u),r&&r.m(e,null),Ni(e,t),a&&a.m(e,null),i=!0,s||(o=Ui(e,"click",l[1]),s=!0)},p(f,[u]){f[0]?r&&(Tt(),qe(r,1,1,()=>{r=null}),Zt()):r?u&1&&ae(r,1):(r=Dt(),r.c(),ae(r,1),r.m(e,t)),f[0]?a?u&1&&ae(a,1):(a=Et(),a.c(),ae(a,1),a.m(e,null)):a&&(Tt(),qe(a,1,1,()=>{a=null}),Zt()),(!i||u&1&&n!==(n=f[0]?"Copied message":"Copy message"))&&Ie(e,"aria-label",n)},i(f){i||(ae(r),ae(a),i=!0)},o(f){qe(r),qe(a),i=!1},d(f){f&&Zi(e),r&&r.d(),a&&a.d(),s=!1,o()}}}function Oi(l,e,t){let n=!1,{value:i}=e,s;function o(){t(0,n=!0),s&&clearTimeout(s),s=setTimeout(()=>{t(0,n=!1)},2e3)}async function r(){if("clipboard"in navigator)await navigator.clipboard.writeText(i),o();else{const a=document.createElement("textarea");a.value=i,a.style.position="absolute",a.style.left="-999999px",document.body.prepend(a),a.select();try{document.execCommand("copy"),o()}catch(f){console.error(f)}finally{a.remove()}}}return Ri(()=>{s&&clearTimeout(s)}),l.$$set=a=>{"value"in a&&t(2,i=a.value)},[n,r,i]}class Yi extends Bi{constructor(e){super(),Ei(this,e,Oi,Gi,Ii,{value:2})}get value(){return this.$$.ctx[2]}set value(e){this.$$set({value:e}),Di()}}const{SvelteComponent:Ji,append:Pt,attr:te,detach:Ki,init:Qi,insert:Wi,noop:ct,safe_not_equal:Xi,svg_element:mt}=window.__gradio__svelte__internal;function xi(l){let e,t,n;return{c(){e=mt("svg"),t=mt("path"),n=mt("path"),te(t,"d","M6.27701 8.253C6.24187 8.29143 6.19912 8.32212 6.15147 8.34311C6.10383 8.36411 6.05233 8.37495 6.00026 8.37495C5.94819 8.37495 5.89669 8.36411 5.84905 8.34311C5.8014 8.32212 5.75865 8.29143 5.72351 8.253L3.72351 6.0655C3.65798 5.99185 3.62408 5.89536 3.62916 5.79691C3.63424 5.69846 3.67788 5.60596 3.75064 5.53945C3.8234 5.47293 3.91943 5.43774 4.01794 5.44149C4.11645 5.44525 4.20952 5.48764 4.27701 5.5595L5.62501 7.0345V1.5C5.62501 1.40054 5.66452 1.30516 5.73485 1.23483C5.80517 1.16451 5.90055 1.125 6.00001 1.125C6.09947 1.125 6.19485 1.16451 6.26517 1.23483C6.3355 1.30516 6.37501 1.40054 6.37501 1.5V7.034L7.72351 5.559C7.79068 5.4856 7.88425 5.44189 7.98364 5.43748C8.08304 5.43308 8.18011 5.46833 8.25351 5.5355C8.32691 5.60267 8.37062 5.69624 8.37503 5.79563C8.37943 5.89503 8.34418 5.9921 8.27701 6.0655L6.27701 8.253Z"),te(t,"fill","currentColor"),te(n,"d","M1.875 7.39258C1.875 7.29312 1.83549 7.19774 1.76517 7.12741C1.69484 7.05709 1.59946 7.01758 1.5 7.01758C1.40054 7.01758 1.30516 7.05709 1.23483 7.12741C1.16451 7.19774 1.125 7.29312 1.125 7.39258V7.42008C1.125 8.10358 1.125 8.65508 1.1835 9.08858C1.2435 9.53858 1.3735 9.91758 1.674 10.2186C1.975 10.5196 2.354 10.6486 2.804 10.7096C3.2375 10.7676 3.789 10.7676 4.4725 10.7676H7.5275C8.211 10.7676 8.7625 10.7676 9.196 10.7096C9.646 10.6486 10.025 10.5196 10.326 10.2186C10.627 9.91758 10.756 9.53858 10.817 9.08858C10.875 8.65508 10.875 8.10358 10.875 7.42008V7.39258C10.875 7.29312 10.8355 7.19774 10.7652 7.12741C10.6948 7.05709 10.5995 7.01758 10.5 7.01758C10.4005 7.01758 10.3052 7.05709 10.2348 7.12741C10.1645 7.19774 10.125 7.29312 10.125 7.39258C10.125 8.11008 10.124 8.61058 10.0735 8.98858C10.024 9.35558 9.9335 9.54958 9.7955 9.68808C9.657 9.82658 9.463 9.91658 9.0955 9.96608C8.718 10.0166 8.2175 10.0176 7.5 10.0176H4.5C3.7825 10.0176 3.2815 10.0166 2.904 9.96608C2.537 9.91658 2.343 9.82608 2.2045 9.68808C2.066 9.54958 1.976 9.35558 1.9265 8.98808C1.876 8.61058 1.875 8.11008 1.875 7.39258Z"),te(n,"fill","currentColor"),te(e,"width","16"),te(e,"height","16"),te(e,"viewBox","0 0 12 12"),te(e,"fill","none"),te(e,"xmlns","http://www.w3.org/2000/svg")},m(i,s){Wi(i,e,s),Pt(e,t),Pt(e,n)},p:ct,i:ct,o:ct,d(i){i&&Ki(e)}}}class eo extends Ji{constructor(e){super(),Qi(this,e,null,xi,Xi,{})}}const{SvelteComponent:to,append:Ut,attr:dt,check_outros:Re,create_component:Qe,destroy_component:We,detach:pt,element:$n,empty:no,flush:se,group_outros:Ge,init:lo,insert:wt,mount_component:Xe,noop:io,safe_not_equal:oo,space:It,transition_in:A,transition_out:U}=window.__gradio__svelte__internal;function Ft(l){let e,t,n=l[7]&&!Array.isArray(l[2])&&we(l[2]),i,s,o,r=l[8]&&Rt(l),a=n&&Gt(l),f=l[0]&&Ot(l);return{c(){e=$n("div"),r&&r.c(),t=It(),a&&a.c(),i=It(),f&&f.c(),dt(e,"class",s="message-buttons-"+l[3]+" "+l[6]+" message-buttons "+(l[4]!==null&&"with-avatar")+" svelte-hs6bgi")},m(u,_){wt(u,e,_),r&&r.m(e,null),Ut(e,t),a&&a.m(e,null),Ut(e,i),f&&f.m(e,null),o=!0},p(u,_){u[8]?r?(r.p(u,_),_&256&&A(r,1)):(r=Rt(u),r.c(),A(r,1),r.m(e,t)):r&&(Ge(),U(r,1,1,()=>{r=null}),Re()),_&132&&(n=u[7]&&!Array.isArray(u[2])&&we(u[2])),n?a?(a.p(u,_),_&132&&A(a,1)):(a=Gt(u),a.c(),A(a,1),a.m(e,i)):a&&(Ge(),U(a,1,1,()=>{a=null}),Re()),u[0]?f?(f.p(u,_),_&1&&A(f,1)):(f=Ot(u),f.c(),A(f,1),f.m(e,null)):f&&(Ge(),U(f,1,1,()=>{f=null}),Re()),(!o||_&88&&s!==(s="message-buttons-"+u[3]+" "+u[6]+" message-buttons "+(u[4]!==null&&"with-avatar")+" svelte-hs6bgi"))&&dt(e,"class",s)},i(u){o||(A(r),A(a),A(f),o=!0)},o(u){U(r),U(a),U(f),o=!1},d(u){u&&pt(e),r&&r.d(),a&&a.d(),f&&f.d()}}}function Rt(l){let e,t;return e=new Yi({props:{value:l[9]}}),{c(){Qe(e.$$.fragment)},m(n,i){Xe(e,n,i),t=!0},p(n,i){const s={};i&512&&(s.value=n[9]),e.$set(s)},i(n){t||(A(e.$$.fragment,n),t=!0)},o(n){U(e.$$.fragment,n),t=!1},d(n){We(e,n)}}}function Gt(l){let e,t;return e=new Un({props:{href:l[2]?.content?.value.url,download:l[2].content.value.orig_name||"image",$$slots:{default:[so]},$$scope:{ctx:l}}}),{c(){Qe(e.$$.fragment)},m(n,i){Xe(e,n,i),t=!0},p(n,i){const s={};i&4&&(s.href=n[2]?.content?.value.url),i&4&&(s.download=n[2].content.value.orig_name||"image"),i&2048&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(A(e.$$.fragment,n),t=!0)},o(n){U(e.$$.fragment,n),t=!1},d(n){We(e,n)}}}function so(l){let e,t,n;return t=new eo({}),{c(){e=$n("span"),Qe(t.$$.fragment),dt(e,"class","icon-wrap svelte-hs6bgi")},m(i,s){wt(i,e,s),Xe(t,e,null),n=!0},p:io,i(i){n||(A(t.$$.fragment,i),n=!0)},o(i){U(t.$$.fragment,i),n=!1},d(i){i&&pt(e),We(t)}}}function Ot(l){let e,t;return e=new Mi({props:{handle_action:l[5],padded:l[8]||l[7]}}),{c(){Qe(e.$$.fragment)},m(n,i){Xe(e,n,i),t=!0},p(n,i){const s={};i&32&&(s.handle_action=n[5]),i&384&&(s.padded=n[8]||n[7]),e.$set(s)},i(n){t||(A(e.$$.fragment,n),t=!0)},o(n){U(e.$$.fragment,n),t=!1},d(n){We(e,n)}}}function ao(l){let e,t,n=l[1]&&Ft(l);return{c(){n&&n.c(),e=no()},m(i,s){n&&n.m(i,s),wt(i,e,s),t=!0},p(i,[s]){i[1]?n?(n.p(i,s),s&2&&A(n,1)):(n=Ft(i),n.c(),A(n,1),n.m(e.parentNode,e)):n&&(Ge(),U(n,1,1,()=>{n=null}),Re())},i(i){t||(A(n),t=!0)},o(i){U(n),t=!1},d(i){i&&pt(e),n&&n.d(i)}}}function Yt(l){return Array.isArray(l)&&l.every(e=>typeof e.content=="string")||!Array.isArray(l)&&typeof l.content=="string"}function ro(l){return Array.isArray(l)?l.map(e=>e.content).join(`
8
+ `):l.content}function uo(l,e,t){let n,i,s,{likeable:o}=e,{show_copy_button:r}=e,{show:a}=e,{message:f}=e,{position:u}=e,{avatar:_}=e,{handle_action:b}=e,{layout:g}=e;return l.$$set=h=>{"likeable"in h&&t(0,o=h.likeable),"show_copy_button"in h&&t(10,r=h.show_copy_button),"show"in h&&t(1,a=h.show),"message"in h&&t(2,f=h.message),"position"in h&&t(3,u=h.position),"avatar"in h&&t(4,_=h.avatar),"handle_action"in h&&t(5,b=h.handle_action),"layout"in h&&t(6,g=h.layout)},l.$$.update=()=>{l.$$.dirty&4&&t(9,n=Yt(f)?ro(f):""),l.$$.dirty&1028&&t(8,i=r&&f&&Yt(f)),l.$$.dirty&4&&t(7,s=!Array.isArray(f)&&we(f)&&f.content.value.url)},[o,a,f,u,_,b,g,s,i,n,r]}class fo extends to{constructor(e){super(),lo(this,e,uo,ao,oo,{likeable:0,show_copy_button:10,show:1,message:2,position:3,avatar:4,handle_action:5,layout:6})}get likeable(){return this.$$.ctx[0]}set likeable(e){this.$$set({likeable:e}),se()}get show_copy_button(){return this.$$.ctx[10]}set show_copy_button(e){this.$$set({show_copy_button:e}),se()}get show(){return this.$$.ctx[1]}set show(e){this.$$set({show:e}),se()}get message(){return this.$$.ctx[2]}set message(e){this.$$set({message:e}),se()}get position(){return this.$$.ctx[3]}set position(e){this.$$set({position:e}),se()}get avatar(){return this.$$.ctx[4]}set avatar(e){this.$$set({avatar:e}),se()}get handle_action(){return this.$$.ctx[5]}set handle_action(e){this.$$set({handle_action:e}),se()}get layout(){return this.$$.ctx[6]}set layout(e){this.$$set({layout:e}),se()}}const{SvelteComponent:_o,action_destroyer:co,append:ne,attr:$,binding_callbacks:mo,bubble:Jt,check_outros:le,create_component:J,destroy_component:K,destroy_each:Cn,detach:B,element:P,empty:yn,ensure_array_like:Oe,flush:j,group_outros:ie,init:ho,insert:N,listen:gt,mount_component:Q,noop:Kt,null_to_empty:Qt,run_all:go,safe_not_equal:bo,set_data:po,set_style:Be,space:ve,src_url_equal:Wt,text:wo,toggle_class:q,transition_in:C,transition_out:H}=window.__gradio__svelte__internal,{beforeUpdate:vo,afterUpdate:ko,createEventDispatcher:$o,tick:Co}=window.__gradio__svelte__internal;function Xt(l,e,t){const n=l.slice();n[44]=e[t],n[49]=t;const i=n[44][0].role==="user"?"user":"bot";n[45]=i;const s=n[9][n[45]==="user"?0:1];n[46]=s;const o=n[9][n[45]==="user"?0:1];return n[47]=o,n}function xt(l,e,t){const n=l.slice();n[50]=e[t],n[53]=t;const i=n[44][0].type;return n[51]=i,n}function en(l){let e,t,n;return t=new Tn({props:{i18n:l[15],formatter:Wn,value:l[0]}}),t.$on("error",l[33]),t.$on("share",l[34]),{c(){e=P("div"),J(t.$$.fragment),$(e,"class","share-button svelte-1ggj411")},m(i,s){N(i,e,s),Q(t,e,null),n=!0},p(i,s){const o={};s[0]&32768&&(o.i18n=i[15]),s[0]&1&&(o.value=i[0]),t.$set(o)},i(i){n||(C(t.$$.fragment,i),n=!0)},o(i){H(t.$$.fragment,i),n=!1},d(i){i&&B(e),K(t)}}}function yo(l){let e,t,n;return t=new bt({props:{message:l[17],latex_delimiters:l[2]}}),{c(){e=P("center"),J(t.$$.fragment),$(e,"class","svelte-1ggj411")},m(i,s){N(i,e,s),Q(t,e,null),n=!0},p(i,s){const o={};s[0]&131072&&(o.message=i[17]),s[0]&4&&(o.latex_delimiters=i[2]),t.$set(o)},i(i){n||(C(t.$$.fragment,i),n=!0)},o(i){H(t.$$.fragment,i),n=!1},d(i){i&&B(e),K(t)}}}function Ho(l){let e,t,n,i=Oe(l[25]),s=[];for(let a=0;a<i.length;a+=1)s[a]=on(Xt(l,i,a));const o=a=>H(s[a],1,1,()=>{s[a]=null});let r=l[3]&&sn(l);return{c(){for(let a=0;a<s.length;a+=1)s[a].c();e=ve(),r&&r.c(),t=yn()},m(a,f){for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(a,f);N(a,e,f),r&&r.m(a,f),N(a,t,f),n=!0},p(a,f){if(f[0]&1071513527){i=Oe(a[25]);let u;for(u=0;u<i.length;u+=1){const _=Xt(a,i,u);s[u]?(s[u].p(_,f),C(s[u],1)):(s[u]=on(_),s[u].c(),C(s[u],1),s[u].m(e.parentNode,e))}for(ie(),u=i.length;u<s.length;u+=1)o(u);le()}a[3]?r?(r.p(a,f),f[0]&8&&C(r,1)):(r=sn(a),r.c(),C(r,1),r.m(t.parentNode,t)):r&&(ie(),H(r,1,1,()=>{r=null}),le())},i(a){if(!n){for(let f=0;f<i.length;f+=1)C(s[f]);C(r),n=!0}},o(a){s=s.filter(Boolean);for(let f=0;f<s.length;f+=1)H(s[f]);H(r),n=!1},d(a){a&&(B(e),B(t)),Cn(s,a),r&&r.d(a)}}}function tn(l){let e,t,n,i,s,o,r,a,f;return o=new Mn({}),{c(){e=P("div"),t=P("img"),i=ve(),s=P("button"),J(o.$$.fragment),Wt(t.src,n=l[22])||$(t,"src",n),$(t,"alt",l[23]),$(t,"class","svelte-1ggj411"),$(s,"class","image-preview-close-button svelte-1ggj411"),$(e,"class","image-preview svelte-1ggj411")},m(u,_){N(u,e,_),ne(e,t),ne(e,i),ne(e,s),Q(o,s,null),r=!0,a||(f=gt(s,"click",l[35]),a=!0)},p(u,_){(!r||_[0]&4194304&&!Wt(t.src,n=u[22]))&&$(t,"src",n),(!r||_[0]&8388608)&&$(t,"alt",u[23])},i(u){r||(C(o.$$.fragment,u),r=!0)},o(u){H(o.$$.fragment,u),r=!1},d(u){u&&B(e),K(o),a=!1,f()}}}function nn(l){let e,t,n;return t=new Dn({props:{class:"avatar-image",src:l[46]?.url,alt:l[45]+" avatar"}}),{c(){e=P("div"),J(t.$$.fragment),$(e,"class","avatar-container svelte-1ggj411")},m(i,s){N(i,e,s),Q(t,e,null),n=!0},p(i,s){const o={};s[0]&33554944&&(o.src=i[46]?.url),s[0]&33554432&&(o.alt=i[45]+" avatar"),t.$set(o)},i(i){n||(C(t.$$.fragment,i),n=!0)},o(i){H(t.$$.fragment,i),n=!1},d(i){i&&B(e),K(t)}}}function So(l){let e,t=(l[50].content.value?.orig_name||l[50].content.value?.path.split("/").pop()||"file")+"",n,i,s;return{c(){e=P("a"),n=wo(t),$(e,"data-testid","chatbot-file"),$(e,"class","file-pil svelte-1ggj411"),$(e,"href",i=l[50].content.value.url),$(e,"target","_blank"),$(e,"download",s=window.__is_colab__?null:l[50].content.value?.orig_name||l[50].content.value?.path.split("/").pop()||"file")},m(o,r){N(o,e,r),ne(e,n)},p(o,r){r[0]&33554432&&t!==(t=(o[50].content.value?.orig_name||o[50].content.value?.path.split("/").pop()||"file")+"")&&po(n,t),r[0]&33554432&&i!==(i=o[50].content.value.url)&&$(e,"href",i),r[0]&33554432&&s!==(s=window.__is_colab__?null:o[50].content.value?.orig_name||o[50].content.value?.path.split("/").pop()||"file")&&$(e,"download",s)},i:Kt,o:Kt,d(o){o&&B(e)}}}function Vo(l){let e,t;return e=new Fl({props:{target:l[26],theme_mode:l[14],props:l[50].content.props,type:l[50].content.component,components:l[20],value:l[50].content.value,i18n:l[15],upload:l[18],_fetch:l[1]}}),e.$on("load",l[27]),{c(){J(e.$$.fragment)},m(n,i){Q(e,n,i),t=!0},p(n,i){const s={};i[0]&16384&&(s.theme_mode=n[14]),i[0]&33554432&&(s.props=n[50].content.props),i[0]&33554432&&(s.type=n[50].content.component),i[0]&1048576&&(s.components=n[20]),i[0]&33554432&&(s.value=n[50].content.value),i[0]&32768&&(s.i18n=n[15]),i[0]&262144&&(s.upload=n[18]),i[0]&2&&(s._fetch=n[1]),e.$set(s)},i(n){t||(C(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){K(e,n)}}}function qo(l){let e,t,n,i;const s=[jo,zo],o=[];function r(a,f){return a[50].metadata.title?0:1}return e=r(l),t=o[e]=s[e](l),{c(){t.c(),n=yn()},m(a,f){o[e].m(a,f),N(a,n,f),i=!0},p(a,f){let u=e;e=r(a),e===u?o[e].p(a,f):(ie(),H(o[u],1,1,()=>{o[u]=null}),le(),t=o[e],t?t.p(a,f):(t=o[e]=s[e](a),t.c()),C(t,1),t.m(n.parentNode,n))},i(a){i||(C(t),i=!0)},o(a){H(t),i=!1},d(a){a&&B(n),o[e].d(a)}}}function zo(l){let e,t;return e=new bt({props:{message:l[50].content,latex_delimiters:l[2],sanitize_html:l[10],render_markdown:l[12],line_breaks:l[13]}}),e.$on("load",l[27]),{c(){J(e.$$.fragment)},m(n,i){Q(e,n,i),t=!0},p(n,i){const s={};i[0]&33554432&&(s.message=n[50].content),i[0]&4&&(s.latex_delimiters=n[2]),i[0]&1024&&(s.sanitize_html=n[10]),i[0]&4096&&(s.render_markdown=n[12]),i[0]&8192&&(s.line_breaks=n[13]),e.$set(s)},i(n){t||(C(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){K(e,n)}}}function jo(l){let e,t;return e=new Sl({props:{title:l[50].metadata.title,$$slots:{default:[Lo]},$$scope:{ctx:l}}}),{c(){J(e.$$.fragment)},m(n,i){Q(e,n,i),t=!0},p(n,i){const s={};i[0]&33554432&&(s.title=n[50].metadata.title),i[0]&33567748|i[1]&8388608&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(C(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){K(e,n)}}}function Lo(l){let e,t;return e=new bt({props:{message:l[50].content,latex_delimiters:l[2],sanitize_html:l[10],render_markdown:l[12],line_breaks:l[13]}}),e.$on("load",l[27]),{c(){J(e.$$.fragment)},m(n,i){Q(e,n,i),t=!0},p(n,i){const s={};i[0]&33554432&&(s.message=n[50].content),i[0]&4&&(s.latex_delimiters=n[2]),i[0]&1024&&(s.sanitize_html=n[10]),i[0]&4096&&(s.render_markdown=n[12]),i[0]&8192&&(s.line_breaks=n[13]),e.$set(s)},i(n){t||(C(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){K(e,n)}}}function ln(l){let e,t,n,i,s,o,r,a,f,u,_,b;const g=[qo,Vo,So],h=[];function y(c,v){return c[50].type==="text"?0:c[50].type==="component"&&c[50].content.component in c[20]?1:c[50].type==="component"&&c[50].content.component==="file"?2:-1}~(n=y(l))&&(i=h[n]=g[n](l));function p(){return l[36](l[49],l[50])}function w(...c){return l[37](l[49],l[50],...c)}return{c(){e=P("div"),t=P("button"),i&&i.c(),a=ve(),$(t,"data-testid",s=l[45]),$(t,"dir",o=l[7]?"rtl":"ltr"),$(t,"aria-label",r=l[45]+"'s message: "+an(l[50])),$(t,"class","svelte-1ggj411"),q(t,"latest",l[49]===l[0].length-1),q(t,"message-markdown-disabled",!l[12]),q(t,"selectable",l[4]),Be(t,"user-select","text"),Be(t,"text-align",l[7]?"right":"left"),$(e,"class",f="message "+l[45]+" "+(we(l[50])?l[50]?.content.component:"")+" svelte-1ggj411"),q(e,"message-fit",!l[11]),q(e,"panel-full-width",!0),q(e,"message-markdown-disabled",!l[12]),q(e,"component",l[51]==="component"),q(e,"html",we(l[50])&&l[50].content.component==="html"),q(e,"thought",l[53]>0),Be(e,"text-align",l[7]&&l[45]==="user"?"left":"right")},m(c,v){N(c,e,v),ne(e,t),~n&&h[n].m(t,null),ne(e,a),u=!0,_||(b=[gt(t,"click",p),gt(t,"keydown",w)],_=!0)},p(c,v){l=c;let k=n;n=y(l),n===k?~n&&h[n].p(l,v):(i&&(ie(),H(h[k],1,1,()=>{h[k]=null}),le()),~n?(i=h[n],i?i.p(l,v):(i=h[n]=g[n](l),i.c()),C(i,1),i.m(t,null)):i=null),(!u||v[0]&33554432&&s!==(s=l[45]))&&$(t,"data-testid",s),(!u||v[0]&128&&o!==(o=l[7]?"rtl":"ltr"))&&$(t,"dir",o),(!u||v[0]&33554432&&r!==(r=l[45]+"'s message: "+an(l[50])))&&$(t,"aria-label",r),(!u||v[0]&1)&&q(t,"latest",l[49]===l[0].length-1),(!u||v[0]&4096)&&q(t,"message-markdown-disabled",!l[12]),(!u||v[0]&16)&&q(t,"selectable",l[4]),v[0]&128&&Be(t,"text-align",l[7]?"right":"left"),(!u||v[0]&33554432&&f!==(f="message "+l[45]+" "+(we(l[50])?l[50]?.content.component:"")+" svelte-1ggj411"))&&$(e,"class",f),(!u||v[0]&33556480)&&q(e,"message-fit",!l[11]),(!u||v[0]&33554432)&&q(e,"panel-full-width",!0),(!u||v[0]&33558528)&&q(e,"message-markdown-disabled",!l[12]),(!u||v[0]&33554432)&&q(e,"component",l[51]==="component"),(!u||v[0]&33554432)&&q(e,"html",we(l[50])&&l[50].content.component==="html"),(!u||v[0]&33554432)&&q(e,"thought",l[53]>0),v[0]&33554560&&Be(e,"text-align",l[7]&&l[45]==="user"?"left":"right")},i(c){u||(C(i),u=!0)},o(c){H(i),u=!1},d(c){c&&B(e),~n&&h[n].d(),_=!1,go(b)}}}function on(l){let e,t,n,i,s,o,r,a,f,u=l[24]&&tn(l),_=l[46]!==null&&nn(l),b=Oe(l[44]),g=[];for(let p=0;p<b.length;p+=1)g[p]=ln(xt(l,b,p));const h=p=>H(g[p],1,1,()=>{g[p]=null});function y(...p){return l[38](l[49],l[44],...p)}return a=new fo({props:{show:l[5]||l[8],handle_action:y,likeable:l[5],show_copy_button:l[8],message:l[19]==="tuples"?l[44][0]:l[44],position:l[45]==="user"?"right":"left",avatar:l[46],layout:l[16]}}),{c(){u&&u.c(),e=ve(),t=P("div"),_&&_.c(),n=ve(),i=P("div");for(let p=0;p<g.length;p+=1)g[p].c();r=ve(),J(a.$$.fragment),$(i,"class",s="flex-wrap "+l[45]+" svelte-1ggj411"),q(i,"component-wrap",l[44][0].type==="component"),$(t,"class",o="message-row "+l[16]+" "+l[45]+"-row svelte-1ggj411"),q(t,"with_avatar",l[46]!==null),q(t,"with_opposite_avatar",l[47]!==null)},m(p,w){u&&u.m(p,w),N(p,e,w),N(p,t,w),_&&_.m(t,null),ne(t,n),ne(t,i);for(let c=0;c<g.length;c+=1)g[c]&&g[c].m(i,null);N(p,r,w),Q(a,p,w),f=!0},p(p,w){if(l=p,l[24]?u?(u.p(l,w),w[0]&16777216&&C(u,1)):(u=tn(l),u.c(),C(u,1),u.m(e.parentNode,e)):u&&(ie(),H(u,1,1,()=>{u=null}),le()),l[46]!==null?_?(_.p(l,w),w[0]&33554944&&C(_,1)):(_=nn(l),_.c(),C(_,1),_.m(t,n)):_&&(ie(),H(_,1,1,()=>{_=null}),le()),w[0]&504691863){b=Oe(l[44]);let v;for(v=0;v<b.length;v+=1){const k=xt(l,b,v);g[v]?(g[v].p(k,w),C(g[v],1)):(g[v]=ln(k),g[v].c(),C(g[v],1),g[v].m(i,null))}for(ie(),v=b.length;v<g.length;v+=1)h(v);le()}(!f||w[0]&33554432&&s!==(s="flex-wrap "+l[45]+" svelte-1ggj411"))&&$(i,"class",s),(!f||w[0]&33554432)&&q(i,"component-wrap",l[44][0].type==="component"),(!f||w[0]&33619968&&o!==(o="message-row "+l[16]+" "+l[45]+"-row svelte-1ggj411"))&&$(t,"class",o),(!f||w[0]&33620480)&&q(t,"with_avatar",l[46]!==null),(!f||w[0]&33620480)&&q(t,"with_opposite_avatar",l[47]!==null);const c={};w[0]&288&&(c.show=l[5]||l[8]),w[0]&33554432&&(c.handle_action=y),w[0]&32&&(c.likeable=l[5]),w[0]&256&&(c.show_copy_button=l[8]),w[0]&34078720&&(c.message=l[19]==="tuples"?l[44][0]:l[44]),w[0]&33554432&&(c.position=l[45]==="user"?"right":"left"),w[0]&33554944&&(c.avatar=l[46]),w[0]&65536&&(c.layout=l[16]),a.$set(c)},i(p){if(!f){C(u),C(_);for(let w=0;w<b.length;w+=1)C(g[w]);C(a.$$.fragment,p),f=!0}},o(p){H(u),H(_),g=g.filter(Boolean);for(let w=0;w<g.length;w+=1)H(g[w]);H(a.$$.fragment,p),f=!1},d(p){p&&(B(e),B(t),B(r)),u&&u.d(p),_&&_.d(),Cn(g,p),K(a,p)}}}function sn(l){let e,t;return e=new fl({props:{layout:l[16]}}),{c(){J(e.$$.fragment)},m(n,i){Q(e,n,i),t=!0},p(n,i){const s={};i[0]&65536&&(s.layout=n[16]),e.$set(s)},i(n){t||(C(e.$$.fragment,n),t=!0)},o(n){H(e.$$.fragment,n),t=!1},d(n){K(e,n)}}}function Ao(l){let e,t,n,i,s,o,r,a,f,u=l[6]&&l[0]!==null&&l[0].length>0&&en(l);const _=[Ho,yo],b=[];function g(h,y){return h[0]!==null&&h[0].length>0&&h[25]!==null?0:h[17]!==null?1:-1}return~(i=g(l))&&(s=b[i]=_[i](l)),{c(){u&&u.c(),e=ve(),t=P("div"),n=P("div"),s&&s.c(),$(n,"class","message-wrap svelte-1ggj411"),$(t,"class",o=Qt(l[16]==="bubble"?"bubble-wrap":"panel-wrap")+" svelte-1ggj411"),$(t,"role","log"),$(t,"aria-label","chatbot conversation"),$(t,"aria-live","polite"),q(t,"placeholder-container",l[0]===null||l[0].length===0)},m(h,y){u&&u.m(h,y),N(h,e,y),N(h,t,y),ne(t,n),~i&&b[i].m(n,null),l[39](t),r=!0,a||(f=co(Nn.call(null,n)),a=!0)},p(h,y){h[6]&&h[0]!==null&&h[0].length>0?u?(u.p(h,y),y[0]&65&&C(u,1)):(u=en(h),u.c(),C(u,1),u.m(e.parentNode,e)):u&&(ie(),H(u,1,1,()=>{u=null}),le());let p=i;i=g(h),i===p?~i&&b[i].p(h,y):(s&&(ie(),H(b[p],1,1,()=>{b[p]=null}),le()),~i?(s=b[i],s?s.p(h,y):(s=b[i]=_[i](h),s.c()),C(s,1),s.m(n,null)):s=null),(!r||y[0]&65536&&o!==(o=Qt(h[16]==="bubble"?"bubble-wrap":"panel-wrap")+" svelte-1ggj411"))&&$(t,"class",o),(!r||y[0]&65537)&&q(t,"placeholder-container",h[0]===null||h[0].length===0)},i(h){r||(C(u),C(s),r=!0)},o(h){H(u),H(s),r=!1},d(h){h&&(B(e),B(t)),u&&u.d(h),~i&&b[i].d(),l[39](null),a=!1,f()}}}function Mo(l){if(!l)return[];let e=new Set;return l.forEach(t=>{t.type==="component"&&e.add(t.content.component)}),Array.from(e)}function an(l){return l.type==="text"?l.content:l.type==="component"&&l.content.component==="file"?Array.isArray(l.content.value)?`file of extension type: ${l.content.value[0].orig_name?.split(".").pop()}`:`file of extension type: ${l.content.value?.orig_name?.split(".").pop()}`+(l.content.value?.orig_name??""):`a component of type ${l.content.component??"unknown"}`}function Bo(l,e,t){let n,i,{value:s=[]}=e,o=null,{_fetch:r}=e,{load_component:a}=e,f={};async function u(d){let z=[],V=[];d.forEach(M=>{if(f[M]||M==="file")return;const{name:Me,component:nt}=a(M,"base");z.push(Me),V.push(nt)}),(await Promise.all(V)).forEach((M,Me)=>{t(20,f[z[Me]]=M.default,f)})}let{latex_delimiters:_}=e,{pending_message:b=!1}=e,{selectable:g=!1}=e,{likeable:h=!1}=e,{show_share_button:y=!1}=e,{rtl:p=!1}=e,{show_copy_button:w=!1}=e,{avatar_images:c=[null,null]}=e,{sanitize_html:v=!0}=e,{bubble_full_width:k=!0}=e,{render_markdown:L=!0}=e,{line_breaks:W=!0}=e,{theme_mode:X}=e,{i18n:O}=e,{layout:ze="bubble"}=e,{placeholder:je=null}=e,{upload:ye}=e,{msg_format:me="tuples"}=e,Te=document.querySelector("div.gradio-container"),D,Le;const He=$o();vo(()=>{Le=D&&D.offsetHeight+D.scrollTop>D.scrollHeight-100});async function De(){await Co(),requestAnimationFrame(()=>{Le&&D?.scrollTo(0,D.scrollHeight)})}let Ee,Pe,Ae=!1;ko(()=>{(Le||f)&&De(),D.querySelectorAll("img").forEach(d=>{d.addEventListener("click",z=>{const V=z.target;V&&(t(22,Ee=V.src),t(23,Pe=V.alt),t(24,Ae=!0))})})});function m(d,z){He("select",{index:z.index,value:z.content})}function vt(d,z,V){if(me==="tuples")He("like",{index:z.index,value:z.content,liked:V==="like"});else{if(!i)return;const x=i[d],[M,Me]=[x[0],x[x.length-1]];He("like",{index:[M.index,Me.index],value:x.map(nt=>nt.content),liked:V==="like"})}}function Hn(d){const z=[];let V=[],x=null;for(const M of d)me==="tuples"&&(x=null),(M.role==="assistant"||M.role==="user")&&(M.role===x?V.push(M):(V.length>0&&z.push(V),V=[M],x=M.role));return V.length>0&&z.push(V),z}function Sn(d){Jt.call(this,l,d)}function Vn(d){Jt.call(this,l,d)}const qn=()=>{t(24,Ae=!1)},zn=(d,z)=>m(d,z),jn=(d,z,V)=>{V.key==="Enter"&&m(d,z)},Ln=(d,z,V)=>vt(d,z[0],V);function An(d){mo[d?"unshift":"push"](()=>{D=d,t(21,D)})}return l.$$set=d=>{"value"in d&&t(0,s=d.value),"_fetch"in d&&t(1,r=d._fetch),"load_component"in d&&t(30,a=d.load_component),"latex_delimiters"in d&&t(2,_=d.latex_delimiters),"pending_message"in d&&t(3,b=d.pending_message),"selectable"in d&&t(4,g=d.selectable),"likeable"in d&&t(5,h=d.likeable),"show_share_button"in d&&t(6,y=d.show_share_button),"rtl"in d&&t(7,p=d.rtl),"show_copy_button"in d&&t(8,w=d.show_copy_button),"avatar_images"in d&&t(9,c=d.avatar_images),"sanitize_html"in d&&t(10,v=d.sanitize_html),"bubble_full_width"in d&&t(11,k=d.bubble_full_width),"render_markdown"in d&&t(12,L=d.render_markdown),"line_breaks"in d&&t(13,W=d.line_breaks),"theme_mode"in d&&t(14,X=d.theme_mode),"i18n"in d&&t(15,O=d.i18n),"layout"in d&&t(16,ze=d.layout),"placeholder"in d&&t(17,je=d.placeholder),"upload"in d&&t(18,ye=d.upload),"msg_format"in d&&t(19,me=d.msg_format)},l.$$.update=()=>{l.$$.dirty[0]&1&&u(Mo(s)),l.$$.dirty[1]&2&&n(),l.$$.dirty[0]&1|l.$$.dirty[1]&1&&(Zn(s,o)||(t(31,o=s),He("change"))),l.$$.dirty[0]&1&&t(25,i=s&&Hn(s))},t(32,n=()=>{let z=getComputedStyle(document.body).getPropertyValue("--body-text-size"),V;switch(z){case"13px":V=14;break;case"14px":V=16;break;case"16px":V=20;break;default:V=14;break}document.body.style.setProperty("--chatbot-body-text-size",V+"px")}),[s,r,_,b,g,h,y,p,w,c,v,k,L,W,X,O,ze,je,ye,me,f,D,Ee,Pe,Ae,i,Te,De,m,vt,a,o,n,Sn,Vn,qn,zn,jn,Ln,An]}class No extends _o{constructor(e){super(),ho(this,e,Bo,Ao,bo,{value:0,_fetch:1,load_component:30,latex_delimiters:2,pending_message:3,selectable:4,likeable:5,show_share_button:6,rtl:7,show_copy_button:8,avatar_images:9,sanitize_html:10,bubble_full_width:11,render_markdown:12,line_breaks:13,theme_mode:14,i18n:15,layout:16,placeholder:17,upload:18,msg_format:19},null,[-1,-1])}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),j()}get _fetch(){return this.$$.ctx[1]}set _fetch(e){this.$$set({_fetch:e}),j()}get load_component(){return this.$$.ctx[30]}set load_component(e){this.$$set({load_component:e}),j()}get latex_delimiters(){return this.$$.ctx[2]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),j()}get pending_message(){return this.$$.ctx[3]}set pending_message(e){this.$$set({pending_message:e}),j()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$$set({selectable:e}),j()}get likeable(){return this.$$.ctx[5]}set likeable(e){this.$$set({likeable:e}),j()}get show_share_button(){return this.$$.ctx[6]}set show_share_button(e){this.$$set({show_share_button:e}),j()}get rtl(){return this.$$.ctx[7]}set rtl(e){this.$$set({rtl:e}),j()}get show_copy_button(){return this.$$.ctx[8]}set show_copy_button(e){this.$$set({show_copy_button:e}),j()}get avatar_images(){return this.$$.ctx[9]}set avatar_images(e){this.$$set({avatar_images:e}),j()}get sanitize_html(){return this.$$.ctx[10]}set sanitize_html(e){this.$$set({sanitize_html:e}),j()}get bubble_full_width(){return this.$$.ctx[11]}set bubble_full_width(e){this.$$set({bubble_full_width:e}),j()}get render_markdown(){return this.$$.ctx[12]}set render_markdown(e){this.$$set({render_markdown:e}),j()}get line_breaks(){return this.$$.ctx[13]}set line_breaks(e){this.$$set({line_breaks:e}),j()}get theme_mode(){return this.$$.ctx[14]}set theme_mode(e){this.$$set({theme_mode:e}),j()}get i18n(){return this.$$.ctx[15]}set i18n(e){this.$$set({i18n:e}),j()}get layout(){return this.$$.ctx[16]}set layout(e){this.$$set({layout:e}),j()}get placeholder(){return this.$$.ctx[17]}set placeholder(e){this.$$set({placeholder:e}),j()}get upload(){return this.$$.ctx[18]}set upload(e){this.$$set({upload:e}),j()}get msg_format(){return this.$$.ctx[19]}set msg_format(e){this.$$set({msg_format:e}),j()}}const Zo=No,{SvelteComponent:To,append:Do,assign:Eo,attr:Po,check_outros:rn,create_component:xe,destroy_component:et,detach:un,element:Uo,flush:S,get_spread_object:Io,get_spread_update:Fo,group_outros:fn,init:Ro,insert:_n,mount_component:tt,safe_not_equal:Go,space:cn,transition_in:Y,transition_out:re}=window.__gradio__svelte__internal;function mn(l){let e,t;const n=[{autoscroll:l[20].autoscroll},{i18n:l[20].i18n},l[22],{show_progress:l[22].show_progress==="hidden"?"hidden":"minimal"}];let i={};for(let s=0;s<n.length;s+=1)i=Eo(i,n[s]);return e=new Bn({props:i}),e.$on("clear_status",l[28]),{c(){xe(e.$$.fragment)},m(s,o){tt(e,s,o),t=!0},p(s,o){const r=o[0]&5242880?Fo(n,[o[0]&1048576&&{autoscroll:s[20].autoscroll},o[0]&1048576&&{i18n:s[20].i18n},o[0]&4194304&&Io(s[22]),o[0]&4194304&&{show_progress:s[22].show_progress==="hidden"?"hidden":"minimal"}]):{};e.$set(r)},i(s){t||(Y(e.$$.fragment,s),t=!0)},o(s){re(e.$$.fragment,s),t=!1},d(s){et(e,s)}}}function hn(l){let e,t;return e=new Fn({props:{show_label:l[7],Icon:Qn,float:!0,label:l[6]||"Chatbot"}}),{c(){xe(e.$$.fragment)},m(n,i){tt(e,n,i),t=!0},p(n,i){const s={};i[0]&128&&(s.show_label=n[7]),i[0]&64&&(s.label=n[6]||"Chatbot"),e.$set(s)},i(n){t||(Y(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){et(e,n)}}}function Oo(l){let e,t,n,i,s,o=l[22]&&mn(l),r=l[7]&&hn(l);return i=new Zo({props:{i18n:l[20].i18n,selectable:l[8],likeable:l[9],show_share_button:l[10],value:l[26],latex_delimiters:l[19],render_markdown:l[17],theme_mode:l[25],pending_message:l[22]?.status==="pending",rtl:l[11],show_copy_button:l[12],avatar_images:l[21],sanitize_html:l[13],bubble_full_width:l[14],line_breaks:l[18],layout:l[15],placeholder:l[24],upload:l[20].client.upload,_fetch:l[20].client.fetch,load_component:l[20].load_component,msg_format:l[16]}}),i.$on("change",l[29]),i.$on("select",l[30]),i.$on("like",l[31]),i.$on("share",l[32]),i.$on("error",l[33]),{c(){o&&o.c(),e=cn(),t=Uo("div"),r&&r.c(),n=cn(),xe(i.$$.fragment),Po(t,"class","wrapper svelte-nab2ao")},m(a,f){o&&o.m(a,f),_n(a,e,f),_n(a,t,f),r&&r.m(t,null),Do(t,n),tt(i,t,null),s=!0},p(a,f){a[22]?o?(o.p(a,f),f[0]&4194304&&Y(o,1)):(o=mn(a),o.c(),Y(o,1),o.m(e.parentNode,e)):o&&(fn(),re(o,1,1,()=>{o=null}),rn()),a[7]?r?(r.p(a,f),f[0]&128&&Y(r,1)):(r=hn(a),r.c(),Y(r,1),r.m(t,n)):r&&(fn(),re(r,1,1,()=>{r=null}),rn());const u={};f[0]&1048576&&(u.i18n=a[20].i18n),f[0]&256&&(u.selectable=a[8]),f[0]&512&&(u.likeable=a[9]),f[0]&1024&&(u.show_share_button=a[10]),f[0]&67108864&&(u.value=a[26]),f[0]&524288&&(u.latex_delimiters=a[19]),f[0]&131072&&(u.render_markdown=a[17]),f[0]&33554432&&(u.theme_mode=a[25]),f[0]&4194304&&(u.pending_message=a[22]?.status==="pending"),f[0]&2048&&(u.rtl=a[11]),f[0]&4096&&(u.show_copy_button=a[12]),f[0]&2097152&&(u.avatar_images=a[21]),f[0]&8192&&(u.sanitize_html=a[13]),f[0]&16384&&(u.bubble_full_width=a[14]),f[0]&262144&&(u.line_breaks=a[18]),f[0]&32768&&(u.layout=a[15]),f[0]&16777216&&(u.placeholder=a[24]),f[0]&1048576&&(u.upload=a[20].client.upload),f[0]&1048576&&(u._fetch=a[20].client.fetch),f[0]&1048576&&(u.load_component=a[20].load_component),f[0]&65536&&(u.msg_format=a[16]),i.$set(u)},i(a){s||(Y(o),Y(r),Y(i.$$.fragment,a),s=!0)},o(a){re(o),re(r),re(i.$$.fragment,a),s=!1},d(a){a&&(un(e),un(t)),o&&o.d(a),r&&r.d(),et(i)}}}function Yo(l){let e,t;return e=new In({props:{elem_id:l[0],elem_classes:l[1],visible:l[2],padding:!1,scale:l[4],min_width:l[5],height:l[23],allow_overflow:!1,$$slots:{default:[Oo]},$$scope:{ctx:l}}}),{c(){xe(e.$$.fragment)},m(n,i){tt(e,n,i),t=!0},p(n,i){const s={};i[0]&1&&(s.elem_id=n[0]),i[0]&2&&(s.elem_classes=n[1]),i[0]&4&&(s.visible=n[2]),i[0]&16&&(s.scale=n[4]),i[0]&32&&(s.min_width=n[5]),i[0]&8388608&&(s.height=n[23]),i[0]&125829064|i[1]&8&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(Y(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){et(e,n)}}}function Jo(l,e,t){let{elem_id:n=""}=e,{elem_classes:i=[]}=e,{visible:s=!0}=e,{value:o=[]}=e,{scale:r=null}=e,{min_width:a=void 0}=e,{label:f}=e,{show_label:u=!0}=e,{root:_}=e,{_selectable:b=!1}=e,{likeable:g=!1}=e,{show_share_button:h=!1}=e,{rtl:y=!1}=e,{show_copy_button:p=!0}=e,{sanitize_html:w=!0}=e,{bubble_full_width:c=!0}=e,{layout:v="bubble"}=e,{type:k="tuples"}=e,{render_markdown:L=!0}=e,{line_breaks:W=!0}=e,{latex_delimiters:X}=e,{gradio:O}=e,{avatar_images:ze=[null,null]}=e,je=[],{loading_status:ye=void 0}=e,{height:me=400}=e,{placeholder:Te=null}=e,{theme_mode:D}=e;const Le=()=>O.dispatch("clear_status",ye),He=()=>O.dispatch("change",o),De=m=>O.dispatch("select",m.detail),Ee=m=>O.dispatch("like",m.detail),Pe=m=>O.dispatch("share",m.detail),Ae=m=>O.dispatch("error",m.detail);return l.$$set=m=>{"elem_id"in m&&t(0,n=m.elem_id),"elem_classes"in m&&t(1,i=m.elem_classes),"visible"in m&&t(2,s=m.visible),"value"in m&&t(3,o=m.value),"scale"in m&&t(4,r=m.scale),"min_width"in m&&t(5,a=m.min_width),"label"in m&&t(6,f=m.label),"show_label"in m&&t(7,u=m.show_label),"root"in m&&t(27,_=m.root),"_selectable"in m&&t(8,b=m._selectable),"likeable"in m&&t(9,g=m.likeable),"show_share_button"in m&&t(10,h=m.show_share_button),"rtl"in m&&t(11,y=m.rtl),"show_copy_button"in m&&t(12,p=m.show_copy_button),"sanitize_html"in m&&t(13,w=m.sanitize_html),"bubble_full_width"in m&&t(14,c=m.bubble_full_width),"layout"in m&&t(15,v=m.layout),"type"in m&&t(16,k=m.type),"render_markdown"in m&&t(17,L=m.render_markdown),"line_breaks"in m&&t(18,W=m.line_breaks),"latex_delimiters"in m&&t(19,X=m.latex_delimiters),"gradio"in m&&t(20,O=m.gradio),"avatar_images"in m&&t(21,ze=m.avatar_images),"loading_status"in m&&t(22,ye=m.loading_status),"height"in m&&t(23,me=m.height),"placeholder"in m&&t(24,Te=m.placeholder),"theme_mode"in m&&t(25,D=m.theme_mode)},l.$$.update=()=>{l.$$.dirty[0]&134283272&&t(26,je=k==="tuples"?el(o,_):xn(o,_))},[n,i,s,o,r,a,f,u,b,g,h,y,p,w,c,v,k,L,W,X,O,ze,ye,me,Te,D,je,_,Le,He,De,Ee,Pe,Ae]}class cs extends To{constructor(e){super(),Ro(this,e,Jo,Yo,Go,{elem_id:0,elem_classes:1,visible:2,value:3,scale:4,min_width:5,label:6,show_label:7,root:27,_selectable:8,likeable:9,show_share_button:10,rtl:11,show_copy_button:12,sanitize_html:13,bubble_full_width:14,layout:15,type:16,render_markdown:17,line_breaks:18,latex_delimiters:19,gradio:20,avatar_images:21,loading_status:22,height:23,placeholder:24,theme_mode:25},null,[-1,-1])}get elem_id(){return this.$$.ctx[0]}set elem_id(e){this.$$set({elem_id:e}),S()}get elem_classes(){return this.$$.ctx[1]}set elem_classes(e){this.$$set({elem_classes:e}),S()}get visible(){return this.$$.ctx[2]}set visible(e){this.$$set({visible:e}),S()}get value(){return this.$$.ctx[3]}set value(e){this.$$set({value:e}),S()}get scale(){return this.$$.ctx[4]}set scale(e){this.$$set({scale:e}),S()}get min_width(){return this.$$.ctx[5]}set min_width(e){this.$$set({min_width:e}),S()}get label(){return this.$$.ctx[6]}set label(e){this.$$set({label:e}),S()}get show_label(){return this.$$.ctx[7]}set show_label(e){this.$$set({show_label:e}),S()}get root(){return this.$$.ctx[27]}set root(e){this.$$set({root:e}),S()}get _selectable(){return this.$$.ctx[8]}set _selectable(e){this.$$set({_selectable:e}),S()}get likeable(){return this.$$.ctx[9]}set likeable(e){this.$$set({likeable:e}),S()}get show_share_button(){return this.$$.ctx[10]}set show_share_button(e){this.$$set({show_share_button:e}),S()}get rtl(){return this.$$.ctx[11]}set rtl(e){this.$$set({rtl:e}),S()}get show_copy_button(){return this.$$.ctx[12]}set show_copy_button(e){this.$$set({show_copy_button:e}),S()}get sanitize_html(){return this.$$.ctx[13]}set sanitize_html(e){this.$$set({sanitize_html:e}),S()}get bubble_full_width(){return this.$$.ctx[14]}set bubble_full_width(e){this.$$set({bubble_full_width:e}),S()}get layout(){return this.$$.ctx[15]}set layout(e){this.$$set({layout:e}),S()}get type(){return this.$$.ctx[16]}set type(e){this.$$set({type:e}),S()}get render_markdown(){return this.$$.ctx[17]}set render_markdown(e){this.$$set({render_markdown:e}),S()}get line_breaks(){return this.$$.ctx[18]}set line_breaks(e){this.$$set({line_breaks:e}),S()}get latex_delimiters(){return this.$$.ctx[19]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),S()}get gradio(){return this.$$.ctx[20]}set gradio(e){this.$$set({gradio:e}),S()}get avatar_images(){return this.$$.ctx[21]}set avatar_images(e){this.$$set({avatar_images:e}),S()}get loading_status(){return this.$$.ctx[22]}set loading_status(e){this.$$set({loading_status:e}),S()}get height(){return this.$$.ctx[23]}set height(e){this.$$set({height:e}),S()}get placeholder(){return this.$$.ctx[24]}set placeholder(e){this.$$set({placeholder:e}),S()}get theme_mode(){return this.$$.ctx[25]}set theme_mode(e){this.$$set({theme_mode:e}),S()}}export{Zo as BaseChatBot,cs as default};
9
+ //# sourceMappingURL=Index-DAXYa8US.js.map
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf ADDED
Binary file (12.3 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff ADDED
Binary file (13.2 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff ADDED
Binary file (19.4 kB). View file
 
moondream/lib/python3.10/site-packages/gradio/templates/frontend/assets/KaTeX_Script-Regular-D5yQViql.woff ADDED
Binary file (10.6 kB). View file