Spaces:
Runtime error
Runtime error
OpenHathi-SI-v0.1
/
env
/Lib
/site-packages
/gradio
/templates
/frontend
/assets
/Example-5a888e08.js
| const Example_svelte_svelte_type_style_lang = ''; | |
| /* home/runner/work/gradio/gradio/js/checkboxgroup/Example.svelte generated by Svelte v4.2.2 */ | |
| const { | |
| SvelteComponent, | |
| attr, | |
| destroy_each, | |
| detach, | |
| element, | |
| empty, | |
| ensure_array_like, | |
| init, | |
| insert, | |
| noop, | |
| safe_not_equal, | |
| set_data, | |
| text, | |
| toggle_class | |
| } = window.__gradio__svelte__internal; | |
| function get_each_context(ctx, list, i) { | |
| const child_ctx = ctx.slice(); | |
| child_ctx[3] = list[i]; | |
| child_ctx[5] = i; | |
| return child_ctx; | |
| } | |
| // (11:50) {#if i !== value.length - 1} | |
| function create_if_block(ctx) { | |
| let t; | |
| return { | |
| c() { | |
| t = text(", "); | |
| }, | |
| m(target, anchor) { | |
| insert(target, t, anchor); | |
| }, | |
| d(detaching) { | |
| if (detaching) { | |
| detach(t); | |
| } | |
| } | |
| }; | |
| } | |
| // (11:1) {#each value as check, i} | |
| function create_each_block(ctx) { | |
| let t_value = /*check*/ ctx[3].toLocaleString() + ""; | |
| let t; | |
| let if_block_anchor; | |
| let if_block = /*i*/ ctx[5] !== /*value*/ ctx[0].length - 1 && create_if_block(); | |
| return { | |
| c() { | |
| t = text(t_value); | |
| if (if_block) if_block.c(); | |
| if_block_anchor = empty(); | |
| }, | |
| m(target, anchor) { | |
| insert(target, t, anchor); | |
| if (if_block) if_block.m(target, anchor); | |
| insert(target, if_block_anchor, anchor); | |
| }, | |
| p(ctx, dirty) { | |
| if (dirty & /*value*/ 1 && t_value !== (t_value = /*check*/ ctx[3].toLocaleString() + "")) set_data(t, t_value); | |
| if (/*i*/ ctx[5] !== /*value*/ ctx[0].length - 1) { | |
| if (if_block) ; else { | |
| if_block = create_if_block(); | |
| if_block.c(); | |
| if_block.m(if_block_anchor.parentNode, if_block_anchor); | |
| } | |
| } else if (if_block) { | |
| if_block.d(1); | |
| if_block = null; | |
| } | |
| }, | |
| d(detaching) { | |
| if (detaching) { | |
| detach(t); | |
| detach(if_block_anchor); | |
| } | |
| if (if_block) if_block.d(detaching); | |
| } | |
| }; | |
| } | |
| function create_fragment(ctx) { | |
| let div; | |
| let each_value = ensure_array_like(/*value*/ ctx[0]); | |
| let each_blocks = []; | |
| for (let i = 0; i < each_value.length; i += 1) { | |
| each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); | |
| } | |
| return { | |
| c() { | |
| div = element("div"); | |
| for (let i = 0; i < each_blocks.length; i += 1) { | |
| each_blocks[i].c(); | |
| } | |
| attr(div, "class", "svelte-1ayixqk"); | |
| toggle_class(div, "table", /*type*/ ctx[1] === "table"); | |
| toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); | |
| toggle_class(div, "selected", /*selected*/ ctx[2]); | |
| }, | |
| m(target, anchor) { | |
| insert(target, div, anchor); | |
| for (let i = 0; i < each_blocks.length; i += 1) { | |
| if (each_blocks[i]) { | |
| each_blocks[i].m(div, null); | |
| } | |
| } | |
| }, | |
| p(ctx, [dirty]) { | |
| if (dirty & /*value*/ 1) { | |
| each_value = ensure_array_like(/*value*/ ctx[0]); | |
| let i; | |
| for (i = 0; i < each_value.length; i += 1) { | |
| const child_ctx = get_each_context(ctx, each_value, i); | |
| if (each_blocks[i]) { | |
| each_blocks[i].p(child_ctx, dirty); | |
| } else { | |
| each_blocks[i] = create_each_block(child_ctx); | |
| each_blocks[i].c(); | |
| each_blocks[i].m(div, null); | |
| } | |
| } | |
| for (; i < each_blocks.length; i += 1) { | |
| each_blocks[i].d(1); | |
| } | |
| each_blocks.length = each_value.length; | |
| } | |
| if (dirty & /*type*/ 2) { | |
| toggle_class(div, "table", /*type*/ ctx[1] === "table"); | |
| } | |
| if (dirty & /*type*/ 2) { | |
| toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery"); | |
| } | |
| if (dirty & /*selected*/ 4) { | |
| toggle_class(div, "selected", /*selected*/ ctx[2]); | |
| } | |
| }, | |
| i: noop, | |
| o: noop, | |
| d(detaching) { | |
| if (detaching) { | |
| detach(div); | |
| } | |
| destroy_each(each_blocks, detaching); | |
| } | |
| }; | |
| } | |
| function instance($$self, $$props, $$invalidate) { | |
| let { value } = $$props; | |
| let { type } = $$props; | |
| let { selected = false } = $$props; | |
| $$self.$$set = $$props => { | |
| if ('value' in $$props) $$invalidate(0, value = $$props.value); | |
| if ('type' in $$props) $$invalidate(1, type = $$props.type); | |
| if ('selected' in $$props) $$invalidate(2, selected = $$props.selected); | |
| }; | |
| return [value, type, selected]; | |
| } | |
| class Example extends SvelteComponent { | |
| constructor(options) { | |
| super(); | |
| init(this, options, instance, create_fragment, safe_not_equal, { value: 0, type: 1, selected: 2 }); | |
| } | |
| } | |
| export { Example as default }; | |
| //# sourceMappingURL=Example-5a888e08.js.map | |