Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
src/.idea/workspace.xml
CHANGED
@@ -5,10 +5,9 @@
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="b53f7e4a-53f1-42ea-8826-4ef9a94fcbb4" name="Changes" comment="">
|
8 |
-
<change beforePath="$PROJECT_DIR$/
|
9 |
-
<change beforePath="$PROJECT_DIR$/demo/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/demo/app.py" afterDir="false" />
|
10 |
-
<change beforePath="$PROJECT_DIR$/demo/space.py" beforeDir="false" afterPath="$PROJECT_DIR$/demo/space.py" afterDir="false" />
|
11 |
<change beforePath="$PROJECT_DIR$/frontend/shared/JSONNode.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/shared/JSONNode.svelte" afterDir="false" />
|
|
|
12 |
</list>
|
13 |
<option name="SHOW_DIALOG" value="false" />
|
14 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -33,14 +32,14 @@
|
|
33 |
<option name="showLibraryContents" value="true" />
|
34 |
<option name="showMembers" value="true" />
|
35 |
</component>
|
36 |
-
<component name="PropertiesComponent"
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
}
|
43 |
-
}
|
44 |
<component name="RecentsManager">
|
45 |
<key name="MoveFile.RECENT_KEYS">
|
46 |
<recent name="$PROJECT_DIR$" />
|
@@ -138,12 +137,21 @@
|
|
138 |
<option name="project" value="LOCAL" />
|
139 |
<updated>1724809266516</updated>
|
140 |
</task>
|
141 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
<servers />
|
143 |
</component>
|
144 |
<component name="VcsManagerConfiguration">
|
145 |
<MESSAGE value="Initial commit" />
|
146 |
<MESSAGE value="Add image" />
|
147 |
-
<
|
|
|
148 |
</component>
|
149 |
</project>
|
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="b53f7e4a-53f1-42ea-8826-4ef9a94fcbb4" name="Changes" comment="">
|
8 |
+
<change beforePath="$PROJECT_DIR$/backend/gradio_json_markdown/templates/component/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/backend/gradio_json_markdown/templates/component/index.js" afterDir="false" />
|
|
|
|
|
9 |
<change beforePath="$PROJECT_DIR$/frontend/shared/JSONNode.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/frontend/shared/JSONNode.svelte" afterDir="false" />
|
10 |
+
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
11 |
</list>
|
12 |
<option name="SHOW_DIALOG" value="false" />
|
13 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
|
32 |
<option name="showLibraryContents" value="true" />
|
33 |
<option name="showMembers" value="true" />
|
34 |
</component>
|
35 |
+
<component name="PropertiesComponent">{
|
36 |
+
"keyToString": {
|
37 |
+
"Python.app (1).executor": "Run",
|
38 |
+
"Python.app.executor": "Run",
|
39 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
40 |
+
"git-widget-placeholder": "master"
|
41 |
}
|
42 |
+
}</component>
|
43 |
<component name="RecentsManager">
|
44 |
<key name="MoveFile.RECENT_KEYS">
|
45 |
<recent name="$PROJECT_DIR$" />
|
|
|
137 |
<option name="project" value="LOCAL" />
|
138 |
<updated>1724809266516</updated>
|
139 |
</task>
|
140 |
+
<task id="LOCAL-00004" summary="Fix a bug with rendering of xml tags inside of the json text">
|
141 |
+
<option name="closed" value="true" />
|
142 |
+
<created>1728158411722</created>
|
143 |
+
<option name="number" value="00004" />
|
144 |
+
<option name="presentableId" value="LOCAL-00004" />
|
145 |
+
<option name="project" value="LOCAL" />
|
146 |
+
<updated>1728158411723</updated>
|
147 |
+
</task>
|
148 |
+
<option name="localTasksCounter" value="5" />
|
149 |
<servers />
|
150 |
</component>
|
151 |
<component name="VcsManagerConfiguration">
|
152 |
<MESSAGE value="Initial commit" />
|
153 |
<MESSAGE value="Add image" />
|
154 |
+
<MESSAGE value="Fix a bug with rendering of xml tags inside of the json text" />
|
155 |
+
<option name="LAST_COMMIT_MESSAGE" value="Fix a bug with rendering of xml tags inside of the json text" />
|
156 |
</component>
|
157 |
</project>
|
src/backend/gradio_json_markdown/templates/component/index.js
CHANGED
@@ -3770,12 +3770,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = I, V = M), B ===
|
|
3770 |
}
|
3771 |
B.name || (B.name = I), e[I] = B, B.rawDefinition = M.bind(null, a), B.aliases && k(B.aliases, { languageName: I });
|
3772 |
}
|
3773 |
-
function
|
3774 |
delete e[I];
|
3775 |
for (const M of Object.keys(t))
|
3776 |
t[M] === I && delete t[M];
|
3777 |
}
|
3778 |
-
function
|
3779 |
return Object.keys(e);
|
3780 |
}
|
3781 |
function D(I) {
|
@@ -3828,8 +3828,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), F = I, V = M), B ===
|
|
3828 |
initHighlighting: f,
|
3829 |
initHighlightingOnLoad: g,
|
3830 |
registerLanguage: N,
|
3831 |
-
unregisterLanguage:
|
3832 |
-
listLanguages:
|
3833 |
getLanguage: D,
|
3834 |
registerAliases: k,
|
3835 |
autoDetection: L,
|
@@ -5580,7 +5580,7 @@ function nS() {
|
|
5580 |
],
|
5581 |
built_in: ["_Pragma"],
|
5582 |
_type_hints: g
|
5583 |
-
},
|
5584 |
className: "function.dispatch",
|
5585 |
relevance: 0,
|
5586 |
keywords: {
|
@@ -5597,8 +5597,8 @@ function nS() {
|
|
5597 |
t.IDENT_RE,
|
5598 |
n.lookahead(/(<[^<>]+>|)\s*\(/)
|
5599 |
)
|
5600 |
-
},
|
5601 |
-
|
5602 |
u,
|
5603 |
c,
|
5604 |
r,
|
@@ -5624,12 +5624,12 @@ function nS() {
|
|
5624 |
}
|
5625 |
],
|
5626 |
keywords: N,
|
5627 |
-
contains:
|
5628 |
{
|
5629 |
begin: /\(/,
|
5630 |
end: /\)/,
|
5631 |
keywords: N,
|
5632 |
-
contains:
|
5633 |
relevance: 0
|
5634 |
}
|
5635 |
]),
|
@@ -5728,8 +5728,8 @@ function nS() {
|
|
5728 |
contains: [].concat(
|
5729 |
D,
|
5730 |
k,
|
5731 |
-
A,
|
5732 |
O,
|
|
|
5733 |
[
|
5734 |
u,
|
5735 |
{
|
@@ -10240,7 +10240,7 @@ function hS() {
|
|
10240 |
e.IDENT_RE,
|
10241 |
t.lookahead(/(<[^<>]+>|)\s*\(/)
|
10242 |
)
|
10243 |
-
},
|
10244 |
N,
|
10245 |
p,
|
10246 |
l,
|
@@ -10248,7 +10248,7 @@ function hS() {
|
|
10248 |
e.C_BLOCK_COMMENT_MODE,
|
10249 |
d,
|
10250 |
_
|
10251 |
-
],
|
10252 |
// This mode covers expression context where we can't expect a function
|
10253 |
// definition and shouldn't highlight anything that looks like one:
|
10254 |
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
@@ -10267,12 +10267,12 @@ function hS() {
|
|
10267 |
}
|
10268 |
],
|
10269 |
keywords: h,
|
10270 |
-
contains:
|
10271 |
{
|
10272 |
begin: /\(/,
|
10273 |
end: /\)/,
|
10274 |
keywords: h,
|
10275 |
-
contains:
|
10276 |
relevance: 0
|
10277 |
}
|
10278 |
]),
|
@@ -10369,10 +10369,10 @@ function hS() {
|
|
10369 |
illegal: "</",
|
10370 |
classNameAliases: { "function.dispatch": "built_in" },
|
10371 |
contains: [].concat(
|
10372 |
-
|
10373 |
D,
|
10374 |
N,
|
10375 |
-
|
10376 |
[
|
10377 |
p,
|
10378 |
{
|
@@ -12085,12 +12085,12 @@ function wS() {
|
|
12085 |
className: "string",
|
12086 |
begin: 'q"\\{',
|
12087 |
end: '\\}"'
|
12088 |
-
},
|
12089 |
className: "meta",
|
12090 |
begin: "^#!",
|
12091 |
end: "$",
|
12092 |
relevance: 5
|
12093 |
-
},
|
12094 |
className: "meta",
|
12095 |
begin: "#(line)",
|
12096 |
end: "$",
|
@@ -12121,8 +12121,8 @@ function wS() {
|
|
12121 |
S,
|
12122 |
m,
|
12123 |
E,
|
12124 |
-
A,
|
12125 |
O,
|
|
|
12126 |
D
|
12127 |
]
|
12128 |
};
|
@@ -14074,7 +14074,7 @@ function QS() {
|
|
14074 |
keywords: s
|
14075 |
}
|
14076 |
]
|
14077 |
-
},
|
14078 |
p,
|
14079 |
{
|
14080 |
variants: [
|
@@ -14217,13 +14217,13 @@ function QS() {
|
|
14217 |
relevance: 0
|
14218 |
}
|
14219 |
].concat(c, _);
|
14220 |
-
d.contains =
|
14221 |
const L = [
|
14222 |
{
|
14223 |
begin: /^\s*=>/,
|
14224 |
starts: {
|
14225 |
end: "$",
|
14226 |
-
contains:
|
14227 |
}
|
14228 |
},
|
14229 |
{
|
@@ -14232,7 +14232,7 @@ function QS() {
|
|
14232 |
starts: {
|
14233 |
end: "$",
|
14234 |
keywords: s,
|
14235 |
-
contains:
|
14236 |
}
|
14237 |
}
|
14238 |
];
|
@@ -14247,7 +14247,7 @@ function QS() {
|
|
14247 |
],
|
14248 |
keywords: s,
|
14249 |
illegal: /\/\*/,
|
14250 |
-
contains: [e.SHEBANG({ binary: "ruby" })].concat(L).concat(_).concat(
|
14251 |
};
|
14252 |
}
|
14253 |
return mr = a, mr;
|
@@ -15951,7 +15951,7 @@ function nT() {
|
|
15951 |
// A single $ can be used as an operator
|
15952 |
relevance: 0
|
15953 |
};
|
15954 |
-
},
|
15955 |
return {
|
15956 |
begin: n(
|
15957 |
// a type annotation is a
|
@@ -16002,7 +16002,7 @@ function nT() {
|
|
16002 |
h,
|
16003 |
s.inherit(R, { scope: null }),
|
16004 |
// match to avoid strange patterns inside that may break the parsing
|
16005 |
-
|
16006 |
]
|
16007 |
};
|
16008 |
}, k = D(/:/, "operator"), L = D(/\bof\b/, "keyword"), Y = {
|
@@ -16158,7 +16158,7 @@ function nT() {
|
|
16158 |
Q,
|
16159 |
q,
|
16160 |
h,
|
16161 |
-
|
16162 |
], {
|
16163 |
name: "F#",
|
16164 |
aliases: [
|
@@ -16209,7 +16209,7 @@ function nT() {
|
|
16209 |
Q,
|
16210 |
q,
|
16211 |
h,
|
16212 |
-
|
16213 |
]
|
16214 |
};
|
16215 |
}
|
@@ -22168,7 +22168,7 @@ function IT() {
|
|
22168 |
],
|
22169 |
subLanguage: "xml"
|
22170 |
}
|
22171 |
-
},
|
22172 |
begin: ".?css`",
|
22173 |
end: "",
|
22174 |
starts: {
|
@@ -22180,7 +22180,7 @@ function IT() {
|
|
22180 |
],
|
22181 |
subLanguage: "css"
|
22182 |
}
|
22183 |
-
},
|
22184 |
begin: ".?gql`",
|
22185 |
end: "",
|
22186 |
starts: {
|
@@ -22249,8 +22249,8 @@ function IT() {
|
|
22249 |
c.APOS_STRING_MODE,
|
22250 |
c.QUOTE_STRING_MODE,
|
22251 |
N,
|
22252 |
-
A,
|
22253 |
O,
|
|
|
22254 |
D,
|
22255 |
// Skip numbers when they are part of a variable name
|
22256 |
{ match: /\$\d+/ },
|
@@ -22459,8 +22459,8 @@ function IT() {
|
|
22459 |
c.APOS_STRING_MODE,
|
22460 |
c.QUOTE_STRING_MODE,
|
22461 |
N,
|
22462 |
-
A,
|
22463 |
O,
|
|
|
22464 |
D,
|
22465 |
L,
|
22466 |
// Skip numbers when they are part of a variable name
|
@@ -23636,14 +23636,14 @@ function wT() {
|
|
23636 |
},
|
23637 |
C(g, Y)
|
23638 |
);
|
23639 |
-
},
|
23640 |
className: L,
|
23641 |
begin: /(.|\r?\n)/,
|
23642 |
end: /(.|\r?\n)/,
|
23643 |
excludeBegin: !0,
|
23644 |
excludeEnd: !0,
|
23645 |
endsParent: !0
|
23646 |
-
}),
|
23647 |
return {
|
23648 |
className: "string",
|
23649 |
end: "(?=\\\\end\\{" + L + "\\})"
|
@@ -23673,11 +23673,11 @@ function wT() {
|
|
23673 |
...[
|
23674 |
"verb",
|
23675 |
"lstinline"
|
23676 |
-
].map((L) => h(L, { contains: [
|
23677 |
-
h("mint", C(g, { contains: [
|
23678 |
h("mintinline", C(g, { contains: [
|
23679 |
D(),
|
23680 |
-
|
23681 |
] })),
|
23682 |
h("url", { contains: [
|
23683 |
D("link"),
|
@@ -23689,17 +23689,17 @@ function wT() {
|
|
23689 |
"",
|
23690 |
"\\*"
|
23691 |
].map((L) => [
|
23692 |
-
N("verbatim" + L,
|
23693 |
-
N("filecontents" + L, C(g,
|
23694 |
...[
|
23695 |
"",
|
23696 |
"B",
|
23697 |
"L"
|
23698 |
].map(
|
23699 |
-
(Y) => N(Y + "Verbatim" + L, C(R,
|
23700 |
)
|
23701 |
])),
|
23702 |
-
N("minted", C(R, C(g,
|
23703 |
];
|
23704 |
return {
|
23705 |
name: "LaTeX",
|
@@ -24597,12 +24597,12 @@ function kT() {
|
|
24597 |
begin: /\{/,
|
24598 |
end: /\}/,
|
24599 |
contains: E
|
24600 |
-
}),
|
24601 |
beginKeywords: "when",
|
24602 |
endsWithParent: !0,
|
24603 |
contains: [{ beginKeywords: "and not" }].concat(f)
|
24604 |
// using this form to override VALUE’s 'function' match
|
24605 |
-
},
|
24606 |
begin: S + "\\s*:",
|
24607 |
returnBegin: !0,
|
24608 |
end: /[;}]/,
|
@@ -24672,7 +24672,7 @@ function kT() {
|
|
24672 |
contains: [
|
24673 |
_.C_LINE_COMMENT_MODE,
|
24674 |
_.C_BLOCK_COMMENT_MODE,
|
24675 |
-
|
24676 |
R("keyword", "all\\b"),
|
24677 |
R("variable", "@\\{" + m + "\\}"),
|
24678 |
// otherwise it’s identified as tag
|
@@ -24716,9 +24716,9 @@ function kT() {
|
|
24716 |
D,
|
24717 |
k,
|
24718 |
Y,
|
24719 |
-
O,
|
24720 |
-
L,
|
24721 |
A,
|
|
|
|
|
24722 |
d.FUNCTION_DISPATCH
|
24723 |
), {
|
24724 |
name: "Less",
|
@@ -32819,8 +32819,8 @@ function VT() {
|
|
32819 |
className: "builtin-symbol",
|
32820 |
begin: m,
|
32821 |
// for performance out of fear of regex.either(...Mathematica.SYSTEM_SYMBOLS)
|
32822 |
-
"on:begin": (
|
32823 |
-
S.has(
|
32824 |
}
|
32825 |
},
|
32826 |
{
|
@@ -36502,14 +36502,14 @@ function gf() {
|
|
36502 |
4: "title.class"
|
36503 |
}
|
36504 |
}
|
36505 |
-
] },
|
36506 |
{
|
36507 |
match: [
|
36508 |
t.concat(
|
36509 |
/::/,
|
36510 |
t.lookahead(/(?!class\b)/)
|
36511 |
),
|
36512 |
-
|
36513 |
],
|
36514 |
scope: { 2: "variable.constant" }
|
36515 |
},
|
@@ -36527,7 +36527,7 @@ function gf() {
|
|
36527 |
/::/,
|
36528 |
t.lookahead(/(?!class\b)/)
|
36529 |
),
|
36530 |
-
|
36531 |
],
|
36532 |
scope: {
|
36533 |
1: "title.class",
|
@@ -36566,7 +36566,7 @@ function gf() {
|
|
36566 |
contains: [
|
36567 |
D,
|
36568 |
o,
|
36569 |
-
|
36570 |
e.C_BLOCK_COMMENT_MODE,
|
36571 |
m,
|
36572 |
S,
|
@@ -36588,7 +36588,7 @@ function gf() {
|
|
36588 |
k.contains.push(L);
|
36589 |
const Y = [
|
36590 |
D,
|
36591 |
-
|
36592 |
e.C_BLOCK_COMMENT_MODE,
|
36593 |
m,
|
36594 |
S,
|
@@ -36667,7 +36667,7 @@ function gf() {
|
|
36667 |
},
|
36668 |
o,
|
36669 |
L,
|
36670 |
-
|
36671 |
{
|
36672 |
match: [
|
36673 |
/const/,
|
@@ -36705,7 +36705,7 @@ function gf() {
|
|
36705 |
contains: [
|
36706 |
"self",
|
36707 |
o,
|
36708 |
-
|
36709 |
e.C_BLOCK_COMMENT_MODE,
|
36710 |
m,
|
36711 |
S
|
@@ -44808,8 +44808,8 @@ function Xf() {
|
|
44808 |
exceptions: h,
|
44809 |
when: N
|
44810 |
} = {}) {
|
44811 |
-
const
|
44812 |
-
return h = h || [], C.map((
|
44813 |
}
|
44814 |
return {
|
44815 |
name: "SQL",
|
@@ -46354,26 +46354,26 @@ var Co, sd;
|
|
46354 |
function nb() {
|
46355 |
if (sd) return Co;
|
46356 |
sd = 1;
|
46357 |
-
function a(
|
46358 |
-
return
|
46359 |
}
|
46360 |
-
function e(
|
46361 |
-
return t("(?=",
|
46362 |
}
|
46363 |
-
function t(...
|
46364 |
-
return
|
46365 |
}
|
46366 |
-
function n(
|
46367 |
-
const D =
|
46368 |
-
return typeof D == "object" && D.constructor === Object ? (
|
46369 |
}
|
46370 |
-
function r(...
|
46371 |
-
return "(" + (n(
|
46372 |
}
|
46373 |
-
const i = (
|
46374 |
/\b/,
|
46375 |
-
|
46376 |
-
/\w$/.test(
|
46377 |
), o = [
|
46378 |
"Protocol",
|
46379 |
// contextual
|
@@ -46686,16 +46686,16 @@ function nb() {
|
|
46686 |
"tvOSApplicationExtension",
|
46687 |
"swift"
|
46688 |
];
|
46689 |
-
function A
|
46690 |
const D = {
|
46691 |
match: /\s+/,
|
46692 |
relevance: 0
|
46693 |
-
}, k =
|
46694 |
"/\\*",
|
46695 |
"\\*/",
|
46696 |
{ contains: ["self"] }
|
46697 |
), L = [
|
46698 |
-
|
46699 |
k
|
46700 |
], Y = {
|
46701 |
match: [
|
@@ -46809,12 +46809,12 @@ function nb() {
|
|
46809 |
pe("###")
|
46810 |
]
|
46811 |
}, Ce = [
|
46812 |
-
|
46813 |
{
|
46814 |
begin: /\[/,
|
46815 |
end: /\]/,
|
46816 |
relevance: 0,
|
46817 |
-
contains: [
|
46818 |
}
|
46819 |
], De = {
|
46820 |
begin: /\/[^\s](?=[^/\n]*\/)/,
|
@@ -47125,7 +47125,7 @@ function nb() {
|
|
47125 |
]
|
47126 |
};
|
47127 |
}
|
47128 |
-
return Co =
|
47129 |
}
|
47130 |
var No, ld;
|
47131 |
function ab() {
|
@@ -48252,7 +48252,7 @@ function _b() {
|
|
48252 |
keywords: f,
|
48253 |
contains: []
|
48254 |
// defined later
|
48255 |
-
},
|
48256 |
begin: ".?html`",
|
48257 |
end: "",
|
48258 |
starts: {
|
@@ -48264,7 +48264,7 @@ function _b() {
|
|
48264 |
],
|
48265 |
subLanguage: "xml"
|
48266 |
}
|
48267 |
-
},
|
48268 |
begin: ".?css`",
|
48269 |
end: "",
|
48270 |
starts: {
|
@@ -48344,8 +48344,8 @@ function _b() {
|
|
48344 |
}, te = [
|
48345 |
_.APOS_STRING_MODE,
|
48346 |
_.QUOTE_STRING_MODE,
|
48347 |
-
A,
|
48348 |
O,
|
|
|
48349 |
D,
|
48350 |
k,
|
48351 |
// Skip numbers when they are part of a variable name
|
@@ -48554,8 +48554,8 @@ function _b() {
|
|
48554 |
B,
|
48555 |
_.APOS_STRING_MODE,
|
48556 |
_.QUOTE_STRING_MODE,
|
48557 |
-
A,
|
48558 |
O,
|
|
|
48559 |
D,
|
48560 |
k,
|
48561 |
Y,
|
@@ -48750,14 +48750,14 @@ function _b() {
|
|
48750 |
}, R = {
|
48751 |
className: "meta",
|
48752 |
begin: "@" + p
|
48753 |
-
}, C = (
|
48754 |
-
const k =
|
48755 |
if (k === -1)
|
48756 |
throw new Error("can not find mode to replace");
|
48757 |
-
|
48758 |
};
|
48759 |
Object.assign(d.keywords, g), d.exports.PARAMS_CONTAINS.push(R);
|
48760 |
-
const h = d.contains.find((
|
48761 |
d.exports.PARAMS_CONTAINS.push([
|
48762 |
d.exports.CLASS_REFERENCE,
|
48763 |
// class reference for highlighting the params types
|
@@ -48768,7 +48768,7 @@ function _b() {
|
|
48768 |
m,
|
48769 |
S
|
48770 |
]), C(d, "shebang", _.SHEBANG()), C(d, "use_strict", E);
|
48771 |
-
const N = d.contains.find((
|
48772 |
return N.relevance = 0, Object.assign(d, {
|
48773 |
name: "TypeScript",
|
48774 |
aliases: [
|
@@ -50299,7 +50299,7 @@ function fb() {
|
|
50299 |
...r,
|
50300 |
...o,
|
50301 |
...i
|
50302 |
-
],
|
50303 |
relevance: 0,
|
50304 |
match: t.concat(
|
50305 |
"\\b(?!",
|
@@ -50362,7 +50362,7 @@ function fb() {
|
|
50362 |
p,
|
50363 |
S,
|
50364 |
m,
|
50365 |
-
|
50366 |
]
|
50367 |
};
|
50368 |
}
|
@@ -51749,23 +51749,23 @@ function zb(a) {
|
|
51749 |
/*key*/
|
51750 |
a[4] !== null && Pd(a)
|
51751 |
);
|
51752 |
-
function R(
|
51753 |
return D & /*value*/
|
51754 |
1 && (c = null), c == null && (c = !!vt(
|
51755 |
/*value*/
|
51756 |
-
|
51757 |
)), c ? Vb : typeof /*value*/
|
51758 |
-
|
51759 |
-
|
51760 |
-
|
51761 |
/*value*/
|
51762 |
-
|
51763 |
);
|
51764 |
}
|
51765 |
-
let C = R(a, -1), h = C(a), N = d && Ud(),
|
51766 |
return {
|
51767 |
c() {
|
51768 |
-
e = Re("div"), t = Re("div"), n = Re("span"), r = ut(), i = Re("span"), f && f.c(), s = ut(), g && g.c(), l = ut(), h.c(), _ = ut(), N && N.c(), p = ut(),
|
51769 |
t,
|
51770 |
"collapsed",
|
51771 |
/*collapsed*/
|
@@ -51787,67 +51787,67 @@ function zb(a) {
|
|
51787 |
a[6] === "dark"
|
51788 |
);
|
51789 |
},
|
51790 |
-
m(
|
51791 |
-
ye(
|
51792 |
e,
|
51793 |
"toggle",
|
51794 |
/*toggle_handler*/
|
51795 |
a[13]
|
51796 |
), S = !0);
|
51797 |
},
|
51798 |
-
p(
|
51799 |
D & /*value*/
|
51800 |
1 && (o = vt(
|
51801 |
/*value*/
|
51802 |
-
|
51803 |
-
)), o ? f ? f.p(
|
51804 |
-
|
51805 |
521 && (d = !/*is_last_item*/
|
51806 |
-
|
51807 |
/*value*/
|
51808 |
-
|
51809 |
) || /*collapsed*/
|
51810 |
-
|
51811 |
512) && Ge(
|
51812 |
t,
|
51813 |
"collapsed",
|
51814 |
/*collapsed*/
|
51815 |
-
|
51816 |
), D & /*value*/
|
51817 |
1 && (u = vt(
|
51818 |
/*value*/
|
51819 |
-
|
51820 |
-
)), u ?
|
51821 |
-
1 && Ut(
|
51822 |
-
|
51823 |
}), ju()), (!m || D & /*depth*/
|
51824 |
2) && Ld(
|
51825 |
e,
|
51826 |
"--depth",
|
51827 |
/*depth*/
|
51828 |
-
|
51829 |
), (!m || D & /*is_root*/
|
51830 |
4) && Ge(
|
51831 |
e,
|
51832 |
"root",
|
51833 |
/*is_root*/
|
51834 |
-
|
51835 |
), (!m || D & /*theme_mode*/
|
51836 |
64) && Ge(
|
51837 |
e,
|
51838 |
"dark-mode",
|
51839 |
/*theme_mode*/
|
51840 |
-
|
51841 |
);
|
51842 |
},
|
51843 |
-
i(
|
51844 |
-
m || (Ut(
|
51845 |
},
|
51846 |
-
o(
|
51847 |
-
pn(
|
51848 |
},
|
51849 |
-
d(
|
51850 |
-
|
51851 |
}
|
51852 |
};
|
51853 |
}
|
@@ -51858,10 +51858,11 @@ function Yd(a) {
|
|
51858 |
return Array.isArray(a) ? `Array(${a.length})` : typeof a == "object" && a !== null ? `Object(${Object.keys(a).length})` : String(a);
|
51859 |
}
|
51860 |
function Wb(a) {
|
51861 |
-
|
|
|
51862 |
}
|
51863 |
function Kb(a, e, t) {
|
51864 |
-
var n = this && this.__awaiter || function(
|
51865 |
function L(Y) {
|
51866 |
return Y instanceof D ? Y : new D(function(te) {
|
51867 |
te(Y);
|
@@ -51885,7 +51886,7 @@ function Kb(a, e, t) {
|
|
51885 |
function X(I) {
|
51886 |
I.done ? Y(I.value) : L(I.value).then(Q, q);
|
51887 |
}
|
51888 |
-
X((k = k.apply(
|
51889 |
});
|
51890 |
};
|
51891 |
let { value: r } = e, { depth: i = 0 } = e, { is_root: o = !1 } = e, { is_last_item: s = !0 } = e, { key: l = null } = e, { open: c = !1 } = e, { theme_mode: _ = "system" } = e, { show_indices: d = !1 } = e;
|
@@ -51898,22 +51899,20 @@ function Kb(a, e, t) {
|
|
51898 |
}
|
51899 |
const f = new Fu($E({
|
51900 |
langPrefix: "hljs language-",
|
51901 |
-
highlight(
|
51902 |
-
const k = yd.getLanguage(
|
51903 |
-
return yd.highlight(
|
51904 |
}
|
51905 |
}));
|
51906 |
-
function g(
|
51907 |
-
const
|
51908 |
-
console.log("Escaped:" + O);
|
51909 |
-
const D = f.parse(O), L = new DOMParser().parseFromString(D, "text/html");
|
51910 |
return L.querySelectorAll("code").forEach((Y) => {
|
51911 |
Y.setAttribute("style", "border: 1px solid #d3d3d3; background-color: rgba(150,150,150,0.05);");
|
51912 |
}), L.body.innerHTML;
|
51913 |
}
|
51914 |
function R() {
|
51915 |
-
u.querySelectorAll(".line").forEach((
|
51916 |
-
const k =
|
51917 |
k && (k.setAttribute("data-pseudo-content", (D + 1).toString()), k == null || k.setAttribute("aria-roledescription", `Line number ${D + 1}`), k == null || k.setAttribute("title", `Line number ${D + 1}`));
|
51918 |
});
|
51919 |
}
|
@@ -51922,19 +51921,19 @@ function Kb(a, e, t) {
|
|
51922 |
}), Fb(() => {
|
51923 |
o && R();
|
51924 |
});
|
51925 |
-
function C(
|
51926 |
-
Dd.call(this, a,
|
51927 |
}
|
51928 |
-
function h(
|
51929 |
-
Dd.call(this, a,
|
51930 |
}
|
51931 |
-
function N(
|
51932 |
-
Ib[
|
51933 |
-
u =
|
51934 |
});
|
51935 |
}
|
51936 |
-
return a.$$set = (
|
51937 |
-
"value" in
|
51938 |
}, a.$$.update = () => {
|
51939 |
a.$$.dirty & /*value*/
|
51940 |
1 && (vt(r) ? t(10, S = Object.entries(r)) : t(10, S = [])), a.$$.dirty & /*is_root, root_element*/
|
@@ -52214,15 +52213,15 @@ function lR(a, e, t) {
|
|
52214 |
function R(N) {
|
52215 |
try {
|
52216 |
h(S.next(N));
|
52217 |
-
} catch (
|
52218 |
-
g(
|
52219 |
}
|
52220 |
}
|
52221 |
function C(N) {
|
52222 |
try {
|
52223 |
h(S.throw(N));
|
52224 |
-
} catch (
|
52225 |
-
g(
|
52226 |
}
|
52227 |
}
|
52228 |
function h(N) {
|
@@ -52437,22 +52436,22 @@ function RR(a, e, t) {
|
|
52437 |
});
|
52438 |
}
|
52439 |
return new (S || (S = Promise))(function(g, R) {
|
52440 |
-
function C(
|
52441 |
try {
|
52442 |
-
N(E.next(
|
52443 |
-
} catch (
|
52444 |
-
R(
|
52445 |
}
|
52446 |
}
|
52447 |
-
function h(
|
52448 |
try {
|
52449 |
-
N(E.throw(
|
52450 |
-
} catch (
|
52451 |
-
R(
|
52452 |
}
|
52453 |
}
|
52454 |
-
function N(
|
52455 |
-
|
52456 |
}
|
52457 |
N((E = E.apply(u, m || [])).next());
|
52458 |
});
|
@@ -53402,20 +53401,20 @@ function VR(a, e, t) {
|
|
53402 |
let n, { $$slots: r = {}, $$scope: i } = e;
|
53403 |
this && this.__awaiter;
|
53404 |
const o = vR();
|
53405 |
-
let { i18n: s } = e, { eta: l = null } = e, { queue_position: c } = e, { queue_size: _ } = e, { status: d } = e, { scroll_to_output: p = !1 } = e, { timer: u = !0 } = e, { show_progress: m = "full" } = e, { message: S = null } = e, { progress: E = null } = e, { variant: f = "default" } = e, { loading_text: g = "Loading..." } = e, { absolute: R = !0 } = e, { translucent: C = !1 } = e, { border: h = !1 } = e, { autoscroll: N } = e,
|
53406 |
const M = () => {
|
53407 |
-
t(0, l = t(27, L = t(19, F = null))), t(25, D = performance.now()), t(26, k = 0),
|
53408 |
};
|
53409 |
function B() {
|
53410 |
requestAnimationFrame(() => {
|
53411 |
-
t(26, k = (performance.now() - D) / 1e3),
|
53412 |
});
|
53413 |
}
|
53414 |
function V() {
|
53415 |
-
t(26, k = 0), t(0, l = t(27, L = t(19, F = null))),
|
53416 |
}
|
53417 |
hR(() => {
|
53418 |
-
|
53419 |
});
|
53420 |
let F = null;
|
53421 |
function _e(v) {
|
@@ -53428,7 +53427,7 @@ function VR(a, e, t) {
|
|
53428 |
};
|
53429 |
function Se(v) {
|
53430 |
$d[v ? "unshift" : "push"](() => {
|
53431 |
-
|
53432 |
});
|
53433 |
}
|
53434 |
return a.$$set = (v) => {
|
@@ -53445,7 +53444,7 @@ function VR(a, e, t) {
|
|
53445 |
return v.progress;
|
53446 |
})) : t(14, Q = null), Q ? (t(15, q = Q[Q.length - 1]), X && (q === 0 ? t(16, X.style.transition = "0", X) : t(16, X.style.transition = "150ms", X))) : t(15, q = void 0)), a.$$.dirty[0] & /*status*/
|
53447 |
16 && (d === "pending" ? M() : V()), a.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
|
53448 |
-
20979728 &&
|
53449 |
8388624, a.$$.dirty[0] & /*timer_diff*/
|
53450 |
67108864 && t(20, n = k.toFixed(1));
|
53451 |
}, [
|
@@ -53462,7 +53461,7 @@ function VR(a, e, t) {
|
|
53462 |
R,
|
53463 |
C,
|
53464 |
h,
|
53465 |
-
|
53466 |
Q,
|
53467 |
q,
|
53468 |
X,
|
@@ -53684,8 +53683,8 @@ function fp() {
|
|
53684 |
let C, h = "";
|
53685 |
const {
|
53686 |
implementation: N,
|
53687 |
-
createNodeIterator:
|
53688 |
-
createDocumentFragment:
|
53689 |
getElementsByTagName: D
|
53690 |
} = t, {
|
53691 |
importNode: k
|
@@ -53835,7 +53834,7 @@ function fp() {
|
|
53835 |
const Me = y.body || y.documentElement;
|
53836 |
return b && P && Me.insertBefore(t.createTextNode(P), Me.childNodes[0] || null), St === Fe ? D.call(y, Ce ? "html" : "body")[0] : Ce ? y.documentElement : Me;
|
53837 |
}, Qn = function(b) {
|
53838 |
-
return
|
53839 |
b.ownerDocument || b,
|
53840 |
b,
|
53841 |
// eslint-disable-next-line no-bitwise
|
@@ -54003,7 +54002,7 @@ function fp() {
|
|
54003 |
return U;
|
54004 |
if (Ve) {
|
54005 |
if (ze)
|
54006 |
-
for (Me =
|
54007 |
Me.appendChild(y.firstChild);
|
54008 |
else
|
54009 |
Me = y;
|
|
|
3770 |
}
|
3771 |
B.name || (B.name = I), e[I] = B, B.rawDefinition = M.bind(null, a), B.aliases && k(B.aliases, { languageName: I });
|
3772 |
}
|
3773 |
+
function O(I) {
|
3774 |
delete e[I];
|
3775 |
for (const M of Object.keys(t))
|
3776 |
t[M] === I && delete t[M];
|
3777 |
}
|
3778 |
+
function A() {
|
3779 |
return Object.keys(e);
|
3780 |
}
|
3781 |
function D(I) {
|
|
|
3828 |
initHighlighting: f,
|
3829 |
initHighlightingOnLoad: g,
|
3830 |
registerLanguage: N,
|
3831 |
+
unregisterLanguage: O,
|
3832 |
+
listLanguages: A,
|
3833 |
getLanguage: D,
|
3834 |
registerAliases: k,
|
3835 |
autoDetection: L,
|
|
|
5580 |
],
|
5581 |
built_in: ["_Pragma"],
|
5582 |
_type_hints: g
|
5583 |
+
}, O = {
|
5584 |
className: "function.dispatch",
|
5585 |
relevance: 0,
|
5586 |
keywords: {
|
|
|
5597 |
t.IDENT_RE,
|
5598 |
n.lookahead(/(<[^<>]+>|)\s*\(/)
|
5599 |
)
|
5600 |
+
}, A = [
|
5601 |
+
O,
|
5602 |
u,
|
5603 |
c,
|
5604 |
r,
|
|
|
5624 |
}
|
5625 |
],
|
5626 |
keywords: N,
|
5627 |
+
contains: A.concat([
|
5628 |
{
|
5629 |
begin: /\(/,
|
5630 |
end: /\)/,
|
5631 |
keywords: N,
|
5632 |
+
contains: A.concat(["self"]),
|
5633 |
relevance: 0
|
5634 |
}
|
5635 |
]),
|
|
|
5728 |
contains: [].concat(
|
5729 |
D,
|
5730 |
k,
|
|
|
5731 |
O,
|
5732 |
+
A,
|
5733 |
[
|
5734 |
u,
|
5735 |
{
|
|
|
10240 |
e.IDENT_RE,
|
10241 |
t.lookahead(/(<[^<>]+>|)\s*\(/)
|
10242 |
)
|
10243 |
+
}, O = [
|
10244 |
N,
|
10245 |
p,
|
10246 |
l,
|
|
|
10248 |
e.C_BLOCK_COMMENT_MODE,
|
10249 |
d,
|
10250 |
_
|
10251 |
+
], A = {
|
10252 |
// This mode covers expression context where we can't expect a function
|
10253 |
// definition and shouldn't highlight anything that looks like one:
|
10254 |
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
|
|
10267 |
}
|
10268 |
],
|
10269 |
keywords: h,
|
10270 |
+
contains: O.concat([
|
10271 |
{
|
10272 |
begin: /\(/,
|
10273 |
end: /\)/,
|
10274 |
keywords: h,
|
10275 |
+
contains: O.concat(["self"]),
|
10276 |
relevance: 0
|
10277 |
}
|
10278 |
]),
|
|
|
10369 |
illegal: "</",
|
10370 |
classNameAliases: { "function.dispatch": "built_in" },
|
10371 |
contains: [].concat(
|
10372 |
+
A,
|
10373 |
D,
|
10374 |
N,
|
10375 |
+
O,
|
10376 |
[
|
10377 |
p,
|
10378 |
{
|
|
|
12085 |
className: "string",
|
12086 |
begin: 'q"\\{',
|
12087 |
end: '\\}"'
|
12088 |
+
}, O = {
|
12089 |
className: "meta",
|
12090 |
begin: "^#!",
|
12091 |
end: "$",
|
12092 |
relevance: 5
|
12093 |
+
}, A = {
|
12094 |
className: "meta",
|
12095 |
begin: "#(line)",
|
12096 |
end: "$",
|
|
|
12121 |
S,
|
12122 |
m,
|
12123 |
E,
|
|
|
12124 |
O,
|
12125 |
+
A,
|
12126 |
D
|
12127 |
]
|
12128 |
};
|
|
|
14074 |
keywords: s
|
14075 |
}
|
14076 |
]
|
14077 |
+
}, O = [
|
14078 |
p,
|
14079 |
{
|
14080 |
variants: [
|
|
|
14217 |
relevance: 0
|
14218 |
}
|
14219 |
].concat(c, _);
|
14220 |
+
d.contains = O, E.contains = O;
|
14221 |
const L = [
|
14222 |
{
|
14223 |
begin: /^\s*=>/,
|
14224 |
starts: {
|
14225 |
end: "$",
|
14226 |
+
contains: O
|
14227 |
}
|
14228 |
},
|
14229 |
{
|
|
|
14232 |
starts: {
|
14233 |
end: "$",
|
14234 |
keywords: s,
|
14235 |
+
contains: O
|
14236 |
}
|
14237 |
}
|
14238 |
];
|
|
|
14247 |
],
|
14248 |
keywords: s,
|
14249 |
illegal: /\/\*/,
|
14250 |
+
contains: [e.SHEBANG({ binary: "ruby" })].concat(L).concat(_).concat(O)
|
14251 |
};
|
14252 |
}
|
14253 |
return mr = a, mr;
|
|
|
15951 |
// A single $ can be used as an operator
|
15952 |
relevance: 0
|
15953 |
};
|
15954 |
+
}, O = N({ includeEqual: !0 }), A = N({ includeEqual: !1 }), D = function(v, ee) {
|
15955 |
return {
|
15956 |
begin: n(
|
15957 |
// a type annotation is a
|
|
|
16002 |
h,
|
16003 |
s.inherit(R, { scope: null }),
|
16004 |
// match to avoid strange patterns inside that may break the parsing
|
16005 |
+
A
|
16006 |
]
|
16007 |
};
|
16008 |
}, k = D(/:/, "operator"), L = D(/\bof\b/, "keyword"), Y = {
|
|
|
16158 |
Q,
|
16159 |
q,
|
16160 |
h,
|
16161 |
+
O
|
16162 |
], {
|
16163 |
name: "F#",
|
16164 |
aliases: [
|
|
|
16209 |
Q,
|
16210 |
q,
|
16211 |
h,
|
16212 |
+
O
|
16213 |
]
|
16214 |
};
|
16215 |
}
|
|
|
22168 |
],
|
22169 |
subLanguage: "xml"
|
22170 |
}
|
22171 |
+
}, O = {
|
22172 |
begin: ".?css`",
|
22173 |
end: "",
|
22174 |
starts: {
|
|
|
22180 |
],
|
22181 |
subLanguage: "css"
|
22182 |
}
|
22183 |
+
}, A = {
|
22184 |
begin: ".?gql`",
|
22185 |
end: "",
|
22186 |
starts: {
|
|
|
22249 |
c.APOS_STRING_MODE,
|
22250 |
c.QUOTE_STRING_MODE,
|
22251 |
N,
|
|
|
22252 |
O,
|
22253 |
+
A,
|
22254 |
D,
|
22255 |
// Skip numbers when they are part of a variable name
|
22256 |
{ match: /\$\d+/ },
|
|
|
22459 |
c.APOS_STRING_MODE,
|
22460 |
c.QUOTE_STRING_MODE,
|
22461 |
N,
|
|
|
22462 |
O,
|
22463 |
+
A,
|
22464 |
D,
|
22465 |
L,
|
22466 |
// Skip numbers when they are part of a variable name
|
|
|
23636 |
},
|
23637 |
C(g, Y)
|
23638 |
);
|
23639 |
+
}, O = (L = "string") => e.END_SAME_AS_BEGIN({
|
23640 |
className: L,
|
23641 |
begin: /(.|\r?\n)/,
|
23642 |
end: /(.|\r?\n)/,
|
23643 |
excludeBegin: !0,
|
23644 |
excludeEnd: !0,
|
23645 |
endsParent: !0
|
23646 |
+
}), A = function(L) {
|
23647 |
return {
|
23648 |
className: "string",
|
23649 |
end: "(?=\\\\end\\{" + L + "\\})"
|
|
|
23673 |
...[
|
23674 |
"verb",
|
23675 |
"lstinline"
|
23676 |
+
].map((L) => h(L, { contains: [O()] })),
|
23677 |
+
h("mint", C(g, { contains: [O()] })),
|
23678 |
h("mintinline", C(g, { contains: [
|
23679 |
D(),
|
23680 |
+
O()
|
23681 |
] })),
|
23682 |
h("url", { contains: [
|
23683 |
D("link"),
|
|
|
23689 |
"",
|
23690 |
"\\*"
|
23691 |
].map((L) => [
|
23692 |
+
N("verbatim" + L, A("verbatim" + L)),
|
23693 |
+
N("filecontents" + L, C(g, A("filecontents" + L))),
|
23694 |
...[
|
23695 |
"",
|
23696 |
"B",
|
23697 |
"L"
|
23698 |
].map(
|
23699 |
+
(Y) => N(Y + "Verbatim" + L, C(R, A(Y + "Verbatim" + L)))
|
23700 |
)
|
23701 |
])),
|
23702 |
+
N("minted", C(R, C(g, A("minted"))))
|
23703 |
];
|
23704 |
return {
|
23705 |
name: "LaTeX",
|
|
|
24597 |
begin: /\{/,
|
24598 |
end: /\}/,
|
24599 |
contains: E
|
24600 |
+
}), O = {
|
24601 |
beginKeywords: "when",
|
24602 |
endsWithParent: !0,
|
24603 |
contains: [{ beginKeywords: "and not" }].concat(f)
|
24604 |
// using this form to override VALUE’s 'function' match
|
24605 |
+
}, A = {
|
24606 |
begin: S + "\\s*:",
|
24607 |
returnBegin: !0,
|
24608 |
end: /[;}]/,
|
|
|
24672 |
contains: [
|
24673 |
_.C_LINE_COMMENT_MODE,
|
24674 |
_.C_BLOCK_COMMENT_MODE,
|
24675 |
+
O,
|
24676 |
R("keyword", "all\\b"),
|
24677 |
R("variable", "@\\{" + m + "\\}"),
|
24678 |
// otherwise it’s identified as tag
|
|
|
24716 |
D,
|
24717 |
k,
|
24718 |
Y,
|
|
|
|
|
24719 |
A,
|
24720 |
+
L,
|
24721 |
+
O,
|
24722 |
d.FUNCTION_DISPATCH
|
24723 |
), {
|
24724 |
name: "Less",
|
|
|
32819 |
className: "builtin-symbol",
|
32820 |
begin: m,
|
32821 |
// for performance out of fear of regex.either(...Mathematica.SYSTEM_SYMBOLS)
|
32822 |
+
"on:begin": (O, A) => {
|
32823 |
+
S.has(O[0]) || A.ignoreMatch();
|
32824 |
}
|
32825 |
},
|
32826 |
{
|
|
|
36502 |
4: "title.class"
|
36503 |
}
|
36504 |
}
|
36505 |
+
] }, O = t.concat(r, "\\b(?!\\()"), A = { variants: [
|
36506 |
{
|
36507 |
match: [
|
36508 |
t.concat(
|
36509 |
/::/,
|
36510 |
t.lookahead(/(?!class\b)/)
|
36511 |
),
|
36512 |
+
O
|
36513 |
],
|
36514 |
scope: { 2: "variable.constant" }
|
36515 |
},
|
|
|
36527 |
/::/,
|
36528 |
t.lookahead(/(?!class\b)/)
|
36529 |
),
|
36530 |
+
O
|
36531 |
],
|
36532 |
scope: {
|
36533 |
1: "title.class",
|
|
|
36566 |
contains: [
|
36567 |
D,
|
36568 |
o,
|
36569 |
+
A,
|
36570 |
e.C_BLOCK_COMMENT_MODE,
|
36571 |
m,
|
36572 |
S,
|
|
|
36588 |
k.contains.push(L);
|
36589 |
const Y = [
|
36590 |
D,
|
36591 |
+
A,
|
36592 |
e.C_BLOCK_COMMENT_MODE,
|
36593 |
m,
|
36594 |
S,
|
|
|
36667 |
},
|
36668 |
o,
|
36669 |
L,
|
36670 |
+
A,
|
36671 |
{
|
36672 |
match: [
|
36673 |
/const/,
|
|
|
36705 |
contains: [
|
36706 |
"self",
|
36707 |
o,
|
36708 |
+
A,
|
36709 |
e.C_BLOCK_COMMENT_MODE,
|
36710 |
m,
|
36711 |
S
|
|
|
44808 |
exceptions: h,
|
44809 |
when: N
|
44810 |
} = {}) {
|
44811 |
+
const O = N;
|
44812 |
+
return h = h || [], C.map((A) => A.match(/\|\d+$/) || h.includes(A) ? A : O(A) ? `${A}|0` : A);
|
44813 |
}
|
44814 |
return {
|
44815 |
name: "SQL",
|
|
|
46354 |
function nb() {
|
46355 |
if (sd) return Co;
|
46356 |
sd = 1;
|
46357 |
+
function a(A) {
|
46358 |
+
return A ? typeof A == "string" ? A : A.source : null;
|
46359 |
}
|
46360 |
+
function e(A) {
|
46361 |
+
return t("(?=", A, ")");
|
46362 |
}
|
46363 |
+
function t(...A) {
|
46364 |
+
return A.map((k) => a(k)).join("");
|
46365 |
}
|
46366 |
+
function n(A) {
|
46367 |
+
const D = A[A.length - 1];
|
46368 |
+
return typeof D == "object" && D.constructor === Object ? (A.splice(A.length - 1, 1), D) : {};
|
46369 |
}
|
46370 |
+
function r(...A) {
|
46371 |
+
return "(" + (n(A).capture ? "" : "?:") + A.map((L) => a(L)).join("|") + ")";
|
46372 |
}
|
46373 |
+
const i = (A) => t(
|
46374 |
/\b/,
|
46375 |
+
A,
|
46376 |
+
/\w$/.test(A) ? /\b/ : /\B/
|
46377 |
), o = [
|
46378 |
"Protocol",
|
46379 |
// contextual
|
|
|
46686 |
"tvOSApplicationExtension",
|
46687 |
"swift"
|
46688 |
];
|
46689 |
+
function O(A) {
|
46690 |
const D = {
|
46691 |
match: /\s+/,
|
46692 |
relevance: 0
|
46693 |
+
}, k = A.COMMENT(
|
46694 |
"/\\*",
|
46695 |
"\\*/",
|
46696 |
{ contains: ["self"] }
|
46697 |
), L = [
|
46698 |
+
A.C_LINE_COMMENT_MODE,
|
46699 |
k
|
46700 |
], Y = {
|
46701 |
match: [
|
|
|
46809 |
pe("###")
|
46810 |
]
|
46811 |
}, Ce = [
|
46812 |
+
A.BACKSLASH_ESCAPE,
|
46813 |
{
|
46814 |
begin: /\[/,
|
46815 |
end: /\]/,
|
46816 |
relevance: 0,
|
46817 |
+
contains: [A.BACKSLASH_ESCAPE]
|
46818 |
}
|
46819 |
], De = {
|
46820 |
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
|
47125 |
]
|
47126 |
};
|
47127 |
}
|
47128 |
+
return Co = O, Co;
|
47129 |
}
|
47130 |
var No, ld;
|
47131 |
function ab() {
|
|
|
48252 |
keywords: f,
|
48253 |
contains: []
|
48254 |
// defined later
|
48255 |
+
}, O = {
|
48256 |
begin: ".?html`",
|
48257 |
end: "",
|
48258 |
starts: {
|
|
|
48264 |
],
|
48265 |
subLanguage: "xml"
|
48266 |
}
|
48267 |
+
}, A = {
|
48268 |
begin: ".?css`",
|
48269 |
end: "",
|
48270 |
starts: {
|
|
|
48344 |
}, te = [
|
48345 |
_.APOS_STRING_MODE,
|
48346 |
_.QUOTE_STRING_MODE,
|
|
|
48347 |
O,
|
48348 |
+
A,
|
48349 |
D,
|
48350 |
k,
|
48351 |
// Skip numbers when they are part of a variable name
|
|
|
48554 |
B,
|
48555 |
_.APOS_STRING_MODE,
|
48556 |
_.QUOTE_STRING_MODE,
|
|
|
48557 |
O,
|
48558 |
+
A,
|
48559 |
D,
|
48560 |
k,
|
48561 |
Y,
|
|
|
48750 |
}, R = {
|
48751 |
className: "meta",
|
48752 |
begin: "@" + p
|
48753 |
+
}, C = (O, A, D) => {
|
48754 |
+
const k = O.contains.findIndex((L) => L.label === A);
|
48755 |
if (k === -1)
|
48756 |
throw new Error("can not find mode to replace");
|
48757 |
+
O.contains.splice(k, 1, D);
|
48758 |
};
|
48759 |
Object.assign(d.keywords, g), d.exports.PARAMS_CONTAINS.push(R);
|
48760 |
+
const h = d.contains.find((O) => O.className === "attr");
|
48761 |
d.exports.PARAMS_CONTAINS.push([
|
48762 |
d.exports.CLASS_REFERENCE,
|
48763 |
// class reference for highlighting the params types
|
|
|
48768 |
m,
|
48769 |
S
|
48770 |
]), C(d, "shebang", _.SHEBANG()), C(d, "use_strict", E);
|
48771 |
+
const N = d.contains.find((O) => O.label === "func.def");
|
48772 |
return N.relevance = 0, Object.assign(d, {
|
48773 |
name: "TypeScript",
|
48774 |
aliases: [
|
|
|
50299 |
...r,
|
50300 |
...o,
|
50301 |
...i
|
50302 |
+
], O = {
|
50303 |
relevance: 0,
|
50304 |
match: t.concat(
|
50305 |
"\\b(?!",
|
|
|
50362 |
p,
|
50363 |
S,
|
50364 |
m,
|
50365 |
+
O
|
50366 |
]
|
50367 |
};
|
50368 |
}
|
|
|
51749 |
/*key*/
|
51750 |
a[4] !== null && Pd(a)
|
51751 |
);
|
51752 |
+
function R(A, D) {
|
51753 |
return D & /*value*/
|
51754 |
1 && (c = null), c == null && (c = !!vt(
|
51755 |
/*value*/
|
51756 |
+
A[0]
|
51757 |
)), c ? Vb : typeof /*value*/
|
51758 |
+
A[0] == "string" ? Hb : typeof /*value*/
|
51759 |
+
A[0] == "number" ? qb : typeof /*value*/
|
51760 |
+
A[0] == "boolean" ? Yb : (
|
51761 |
/*value*/
|
51762 |
+
A[0] === null ? Gb : Bb
|
51763 |
);
|
51764 |
}
|
51765 |
+
let C = R(a, -1), h = C(a), N = d && Ud(), O = u && Fd(a);
|
51766 |
return {
|
51767 |
c() {
|
51768 |
+
e = Re("div"), t = Re("div"), n = Re("span"), r = ut(), i = Re("span"), f && f.c(), s = ut(), g && g.c(), l = ut(), h.c(), _ = ut(), N && N.c(), p = ut(), O && O.c(), ge(n, "class", "line-number svelte-1340jar"), ge(i, "class", "content svelte-1340jar"), ge(t, "class", "line svelte-1340jar"), Ge(
|
51769 |
t,
|
51770 |
"collapsed",
|
51771 |
/*collapsed*/
|
|
|
51787 |
a[6] === "dark"
|
51788 |
);
|
51789 |
},
|
51790 |
+
m(A, D) {
|
51791 |
+
ye(A, e, D), Ee(e, t), Ee(t, n), Ee(t, r), Ee(t, i), f && f.m(i, null), Ee(i, s), g && g.m(i, null), Ee(i, l), h.m(i, null), Ee(i, _), N && N.m(i, null), Ee(e, p), O && O.m(e, null), a[15](e), m = !0, S || (E = Ss(
|
51792 |
e,
|
51793 |
"toggle",
|
51794 |
/*toggle_handler*/
|
51795 |
a[13]
|
51796 |
), S = !0);
|
51797 |
},
|
51798 |
+
p(A, [D]) {
|
51799 |
D & /*value*/
|
51800 |
1 && (o = vt(
|
51801 |
/*value*/
|
51802 |
+
A[0]
|
51803 |
+
)), o ? f ? f.p(A, D) : (f = xd(A), f.c(), f.m(i, s)) : f && (f.d(1), f = null), /*key*/
|
51804 |
+
A[4] !== null ? g ? g.p(A, D) : (g = Pd(A), g.c(), g.m(i, l)) : g && (g.d(1), g = null), C === (C = R(A, D)) && h ? h.p(A, D) : (h.d(1), h = C(A), h && (h.c(), h.m(i, _))), D & /*is_last_item, value, collapsed*/
|
51805 |
521 && (d = !/*is_last_item*/
|
51806 |
+
A[3] && (!vt(
|
51807 |
/*value*/
|
51808 |
+
A[0]
|
51809 |
) || /*collapsed*/
|
51810 |
+
A[9])), d ? N || (N = Ud(), N.c(), N.m(i, null)) : N && (N.d(1), N = null), (!m || D & /*collapsed*/
|
51811 |
512) && Ge(
|
51812 |
t,
|
51813 |
"collapsed",
|
51814 |
/*collapsed*/
|
51815 |
+
A[9]
|
51816 |
), D & /*value*/
|
51817 |
1 && (u = vt(
|
51818 |
/*value*/
|
51819 |
+
A[0]
|
51820 |
+
)), u ? O ? (O.p(A, D), D & /*value*/
|
51821 |
+
1 && Ut(O, 1)) : (O = Fd(A), O.c(), Ut(O, 1), O.m(e, null)) : O && (ep(), pn(O, 1, 1, () => {
|
51822 |
+
O = null;
|
51823 |
}), ju()), (!m || D & /*depth*/
|
51824 |
2) && Ld(
|
51825 |
e,
|
51826 |
"--depth",
|
51827 |
/*depth*/
|
51828 |
+
A[1]
|
51829 |
), (!m || D & /*is_root*/
|
51830 |
4) && Ge(
|
51831 |
e,
|
51832 |
"root",
|
51833 |
/*is_root*/
|
51834 |
+
A[2]
|
51835 |
), (!m || D & /*theme_mode*/
|
51836 |
64) && Ge(
|
51837 |
e,
|
51838 |
"dark-mode",
|
51839 |
/*theme_mode*/
|
51840 |
+
A[6] === "dark"
|
51841 |
);
|
51842 |
},
|
51843 |
+
i(A) {
|
51844 |
+
m || (Ut(O), m = !0);
|
51845 |
},
|
51846 |
+
o(A) {
|
51847 |
+
pn(O), m = !1;
|
51848 |
},
|
51849 |
+
d(A) {
|
51850 |
+
A && ve(e), f && f.d(), g && g.d(), h.d(), N && N.d(), O && O.d(), a[15](null), S = !1, E();
|
51851 |
}
|
51852 |
};
|
51853 |
}
|
|
|
51858 |
return Array.isArray(a) ? `Array(${a.length})` : typeof a == "object" && a !== null ? `Object(${Object.keys(a).length})` : String(a);
|
51859 |
}
|
51860 |
function Wb(a) {
|
51861 |
+
const e = /(```[\s\S]*?```)/g;
|
51862 |
+
return a.split(e).map((n) => n.startsWith("```") && n.endsWith("```") ? n : n.replace(/</g, "<").replace(/>/g, ">")).join("");
|
51863 |
}
|
51864 |
function Kb(a, e, t) {
|
51865 |
+
var n = this && this.__awaiter || function(O, A, D, k) {
|
51866 |
function L(Y) {
|
51867 |
return Y instanceof D ? Y : new D(function(te) {
|
51868 |
te(Y);
|
|
|
51886 |
function X(I) {
|
51887 |
I.done ? Y(I.value) : L(I.value).then(Q, q);
|
51888 |
}
|
51889 |
+
X((k = k.apply(O, A || [])).next());
|
51890 |
});
|
51891 |
};
|
51892 |
let { value: r } = e, { depth: i = 0 } = e, { is_root: o = !1 } = e, { is_last_item: s = !0 } = e, { key: l = null } = e, { open: c = !1 } = e, { theme_mode: _ = "system" } = e, { show_indices: d = !1 } = e;
|
|
|
51899 |
}
|
51900 |
const f = new Fu($E({
|
51901 |
langPrefix: "hljs language-",
|
51902 |
+
highlight(O, A, D) {
|
51903 |
+
const k = yd.getLanguage(A) ? A : "plaintext";
|
51904 |
+
return yd.highlight(O, { language: k }).value;
|
51905 |
}
|
51906 |
}));
|
51907 |
+
function g(O) {
|
51908 |
+
const A = Wb(O), D = f.parse(A), L = new DOMParser().parseFromString(D, "text/html");
|
|
|
|
|
51909 |
return L.querySelectorAll("code").forEach((Y) => {
|
51910 |
Y.setAttribute("style", "border: 1px solid #d3d3d3; background-color: rgba(150,150,150,0.05);");
|
51911 |
}), L.body.innerHTML;
|
51912 |
}
|
51913 |
function R() {
|
51914 |
+
u.querySelectorAll(".line").forEach((A, D) => {
|
51915 |
+
const k = A.querySelector(".line-number");
|
51916 |
k && (k.setAttribute("data-pseudo-content", (D + 1).toString()), k == null || k.setAttribute("aria-roledescription", `Line number ${D + 1}`), k == null || k.setAttribute("title", `Line number ${D + 1}`));
|
51917 |
});
|
51918 |
}
|
|
|
51921 |
}), Fb(() => {
|
51922 |
o && R();
|
51923 |
});
|
51924 |
+
function C(O) {
|
51925 |
+
Dd.call(this, a, O);
|
51926 |
}
|
51927 |
+
function h(O) {
|
51928 |
+
Dd.call(this, a, O);
|
51929 |
}
|
51930 |
+
function N(O) {
|
51931 |
+
Ib[O ? "unshift" : "push"](() => {
|
51932 |
+
u = O, t(8, u);
|
51933 |
});
|
51934 |
}
|
51935 |
+
return a.$$set = (O) => {
|
51936 |
+
"value" in O && t(0, r = O.value), "depth" in O && t(1, i = O.depth), "is_root" in O && t(2, o = O.is_root), "is_last_item" in O && t(3, s = O.is_last_item), "key" in O && t(4, l = O.key), "open" in O && t(5, c = O.open), "theme_mode" in O && t(6, _ = O.theme_mode), "show_indices" in O && t(7, d = O.show_indices);
|
51937 |
}, a.$$.update = () => {
|
51938 |
a.$$.dirty & /*value*/
|
51939 |
1 && (vt(r) ? t(10, S = Object.entries(r)) : t(10, S = [])), a.$$.dirty & /*is_root, root_element*/
|
|
|
52213 |
function R(N) {
|
52214 |
try {
|
52215 |
h(S.next(N));
|
52216 |
+
} catch (O) {
|
52217 |
+
g(O);
|
52218 |
}
|
52219 |
}
|
52220 |
function C(N) {
|
52221 |
try {
|
52222 |
h(S.throw(N));
|
52223 |
+
} catch (O) {
|
52224 |
+
g(O);
|
52225 |
}
|
52226 |
}
|
52227 |
function h(N) {
|
|
|
52436 |
});
|
52437 |
}
|
52438 |
return new (S || (S = Promise))(function(g, R) {
|
52439 |
+
function C(O) {
|
52440 |
try {
|
52441 |
+
N(E.next(O));
|
52442 |
+
} catch (A) {
|
52443 |
+
R(A);
|
52444 |
}
|
52445 |
}
|
52446 |
+
function h(O) {
|
52447 |
try {
|
52448 |
+
N(E.throw(O));
|
52449 |
+
} catch (A) {
|
52450 |
+
R(A);
|
52451 |
}
|
52452 |
}
|
52453 |
+
function N(O) {
|
52454 |
+
O.done ? g(O.value) : f(O.value).then(C, h);
|
52455 |
}
|
52456 |
N((E = E.apply(u, m || [])).next());
|
52457 |
});
|
|
|
53401 |
let n, { $$slots: r = {}, $$scope: i } = e;
|
53402 |
this && this.__awaiter;
|
53403 |
const o = vR();
|
53404 |
+
let { i18n: s } = e, { eta: l = null } = e, { queue_position: c } = e, { queue_size: _ } = e, { status: d } = e, { scroll_to_output: p = !1 } = e, { timer: u = !0 } = e, { show_progress: m = "full" } = e, { message: S = null } = e, { progress: E = null } = e, { variant: f = "default" } = e, { loading_text: g = "Loading..." } = e, { absolute: R = !0 } = e, { translucent: C = !1 } = e, { border: h = !1 } = e, { autoscroll: N } = e, O, A = !1, D = 0, k = 0, L = null, Y = null, te = 0, Q = null, q, X = null, I = !0;
|
53405 |
const M = () => {
|
53406 |
+
t(0, l = t(27, L = t(19, F = null))), t(25, D = performance.now()), t(26, k = 0), A = !0, B();
|
53407 |
};
|
53408 |
function B() {
|
53409 |
requestAnimationFrame(() => {
|
53410 |
+
t(26, k = (performance.now() - D) / 1e3), A && B();
|
53411 |
});
|
53412 |
}
|
53413 |
function V() {
|
53414 |
+
t(26, k = 0), t(0, l = t(27, L = t(19, F = null))), A && (A = !1);
|
53415 |
}
|
53416 |
hR(() => {
|
53417 |
+
A && V();
|
53418 |
});
|
53419 |
let F = null;
|
53420 |
function _e(v) {
|
|
|
53427 |
};
|
53428 |
function Se(v) {
|
53429 |
$d[v ? "unshift" : "push"](() => {
|
53430 |
+
O = v, t(13, O);
|
53431 |
});
|
53432 |
}
|
53433 |
return a.$$set = (v) => {
|
|
|
53444 |
return v.progress;
|
53445 |
})) : t(14, Q = null), Q ? (t(15, q = Q[Q.length - 1]), X && (q === 0 ? t(16, X.style.transition = "0", X) : t(16, X.style.transition = "150ms", X))) : t(15, q = void 0)), a.$$.dirty[0] & /*status*/
|
53446 |
16 && (d === "pending" ? M() : V()), a.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
|
53447 |
+
20979728 && O && p && (d === "pending" || d === "complete") && HR(O, N), a.$$.dirty[0] & /*status, message*/
|
53448 |
8388624, a.$$.dirty[0] & /*timer_diff*/
|
53449 |
67108864 && t(20, n = k.toFixed(1));
|
53450 |
}, [
|
|
|
53461 |
R,
|
53462 |
C,
|
53463 |
h,
|
53464 |
+
O,
|
53465 |
Q,
|
53466 |
q,
|
53467 |
X,
|
|
|
53683 |
let C, h = "";
|
53684 |
const {
|
53685 |
implementation: N,
|
53686 |
+
createNodeIterator: O,
|
53687 |
+
createDocumentFragment: A,
|
53688 |
getElementsByTagName: D
|
53689 |
} = t, {
|
53690 |
importNode: k
|
|
|
53834 |
const Me = y.body || y.documentElement;
|
53835 |
return b && P && Me.insertBefore(t.createTextNode(P), Me.childNodes[0] || null), St === Fe ? D.call(y, Ce ? "html" : "body")[0] : Ce ? y.documentElement : Me;
|
53836 |
}, Qn = function(b) {
|
53837 |
+
return O.call(
|
53838 |
b.ownerDocument || b,
|
53839 |
b,
|
53840 |
// eslint-disable-next-line no-bitwise
|
|
|
54002 |
return U;
|
54003 |
if (Ve) {
|
54004 |
if (ze)
|
54005 |
+
for (Me = A.call(y.ownerDocument); y.firstChild; )
|
54006 |
Me.appendChild(y.firstChild);
|
54007 |
else
|
54008 |
Me = y;
|
src/frontend/shared/JSONNode.svelte
CHANGED
@@ -46,14 +46,21 @@
|
|
46 |
})
|
47 |
);
|
48 |
|
49 |
-
function
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
function toMarkdown(value: string): string {
|
54 |
// console.log("Render:" + value);
|
55 |
-
const escapedValue =
|
56 |
-
console.log("Escaped:" + escapedValue);
|
57 |
const parsed = marked.parse(escapedValue);
|
58 |
const parser = new DOMParser();
|
59 |
const doc = parser.parseFromString(parsed, 'text/html');
|
|
|
46 |
})
|
47 |
);
|
48 |
|
49 |
+
function escapeXmlTagsOutsideCodeBlocks(value: string): string {
|
50 |
+
const codeBlockRegex = /(```[\s\S]*?```)/g;
|
51 |
+
const parts = value.split(codeBlockRegex);
|
52 |
+
return parts.map(part => {
|
53 |
+
if (part.startsWith('```') && part.endsWith('```')) {
|
54 |
+
return part; // Do not escape inside code blocks
|
55 |
+
}
|
56 |
+
return part.replace(/</g, '<').replace(/>/g, '>'); // Escape outside code blocks
|
57 |
+
}).join('');
|
58 |
}
|
59 |
|
60 |
function toMarkdown(value: string): string {
|
61 |
// console.log("Render:" + value);
|
62 |
+
const escapedValue = escapeXmlTagsOutsideCodeBlocks(value);
|
63 |
+
//console.log("Escaped:" + escapedValue);
|
64 |
const parsed = marked.parse(escapedValue);
|
65 |
const parser = new DOMParser();
|
66 |
const doc = parser.parseFromString(parsed, 'text/html');
|
src/pyproject.toml
CHANGED
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_json_markdown"
|
11 |
-
version = "0.0.
|
12 |
description = "JSON module with markdown support"
|
13 |
readme = "README.md"
|
14 |
license = "apache-2.0"
|
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_json_markdown"
|
11 |
+
version = "0.0.3"
|
12 |
description = "JSON module with markdown support"
|
13 |
readme = "README.md"
|
14 |
license = "apache-2.0"
|