PageSourceSearch

https://nielsr-trocr-scene-text-recognition.hf.space/assets/index.32b77d49.js

js nielsr-trocr-scene-text-recognition.hf.space collected 2026-10-03 10:22:51 UTC 4,089 bytes, 158 lines download raw bytes

1import { S as SvelteComponent, i as init, s as safe_not_equal, H as binding_callbacks, N as bind, c as create_component, m as mount_component, K as add_flush_callback, j as transition_in, k as transition_out, o as destroy_component, E as createEventDispatcher, p as create_slot, u as update_slot_base, q as get_all_dirty_from_scope, r as get_slot_changes, J as bubble } from './index.aa663a61.js';
2import { T as Tabs } from './Tabs.31c6bd6f.js';
3import './Column.492c3e22.js';
4import './styles.c72835fa.js';
5
6/* src/components/Tabs/Tabs.svelte generated by Svelte v3.49.0 */
7
8function create_default_slot(ctx) {
9	let current;
10	const default_slot_template = /*#slots*/ ctx[2].default;
11	const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[5], null);
12
13	return {
14		c() {
15			if (default_slot) default_slot.c();
16		},
17		m(target, anchor) {
18			if (default_slot) {
19				default_slot.m(target, anchor);
20			}
21
22			current = true;
23		},
24		p(ctx, dirty) {
25			if (default_slot) {
26				if (default_slot.p && (!current || dirty & /*$$scope*/ 32)) {
27					update_slot_base(
28						default_slot,
29						default_slot_template,
30						ctx,
31						/*$$scope*/ ctx[5],
32						!current
33						? get_all_dirty_from_scope(/*$$scope*/ ctx[5])
34						: get_slot_changes(default_slot_template, /*$$scope*/ ctx[5], dirty, null),
35						null
36					);
37				}
38			}
39		},
40		i(local) {
41			if (current) return;
42			transition_in(default_slot, local);
43			current = true;
44		},
45		o(local) {
46			transition_out(default_slot, local);
47			current = false;
48		},
49		d(detaching) {
50			if (default_slot) default_slot.d(detaching);
51		}
52	};
53}
54
55function create_fragment(ctx) {
56	let tabs;
57	let updating_selected;
58	let current;
59
60	function tabs_selected_binding(value) {
61		/*tabs_selected_binding*/ ctx[3](value);
62	}
63
64	let tabs_props = {
65		elem_id: /*elem_id*/ ctx[1],
66		$$slots: { default: [create_default_slot] },
67		$$scope: { ctx }
68	};
69
70	if (/*selected*/ ctx[0] !== void 0) {
71		tabs_props.selected = /*selected*/ ctx[0];
72	}
73
74	tabs = new Tabs({ props: tabs_props });
75	binding_callbacks.push(() => bind(tabs, 'selected', tabs_selected_binding));
76	tabs.$on("change", /*change_handler*/ ctx[4]);
77
78	return {
79		c() {
80			create_component(tabs.$$.fragment);
81		},
82		m(target, anchor) {
83			mount_component(tabs, target, anchor);
84			current = true;
85		},
86		p(ctx, [dirty]) {
87			const tabs_changes = {};
88			if (dirty & /*elem_id*/ 2) tabs_changes.elem_id = /*elem_id*/ ctx[1];
89
90			if (dirty & /*$$scope*/ 32) {
91				tabs_changes.$$scope = { dirty, ctx };
92			}
93
94			if (!updating_selected && dirty & /*selected*/ 1) {
95				updating_selected = true;
96				tabs_changes.selected = /*selected*/ ctx[0];
97				add_flush_callback(() => updating_selected = false);
98			}
99
100			tabs.$set(tabs_changes);
101		},
102		i(local) {
103			if (current) return;
104			transition_in(tabs.$$.fragment, local);
105			current = true;
106		},
107		o(local) {
108			transition_out(tabs.$$.fragment, local);
109			current = false;
110		},
111		d(detaching) {
112			destroy_component(tabs, detaching);
113		}
114	};
115}
116
117function instance($$self, $$props, $$invalidate) {
118	let { $$slots: slots = {}, $$scope } = $$props;
119	const dispatch = createEventDispatcher();
120	let { elem_id = "" } = $$props;
121	let { selected } = $$props;
122
123	function tabs_selected_binding(value) {
124		selected = value;
125		$$invalidate(0, selected);
126	}
127
128	function change_handler(event) {
129		bubble.call(this, $$self, event);
130	}
131
132	$$self.$$set = $$props => {
133		if ('elem_id' in $$props) $$invalidate(1, elem_id = $$props.elem_id);
134		if ('selected' in $$props) $$invalidate(0, selected = $$props.selected);
135		if ('$$scope' in $$props) $$invalidate(5, $$scope = $$props.$$scope);
136	};
137
138	$$self.$$.update = () => {
139		if ($$self.$$.dirty & /*selected*/ 1) {
140			dispatch("prop_change", { selected });
141		}
142	};
143
144	return [selected, elem_id, slots, tabs_selected_binding, change_handler, $$scope];
145}
146
147class Tabs_1 extends SvelteComponent {
148	constructor(options) {
149		super();
150		init(this, options, instance, create_fragment, safe_not_equal, { elem_id: 1, selected: 0 });
151	}
152}
153
154var Tabs_1$1 = Tabs_1;
155
156const modes = ["static"];
157
158export { Tabs_1$1 as Component, modes };

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.