PageSourceSearch

https://merve-owlv2.hf.space/assets/Index-0d7ad3de.js

js merve-owlv2.hf.space collected 2026-10-03 10:22:01 UTC 2,899 bytes, 116 lines download raw bytes

1const Index_svelte_svelte_type_style_lang = '';
2
3/* home/runner/work/gradio/gradio/js/form/Index.svelte generated by Svelte v4.2.2 */
4const {
5	SvelteComponent,
6	attr,
7	create_slot,
8	detach,
9	element,
10	get_all_dirty_from_scope,
11	get_slot_changes,
12	init,
13	insert,
14	safe_not_equal,
15	set_style,
16	toggle_class,
17	transition_in,
18	transition_out,
19	update_slot_base
20} = window.__gradio__svelte__internal;
21function create_fragment(ctx) {
22	let div;
23	let current;
24	const default_slot_template = /*#slots*/ ctx[4].default;
25	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
26
27	return {
28		c() {
29			div = element("div");
30			if (default_slot) default_slot.c();
31			attr(div, "class", "form svelte-sfqy0y");
32			toggle_class(div, "hidden", !/*visible*/ ctx[0]);
33			set_style(div, "flex-grow", /*scale*/ ctx[1]);
34			set_style(div, "min-width", `calc(min(${/*min_width*/ ctx[2]}px, 100%))`);
35		},
36		m(target, anchor) {
37			insert(target, div, anchor);
38
39			if (default_slot) {
40				default_slot.m(div, null);
41			}
42
43			current = true;
44		},
45		p(ctx, [dirty]) {
46			if (default_slot) {
47				if (default_slot.p && (!current || dirty & /*$$scope*/ 8)) {
48					update_slot_base(
49						default_slot,
50						default_slot_template,
51						ctx,
52						/*$$scope*/ ctx[3],
53						!current
54						? get_all_dirty_from_scope(/*$$scope*/ ctx[3])
55						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[3], dirty, null),
56						null
57					);
58				}
59			}
60
61			if (!current || dirty & /*visible*/ 1) {
62				toggle_class(div, "hidden", !/*visible*/ ctx[0]);
63			}
64
65			if (dirty & /*scale*/ 2) {
66				set_style(div, "flex-grow", /*scale*/ ctx[1]);
67			}
68
69			if (dirty & /*min_width*/ 4) {
70				set_style(div, "min-width", `calc(min(${/*min_width*/ ctx[2]}px, 100%))`);
71			}
72		},
73		i(local) {
74			if (current) return;
75			transition_in(default_slot, local);
76			current = true;
77		},
78		o(local) {
79			transition_out(default_slot, local);
80			current = false;
81		},
82		d(detaching) {
83			if (detaching) {
84				detach(div);
85			}
86
87			if (default_slot) default_slot.d(detaching);
88		}
89	};
90}
91
92function instance($$self, $$props, $$invalidate) {
93	let { $$slots: slots = {}, $$scope } = $$props;
94	let { visible = true } = $$props;
95	let { scale = null } = $$props;
96	let { min_width = 0 } = $$props;
97
98	$$self.$$set = $$props => {
99		if ('visible' in $$props) $$invalidate(0, visible = $$props.visible);
100		if ('scale' in $$props) $$invalidate(1, scale = $$props.scale);
101		if ('min_width' in $$props) $$invalidate(2, min_width = $$props.min_width);
102		if ('$$scope' in $$props) $$invalidate(3, $$scope = $$props.$$scope);
103	};
104
105	return [visible, scale, min_width, $$scope, slots];
106}
107
108class Index extends SvelteComponent {
109	constructor(options) {
110		super();
111		init(this, options, instance, create_fragment, safe_not_equal, { visible: 0, scale: 1, min_width: 2 });
112	}
113}
114
115export { Index as default };
116//# sourceMappingURL=Index-0d7ad3de.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.