PageSourceSearch

https://ksort-k-sort-arena.hf.space/assets/Index-37392b60.js

js ksort-k-sort-arena.hf.space collected 2026-10-03 17:02:58 UTC 4,947 bytes, 184 lines download raw bytes

1import './index-10ead756.js';
2import { a as Button } from './Button-bd009e9a.js';
3import './svelte/svelte.js';
4import './Index-7fdff9d2.js';
5
6/* home/runner/work/gradio/gradio/js/button/Index.svelte generated by Svelte v4.2.2 */
7const {
8	SvelteComponent,
9	create_component,
10	destroy_component,
11	detach,
12	init,
13	insert,
14	mount_component,
15	safe_not_equal,
16	set_data,
17	text,
18	transition_in,
19	transition_out
20} = window.__gradio__svelte__internal;
21function create_default_slot(ctx) {
22	let t_value = (/*value*/ ctx[3]
23	? /*gradio*/ ctx[11].i18n(/*value*/ ctx[3])
24	: "") + "";
25
26	let t;
27
28	return {
29		c() {
30			t = text(t_value);
31		},
32		m(target, anchor) {
33			insert(target, t, anchor);
34		},
35		p(ctx, dirty) {
36			if (dirty & /*value, gradio*/ 2056 && t_value !== (t_value = (/*value*/ ctx[3]
37			? /*gradio*/ ctx[11].i18n(/*value*/ ctx[3])
38			: "") + "")) set_data(t, t_value);
39		},
40		d(detaching) {
41			if (detaching) {
42				detach(t);
43			}
44		}
45	};
46}
47
48function create_fragment(ctx) {
49	let button;
50	let current;
51
52	button = new Button({
53			props: {
54				value: /*value*/ ctx[3],
55				variant: /*variant*/ ctx[4],
56				elem_id: /*elem_id*/ ctx[0],
57				elem_classes: /*elem_classes*/ ctx[1],
58				size: /*size*/ ctx[6],
59				scale: /*scale*/ ctx[7],
60				link: /*link*/ ctx[9],
61				icon: /*icon*/ ctx[8],
62				min_width: /*min_width*/ ctx[10],
63				visible: /*visible*/ ctx[2],
64				disabled: !/*interactive*/ ctx[5],
65				$$slots: { default: [create_default_slot] },
66				$$scope: { ctx }
67			}
68		});
69
70	button.$on("click", /*click_handler*/ ctx[12]);
71
72	return {
73		c() {
74			create_component(button.$$.fragment);
75		},
76		m(target, anchor) {
77			mount_component(button, target, anchor);
78			current = true;
79		},
80		p(ctx, [dirty]) {
81			const button_changes = {};
82			if (dirty & /*value*/ 8) button_changes.value = /*value*/ ctx[3];
83			if (dirty & /*variant*/ 16) button_changes.variant = /*variant*/ ctx[4];
84			if (dirty & /*elem_id*/ 1) button_changes.elem_id = /*elem_id*/ ctx[0];
85			if (dirty & /*elem_classes*/ 2) button_changes.elem_classes = /*elem_classes*/ ctx[1];
86			if (dirty & /*size*/ 64) button_changes.size = /*size*/ ctx[6];
87			if (dirty & /*scale*/ 128) button_changes.scale = /*scale*/ ctx[7];
88			if (dirty & /*link*/ 512) button_changes.link = /*link*/ ctx[9];
89			if (dirty & /*icon*/ 256) button_changes.icon = /*icon*/ ctx[8];
90			if (dirty & /*min_width*/ 1024) button_changes.min_width = /*min_width*/ ctx[10];
91			if (dirty & /*visible*/ 4) button_changes.visible = /*visible*/ ctx[2];
92			if (dirty & /*interactive*/ 32) button_changes.disabled = !/*interactive*/ ctx[5];
93
94			if (dirty & /*$$scope, value, gradio*/ 10248) {
95				button_changes.$$scope = { dirty, ctx };
96			}
97
98			button.$set(button_changes);
99		},
100		i(local) {
101			if (current) return;
102			transition_in(button.$$.fragment, local);
103			current = true;
104		},
105		o(local) {
106			transition_out(button.$$.fragment, local);
107			current = false;
108		},
109		d(detaching) {
110			destroy_component(button, detaching);
111		}
112	};
113}
114
115function instance($$self, $$props, $$invalidate) {
116	let { elem_id = "" } = $$props;
117	let { elem_classes = [] } = $$props;
118	let { visible = true } = $$props;
119	let { value } = $$props;
120	let { variant = "secondary" } = $$props;
121	let { interactive } = $$props;
122	let { size = "lg" } = $$props;
123	let { scale = null } = $$props;
124	let { icon = null } = $$props;
125	let { link = null } = $$props;
126	let { min_width = undefined } = $$props;
127	let { gradio } = $$props;
128	const click_handler = () => gradio.dispatch("click");
129
130	$$self.$$set = $$props => {
131		if ('elem_id' in $$props) $$invalidate(0, elem_id = $$props.elem_id);
132		if ('elem_classes' in $$props) $$invalidate(1, elem_classes = $$props.elem_classes);
133		if ('visible' in $$props) $$invalidate(2, visible = $$props.visible);
134		if ('value' in $$props) $$invalidate(3, value = $$props.value);
135		if ('variant' in $$props) $$invalidate(4, variant = $$props.variant);
136		if ('interactive' in $$props) $$invalidate(5, interactive = $$props.interactive);
137		if ('size' in $$props) $$invalidate(6, size = $$props.size);
138		if ('scale' in $$props) $$invalidate(7, scale = $$props.scale);
139		if ('icon' in $$props) $$invalidate(8, icon = $$props.icon);
140		if ('link' in $$props) $$invalidate(9, link = $$props.link);
141		if ('min_width' in $$props) $$invalidate(10, min_width = $$props.min_width);
142		if ('gradio' in $$props) $$invalidate(11, gradio = $$props.gradio);
143	};
144
145	return [
146		elem_id,
147		elem_classes,
148		visible,
149		value,
150		variant,
151		interactive,
152		size,
153		scale,
154		icon,
155		link,
156		min_width,
157		gradio,
158		click_handler
159	];
160}
161
162class Index extends SvelteComponent {
163	constructor(options) {
164		super();
165
166		init(this, options, instance, create_fragment, safe_not_equal, {
167			elem_id: 0,
168			elem_classes: 1,
169			visible: 2,
170			value: 3,
171			variant: 4,
172			interactive: 5,
173			size: 6,
174			scale: 7,
175			icon: 8,
176			link: 9,
177			min_width: 10,
178			gradio: 11
179		});
180	}
181}
182
183export { Button as BaseButton, Index as default };
184//# sourceMappingURL=Index-37392b60.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.