PageSourceSearch

https://malhajar-openllmturkishleaderboard.hf.space/assets/Index-4fd6b43c.js

js malhajar-openllmturkishleaderboard.hf.space collected 2026-10-03 10:22:39 UTC 7,511 bytes, 253 lines download raw bytes

1import { M as Markdown } from './Index.svelte_svelte_type_style_lang-e77843b3.js';
2import { S as Static } from './Index-259f3890.js';
3import { B as Block } from './Button-5e2814d0.js';
4export { default as BaseExample } from './Example-e7bb6dd2.js';
5export { M as MarkdownCode } from './Example.svelte_svelte_type_style_lang-8ae9c46f.js';
6import './utils-8f25e669.js';
7import './index-2b08cc7a.js';
8import './svelte/svelte.js';
9
10/* home/runner/work/gradio/gradio/js/markdown/Index.svelte generated by Svelte v4.2.2 */
11const {
12	SvelteComponent,
13	assign,
14	attr,
15	create_component,
16	destroy_component,
17	detach,
18	element,
19	get_spread_object,
20	get_spread_update,
21	init,
22	insert,
23	mount_component,
24	safe_not_equal,
25	space,
26	toggle_class,
27	transition_in,
28	transition_out
29} = window.__gradio__svelte__internal;
30function create_default_slot(ctx) {
31	let statustracker;
32	let t;
33	let div;
34	let markdown;
35	let current;
36
37	const statustracker_spread_levels = [
38		{ autoscroll: /*gradio*/ ctx[8].autoscroll },
39		{ i18n: /*gradio*/ ctx[8].i18n },
40		/*loading_status*/ ctx[4],
41		{ variant: "center" }
42	];
43
44	let statustracker_props = {};
45
46	for (let i = 0; i < statustracker_spread_levels.length; i += 1) {
47		statustracker_props = assign(statustracker_props, statustracker_spread_levels[i]);
48	}
49
50	statustracker = new Static({ props: statustracker_props });
51
52	markdown = new Markdown({
53			props: {
54				min_height: /*loading_status*/ ctx[4] && /*loading_status*/ ctx[4].status !== "complete",
55				value: /*value*/ ctx[3],
56				elem_classes: /*elem_classes*/ ctx[1],
57				visible: /*visible*/ ctx[2],
58				rtl: /*rtl*/ ctx[5],
59				latex_delimiters: /*latex_delimiters*/ ctx[9],
60				sanitize_html: /*sanitize_html*/ ctx[6],
61				line_breaks: /*line_breaks*/ ctx[7]
62			}
63		});
64
65	markdown.$on("change", /*change_handler*/ ctx[11]);
66
67	return {
68		c() {
69			create_component(statustracker.$$.fragment);
70			t = space();
71			div = element("div");
72			create_component(markdown.$$.fragment);
73			attr(div, "class", "svelte-1ed2p3z");
74			toggle_class(div, "pending", /*loading_status*/ ctx[4]?.status === "pending");
75		},
76		m(target, anchor) {
77			mount_component(statustracker, target, anchor);
78			insert(target, t, anchor);
79			insert(target, div, anchor);
80			mount_component(markdown, div, null);
81			current = true;
82		},
83		p(ctx, dirty) {
84			const statustracker_changes = (dirty & /*gradio, loading_status*/ 272)
85			? get_spread_update(statustracker_spread_levels, [
86					dirty & /*gradio*/ 256 && { autoscroll: /*gradio*/ ctx[8].autoscroll },
87					dirty & /*gradio*/ 256 && { i18n: /*gradio*/ ctx[8].i18n },
88					dirty & /*loading_status*/ 16 && get_spread_object(/*loading_status*/ ctx[4]),
89					statustracker_spread_levels[3]
90				])
91			: {};
92
93			statustracker.$set(statustracker_changes);
94			const markdown_changes = {};
95			if (dirty & /*loading_status*/ 16) markdown_changes.min_height = /*loading_status*/ ctx[4] && /*loading_status*/ ctx[4].status !== "complete";
96			if (dirty & /*value*/ 8) markdown_changes.value = /*value*/ ctx[3];
97			if (dirty & /*elem_classes*/ 2) markdown_changes.elem_classes = /*elem_classes*/ ctx[1];
98			if (dirty & /*visible*/ 4) markdown_changes.visible = /*visible*/ ctx[2];
99			if (dirty & /*rtl*/ 32) markdown_changes.rtl = /*rtl*/ ctx[5];
100			if (dirty & /*latex_delimiters*/ 512) markdown_changes.latex_delimiters = /*latex_delimiters*/ ctx[9];
101			if (dirty & /*sanitize_html*/ 64) markdown_changes.sanitize_html = /*sanitize_html*/ ctx[6];
102			if (dirty & /*line_breaks*/ 128) markdown_changes.line_breaks = /*line_breaks*/ ctx[7];
103			markdown.$set(markdown_changes);
104
105			if (!current || dirty & /*loading_status*/ 16) {
106				toggle_class(div, "pending", /*loading_status*/ ctx[4]?.status === "pending");
107			}
108		},
109		i(local) {
110			if (current) return;
111			transition_in(statustracker.$$.fragment, local);
112			transition_in(markdown.$$.fragment, local);
113			current = true;
114		},
115		o(local) {
116			transition_out(statustracker.$$.fragment, local);
117			transition_out(markdown.$$.fragment, local);
118			current = false;
119		},
120		d(detaching) {
121			if (detaching) {
122				detach(t);
123				detach(div);
124			}
125
126			destroy_component(statustracker, detaching);
127			destroy_component(markdown);
128		}
129	};
130}
131
132function create_fragment(ctx) {
133	let block;
134	let current;
135
136	block = new Block({
137			props: {
138				visible: /*visible*/ ctx[2],
139				elem_id: /*elem_id*/ ctx[0],
140				elem_classes: /*elem_classes*/ ctx[1],
141				container: false,
142				$$slots: { default: [create_default_slot] },
143				$$scope: { ctx }
144			}
145		});
146
147	return {
148		c() {
149			create_component(block.$$.fragment);
150		},
151		m(target, anchor) {
152			mount_component(block, target, anchor);
153			current = true;
154		},
155		p(ctx, [dirty]) {
156			const block_changes = {};
157			if (dirty & /*visible*/ 4) block_changes.visible = /*visible*/ ctx[2];
158			if (dirty & /*elem_id*/ 1) block_changes.elem_id = /*elem_id*/ ctx[0];
159			if (dirty & /*elem_classes*/ 2) block_changes.elem_classes = /*elem_classes*/ ctx[1];
160
161			if (dirty & /*$$scope, loading_status, value, elem_classes, visible, rtl, latex_delimiters, sanitize_html, line_breaks, gradio*/ 5118) {
162				block_changes.$$scope = { dirty, ctx };
163			}
164
165			block.$set(block_changes);
166		},
167		i(local) {
168			if (current) return;
169			transition_in(block.$$.fragment, local);
170			current = true;
171		},
172		o(local) {
173			transition_out(block.$$.fragment, local);
174			current = false;
175		},
176		d(detaching) {
177			destroy_component(block, detaching);
178		}
179	};
180}
181
182function instance($$self, $$props, $$invalidate) {
183	let { label } = $$props;
184	let { elem_id = "" } = $$props;
185	let { elem_classes = [] } = $$props;
186	let { visible = true } = $$props;
187	let { value = "" } = $$props;
188	let { loading_status } = $$props;
189	let { rtl = false } = $$props;
190	let { sanitize_html = true } = $$props;
191	let { line_breaks = false } = $$props;
192	let { gradio } = $$props;
193	let { latex_delimiters } = $$props;
194	const change_handler = () => gradio.dispatch("change");
195
196	$$self.$$set = $$props => {
197		if ('label' in $$props) $$invalidate(10, label = $$props.label);
198		if ('elem_id' in $$props) $$invalidate(0, elem_id = $$props.elem_id);
199		if ('elem_classes' in $$props) $$invalidate(1, elem_classes = $$props.elem_classes);
200		if ('visible' in $$props) $$invalidate(2, visible = $$props.visible);
201		if ('value' in $$props) $$invalidate(3, value = $$props.value);
202		if ('loading_status' in $$props) $$invalidate(4, loading_status = $$props.loading_status);
203		if ('rtl' in $$props) $$invalidate(5, rtl = $$props.rtl);
204		if ('sanitize_html' in $$props) $$invalidate(6, sanitize_html = $$props.sanitize_html);
205		if ('line_breaks' in $$props) $$invalidate(7, line_breaks = $$props.line_breaks);
206		if ('gradio' in $$props) $$invalidate(8, gradio = $$props.gradio);
207		if ('latex_delimiters' in $$props) $$invalidate(9, latex_delimiters = $$props.latex_delimiters);
208	};
209
210	$$self.$$.update = () => {
211		if ($$self.$$.dirty & /*label, gradio*/ 1280) {
212			(gradio.dispatch("change"));
213		}
214	};
215
216	return [
217		elem_id,
218		elem_classes,
219		visible,
220		value,
221		loading_status,
222		rtl,
223		sanitize_html,
224		line_breaks,
225		gradio,
226		latex_delimiters,
227		label,
228		change_handler
229	];
230}
231
232class Index extends SvelteComponent {
233	constructor(options) {
234		super();
235
236		init(this, options, instance, create_fragment, safe_not_equal, {
237			label: 10,
238			elem_id: 0,
239			elem_classes: 1,
240			visible: 2,
241			value: 3,
242			loading_status: 4,
243			rtl: 5,
244			sanitize_html: 6,
245			line_breaks: 7,
246			gradio: 8,
247			latex_delimiters: 9
248		});
249	}
250}
251
252export { Markdown as BaseMarkdown, Index as default };
253//# sourceMappingURL=Index-4fd6b43c.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.