diff --git "a/src/backend/gradio_image_annotation/templates/component/index.js" "b/src/backend/gradio_image_annotation/templates/component/index.js" --- "a/src/backend/gradio_image_annotation/templates/component/index.js" +++ "b/src/backend/gradio_image_annotation/templates/component/index.js" @@ -1,28 +1,28 @@ const { - SvelteComponent: df, - assign: hf, - create_slot: mf, - detach: gf, - element: bf, - get_all_dirty_from_scope: wf, - get_slot_changes: pf, - get_spread_update: vf, - init: kf, - insert: yf, - safe_not_equal: Cf, - set_dynamic_element_data: Ps, + SvelteComponent: mf, + assign: gf, + create_slot: bf, + detach: wf, + element: pf, + get_all_dirty_from_scope: vf, + get_slot_changes: kf, + get_spread_update: yf, + init: Cf, + insert: Sf, + safe_not_equal: zf, + set_dynamic_element_data: Zs, set_style: Ye, - toggle_class: rt, - transition_in: Na, - transition_out: Oa, - update_slot_base: Sf + toggle_class: at, + transition_in: Pa, + transition_out: Za, + update_slot_base: Bf } = window.__gradio__svelte__internal; -function zf(i) { +function Df(i) { let e, t, n; const l = ( /*#slots*/ i[18].default - ), s = mf( + ), s = bf( l, i, /*$$scope*/ @@ -44,36 +44,36 @@ function zf(i) { } ], r = {}; for (let a = 0; a < o.length; a += 1) - r = hf(r, o[a]); + r = gf(r, o[a]); return { c() { - e = bf( + e = pf( /*tag*/ i[14] - ), s && s.c(), Ps( + ), s && s.c(), Zs( /*tag*/ i[14] - )(e, r), rt( + )(e, r), at( e, "hidden", /*visible*/ i[10] === !1 - ), rt( + ), at( e, "padded", /*padding*/ i[6] - ), rt( + ), at( e, "border_focus", /*border_mode*/ i[5] === "focus" - ), rt( + ), at( e, "border_contrast", /*border_mode*/ i[5] === "contrast" - ), rt(e, "hide-container", !/*explicit_call*/ + ), at(e, "hide-container", !/*explicit_call*/ i[8] && !/*container*/ i[9]), Ye( e, @@ -110,31 +110,31 @@ function zf(i) { i[13]}px, 100%))`), Ye(e, "border-width", "var(--block-border-width)"); }, m(a, f) { - yf(a, e, f), s && s.m(e, null), n = !0; + Sf(a, e, f), s && s.m(e, null), n = !0; }, p(a, f) { s && s.p && (!n || f & /*$$scope*/ - 131072) && Sf( + 131072) && Bf( s, l, a, /*$$scope*/ a[17], - n ? pf( + n ? kf( l, /*$$scope*/ a[17], f, null - ) : wf( + ) : vf( /*$$scope*/ a[17] ), null - ), Ps( + ), Zs( /*tag*/ a[14] - )(e, r = vf(o, [ + )(e, r = yf(o, [ (!n || f & /*test_id*/ 128) && { "data-testid": ( /*test_id*/ @@ -148,27 +148,27 @@ function zf(i) { (!n || f & /*elem_classes*/ 8 && t !== (t = "block " + /*elem_classes*/ a[3].join(" ") + " svelte-nl1om8")) && { class: t } - ])), rt( + ])), at( e, "hidden", /*visible*/ a[10] === !1 - ), rt( + ), at( e, "padded", /*padding*/ a[6] - ), rt( + ), at( e, "border_focus", /*border_mode*/ a[5] === "focus" - ), rt( + ), at( e, "border_contrast", /*border_mode*/ a[5] === "contrast" - ), rt(e, "hide-container", !/*explicit_call*/ + ), at(e, "hide-container", !/*explicit_call*/ a[8] && !/*container*/ a[9]), f & /*height*/ 1 && Ye( @@ -211,20 +211,20 @@ function zf(i) { a[13]}px, 100%))`); }, i(a) { - n || (Na(s, a), n = !0); + n || (Pa(s, a), n = !0); }, o(a) { - Oa(s, a), n = !1; + Za(s, a), n = !1; }, d(a) { - a && gf(e), s && s.d(a); + a && wf(e), s && s.d(a); } }; } -function Bf(i) { +function qf(i) { let e, t = ( /*tag*/ - i[14] && zf(i) + i[14] && Df(i) ); return { c() { @@ -238,17 +238,17 @@ function Bf(i) { n[14] && t.p(n, l); }, i(n) { - e || (Na(t, n), e = !0); + e || (Pa(t, n), e = !0); }, o(n) { - Oa(t, n), e = !1; + Za(t, n), e = !1; }, d(n) { t && t.d(n); } }; } -function Df(i, e, t) { +function Lf(i, e, t) { let { $$slots: n = {}, $$scope: l } = e, { height: s = void 0 } = e, { width: o = void 0 } = e, { elem_id: r = "" } = e, { elem_classes: a = [] } = e, { variant: f = "solid" } = e, { border_mode: c = "base" } = e, { padding: u = !0 } = e, { type: _ = "normal" } = e, { test_id: d = void 0 } = e, { explicit_call: m = !1 } = e, { container: h = !0 } = e, { visible: g = !0 } = e, { allow_overflow: p = !0 } = e, { scale: w = null } = e, { min_width: b = 0 } = e, k = _ === "fieldset" ? "fieldset" : "div"; const v = (y) => { if (y !== void 0) { @@ -282,9 +282,9 @@ function Df(i, e, t) { n ]; } -class qf extends df { +class Mf extends mf { constructor(e) { - super(), kf(this, e, Df, Bf, Cf, { + super(), Cf(this, e, Lf, qf, zf, { height: 0, width: 1, elem_id: 2, @@ -304,26 +304,26 @@ class qf extends df { } } const { - SvelteComponent: Lf, - attr: Mf, - create_slot: Ef, - detach: Rf, - element: Af, - get_all_dirty_from_scope: Wf, - get_slot_changes: Xf, - init: Yf, - insert: If, - safe_not_equal: Hf, - transition_in: Tf, - transition_out: jf, - update_slot_base: Ff + SvelteComponent: Ef, + attr: Rf, + create_slot: Af, + detach: Wf, + element: Xf, + get_all_dirty_from_scope: Yf, + get_slot_changes: If, + init: Hf, + insert: Tf, + safe_not_equal: jf, + transition_in: Ff, + transition_out: Uf, + update_slot_base: Vf } = window.__gradio__svelte__internal; -function Uf(i) { +function Nf(i) { let e, t; const n = ( /*#slots*/ i[1].default - ), l = Ef( + ), l = Af( n, i, /*$$scope*/ @@ -332,26 +332,26 @@ function Uf(i) { ); return { c() { - e = Af("div"), l && l.c(), Mf(e, "class", "svelte-1hnfib2"); + e = Xf("div"), l && l.c(), Rf(e, "class", "svelte-1hnfib2"); }, m(s, o) { - If(s, e, o), l && l.m(e, null), t = !0; + Tf(s, e, o), l && l.m(e, null), t = !0; }, p(s, [o]) { l && l.p && (!t || o & /*$$scope*/ - 1) && Ff( + 1) && Vf( l, n, s, /*$$scope*/ s[0], - t ? Xf( + t ? If( n, /*$$scope*/ s[0], o, null - ) : Wf( + ) : Yf( /*$$scope*/ s[0] ), @@ -359,65 +359,65 @@ function Uf(i) { ); }, i(s) { - t || (Tf(l, s), t = !0); + t || (Ff(l, s), t = !0); }, o(s) { - jf(l, s), t = !1; + Uf(l, s), t = !1; }, d(s) { - s && Rf(e), l && l.d(s); + s && Wf(e), l && l.d(s); } }; } -function Vf(i, e, t) { +function Of(i, e, t) { let { $$slots: n = {}, $$scope: l } = e; return i.$$set = (s) => { "$$scope" in s && t(0, l = s.$$scope); }, [l, n]; } -class Nf extends Lf { +class Pf extends Ef { constructor(e) { - super(), Yf(this, e, Vf, Uf, Hf, {}); + super(), Hf(this, e, Of, Nf, jf, {}); } } const { - SvelteComponent: Of, - attr: Zs, - check_outros: Pf, - create_component: Zf, - create_slot: Gf, - destroy_component: Kf, + SvelteComponent: Zf, + attr: Gs, + check_outros: Gf, + create_component: Kf, + create_slot: Jf, + destroy_component: Qf, detach: Ui, - element: Jf, - empty: Qf, - get_all_dirty_from_scope: xf, - get_slot_changes: $f, - group_outros: ec, - init: tc, + element: xf, + empty: $f, + get_all_dirty_from_scope: ec, + get_slot_changes: tc, + group_outros: nc, + init: ic, insert: Vi, - mount_component: nc, - safe_not_equal: ic, - set_data: lc, - space: sc, - text: oc, - toggle_class: Sn, - transition_in: ii, + mount_component: lc, + safe_not_equal: sc, + set_data: oc, + space: ac, + text: rc, + toggle_class: zn, + transition_in: li, transition_out: Ni, - update_slot_base: ac + update_slot_base: fc } = window.__gradio__svelte__internal; -function Gs(i) { +function Ks(i) { let e, t; - return e = new Nf({ + return e = new Pf({ props: { - $$slots: { default: [rc] }, + $$slots: { default: [cc] }, $$scope: { ctx: i } } }), { c() { - Zf(e.$$.fragment); + Kf(e.$$.fragment); }, m(n, l) { - nc(e, n, l), t = !0; + lc(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -425,21 +425,21 @@ function Gs(i) { 10 && (s.$$scope = { dirty: l, ctx: n }), e.$set(s); }, i(n) { - t || (ii(e.$$.fragment, n), t = !0); + t || (li(e.$$.fragment, n), t = !0); }, o(n) { Ni(e.$$.fragment, n), t = !1; }, d(n) { - Kf(e, n); + Qf(e, n); } }; } -function rc(i) { +function cc(i) { let e; return { c() { - e = oc( + e = rc( /*info*/ i[1] ); @@ -449,7 +449,7 @@ function rc(i) { }, p(t, n) { n & /*info*/ - 2 && lc( + 2 && oc( e, /*info*/ t[1] @@ -460,12 +460,12 @@ function rc(i) { } }; } -function fc(i) { +function uc(i) { let e, t, n, l; const s = ( /*#slots*/ i[2].default - ), o = Gf( + ), o = Jf( s, i, /*$$scope*/ @@ -474,13 +474,13 @@ function fc(i) { ); let r = ( /*info*/ - i[1] && Gs(i) + i[1] && Ks(i) ); return { c() { - e = Jf("span"), o && o.c(), t = sc(), r && r.c(), n = Qf(), Zs(e, "data-testid", "block-info"), Zs(e, "class", "svelte-22c38v"), Sn(e, "sr-only", !/*show_label*/ - i[0]), Sn(e, "hide", !/*show_label*/ - i[0]), Sn( + e = xf("span"), o && o.c(), t = ac(), r && r.c(), n = $f(), Gs(e, "data-testid", "block-info"), Gs(e, "class", "svelte-22c38v"), zn(e, "sr-only", !/*show_label*/ + i[0]), zn(e, "hide", !/*show_label*/ + i[0]), zn( e, "has-info", /*info*/ @@ -492,41 +492,41 @@ function fc(i) { }, p(a, [f]) { o && o.p && (!l || f & /*$$scope*/ - 8) && ac( + 8) && fc( o, s, a, /*$$scope*/ a[3], - l ? $f( + l ? tc( s, /*$$scope*/ a[3], f, null - ) : xf( + ) : ec( /*$$scope*/ a[3] ), null ), (!l || f & /*show_label*/ - 1) && Sn(e, "sr-only", !/*show_label*/ + 1) && zn(e, "sr-only", !/*show_label*/ a[0]), (!l || f & /*show_label*/ - 1) && Sn(e, "hide", !/*show_label*/ + 1) && zn(e, "hide", !/*show_label*/ a[0]), (!l || f & /*info*/ - 2) && Sn( + 2) && zn( e, "has-info", /*info*/ a[1] != null ), /*info*/ a[1] ? r ? (r.p(a, f), f & /*info*/ - 2 && ii(r, 1)) : (r = Gs(a), r.c(), ii(r, 1), r.m(n.parentNode, n)) : r && (ec(), Ni(r, 1, 1, () => { + 2 && li(r, 1)) : (r = Ks(a), r.c(), li(r, 1), r.m(n.parentNode, n)) : r && (nc(), Ni(r, 1, 1, () => { r = null; - }), Pf()); + }), Gf()); }, i(a) { - l || (ii(o, a), ii(r), l = !0); + l || (li(o, a), li(r), l = !0); }, o(a) { Ni(o, a), Ni(r), l = !1; @@ -536,52 +536,52 @@ function fc(i) { } }; } -function cc(i, e, t) { +function _c(i, e, t) { let { $$slots: n = {}, $$scope: l } = e, { show_label: s = !0 } = e, { info: o = void 0 } = e; return i.$$set = (r) => { "show_label" in r && t(0, s = r.show_label), "info" in r && t(1, o = r.info), "$$scope" in r && t(3, l = r.$$scope); }, [s, o, n, l]; } -class Pa extends Of { +class Ga extends Zf { constructor(e) { - super(), tc(this, e, cc, fc, ic, { show_label: 0, info: 1 }); + super(), ic(this, e, _c, uc, sc, { show_label: 0, info: 1 }); } } const { - SvelteComponent: uc, + SvelteComponent: dc, append: Cl, attr: yi, - create_component: _c, - destroy_component: dc, - detach: hc, - element: Ks, - init: mc, - insert: gc, - mount_component: bc, - safe_not_equal: wc, - set_data: pc, - space: vc, - text: kc, - toggle_class: Tt, - transition_in: yc, - transition_out: Cc + create_component: hc, + destroy_component: mc, + detach: gc, + element: Js, + init: bc, + insert: wc, + mount_component: pc, + safe_not_equal: vc, + set_data: kc, + space: yc, + text: Cc, + toggle_class: jt, + transition_in: Sc, + transition_out: zc } = window.__gradio__svelte__internal; -function Sc(i) { +function Bc(i) { let e, t, n, l, s, o; return n = new /*Icon*/ i[1]({}), { c() { - e = Ks("label"), t = Ks("span"), _c(n.$$.fragment), l = vc(), s = kc( + e = Js("label"), t = Js("span"), hc(n.$$.fragment), l = yc(), s = Cc( /*label*/ i[0] - ), yi(t, "class", "svelte-9gxdi0"), yi(e, "for", ""), yi(e, "data-testid", "block-label"), yi(e, "class", "svelte-9gxdi0"), Tt(e, "hide", !/*show_label*/ - i[2]), Tt(e, "sr-only", !/*show_label*/ - i[2]), Tt( + ), yi(t, "class", "svelte-9gxdi0"), yi(e, "for", ""), yi(e, "data-testid", "block-label"), yi(e, "class", "svelte-9gxdi0"), jt(e, "hide", !/*show_label*/ + i[2]), jt(e, "sr-only", !/*show_label*/ + i[2]), jt( e, "float", /*float*/ i[4] - ), Tt( + ), jt( e, "hide-label", /*disable*/ @@ -589,26 +589,26 @@ function Sc(i) { ); }, m(r, a) { - gc(r, e, a), Cl(e, t), bc(n, t, null), Cl(e, l), Cl(e, s), o = !0; + wc(r, e, a), Cl(e, t), pc(n, t, null), Cl(e, l), Cl(e, s), o = !0; }, p(r, [a]) { (!o || a & /*label*/ - 1) && pc( + 1) && kc( s, /*label*/ r[0] ), (!o || a & /*show_label*/ - 4) && Tt(e, "hide", !/*show_label*/ + 4) && jt(e, "hide", !/*show_label*/ r[2]), (!o || a & /*show_label*/ - 4) && Tt(e, "sr-only", !/*show_label*/ + 4) && jt(e, "sr-only", !/*show_label*/ r[2]), (!o || a & /*float*/ - 16) && Tt( + 16) && jt( e, "float", /*float*/ r[4] ), (!o || a & /*disable*/ - 8) && Tt( + 8) && jt( e, "hide-label", /*disable*/ @@ -616,25 +616,25 @@ function Sc(i) { ); }, i(r) { - o || (yc(n.$$.fragment, r), o = !0); + o || (Sc(n.$$.fragment, r), o = !0); }, o(r) { - Cc(n.$$.fragment, r), o = !1; + zc(n.$$.fragment, r), o = !1; }, d(r) { - r && hc(e), dc(n); + r && gc(e), mc(n); } }; } -function zc(i, e, t) { +function Dc(i, e, t) { let { label: n = null } = e, { Icon: l } = e, { show_label: s = !0 } = e, { disable: o = !1 } = e, { float: r = !0 } = e; return i.$$set = (a) => { "label" in a && t(0, n = a.label), "Icon" in a && t(1, l = a.Icon), "show_label" in a && t(2, s = a.show_label), "disable" in a && t(3, o = a.disable), "float" in a && t(4, r = a.float); }, [n, l, s, o, r]; } -class Bc extends uc { +class qc extends dc { constructor(e) { - super(), mc(this, e, zc, Sc, wc, { + super(), bc(this, e, Dc, Bc, vc, { label: 0, Icon: 1, show_label: 2, @@ -644,61 +644,61 @@ class Bc extends uc { } } const { - SvelteComponent: Dc, + SvelteComponent: Lc, append: _s, attr: Ct, - bubble: qc, - create_component: Lc, - destroy_component: Mc, - detach: Za, + bubble: Mc, + create_component: Ec, + destroy_component: Rc, + detach: Ka, element: ds, - init: Ec, - insert: Ga, - listen: Rc, - mount_component: Ac, - safe_not_equal: Wc, - set_data: Xc, - set_style: zn, - space: Yc, - text: Ic, + init: Ac, + insert: Ja, + listen: Wc, + mount_component: Xc, + safe_not_equal: Yc, + set_data: Ic, + set_style: Bn, + space: Hc, + text: Tc, toggle_class: ze, - transition_in: Hc, - transition_out: Tc + transition_in: jc, + transition_out: Fc } = window.__gradio__svelte__internal; -function Js(i) { +function Qs(i) { let e, t; return { c() { - e = ds("span"), t = Ic( + e = ds("span"), t = Tc( /*label*/ i[1] ), Ct(e, "class", "svelte-1lrphxw"); }, m(n, l) { - Ga(n, e, l), _s(e, t); + Ja(n, e, l), _s(e, t); }, p(n, l) { l & /*label*/ - 2 && Xc( + 2 && Ic( t, /*label*/ n[1] ); }, d(n) { - n && Za(e); + n && Ka(e); } }; } -function jc(i) { +function Uc(i) { let e, t, n, l, s, o, r, a = ( /*show_label*/ - i[2] && Js(i) + i[2] && Qs(i) ); return l = new /*Icon*/ i[0]({}), { c() { - e = ds("button"), a && a.c(), t = Yc(), n = ds("div"), Lc(l.$$.fragment), Ct(n, "class", "svelte-1lrphxw"), ze( + e = ds("button"), a && a.c(), t = Hc(), n = ds("div"), Ec(l.$$.fragment), Ct(n, "class", "svelte-1lrphxw"), ze( n, "small", /*size*/ @@ -749,16 +749,16 @@ function jc(i) { "transparent", /*transparent*/ i[9] - ), zn(e, "color", !/*disabled*/ + ), Bn(e, "color", !/*disabled*/ i[7] && /*_color*/ i[12] ? ( /*_color*/ i[12] - ) : "var(--block-label-text-color)"), zn(e, "--bg-color", /*disabled*/ + ) : "var(--block-label-text-color)"), Bn(e, "--bg-color", /*disabled*/ i[7] ? "auto" : ( /*background*/ i[10] - )), zn( + )), Bn( e, "margin-left", /*offset*/ @@ -766,7 +766,7 @@ function jc(i) { ); }, m(f, c) { - Ga(f, e, c), a && a.m(e, null), _s(e, t), _s(e, n), Ac(l, n, null), s = !0, o || (r = Rc( + Ja(f, e, c), a && a.m(e, null), _s(e, t), _s(e, n), Xc(l, n, null), s = !0, o || (r = Wc( e, "click", /*click_handler*/ @@ -775,7 +775,7 @@ function jc(i) { }, p(f, [c]) { /*show_label*/ - f[2] ? a ? a.p(f, c) : (a = Js(f), a.c(), a.m(e, t)) : a && (a.d(1), a = null), (!s || c & /*size*/ + f[2] ? a ? a.p(f, c) : (a = Qs(f), a.c(), a.m(e, t)) : a && (a.d(1), a = null), (!s || c & /*size*/ 16) && ze( n, "small", @@ -838,18 +838,18 @@ function jc(i) { /*transparent*/ f[9] ), c & /*disabled, _color*/ - 4224 && zn(e, "color", !/*disabled*/ + 4224 && Bn(e, "color", !/*disabled*/ f[7] && /*_color*/ f[12] ? ( /*_color*/ f[12] ) : "var(--block-label-text-color)"), c & /*disabled, background*/ - 1152 && zn(e, "--bg-color", /*disabled*/ + 1152 && Bn(e, "--bg-color", /*disabled*/ f[7] ? "auto" : ( /*background*/ f[10] )), c & /*offset*/ - 2048 && zn( + 2048 && Bn( e, "margin-left", /*offset*/ @@ -857,20 +857,20 @@ function jc(i) { ); }, i(f) { - s || (Hc(l.$$.fragment, f), s = !0); + s || (jc(l.$$.fragment, f), s = !0); }, o(f) { - Tc(l.$$.fragment, f), s = !1; + Fc(l.$$.fragment, f), s = !1; }, d(f) { - f && Za(e), a && a.d(), Mc(l), o = !1, r(); + f && Ka(e), a && a.d(), Rc(l), o = !1, r(); } }; } -function Fc(i, e, t) { +function Vc(i, e, t) { let n, { Icon: l } = e, { label: s = "" } = e, { show_label: o = !1 } = e, { pending: r = !1 } = e, { size: a = "small" } = e, { padded: f = !0 } = e, { highlight: c = !1 } = e, { disabled: u = !1 } = e, { hasPopup: _ = !1 } = e, { color: d = "var(--block-label-text-color)" } = e, { transparent: m = !1 } = e, { background: h = "var(--background-fill-primary)" } = e, { offset: g = 0 } = e; function p(w) { - qc.call(this, i, w); + Mc.call(this, i, w); } return i.$$set = (w) => { "Icon" in w && t(0, l = w.Icon), "label" in w && t(1, s = w.label), "show_label" in w && t(2, o = w.show_label), "pending" in w && t(3, r = w.pending), "size" in w && t(4, a = w.size), "padded" in w && t(5, f = w.padded), "highlight" in w && t(6, c = w.highlight), "disabled" in w && t(7, u = w.disabled), "hasPopup" in w && t(8, _ = w.hasPopup), "color" in w && t(13, d = w.color), "transparent" in w && t(9, m = w.transparent), "background" in w && t(10, h = w.background), "offset" in w && t(11, g = w.offset); @@ -895,9 +895,9 @@ function Fc(i, e, t) { p ]; } -class fl extends Dc { +class fl extends Lc { constructor(e) { - super(), Ec(this, e, Fc, jc, Wc, { + super(), Ac(this, e, Vc, Uc, Yc, { Icon: 0, label: 1, show_label: 2, @@ -915,29 +915,29 @@ class fl extends Dc { } } const { - SvelteComponent: Uc, - append: Vc, + SvelteComponent: Nc, + append: Oc, attr: Sl, - binding_callbacks: Nc, - create_slot: Oc, - detach: Pc, - element: Qs, - get_all_dirty_from_scope: Zc, - get_slot_changes: Gc, - init: Kc, - insert: Jc, - safe_not_equal: Qc, - toggle_class: jt, - transition_in: xc, - transition_out: $c, - update_slot_base: eu + binding_callbacks: Pc, + create_slot: Zc, + detach: Gc, + element: xs, + get_all_dirty_from_scope: Kc, + get_slot_changes: Jc, + init: Qc, + insert: xc, + safe_not_equal: $c, + toggle_class: Ft, + transition_in: eu, + transition_out: tu, + update_slot_base: nu } = window.__gradio__svelte__internal; -function tu(i) { +function iu(i) { let e, t, n; const l = ( /*#slots*/ i[5].default - ), s = Oc( + ), s = Zc( l, i, /*$$scope*/ @@ -946,22 +946,22 @@ function tu(i) { ); return { c() { - e = Qs("div"), t = Qs("div"), s && s.c(), Sl(t, "class", "icon svelte-3w3rth"), Sl(e, "class", "empty svelte-3w3rth"), Sl(e, "aria-label", "Empty value"), jt( + e = xs("div"), t = xs("div"), s && s.c(), Sl(t, "class", "icon svelte-3w3rth"), Sl(e, "class", "empty svelte-3w3rth"), Sl(e, "aria-label", "Empty value"), Ft( e, "small", /*size*/ i[0] === "small" - ), jt( + ), Ft( e, "large", /*size*/ i[0] === "large" - ), jt( + ), Ft( e, "unpadded_box", /*unpadded_box*/ i[1] - ), jt( + ), Ft( e, "small_parent", /*parent_height*/ @@ -969,47 +969,47 @@ function tu(i) { ); }, m(o, r) { - Jc(o, e, r), Vc(e, t), s && s.m(t, null), i[6](e), n = !0; + xc(o, e, r), Oc(e, t), s && s.m(t, null), i[6](e), n = !0; }, p(o, [r]) { s && s.p && (!n || r & /*$$scope*/ - 16) && eu( + 16) && nu( s, l, o, /*$$scope*/ o[4], - n ? Gc( + n ? Jc( l, /*$$scope*/ o[4], r, null - ) : Zc( + ) : Kc( /*$$scope*/ o[4] ), null ), (!n || r & /*size*/ - 1) && jt( + 1) && Ft( e, "small", /*size*/ o[0] === "small" ), (!n || r & /*size*/ - 1) && jt( + 1) && Ft( e, "large", /*size*/ o[0] === "large" ), (!n || r & /*unpadded_box*/ - 2) && jt( + 2) && Ft( e, "unpadded_box", /*unpadded_box*/ o[1] ), (!n || r & /*parent_height*/ - 8) && jt( + 8) && Ft( e, "small_parent", /*parent_height*/ @@ -1017,17 +1017,17 @@ function tu(i) { ); }, i(o) { - n || (xc(s, o), n = !0); + n || (eu(s, o), n = !0); }, o(o) { - $c(s, o), n = !1; + tu(s, o), n = !1; }, d(o) { - o && Pc(e), s && s.d(o), i[6](null); + o && Gc(e), s && s.d(o), i[6](null); } }; } -function nu(i, e, t) { +function lu(i, e, t) { let n, { $$slots: l = {}, $$scope: s } = e, { size: o = "small" } = e, { unpadded_box: r = !1 } = e, a; function f(u) { var _; @@ -1036,7 +1036,7 @@ function nu(i, e, t) { return d > m + 2; } function c(u) { - Nc[u ? "unshift" : "push"](() => { + Pc[u ? "unshift" : "push"](() => { a = u, t(2, a); }); } @@ -1047,476 +1047,476 @@ function nu(i, e, t) { 4 && t(3, n = f(a)); }, [o, r, a, n, s, l, c]; } -class iu extends Uc { +class su extends Nc { constructor(e) { - super(), Kc(this, e, nu, tu, Qc, { size: 0, unpadded_box: 1 }); + super(), Qc(this, e, lu, iu, $c, { size: 0, unpadded_box: 1 }); } } const { - SvelteComponent: lu, - append: xs, + SvelteComponent: ou, + append: $s, attr: Be, - detach: su, - init: ou, - insert: au, + detach: au, + init: ru, + insert: fu, noop: zl, - safe_not_equal: ru, + safe_not_equal: cu, svg_element: Bl } = window.__gradio__svelte__internal; -function fu(i) { +function uu(i) { let e, t, n; return { c() { e = Bl("svg"), t = Bl("path"), n = Bl("circle"), Be(t, "d", "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"), Be(n, "cx", "12"), Be(n, "cy", "13"), Be(n, "r", "4"), Be(e, "xmlns", "http://www.w3.org/2000/svg"), Be(e, "width", "100%"), Be(e, "height", "100%"), Be(e, "viewBox", "0 0 24 24"), Be(e, "fill", "none"), Be(e, "stroke", "currentColor"), Be(e, "stroke-width", "1.5"), Be(e, "stroke-linecap", "round"), Be(e, "stroke-linejoin", "round"), Be(e, "class", "feather feather-camera"); }, m(l, s) { - au(l, e, s), xs(e, t), xs(e, n); + fu(l, e, s), $s(e, t), $s(e, n); }, p: zl, i: zl, o: zl, d(l) { - l && su(e); + l && au(e); } }; } -class cu extends lu { +class _u extends ou { constructor(e) { - super(), ou(this, e, null, fu, ru, {}); + super(), ru(this, e, null, uu, cu, {}); } } const { - SvelteComponent: uu, - append: _u, - attr: xe, - detach: du, - init: hu, - insert: mu, + SvelteComponent: du, + append: hu, + attr: Qe, + detach: mu, + init: gu, + insert: bu, noop: Dl, - safe_not_equal: gu, - svg_element: $s + safe_not_equal: wu, + svg_element: eo } = window.__gradio__svelte__internal; -function bu(i) { +function pu(i) { let e, t; return { c() { - e = $s("svg"), t = $s("circle"), xe(t, "cx", "12"), xe(t, "cy", "12"), xe(t, "r", "10"), xe(e, "xmlns", "http://www.w3.org/2000/svg"), xe(e, "width", "100%"), xe(e, "height", "100%"), xe(e, "viewBox", "0 0 24 24"), xe(e, "stroke-width", "1.5"), xe(e, "stroke-linecap", "round"), xe(e, "stroke-linejoin", "round"), xe(e, "class", "feather feather-circle"); + e = eo("svg"), t = eo("circle"), Qe(t, "cx", "12"), Qe(t, "cy", "12"), Qe(t, "r", "10"), Qe(e, "xmlns", "http://www.w3.org/2000/svg"), Qe(e, "width", "100%"), Qe(e, "height", "100%"), Qe(e, "viewBox", "0 0 24 24"), Qe(e, "stroke-width", "1.5"), Qe(e, "stroke-linecap", "round"), Qe(e, "stroke-linejoin", "round"), Qe(e, "class", "feather feather-circle"); }, m(n, l) { - mu(n, e, l), _u(e, t); + bu(n, e, l), hu(e, t); }, p: Dl, i: Dl, o: Dl, d(n) { - n && du(e); + n && mu(e); } }; } -class wu extends uu { +class vu extends du { constructor(e) { - super(), hu(this, e, null, bu, gu, {}); + super(), gu(this, e, null, pu, wu, {}); } } const { - SvelteComponent: pu, + SvelteComponent: ku, append: ql, - attr: $e, - detach: vu, - init: ku, - insert: yu, + attr: xe, + detach: yu, + init: Cu, + insert: Su, noop: Ll, - safe_not_equal: Cu, - set_style: ft, + safe_not_equal: zu, + set_style: rt, svg_element: Ci } = window.__gradio__svelte__internal; -function Su(i) { +function Bu(i) { let e, t, n, l; return { c() { - e = Ci("svg"), t = Ci("g"), n = Ci("path"), l = Ci("path"), $e(n, "d", "M18,6L6.087,17.913"), ft(n, "fill", "none"), ft(n, "fill-rule", "nonzero"), ft(n, "stroke-width", "2px"), $e(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), $e(l, "d", "M4.364,4.364L19.636,19.636"), ft(l, "fill", "none"), ft(l, "fill-rule", "nonzero"), ft(l, "stroke-width", "2px"), $e(e, "width", "100%"), $e(e, "height", "100%"), $e(e, "viewBox", "0 0 24 24"), $e(e, "version", "1.1"), $e(e, "xmlns", "http://www.w3.org/2000/svg"), $e(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), $e(e, "xml:space", "preserve"), $e(e, "stroke", "currentColor"), ft(e, "fill-rule", "evenodd"), ft(e, "clip-rule", "evenodd"), ft(e, "stroke-linecap", "round"), ft(e, "stroke-linejoin", "round"); + e = Ci("svg"), t = Ci("g"), n = Ci("path"), l = Ci("path"), xe(n, "d", "M18,6L6.087,17.913"), rt(n, "fill", "none"), rt(n, "fill-rule", "nonzero"), rt(n, "stroke-width", "2px"), xe(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), xe(l, "d", "M4.364,4.364L19.636,19.636"), rt(l, "fill", "none"), rt(l, "fill-rule", "nonzero"), rt(l, "stroke-width", "2px"), xe(e, "width", "100%"), xe(e, "height", "100%"), xe(e, "viewBox", "0 0 24 24"), xe(e, "version", "1.1"), xe(e, "xmlns", "http://www.w3.org/2000/svg"), xe(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), xe(e, "xml:space", "preserve"), xe(e, "stroke", "currentColor"), rt(e, "fill-rule", "evenodd"), rt(e, "clip-rule", "evenodd"), rt(e, "stroke-linecap", "round"), rt(e, "stroke-linejoin", "round"); }, m(s, o) { - yu(s, e, o), ql(e, t), ql(t, n), ql(e, l); + Su(s, e, o), ql(e, t), ql(t, n), ql(e, l); }, p: Ll, i: Ll, o: Ll, d(s) { - s && vu(e); + s && yu(e); } }; } -class Ka extends pu { +class Qa extends ku { constructor(e) { - super(), ku(this, e, null, Su, Cu, {}); + super(), Cu(this, e, null, Bu, zu, {}); } } const { - SvelteComponent: zu, - append: Bu, - attr: Qn, - detach: Du, - init: qu, - insert: Lu, + SvelteComponent: Du, + append: qu, + attr: xn, + detach: Lu, + init: Mu, + insert: Eu, noop: Ml, - safe_not_equal: Mu, - svg_element: eo + safe_not_equal: Ru, + svg_element: to } = window.__gradio__svelte__internal; -function Eu(i) { +function Au(i) { let e, t; return { c() { - e = eo("svg"), t = eo("path"), Qn(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), Qn(t, "fill", "currentColor"), Qn(e, "id", "icon"), Qn(e, "xmlns", "http://www.w3.org/2000/svg"), Qn(e, "viewBox", "0 0 32 32"); + e = to("svg"), t = to("path"), xn(t, "d", "M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z"), xn(t, "fill", "currentColor"), xn(e, "id", "icon"), xn(e, "xmlns", "http://www.w3.org/2000/svg"), xn(e, "viewBox", "0 0 32 32"); }, m(n, l) { - Lu(n, e, l), Bu(e, t); + Eu(n, e, l), qu(e, t); }, p: Ml, i: Ml, o: Ml, d(n) { - n && Du(e); + n && Lu(e); } }; } -class Ru extends zu { +class Wu extends Du { constructor(e) { - super(), qu(this, e, null, Eu, Mu, {}); + super(), Mu(this, e, null, Au, Ru, {}); } } const { - SvelteComponent: Au, - append: Wu, - attr: Bn, - detach: Xu, - init: Yu, - insert: Iu, + SvelteComponent: Xu, + append: Yu, + attr: Dn, + detach: Iu, + init: Hu, + insert: Tu, noop: El, - safe_not_equal: Hu, - svg_element: to + safe_not_equal: ju, + svg_element: no } = window.__gradio__svelte__internal; -function Tu(i) { +function Fu(i) { let e, t; return { c() { - e = to("svg"), t = to("path"), Bn(t, "fill", "currentColor"), Bn(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), Bn(e, "xmlns", "http://www.w3.org/2000/svg"), Bn(e, "width", "100%"), Bn(e, "height", "100%"), Bn(e, "viewBox", "0 0 32 32"); + e = no("svg"), t = no("path"), Dn(t, "fill", "currentColor"), Dn(t, "d", "M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z"), Dn(e, "xmlns", "http://www.w3.org/2000/svg"), Dn(e, "width", "100%"), Dn(e, "height", "100%"), Dn(e, "viewBox", "0 0 32 32"); }, m(n, l) { - Iu(n, e, l), Wu(e, t); + Tu(n, e, l), Yu(e, t); }, p: El, i: El, o: El, d(n) { - n && Xu(e); + n && Iu(e); } }; } -class ju extends Au { +class Uu extends Xu { constructor(e) { - super(), Yu(this, e, null, Tu, Hu, {}); + super(), Hu(this, e, null, Fu, ju, {}); } } const { - SvelteComponent: Fu, - append: Uu, - attr: Dn, - detach: Vu, - init: Nu, - insert: Ou, + SvelteComponent: Vu, + append: Nu, + attr: qn, + detach: Ou, + init: Pu, + insert: Zu, noop: Rl, - safe_not_equal: Pu, - svg_element: no + safe_not_equal: Gu, + svg_element: io } = window.__gradio__svelte__internal; -function Zu(i) { +function Ku(i) { let e, t; return { c() { - e = no("svg"), t = no("path"), Dn(t, "d", "M5 8l4 4 4-4z"), Dn(e, "class", "dropdown-arrow svelte-145leq6"), Dn(e, "xmlns", "http://www.w3.org/2000/svg"), Dn(e, "width", "100%"), Dn(e, "height", "100%"), Dn(e, "viewBox", "0 0 18 18"); + e = io("svg"), t = io("path"), qn(t, "d", "M5 8l4 4 4-4z"), qn(e, "class", "dropdown-arrow svelte-145leq6"), qn(e, "xmlns", "http://www.w3.org/2000/svg"), qn(e, "width", "100%"), qn(e, "height", "100%"), qn(e, "viewBox", "0 0 18 18"); }, m(n, l) { - Ou(n, e, l), Uu(e, t); + Zu(n, e, l), Nu(e, t); }, p: Rl, i: Rl, o: Rl, d(n) { - n && Vu(e); + n && Ou(e); } }; } -class As extends Fu { +class As extends Vu { constructor(e) { - super(), Nu(this, e, null, Zu, Pu, {}); + super(), Pu(this, e, null, Ku, Gu, {}); } } const { - SvelteComponent: Gu, + SvelteComponent: Ju, append: Al, attr: _e, - detach: Ku, - init: Ju, - insert: Qu, + detach: Qu, + init: xu, + insert: $u, noop: Wl, - safe_not_equal: xu, + safe_not_equal: e_, svg_element: Si } = window.__gradio__svelte__internal; -function $u(i) { +function t_(i) { let e, t, n, l; return { c() { e = Si("svg"), t = Si("rect"), n = Si("circle"), l = Si("polyline"), _e(t, "x", "3"), _e(t, "y", "3"), _e(t, "width", "18"), _e(t, "height", "18"), _e(t, "rx", "2"), _e(t, "ry", "2"), _e(n, "cx", "8.5"), _e(n, "cy", "8.5"), _e(n, "r", "1.5"), _e(l, "points", "21 15 16 10 5 21"), _e(e, "xmlns", "http://www.w3.org/2000/svg"), _e(e, "width", "100%"), _e(e, "height", "100%"), _e(e, "viewBox", "0 0 24 24"), _e(e, "fill", "none"), _e(e, "stroke", "currentColor"), _e(e, "stroke-width", "1.5"), _e(e, "stroke-linecap", "round"), _e(e, "stroke-linejoin", "round"), _e(e, "class", "feather feather-image"); }, m(s, o) { - Qu(s, e, o), Al(e, t), Al(e, n), Al(e, l); + $u(s, e, o), Al(e, t), Al(e, n), Al(e, l); }, p: Wl, i: Wl, o: Wl, d(s) { - s && Ku(e); + s && Qu(e); } }; } -let Ja = class extends Gu { +let xa = class extends Ju { constructor(e) { - super(), Ju(this, e, null, $u, xu, {}); + super(), xu(this, e, null, t_, e_, {}); } }; const { - SvelteComponent: e_, - append: t_, + SvelteComponent: n_, + append: i_, attr: zi, - detach: n_, - init: i_, - insert: l_, + detach: l_, + init: s_, + insert: o_, noop: Xl, - safe_not_equal: s_, - svg_element: io + safe_not_equal: a_, + svg_element: lo } = window.__gradio__svelte__internal; -function o_(i) { +function r_(i) { let e, t; return { c() { - e = io("svg"), t = io("path"), zi(t, "fill", "currentColor"), zi(t, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a4 4 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2zm2.245 2.096L16 4.25q0-.078-.005-.154M13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5M15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3zm0 11a3 3 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A3 3 0 0 1 20 23zm5-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2"), zi(e, "xmlns", "http://www.w3.org/2000/svg"), zi(e, "viewBox", "0 0 24 24"); + e = lo("svg"), t = lo("path"), zi(t, "fill", "currentColor"), zi(t, "d", "M13.75 2a2.25 2.25 0 0 1 2.236 2.002V4h1.764A2.25 2.25 0 0 1 20 6.25V11h-1.5V6.25a.75.75 0 0 0-.75-.75h-2.129c-.404.603-1.091 1-1.871 1h-3.5c-.78 0-1.467-.397-1.871-1H6.25a.75.75 0 0 0-.75.75v13.5c0 .414.336.75.75.75h4.78a4 4 0 0 0 .505 1.5H6.25A2.25 2.25 0 0 1 4 19.75V6.25A2.25 2.25 0 0 1 6.25 4h1.764a2.25 2.25 0 0 1 2.236-2zm2.245 2.096L16 4.25q0-.078-.005-.154M13.75 3.5h-3.5a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5M15 12a3 3 0 0 0-3 3v5c0 .556.151 1.077.415 1.524l3.494-3.494a2.25 2.25 0 0 1 3.182 0l3.494 3.494c.264-.447.415-.968.415-1.524v-5a3 3 0 0 0-3-3zm0 11a3 3 0 0 1-1.524-.415l3.494-3.494a.75.75 0 0 1 1.06 0l3.494 3.494A3 3 0 0 1 20 23zm5-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2"), zi(e, "xmlns", "http://www.w3.org/2000/svg"), zi(e, "viewBox", "0 0 24 24"); }, m(n, l) { - l_(n, e, l), t_(e, t); + o_(n, e, l), i_(e, t); }, p: Xl, i: Xl, o: Xl, d(n) { - n && n_(e); + n && l_(e); } }; } -class Qa extends e_ { +class $a extends n_ { constructor(e) { - super(), i_(this, e, null, o_, s_, {}); + super(), s_(this, e, null, r_, a_, {}); } } const { - SvelteComponent: a_, + SvelteComponent: f_, append: Bi, attr: de, - detach: r_, - init: f_, - insert: c_, + detach: c_, + init: u_, + insert: __, noop: Yl, - safe_not_equal: u_, - svg_element: xn + safe_not_equal: d_, + svg_element: $n } = window.__gradio__svelte__internal; -function __(i) { +function h_(i) { let e, t, n, l, s; return { c() { - e = xn("svg"), t = xn("path"), n = xn("path"), l = xn("line"), s = xn("line"), de(t, "d", "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"), de(n, "d", "M19 10v2a7 7 0 0 1-14 0v-2"), de(l, "x1", "12"), de(l, "y1", "19"), de(l, "x2", "12"), de(l, "y2", "23"), de(s, "x1", "8"), de(s, "y1", "23"), de(s, "x2", "16"), de(s, "y2", "23"), de(e, "xmlns", "http://www.w3.org/2000/svg"), de(e, "width", "100%"), de(e, "height", "100%"), de(e, "viewBox", "0 0 24 24"), de(e, "fill", "none"), de(e, "stroke", "currentColor"), de(e, "stroke-width", "2"), de(e, "stroke-linecap", "round"), de(e, "stroke-linejoin", "round"), de(e, "class", "feather feather-mic"); + e = $n("svg"), t = $n("path"), n = $n("path"), l = $n("line"), s = $n("line"), de(t, "d", "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"), de(n, "d", "M19 10v2a7 7 0 0 1-14 0v-2"), de(l, "x1", "12"), de(l, "y1", "19"), de(l, "x2", "12"), de(l, "y2", "23"), de(s, "x1", "8"), de(s, "y1", "23"), de(s, "x2", "16"), de(s, "y2", "23"), de(e, "xmlns", "http://www.w3.org/2000/svg"), de(e, "width", "100%"), de(e, "height", "100%"), de(e, "viewBox", "0 0 24 24"), de(e, "fill", "none"), de(e, "stroke", "currentColor"), de(e, "stroke-width", "2"), de(e, "stroke-linecap", "round"), de(e, "stroke-linejoin", "round"), de(e, "class", "feather feather-mic"); }, m(o, r) { - c_(o, e, r), Bi(e, t), Bi(e, n), Bi(e, l), Bi(e, s); + __(o, e, r), Bi(e, t), Bi(e, n), Bi(e, l), Bi(e, s); }, p: Yl, i: Yl, o: Yl, d(o) { - o && r_(e); + o && c_(e); } }; } -class d_ extends a_ { +class m_ extends f_ { constructor(e) { - super(), f_(this, e, null, __, u_, {}); + super(), u_(this, e, null, h_, d_, {}); } } const { - SvelteComponent: h_, - append: lo, + SvelteComponent: g_, + append: so, attr: Ue, - detach: m_, - init: g_, - insert: b_, + detach: b_, + init: w_, + insert: p_, noop: Il, - safe_not_equal: w_, - set_style: p_, + safe_not_equal: v_, + set_style: k_, svg_element: Hl } = window.__gradio__svelte__internal; -function v_(i) { +function y_(i) { let e, t, n; return { c() { - e = Hl("svg"), t = Hl("polyline"), n = Hl("path"), Ue(t, "points", "1 4 1 10 7 10"), Ue(n, "d", "M3.51 15a9 9 0 1 0 2.13-9.36L1 10"), Ue(e, "xmlns", "http://www.w3.org/2000/svg"), Ue(e, "width", "100%"), Ue(e, "height", "100%"), Ue(e, "viewBox", "0 0 24 24"), Ue(e, "fill", "none"), Ue(e, "stroke", "currentColor"), Ue(e, "stroke-width", "2"), Ue(e, "stroke-linecap", "round"), Ue(e, "stroke-linejoin", "round"), Ue(e, "class", "feather feather-rotate-ccw"), p_(e, "transform", "rotateY(180deg)"); + e = Hl("svg"), t = Hl("polyline"), n = Hl("path"), Ue(t, "points", "1 4 1 10 7 10"), Ue(n, "d", "M3.51 15a9 9 0 1 0 2.13-9.36L1 10"), Ue(e, "xmlns", "http://www.w3.org/2000/svg"), Ue(e, "width", "100%"), Ue(e, "height", "100%"), Ue(e, "viewBox", "0 0 24 24"), Ue(e, "fill", "none"), Ue(e, "stroke", "currentColor"), Ue(e, "stroke-width", "2"), Ue(e, "stroke-linecap", "round"), Ue(e, "stroke-linejoin", "round"), Ue(e, "class", "feather feather-rotate-ccw"), k_(e, "transform", "rotateY(180deg)"); }, m(l, s) { - b_(l, e, s), lo(e, t), lo(e, n); + p_(l, e, s), so(e, t), so(e, n); }, p: Il, i: Il, o: Il, d(l) { - l && m_(e); + l && b_(e); } }; } -class k_ extends h_ { +class C_ extends g_ { constructor(e) { - super(), g_(this, e, null, v_, w_, {}); + super(), w_(this, e, null, y_, v_, {}); } } const { - SvelteComponent: y_, - append: C_, + SvelteComponent: S_, + append: z_, attr: De, - detach: S_, - init: z_, - insert: B_, + detach: B_, + init: D_, + insert: q_, noop: Tl, - safe_not_equal: D_, - svg_element: so + safe_not_equal: L_, + svg_element: oo } = window.__gradio__svelte__internal; -function q_(i) { +function M_(i) { let e, t; return { c() { - e = so("svg"), t = so("rect"), De(t, "x", "3"), De(t, "y", "3"), De(t, "width", "18"), De(t, "height", "18"), De(t, "rx", "2"), De(t, "ry", "2"), De(e, "xmlns", "http://www.w3.org/2000/svg"), De(e, "width", "100%"), De(e, "height", "100%"), De(e, "viewBox", "0 0 24 24"), De(e, "stroke-width", "1.5"), De(e, "stroke-linecap", "round"), De(e, "stroke-linejoin", "round"), De(e, "class", "feather feather-square"); + e = oo("svg"), t = oo("rect"), De(t, "x", "3"), De(t, "y", "3"), De(t, "width", "18"), De(t, "height", "18"), De(t, "rx", "2"), De(t, "ry", "2"), De(e, "xmlns", "http://www.w3.org/2000/svg"), De(e, "width", "100%"), De(e, "height", "100%"), De(e, "viewBox", "0 0 24 24"), De(e, "stroke-width", "1.5"), De(e, "stroke-linecap", "round"), De(e, "stroke-linejoin", "round"), De(e, "class", "feather feather-square"); }, m(n, l) { - B_(n, e, l), C_(e, t); + q_(n, e, l), z_(e, t); }, p: Tl, i: Tl, o: Tl, d(n) { - n && S_(e); + n && B_(e); } }; } -class L_ extends y_ { +class E_ extends S_ { constructor(e) { - super(), z_(this, e, null, q_, D_, {}); + super(), D_(this, e, null, M_, L_, {}); } } const { - SvelteComponent: M_, - append: oo, + SvelteComponent: R_, + append: ao, attr: Ve, - detach: E_, - init: R_, - insert: A_, + detach: A_, + init: W_, + insert: X_, noop: jl, - safe_not_equal: W_, + safe_not_equal: Y_, svg_element: Fl } = window.__gradio__svelte__internal; -function X_(i) { +function I_(i) { let e, t, n; return { c() { e = Fl("svg"), t = Fl("polyline"), n = Fl("path"), Ve(t, "points", "1 4 1 10 7 10"), Ve(n, "d", "M3.51 15a9 9 0 1 0 2.13-9.36L1 10"), Ve(e, "xmlns", "http://www.w3.org/2000/svg"), Ve(e, "width", "100%"), Ve(e, "height", "100%"), Ve(e, "viewBox", "0 0 24 24"), Ve(e, "fill", "none"), Ve(e, "stroke", "currentColor"), Ve(e, "stroke-width", "2"), Ve(e, "stroke-linecap", "round"), Ve(e, "stroke-linejoin", "round"), Ve(e, "class", "feather feather-rotate-ccw"); }, m(l, s) { - A_(l, e, s), oo(e, t), oo(e, n); + X_(l, e, s), ao(e, t), ao(e, n); }, p: jl, i: jl, o: jl, d(l) { - l && E_(e); + l && A_(e); } }; } -class Y_ extends M_ { +class H_ extends R_ { constructor(e) { - super(), R_(this, e, null, X_, W_, {}); + super(), W_(this, e, null, I_, Y_, {}); } } const { - SvelteComponent: I_, + SvelteComponent: T_, append: Ul, attr: ve, - detach: H_, - init: T_, - insert: j_, + detach: j_, + init: F_, + insert: U_, noop: Vl, - safe_not_equal: F_, + safe_not_equal: V_, svg_element: Di } = window.__gradio__svelte__internal; -function U_(i) { +function N_(i) { let e, t, n, l; return { c() { e = Di("svg"), t = Di("path"), n = Di("polyline"), l = Di("line"), ve(t, "d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"), ve(n, "points", "17 8 12 3 7 8"), ve(l, "x1", "12"), ve(l, "y1", "3"), ve(l, "x2", "12"), ve(l, "y2", "15"), ve(e, "xmlns", "http://www.w3.org/2000/svg"), ve(e, "width", "90%"), ve(e, "height", "90%"), ve(e, "viewBox", "0 0 24 24"), ve(e, "fill", "none"), ve(e, "stroke", "currentColor"), ve(e, "stroke-width", "2"), ve(e, "stroke-linecap", "round"), ve(e, "stroke-linejoin", "round"), ve(e, "class", "feather feather-upload"); }, m(s, o) { - j_(s, e, o), Ul(e, t), Ul(e, n), Ul(e, l); + U_(s, e, o), Ul(e, t), Ul(e, n), Ul(e, l); }, p: Vl, i: Vl, o: Vl, d(s) { - s && H_(e); + s && j_(e); } }; } -let xa = class extends I_ { +let er = class extends T_ { constructor(e) { - super(), T_(this, e, null, U_, F_, {}); + super(), F_(this, e, null, N_, V_, {}); } }; const { - SvelteComponent: V_, - append: ao, - attr: Ft, - detach: N_, - init: O_, - insert: P_, + SvelteComponent: O_, + append: ro, + attr: Ut, + detach: P_, + init: Z_, + insert: G_, noop: Nl, - safe_not_equal: Z_, + safe_not_equal: K_, svg_element: Ol } = window.__gradio__svelte__internal; -function G_(i) { +function J_(i) { let e, t, n; return { c() { - e = Ol("svg"), t = Ol("path"), n = Ol("path"), Ft(t, "fill", "currentColor"), Ft(t, "d", "M12 2c-4.963 0-9 4.038-9 9c0 3.328 1.82 6.232 4.513 7.79l-2.067 1.378A1 1 0 0 0 6 22h12a1 1 0 0 0 .555-1.832l-2.067-1.378C19.18 17.232 21 14.328 21 11c0-4.962-4.037-9-9-9zm0 16c-3.859 0-7-3.141-7-7c0-3.86 3.141-7 7-7s7 3.14 7 7c0 3.859-3.141 7-7 7z"), Ft(n, "fill", "currentColor"), Ft(n, "d", "M12 6c-2.757 0-5 2.243-5 5s2.243 5 5 5s5-2.243 5-5s-2.243-5-5-5zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3z"), Ft(e, "xmlns", "http://www.w3.org/2000/svg"), Ft(e, "width", "100%"), Ft(e, "height", "100%"), Ft(e, "viewBox", "0 0 24 24"); + e = Ol("svg"), t = Ol("path"), n = Ol("path"), Ut(t, "fill", "currentColor"), Ut(t, "d", "M12 2c-4.963 0-9 4.038-9 9c0 3.328 1.82 6.232 4.513 7.79l-2.067 1.378A1 1 0 0 0 6 22h12a1 1 0 0 0 .555-1.832l-2.067-1.378C19.18 17.232 21 14.328 21 11c0-4.962-4.037-9-9-9zm0 16c-3.859 0-7-3.141-7-7c0-3.86 3.141-7 7-7s7 3.14 7 7c0 3.859-3.141 7-7 7z"), Ut(n, "fill", "currentColor"), Ut(n, "d", "M12 6c-2.757 0-5 2.243-5 5s2.243 5 5 5s5-2.243 5-5s-2.243-5-5-5zm0 8c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3z"), Ut(e, "xmlns", "http://www.w3.org/2000/svg"), Ut(e, "width", "100%"), Ut(e, "height", "100%"), Ut(e, "viewBox", "0 0 24 24"); }, m(l, s) { - P_(l, e, s), ao(e, t), ao(e, n); + G_(l, e, s), ro(e, t), ro(e, n); }, p: Nl, i: Nl, o: Nl, d(l) { - l && N_(e); + l && P_(e); } }; } -let $a = class extends V_ { +let tr = class extends O_ { constructor(e) { - super(), O_(this, e, null, G_, Z_, {}); + super(), Z_(this, e, null, J_, K_, {}); } }; -const K_ = [ +const Q_ = [ { color: "red", primary: 600, secondary: 100 }, { color: "green", primary: 600, secondary: 100 }, { color: "blue", primary: 600, secondary: 100 }, @@ -1527,7 +1527,7 @@ const K_ = [ { color: "cyan", primary: 600, secondary: 100 }, { color: "lime", primary: 500, secondary: 100 }, { color: "pink", primary: 600, secondary: 100 } -], ro = { +], fo = { inherit: "inherit", current: "currentColor", transparent: "transparent", @@ -1820,12 +1820,12 @@ const K_ = [ 950: "#4c0519" } }; -K_.reduce( +Q_.reduce( (i, { color: e, primary: t, secondary: n }) => ({ ...i, [e]: { - primary: ro[e][t], - secondary: ro[e][n] + primary: fo[e][t], + secondary: fo[e][n] } }), {} @@ -1835,12 +1835,12 @@ class Oi extends Error { super(e), this.name = "ShareError"; } } -async function J_(i, e) { +async function x_(i, e) { var a; if (window.__gradio_space__ == null) throw new Oi("Must be on Spaces to share."); let t, n, l; - t = Q_(i), n = i.split(";")[0].split(":")[1], l = "file" + n.split("/")[1]; + t = $_(i), n = i.split(";")[0].split(":")[1], l = "file" + n.split("/")[1]; const s = new File([t], l, { type: n }), o = await fetch("https://huggingface.co/uploads", { method: "POST", body: s, @@ -1858,26 +1858,26 @@ async function J_(i, e) { } return await o.text(); } -function Q_(i) { +function $_(i) { for (var e = i.split(","), t = e[0].match(/:(.*?);/)[1], n = atob(e[1]), l = n.length, s = new Uint8Array(l); l--; ) s[l] = n.charCodeAt(l); return new Blob([s], { type: t }); } const { - SvelteComponent: x_, - create_component: $_, - destroy_component: ed, - init: td, - mount_component: nd, - safe_not_equal: id, - transition_in: ld, - transition_out: sd -} = window.__gradio__svelte__internal, { createEventDispatcher: od } = window.__gradio__svelte__internal; -function ad(i) { + SvelteComponent: ed, + create_component: td, + destroy_component: nd, + init: id, + mount_component: ld, + safe_not_equal: sd, + transition_in: od, + transition_out: ad +} = window.__gradio__svelte__internal, { createEventDispatcher: rd } = window.__gradio__svelte__internal; +function fd(i) { let e, t; return e = new fl({ props: { - Icon: Ru, + Icon: Wu, label: ( /*i18n*/ i[2]("common.share") @@ -1893,10 +1893,10 @@ function ad(i) { i[5] ), { c() { - $_(e.$$.fragment); + td(e.$$.fragment); }, m(n, l) { - nd(e, n, l), t = !0; + ld(e, n, l), t = !0; }, p(n, [l]) { const s = {}; @@ -1907,18 +1907,18 @@ function ad(i) { n[3]), e.$set(s); }, i(n) { - t || (ld(e.$$.fragment, n), t = !0); + t || (od(e.$$.fragment, n), t = !0); }, o(n) { - sd(e.$$.fragment, n), t = !1; + ad(e.$$.fragment, n), t = !1; }, d(n) { - ed(e, n); + nd(e, n); } }; } -function rd(i, e, t) { - const n = od(); +function cd(i, e, t) { + const n = rd(); let { formatter: l } = e, { value: s } = e, { i18n: o } = e, r = !1; const a = async () => { try { @@ -1937,40 +1937,40 @@ function rd(i, e, t) { "formatter" in f && t(0, l = f.formatter), "value" in f && t(1, s = f.value), "i18n" in f && t(2, o = f.i18n); }, [l, s, o, r, n, a]; } -class fd extends x_ { +class ud extends ed { constructor(e) { - super(), td(this, e, rd, ad, id, { formatter: 0, value: 1, i18n: 2 }); + super(), id(this, e, cd, fd, sd, { formatter: 0, value: 1, i18n: 2 }); } } const { - SvelteComponent: cd, - append: rn, + SvelteComponent: _d, + append: fn, attr: hs, - check_outros: ud, - create_component: er, - destroy_component: tr, + check_outros: dd, + create_component: nr, + destroy_component: ir, detach: Pi, element: ms, - group_outros: _d, - init: dd, + group_outros: hd, + init: md, insert: Zi, - mount_component: nr, - safe_not_equal: hd, + mount_component: lr, + safe_not_equal: gd, set_data: gs, space: bs, - text: li, - toggle_class: fo, + text: si, + toggle_class: co, transition_in: Ji, transition_out: Qi } = window.__gradio__svelte__internal; -function md(i) { +function bd(i) { let e, t; - return e = new xa({}), { + return e = new er({}), { c() { - er(e.$$.fragment); + nr(e.$$.fragment); }, m(n, l) { - nr(e, n, l), t = !0; + lr(e, n, l), t = !0; }, i(n) { t || (Ji(e.$$.fragment, n), t = !0); @@ -1979,18 +1979,18 @@ function md(i) { Qi(e.$$.fragment, n), t = !1; }, d(n) { - tr(e, n); + ir(e, n); } }; } -function gd(i) { +function wd(i) { let e, t; - return e = new Qa({}), { + return e = new $a({}), { c() { - er(e.$$.fragment); + nr(e.$$.fragment); }, m(n, l) { - nr(e, n, l), t = !0; + lr(e, n, l), t = !0; }, i(n) { t || (Ji(e.$$.fragment, n), t = !0); @@ -1999,11 +1999,11 @@ function gd(i) { Qi(e.$$.fragment, n), t = !1; }, d(n) { - tr(e, n); + ir(e, n); } }; } -function co(i) { +function uo(i) { let e, t, n = ( /*i18n*/ i[1]("common.or") + "" @@ -2014,10 +2014,10 @@ function co(i) { ), a; return { c() { - e = ms("span"), t = li("- "), l = li(n), s = li(" -"), o = bs(), a = li(r), hs(e, "class", "or svelte-kzcjhc"); + e = ms("span"), t = si("- "), l = si(n), s = si(" -"), o = bs(), a = si(r), hs(e, "class", "or svelte-kzcjhc"); }, m(f, c) { - Zi(f, e, c), rn(e, t), rn(e, l), rn(e, s), Zi(f, o, c), Zi(f, a, c); + Zi(f, e, c), fn(e, t), fn(e, l), fn(e, s), Zi(f, o, c), Zi(f, a, c); }, p(f, c) { c & /*i18n*/ @@ -2032,7 +2032,7 @@ function co(i) { } }; } -function bd(i) { +function pd(i) { let e, t, n, l, s, o = ( /*i18n*/ i[1]( @@ -2044,7 +2044,7 @@ function bd(i) { i[5].file ) + "" ), r, a, f; - const c = [gd, md], u = []; + const c = [wd, bd], u = []; function _(m, h) { return ( /*type*/ @@ -2054,11 +2054,11 @@ function bd(i) { n = _(i), l = u[n] = c[n](i); let d = ( /*mode*/ - i[3] !== "short" && co(i) + i[3] !== "short" && uo(i) ); return { c() { - e = ms("div"), t = ms("span"), l.c(), s = bs(), r = li(o), a = bs(), d && d.c(), hs(t, "class", "icon-wrap svelte-kzcjhc"), fo( + e = ms("div"), t = ms("span"), l.c(), s = bs(), r = si(o), a = bs(), d && d.c(), hs(t, "class", "icon-wrap svelte-kzcjhc"), co( t, "hovered", /*hovered*/ @@ -2066,14 +2066,14 @@ function bd(i) { ), hs(e, "class", "wrap svelte-kzcjhc"); }, m(m, h) { - Zi(m, e, h), rn(e, t), u[n].m(t, null), rn(e, s), rn(e, r), rn(e, a), d && d.m(e, null), f = !0; + Zi(m, e, h), fn(e, t), u[n].m(t, null), fn(e, s), fn(e, r), fn(e, a), d && d.m(e, null), f = !0; }, p(m, [h]) { let g = n; - n = _(m), n !== g && (_d(), Qi(u[g], 1, 1, () => { + n = _(m), n !== g && (hd(), Qi(u[g], 1, 1, () => { u[g] = null; - }), ud(), l = u[n], l || (l = u[n] = c[n](m), l.c()), Ji(l, 1), l.m(t, null)), (!f || h & /*hovered*/ - 16) && fo( + }), dd(), l = u[n], l || (l = u[n] = c[n](m), l.c()), Ji(l, 1), l.m(t, null)), (!f || h & /*hovered*/ + 16) && co( t, "hovered", /*hovered*/ @@ -2088,7 +2088,7 @@ function bd(i) { ] || /*defs*/ m[5].file ) + "") && gs(r, o), /*mode*/ - m[3] !== "short" ? d ? d.p(m, h) : (d = co(m), d.c(), d.m(e, null)) : d && (d.d(1), d = null); + m[3] !== "short" ? d ? d.p(m, h) : (d = uo(m), d.c(), d.m(e, null)) : d && (d.d(1), d = null); }, i(m) { f || (Ji(l), f = !0); @@ -2101,7 +2101,7 @@ function bd(i) { } }; } -function wd(i, e, t) { +function vd(i, e, t) { let { type: n = "file" } = e, { i18n: l } = e, { message: s = void 0 } = e, { mode: o = "full" } = e, { hovered: r = !1 } = e; const a = { image: "upload_text.drop_image", @@ -2116,9 +2116,9 @@ function wd(i, e, t) { "type" in f && t(0, n = f.type), "i18n" in f && t(1, l = f.i18n), "message" in f && t(2, s = f.message), "mode" in f && t(3, o = f.mode), "hovered" in f && t(4, r = f.hovered); }, [n, l, s, o, r, a]; } -class ir extends cd { +class sr extends _d { constructor(e) { - super(), dd(this, e, wd, bd, hd, { + super(), md(this, e, vd, pd, gd, { type: 0, i18n: 1, message: 2, @@ -2128,27 +2128,27 @@ class ir extends cd { } } const { - SvelteComponent: pd, + SvelteComponent: kd, append: Pl, - attr: mt, - check_outros: si, + attr: ht, + check_outros: oi, create_component: cl, destroy_component: ul, - detach: Un, - element: bi, - empty: vd, - group_outros: oi, - init: kd, - insert: Vn, + detach: Vn, + element: wi, + empty: yd, + group_outros: ai, + init: Cd, + insert: Nn, listen: _l, mount_component: dl, - safe_not_equal: yd, + safe_not_equal: Sd, space: Zl, - toggle_class: Jt, + toggle_class: Qt, transition_in: ge, transition_out: qe } = window.__gradio__svelte__internal; -function uo(i) { +function _o(i) { let e, t = ( /*sources*/ i[1].includes("upload") @@ -2161,36 +2161,36 @@ function uo(i) { ), r, a = ( /*sources*/ i[1].includes("clipboard") - ), f, c = t && _o(i), u = l && ho(i), _ = o && mo(i), d = a && go(i); + ), f, c = t && ho(i), u = l && mo(i), _ = o && go(i), d = a && bo(i); return { c() { - e = bi("span"), c && c.c(), n = Zl(), u && u.c(), s = Zl(), _ && _.c(), r = Zl(), d && d.c(), mt(e, "class", "source-selection svelte-1jp3vgd"), mt(e, "data-testid", "source-select"); + e = wi("span"), c && c.c(), n = Zl(), u && u.c(), s = Zl(), _ && _.c(), r = Zl(), d && d.c(), ht(e, "class", "source-selection svelte-1jp3vgd"), ht(e, "data-testid", "source-select"); }, m(m, h) { - Vn(m, e, h), c && c.m(e, null), Pl(e, n), u && u.m(e, null), Pl(e, s), _ && _.m(e, null), Pl(e, r), d && d.m(e, null), f = !0; + Nn(m, e, h), c && c.m(e, null), Pl(e, n), u && u.m(e, null), Pl(e, s), _ && _.m(e, null), Pl(e, r), d && d.m(e, null), f = !0; }, p(m, h) { h & /*sources*/ 2 && (t = /*sources*/ m[1].includes("upload")), t ? c ? (c.p(m, h), h & /*sources*/ - 2 && ge(c, 1)) : (c = _o(m), c.c(), ge(c, 1), c.m(e, n)) : c && (oi(), qe(c, 1, 1, () => { + 2 && ge(c, 1)) : (c = ho(m), c.c(), ge(c, 1), c.m(e, n)) : c && (ai(), qe(c, 1, 1, () => { c = null; - }), si()), h & /*sources*/ + }), oi()), h & /*sources*/ 2 && (l = /*sources*/ m[1].includes("microphone")), l ? u ? (u.p(m, h), h & /*sources*/ - 2 && ge(u, 1)) : (u = ho(m), u.c(), ge(u, 1), u.m(e, s)) : u && (oi(), qe(u, 1, 1, () => { + 2 && ge(u, 1)) : (u = mo(m), u.c(), ge(u, 1), u.m(e, s)) : u && (ai(), qe(u, 1, 1, () => { u = null; - }), si()), h & /*sources*/ + }), oi()), h & /*sources*/ 2 && (o = /*sources*/ m[1].includes("webcam")), o ? _ ? (_.p(m, h), h & /*sources*/ - 2 && ge(_, 1)) : (_ = mo(m), _.c(), ge(_, 1), _.m(e, r)) : _ && (oi(), qe(_, 1, 1, () => { + 2 && ge(_, 1)) : (_ = go(m), _.c(), ge(_, 1), _.m(e, r)) : _ && (ai(), qe(_, 1, 1, () => { _ = null; - }), si()), h & /*sources*/ + }), oi()), h & /*sources*/ 2 && (a = /*sources*/ m[1].includes("clipboard")), a ? d ? (d.p(m, h), h & /*sources*/ - 2 && ge(d, 1)) : (d = go(m), d.c(), ge(d, 1), d.m(e, null)) : d && (oi(), qe(d, 1, 1, () => { + 2 && ge(d, 1)) : (d = bo(m), d.c(), ge(d, 1), d.m(e, null)) : d && (ai(), qe(d, 1, 1, () => { d = null; - }), si()); + }), oi()); }, i(m) { f || (ge(c), ge(u), ge(_), ge(d), f = !0); @@ -2199,15 +2199,15 @@ function uo(i) { qe(c), qe(u), qe(_), qe(d), f = !1; }, d(m) { - m && Un(e), c && c.d(), u && u.d(), _ && _.d(), d && d.d(); + m && Vn(e), c && c.d(), u && u.d(), _ && _.d(), d && d.d(); } }; } -function _o(i) { +function ho(i) { let e, t, n, l, s; - return t = new xa({}), { + return t = new er({}), { c() { - e = bi("button"), cl(t.$$.fragment), mt(e, "class", "icon svelte-1jp3vgd"), mt(e, "aria-label", "Upload file"), Jt( + e = wi("button"), cl(t.$$.fragment), ht(e, "class", "icon svelte-1jp3vgd"), ht(e, "aria-label", "Upload file"), Qt( e, "selected", /*active_source*/ @@ -2216,7 +2216,7 @@ function _o(i) { ); }, m(o, r) { - Vn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( + Nn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( e, "click", /*click_handler*/ @@ -2225,7 +2225,7 @@ function _o(i) { }, p(o, r) { (!n || r & /*active_source*/ - 1) && Jt( + 1) && Qt( e, "selected", /*active_source*/ @@ -2240,15 +2240,15 @@ function _o(i) { qe(t.$$.fragment, o), n = !1; }, d(o) { - o && Un(e), ul(t), l = !1, s(); + o && Vn(e), ul(t), l = !1, s(); } }; } -function ho(i) { +function mo(i) { let e, t, n, l, s; - return t = new d_({}), { + return t = new m_({}), { c() { - e = bi("button"), cl(t.$$.fragment), mt(e, "class", "icon svelte-1jp3vgd"), mt(e, "aria-label", "Record audio"), Jt( + e = wi("button"), cl(t.$$.fragment), ht(e, "class", "icon svelte-1jp3vgd"), ht(e, "aria-label", "Record audio"), Qt( e, "selected", /*active_source*/ @@ -2256,7 +2256,7 @@ function ho(i) { ); }, m(o, r) { - Vn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( + Nn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( e, "click", /*click_handler_1*/ @@ -2265,7 +2265,7 @@ function ho(i) { }, p(o, r) { (!n || r & /*active_source*/ - 1) && Jt( + 1) && Qt( e, "selected", /*active_source*/ @@ -2279,15 +2279,15 @@ function ho(i) { qe(t.$$.fragment, o), n = !1; }, d(o) { - o && Un(e), ul(t), l = !1, s(); + o && Vn(e), ul(t), l = !1, s(); } }; } -function mo(i) { +function go(i) { let e, t, n, l, s; - return t = new $a({}), { + return t = new tr({}), { c() { - e = bi("button"), cl(t.$$.fragment), mt(e, "class", "icon svelte-1jp3vgd"), mt(e, "aria-label", "Capture from camera"), Jt( + e = wi("button"), cl(t.$$.fragment), ht(e, "class", "icon svelte-1jp3vgd"), ht(e, "aria-label", "Capture from camera"), Qt( e, "selected", /*active_source*/ @@ -2295,7 +2295,7 @@ function mo(i) { ); }, m(o, r) { - Vn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( + Nn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( e, "click", /*click_handler_2*/ @@ -2304,7 +2304,7 @@ function mo(i) { }, p(o, r) { (!n || r & /*active_source*/ - 1) && Jt( + 1) && Qt( e, "selected", /*active_source*/ @@ -2318,15 +2318,15 @@ function mo(i) { qe(t.$$.fragment, o), n = !1; }, d(o) { - o && Un(e), ul(t), l = !1, s(); + o && Vn(e), ul(t), l = !1, s(); } }; } -function go(i) { +function bo(i) { let e, t, n, l, s; - return t = new Qa({}), { + return t = new $a({}), { c() { - e = bi("button"), cl(t.$$.fragment), mt(e, "class", "icon svelte-1jp3vgd"), mt(e, "aria-label", "Paste from clipboard"), Jt( + e = wi("button"), cl(t.$$.fragment), ht(e, "class", "icon svelte-1jp3vgd"), ht(e, "aria-label", "Paste from clipboard"), Qt( e, "selected", /*active_source*/ @@ -2334,7 +2334,7 @@ function go(i) { ); }, m(o, r) { - Vn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( + Nn(o, e, r), dl(t, e, null), n = !0, l || (s = _l( e, "click", /*click_handler_3*/ @@ -2343,7 +2343,7 @@ function go(i) { }, p(o, r) { (!n || r & /*active_source*/ - 1) && Jt( + 1) && Qt( e, "selected", /*active_source*/ @@ -2357,28 +2357,28 @@ function go(i) { qe(t.$$.fragment, o), n = !1; }, d(o) { - o && Un(e), ul(t), l = !1, s(); + o && Vn(e), ul(t), l = !1, s(); } }; } -function Cd(i) { +function zd(i) { let e, t, n = ( /*unique_sources*/ - i[2].length > 1 && uo(i) + i[2].length > 1 && _o(i) ); return { c() { - n && n.c(), e = vd(); + n && n.c(), e = yd(); }, m(l, s) { - n && n.m(l, s), Vn(l, e, s), t = !0; + n && n.m(l, s), Nn(l, e, s), t = !0; }, p(l, [s]) { /*unique_sources*/ l[2].length > 1 ? n ? (n.p(l, s), s & /*unique_sources*/ - 4 && ge(n, 1)) : (n = uo(l), n.c(), ge(n, 1), n.m(e.parentNode, e)) : n && (oi(), qe(n, 1, 1, () => { + 4 && ge(n, 1)) : (n = _o(l), n.c(), ge(n, 1), n.m(e.parentNode, e)) : n && (ai(), qe(n, 1, 1, () => { n = null; - }), si()); + }), oi()); }, i(l) { t || (ge(n), t = !0); @@ -2387,11 +2387,11 @@ function Cd(i) { qe(n), t = !1; }, d(l) { - l && Un(e), n && n.d(l); + l && Vn(e), n && n.d(l); } }; } -function Sd(i, e, t) { +function Bd(i, e, t) { let n; var l = this && this.__awaiter || function(m, h, g, p) { function w(b) { @@ -2447,9 +2447,9 @@ function Sd(i, e, t) { d ]; } -class zd extends pd { +class Dd extends kd { constructor(e) { - super(), kd(this, e, Sd, Cd, yd, { + super(), Cd(this, e, Bd, zd, Sd, { sources: 1, active_source: 0, handle_clear: 4, @@ -2457,7 +2457,7 @@ class zd extends pd { }); } } -function Wn(i) { +function Xn(i) { let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0; for (; i > 1e3 && t < e.length - 1; ) i /= 1e3, t++; @@ -2466,11 +2466,11 @@ function Wn(i) { } function Gi() { } -const Bd = (i) => i; -function Dd(i, e) { +const qd = (i) => i; +function Ld(i, e) { return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function"; } -function bo(i) { +function wo(i) { const e = typeof i == "string" && i.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/); return e ? [parseFloat(e[1]), e[2] || "px"] : [ /** @type {number} */ @@ -2478,30 +2478,30 @@ function bo(i) { "px" ]; } -const lr = typeof window < "u"; -let wo = lr ? () => window.performance.now() : () => Date.now(), sr = lr ? (i) => requestAnimationFrame(i) : Gi; -const Fn = /* @__PURE__ */ new Set(); -function or(i) { - Fn.forEach((e) => { - e.c(i) || (Fn.delete(e), e.f()); - }), Fn.size !== 0 && sr(or); +const or = typeof window < "u"; +let po = or ? () => window.performance.now() : () => Date.now(), ar = or ? (i) => requestAnimationFrame(i) : Gi; +const Un = /* @__PURE__ */ new Set(); +function rr(i) { + Un.forEach((e) => { + e.c(i) || (Un.delete(e), e.f()); + }), Un.size !== 0 && ar(rr); } -function qd(i) { +function Md(i) { let e; - return Fn.size === 0 && sr(or), { + return Un.size === 0 && ar(rr), { promise: new Promise((t) => { - Fn.add(e = { c: i, f: t }); + Un.add(e = { c: i, f: t }); }), abort() { - Fn.delete(e); + Un.delete(e); } }; } -function Ld(i) { +function Ed(i) { const e = i - 1; return e * e * e + 1; } -function Md(i, { delay: e = 0, duration: t = 400, easing: n = Bd } = {}) { +function Rd(i, { delay: e = 0, duration: t = 400, easing: n = qd } = {}) { const l = +getComputedStyle(i).opacity; return { delay: e, @@ -2510,8 +2510,8 @@ function Md(i, { delay: e = 0, duration: t = 400, easing: n = Bd } = {}) { css: (s) => `opacity: ${s * l}` }; } -function po(i, { delay: e = 0, duration: t = 400, easing: n = Ld, x: l = 0, y: s = 0, opacity: o = 0 } = {}) { - const r = getComputedStyle(i), a = +r.opacity, f = r.transform === "none" ? "" : r.transform, c = a * (1 - o), [u, _] = bo(l), [d, m] = bo(s); +function vo(i, { delay: e = 0, duration: t = 400, easing: n = Ed, x: l = 0, y: s = 0, opacity: o = 0 } = {}) { + const r = getComputedStyle(i), a = +r.opacity, f = r.transform === "none" ? "" : r.transform, c = a * (1 - o), [u, _] = wo(l), [d, m] = wo(s); return { delay: e, duration: t, @@ -2521,19 +2521,19 @@ function po(i, { delay: e = 0, duration: t = 400, easing: n = Ld, x: l = 0, y: s opacity: ${a - c * g}` }; } -const qn = []; -function Ed(i, e = Gi) { +const Ln = []; +function Ad(i, e = Gi) { let t; const n = /* @__PURE__ */ new Set(); function l(r) { - if (Dd(i, r) && (i = r, t)) { - const a = !qn.length; + if (Ld(i, r) && (i = r, t)) { + const a = !Ln.length; for (const f of n) - f[1](), qn.push(f, i); + f[1](), Ln.push(f, i); if (a) { - for (let f = 0; f < qn.length; f += 2) - qn[f][0](qn[f + 1]); - qn.length = 0; + for (let f = 0; f < Ln.length; f += 2) + Ln[f][0](Ln[f + 1]); + Ln.length = 0; } } } @@ -2548,13 +2548,13 @@ function Ed(i, e = Gi) { } return { set: l, update: s, subscribe: o }; } -function vo(i) { +function ko(i) { return Object.prototype.toString.call(i) === "[object Date]"; } function ws(i, e, t, n) { - if (typeof t == "number" || vo(t)) { + if (typeof t == "number" || ko(t)) { const l = n - t, s = (t - e) / (i.dt || 1 / 60), o = i.opts.stiffness * l, r = i.opts.damping * s, a = (o - r) * i.inv_mass, f = (s + a) * i.dt; - return Math.abs(f) < i.opts.precision && Math.abs(l) < i.opts.precision ? n : (i.settled = !1, vo(t) ? new Date(t.getTime() + f) : t + f); + return Math.abs(f) < i.opts.precision && Math.abs(l) < i.opts.precision ? n : (i.settled = !1, ko(t) ? new Date(t.getTime() + f) : t + f); } else { if (Array.isArray(t)) return t.map( @@ -2569,13 +2569,13 @@ function ws(i, e, t, n) { throw new Error(`Cannot spring ${typeof t} values`); } } -function ko(i, e = {}) { - const t = Ed(i), { stiffness: n = 0.15, damping: l = 0.8, precision: s = 0.01 } = e; +function yo(i, e = {}) { + const t = Ad(i), { stiffness: n = 0.15, damping: l = 0.8, precision: s = 0.01 } = e; let o, r, a, f = i, c = i, u = 1, _ = 0, d = !1; function m(g, p = {}) { c = g; const w = a = {}; - return i == null || p.hard || h.stiffness >= 1 && h.damping >= 1 ? (d = !0, o = wo(), f = g, t.set(i = c), Promise.resolve()) : (p.soft && (_ = 1 / ((p.soft === !0 ? 0.5 : +p.soft) * 60), u = 0), r || (o = wo(), d = !1, r = qd((b) => { + return i == null || p.hard || h.stiffness >= 1 && h.damping >= 1 ? (d = !0, o = po(), f = g, t.set(i = c), Promise.resolve()) : (p.soft && (_ = 1 / ((p.soft === !0 ? 0.5 : +p.soft) * 60), u = 0), r || (o = po(), d = !1, r = Md((b) => { if (d) return d = !1, r = null, !1; u = Math.min(u + _, 1); @@ -2603,29 +2603,29 @@ function ko(i, e = {}) { return h; } const { - SvelteComponent: Rd, - append: et, + SvelteComponent: Wd, + append: $e, attr: N, - component_subscribe: yo, - detach: Ad, - element: Wd, - init: Xd, - insert: Yd, - noop: Co, - safe_not_equal: Id, + component_subscribe: Co, + detach: Xd, + element: Yd, + init: Id, + insert: Hd, + noop: So, + safe_not_equal: Td, set_style: qi, - svg_element: tt, - toggle_class: So -} = window.__gradio__svelte__internal, { onMount: Hd } = window.__gradio__svelte__internal; -function Td(i) { + svg_element: et, + toggle_class: zo +} = window.__gradio__svelte__internal, { onMount: jd } = window.__gradio__svelte__internal; +function Fd(i) { let e, t, n, l, s, o, r, a, f, c, u, _; return { c() { - e = Wd("div"), t = tt("svg"), n = tt("g"), l = tt("path"), s = tt("path"), o = tt("path"), r = tt("path"), a = tt("g"), f = tt("path"), c = tt("path"), u = tt("path"), _ = tt("path"), N(l, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), N(l, "fill", "#FF7C00"), N(l, "fill-opacity", "0.4"), N(l, "class", "svelte-43sxxs"), N(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), N(s, "fill", "#FF7C00"), N(s, "class", "svelte-43sxxs"), N(o, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), N(o, "fill", "#FF7C00"), N(o, "fill-opacity", "0.4"), N(o, "class", "svelte-43sxxs"), N(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), N(r, "fill", "#FF7C00"), N(r, "class", "svelte-43sxxs"), qi(n, "transform", "translate(" + /*$top*/ + e = Yd("div"), t = et("svg"), n = et("g"), l = et("path"), s = et("path"), o = et("path"), r = et("path"), a = et("g"), f = et("path"), c = et("path"), u = et("path"), _ = et("path"), N(l, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), N(l, "fill", "#FF7C00"), N(l, "fill-opacity", "0.4"), N(l, "class", "svelte-43sxxs"), N(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), N(s, "fill", "#FF7C00"), N(s, "class", "svelte-43sxxs"), N(o, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), N(o, "fill", "#FF7C00"), N(o, "fill-opacity", "0.4"), N(o, "class", "svelte-43sxxs"), N(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), N(r, "fill", "#FF7C00"), N(r, "class", "svelte-43sxxs"), qi(n, "transform", "translate(" + /*$top*/ i[1][0] + "px, " + /*$top*/ i[1][1] + "px)"), N(f, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), N(f, "fill", "#FF7C00"), N(f, "fill-opacity", "0.4"), N(f, "class", "svelte-43sxxs"), N(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), N(c, "fill", "#FF7C00"), N(c, "class", "svelte-43sxxs"), N(u, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), N(u, "fill", "#FF7C00"), N(u, "fill-opacity", "0.4"), N(u, "class", "svelte-43sxxs"), N(_, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), N(_, "fill", "#FF7C00"), N(_, "class", "svelte-43sxxs"), qi(a, "transform", "translate(" + /*$bottom*/ i[2][0] + "px, " + /*$bottom*/ - i[2][1] + "px)"), N(t, "viewBox", "-1200 -1200 3000 3000"), N(t, "fill", "none"), N(t, "xmlns", "http://www.w3.org/2000/svg"), N(t, "class", "svelte-43sxxs"), N(e, "class", "svelte-43sxxs"), So( + i[2][1] + "px)"), N(t, "viewBox", "-1200 -1200 3000 3000"), N(t, "fill", "none"), N(t, "xmlns", "http://www.w3.org/2000/svg"), N(t, "class", "svelte-43sxxs"), N(e, "class", "svelte-43sxxs"), zo( e, "margin", /*margin*/ @@ -2633,7 +2633,7 @@ function Td(i) { ); }, m(d, m) { - Yd(d, e, m), et(e, t), et(t, n), et(n, l), et(n, s), et(n, o), et(n, r), et(t, a), et(a, f), et(a, c), et(a, u), et(a, _); + Hd(d, e, m), $e(e, t), $e(t, n), $e(n, l), $e(n, s), $e(n, o), $e(n, r), $e(t, a), $e(a, f), $e(a, c), $e(a, u), $e(a, _); }, p(d, [m]) { m & /*$top*/ @@ -2643,21 +2643,21 @@ function Td(i) { 4 && qi(a, "transform", "translate(" + /*$bottom*/ d[2][0] + "px, " + /*$bottom*/ d[2][1] + "px)"), m & /*margin*/ - 1 && So( + 1 && zo( e, "margin", /*margin*/ d[0] ); }, - i: Co, - o: Co, + i: So, + o: So, d(d) { - d && Ad(e); + d && Xd(e); } }; } -function jd(i, e, t) { +function Ud(i, e, t) { let n, l; var s = this && this.__awaiter || function(d, m, h, g) { function p(w) { @@ -2687,10 +2687,10 @@ function jd(i, e, t) { }); }; let { margin: o = !0 } = e; - const r = ko([0, 0]); - yo(i, r, (d) => t(1, n = d)); - const a = ko([0, 0]); - yo(i, a, (d) => t(2, l = d)); + const r = yo([0, 0]); + Co(i, r, (d) => t(1, n = d)); + const a = yo([0, 0]); + Co(i, a, (d) => t(2, l = d)); let f; function c() { return s(this, void 0, void 0, function* () { @@ -2707,62 +2707,62 @@ function jd(i, e, t) { yield Promise.all([r.set([125, 0]), a.set([-125, 0])]), u(); }); } - return Hd(() => (_(), () => f = !0)), i.$$set = (d) => { + return jd(() => (_(), () => f = !0)), i.$$set = (d) => { "margin" in d && t(0, o = d.margin); }, [o, n, l, r, a]; } -class Fd extends Rd { +class Vd extends Wd { constructor(e) { - super(), Xd(this, e, jd, Td, Id, { margin: 0 }); + super(), Id(this, e, Ud, Fd, Td, { margin: 0 }); } } const { - SvelteComponent: Ud, - append: fn, - attr: st, - binding_callbacks: zo, + SvelteComponent: Nd, + append: cn, + attr: lt, + binding_callbacks: Bo, check_outros: ps, - create_component: ar, - create_slot: rr, - destroy_component: fr, - destroy_each: cr, + create_component: fr, + create_slot: cr, + destroy_component: ur, + destroy_each: _r, detach: T, - element: dt, - empty: Nn, + element: _t, + empty: On, ensure_array_like: xi, - get_all_dirty_from_scope: ur, - get_slot_changes: _r, + get_all_dirty_from_scope: dr, + get_slot_changes: hr, group_outros: vs, - init: Vd, + init: Od, insert: j, - mount_component: dr, + mount_component: mr, noop: ks, - safe_not_equal: Nd, + safe_not_equal: Pd, set_data: Ze, - set_style: Gt, + set_style: Kt, space: Pe, text: ce, toggle_class: Oe, - transition_in: lt, - transition_out: ht, - update_slot_base: hr -} = window.__gradio__svelte__internal, { tick: Od } = window.__gradio__svelte__internal, { onDestroy: Pd } = window.__gradio__svelte__internal, { createEventDispatcher: Zd } = window.__gradio__svelte__internal, Gd = (i) => ({}), Bo = (i) => ({}), Kd = (i) => ({}), Do = (i) => ({}); -function qo(i, e, t) { + transition_in: it, + transition_out: dt, + update_slot_base: gr +} = window.__gradio__svelte__internal, { tick: Zd } = window.__gradio__svelte__internal, { onDestroy: Gd } = window.__gradio__svelte__internal, { createEventDispatcher: Kd } = window.__gradio__svelte__internal, Jd = (i) => ({}), Do = (i) => ({}), Qd = (i) => ({}), qo = (i) => ({}); +function Lo(i, e, t) { const n = i.slice(); return n[41] = e[t], n[43] = t, n; } -function Lo(i, e, t) { +function Mo(i, e, t) { const n = i.slice(); return n[41] = e[t], n; } -function Jd(i) { +function xd(i) { let e, t, n, l, s = ( /*i18n*/ i[1]("common.error") + "" ), o, r, a; t = new fl({ props: { - Icon: Ka, + Icon: Qa, label: ( /*i18n*/ i[1]("common.clear") @@ -2777,19 +2777,19 @@ function Jd(i) { const f = ( /*#slots*/ i[30].error - ), c = rr( + ), c = cr( f, i, /*$$scope*/ i[29], - Bo + Do ); return { c() { - e = dt("div"), ar(t.$$.fragment), n = Pe(), l = dt("span"), o = ce(s), r = Pe(), c && c.c(), st(e, "class", "clear-status svelte-16nch4a"), st(l, "class", "error svelte-16nch4a"); + e = _t("div"), fr(t.$$.fragment), n = Pe(), l = _t("span"), o = ce(s), r = Pe(), c && c.c(), lt(e, "class", "clear-status svelte-16nch4a"), lt(l, "class", "error svelte-16nch4a"); }, m(u, _) { - j(u, e, _), dr(t, e, null), j(u, n, _), j(u, l, _), fn(l, o), j(u, r, _), c && c.m(u, _), a = !0; + j(u, e, _), mr(t, e, null), j(u, n, _), j(u, l, _), cn(l, o), j(u, r, _), c && c.m(u, _), a = !0; }, p(u, _) { const d = {}; @@ -2798,64 +2798,64 @@ function Jd(i) { u[1]("common.clear")), t.$set(d), (!a || _[0] & /*i18n*/ 2) && s !== (s = /*i18n*/ u[1]("common.error") + "") && Ze(o, s), c && c.p && (!a || _[0] & /*$$scope*/ - 536870912) && hr( + 536870912) && gr( c, f, u, /*$$scope*/ u[29], - a ? _r( + a ? hr( f, /*$$scope*/ u[29], _, - Gd - ) : ur( + Jd + ) : dr( /*$$scope*/ u[29] ), - Bo + Do ); }, i(u) { - a || (lt(t.$$.fragment, u), lt(c, u), a = !0); + a || (it(t.$$.fragment, u), it(c, u), a = !0); }, o(u) { - ht(t.$$.fragment, u), ht(c, u), a = !1; + dt(t.$$.fragment, u), dt(c, u), a = !1; }, d(u) { - u && (T(e), T(n), T(l), T(r)), fr(t), c && c.d(u); + u && (T(e), T(n), T(l), T(r)), ur(t), c && c.d(u); } }; } -function Qd(i) { +function $d(i) { let e, t, n, l, s, o, r, a, f, c = ( /*variant*/ i[8] === "default" && /*show_eta_bar*/ i[18] && /*show_progress*/ - i[6] === "full" && Mo(i) + i[6] === "full" && Eo(i) ); function u(b, k) { if ( /*progress*/ b[7] - ) return e1; + ) return n1; if ( /*queue_position*/ b[2] !== null && /*queue_size*/ b[3] !== void 0 && /*queue_position*/ b[2] >= 0 - ) return $d; + ) return t1; if ( /*queue_position*/ b[2] === 0 - ) return xd; + ) return e1; } let _ = u(i), d = _ && _(i), m = ( /*timer*/ - i[5] && Ao(i) + i[5] && Wo(i) ); - const h = [l1, i1], g = []; + const h = [o1, s1], g = []; function p(b, k) { return ( /*last_progress_level*/ @@ -2867,10 +2867,10 @@ function Qd(i) { } ~(s = p(i)) && (o = g[s] = h[s](i)); let w = !/*timer*/ - i[5] && jo(i); + i[5] && Fo(i); return { c() { - c && c.c(), e = Pe(), t = dt("div"), d && d.c(), n = Pe(), m && m.c(), l = Pe(), o && o.c(), r = Pe(), w && w.c(), a = Nn(), st(t, "class", "progress-text svelte-16nch4a"), Oe( + c && c.c(), e = Pe(), t = _t("div"), d && d.c(), n = Pe(), m && m.c(), l = Pe(), o && o.c(), r = Pe(), w && w.c(), a = On(), lt(t, "class", "progress-text svelte-16nch4a"), Oe( t, "meta-text-center", /*variant*/ @@ -2883,14 +2883,14 @@ function Qd(i) { ); }, m(b, k) { - c && c.m(b, k), j(b, e, k), j(b, t, k), d && d.m(t, null), fn(t, n), m && m.m(t, null), j(b, l, k), ~s && g[s].m(b, k), j(b, r, k), w && w.m(b, k), j(b, a, k), f = !0; + c && c.m(b, k), j(b, e, k), j(b, t, k), d && d.m(t, null), cn(t, n), m && m.m(t, null), j(b, l, k), ~s && g[s].m(b, k), j(b, r, k), w && w.m(b, k), j(b, a, k), f = !0; }, p(b, k) { /*variant*/ b[8] === "default" && /*show_eta_bar*/ b[18] && /*show_progress*/ - b[6] === "full" ? c ? c.p(b, k) : (c = Mo(b), c.c(), c.m(e.parentNode, e)) : c && (c.d(1), c = null), _ === (_ = u(b)) && d ? d.p(b, k) : (d && d.d(1), d = _ && _(b), d && (d.c(), d.m(t, n))), /*timer*/ - b[5] ? m ? m.p(b, k) : (m = Ao(b), m.c(), m.m(t, null)) : m && (m.d(1), m = null), (!f || k[0] & /*variant*/ + b[6] === "full" ? c ? c.p(b, k) : (c = Eo(b), c.c(), c.m(e.parentNode, e)) : c && (c.d(1), c = null), _ === (_ = u(b)) && d ? d.p(b, k) : (d && d.d(1), d = _ && _(b), d && (d.c(), d.m(t, n))), /*timer*/ + b[5] ? m ? m.p(b, k) : (m = Wo(b), m.c(), m.m(t, null)) : m && (m.d(1), m = null), (!f || k[0] & /*variant*/ 256) && Oe( t, "meta-text-center", @@ -2904,31 +2904,31 @@ function Qd(i) { b[8] === "default" ); let v = s; - s = p(b), s === v ? ~s && g[s].p(b, k) : (o && (vs(), ht(g[v], 1, 1, () => { + s = p(b), s === v ? ~s && g[s].p(b, k) : (o && (vs(), dt(g[v], 1, 1, () => { g[v] = null; - }), ps()), ~s ? (o = g[s], o ? o.p(b, k) : (o = g[s] = h[s](b), o.c()), lt(o, 1), o.m(r.parentNode, r)) : o = null), /*timer*/ - b[5] ? w && (vs(), ht(w, 1, 1, () => { + }), ps()), ~s ? (o = g[s], o ? o.p(b, k) : (o = g[s] = h[s](b), o.c()), it(o, 1), o.m(r.parentNode, r)) : o = null), /*timer*/ + b[5] ? w && (vs(), dt(w, 1, 1, () => { w = null; }), ps()) : w ? (w.p(b, k), k[0] & /*timer*/ - 32 && lt(w, 1)) : (w = jo(b), w.c(), lt(w, 1), w.m(a.parentNode, a)); + 32 && it(w, 1)) : (w = Fo(b), w.c(), it(w, 1), w.m(a.parentNode, a)); }, i(b) { - f || (lt(o), lt(w), f = !0); + f || (it(o), it(w), f = !0); }, o(b) { - ht(o), ht(w), f = !1; + dt(o), dt(w), f = !1; }, d(b) { b && (T(e), T(t), T(l), T(r), T(a)), c && c.d(b), d && d.d(), m && m.d(), ~s && g[s].d(b), w && w.d(b); } }; } -function Mo(i) { +function Eo(i) { let e, t = `translateX(${/*eta_level*/ (i[17] || 0) * 100 - 100}%)`; return { c() { - e = dt("div"), st(e, "class", "eta-bar svelte-16nch4a"), Gt(e, "transform", t); + e = _t("div"), lt(e, "class", "eta-bar svelte-16nch4a"), Kt(e, "transform", t); }, m(n, l) { j(n, e, l); @@ -2936,14 +2936,14 @@ function Mo(i) { p(n, l) { l[0] & /*eta_level*/ 131072 && t !== (t = `translateX(${/*eta_level*/ - (n[17] || 0) * 100 - 100}%)`) && Gt(e, "transform", t); + (n[17] || 0) * 100 - 100}%)`) && Kt(e, "transform", t); }, d(n) { n && T(e); } }; } -function xd(i) { +function e1(i) { let e; return { c() { @@ -2958,7 +2958,7 @@ function xd(i) { } }; } -function $d(i) { +function t1(i) { let e, t = ( /*queue_position*/ i[2] + 1 + "" @@ -2988,18 +2988,18 @@ function $d(i) { } }; } -function e1(i) { +function n1(i) { let e, t = xi( /*progress*/ i[7] ), n = []; for (let l = 0; l < t.length; l += 1) - n[l] = Ro(Lo(i, t, l)); + n[l] = Ao(Mo(i, t, l)); return { c() { for (let l = 0; l < n.length; l += 1) n[l].c(); - e = Nn(); + e = On(); }, m(l, s) { for (let o = 0; o < n.length; o += 1) @@ -3015,8 +3015,8 @@ function e1(i) { ); let o; for (o = 0; o < t.length; o += 1) { - const r = Lo(l, t, o); - n[o] ? n[o].p(r, s) : (n[o] = Ro(r), n[o].c(), n[o].m(e.parentNode, e)); + const r = Mo(l, t, o); + n[o] ? n[o].p(r, s) : (n[o] = Ao(r), n[o].c(), n[o].m(e.parentNode, e)); } for (; o < n.length; o += 1) n[o].d(1); @@ -3024,11 +3024,11 @@ function e1(i) { } }, d(l) { - l && T(e), cr(n, l); + l && T(e), _r(n, l); } }; } -function Eo(i) { +function Ro(i) { let e, t = ( /*p*/ i[41].unit + "" @@ -3036,7 +3036,7 @@ function Eo(i) { function r(c, u) { return ( /*p*/ - c[41].length != null ? n1 : t1 + c[41].length != null ? l1 : i1 ); } let a = r(i), f = a(i); @@ -3057,8 +3057,8 @@ function Eo(i) { } }; } -function t1(i) { - let e = Wn( +function i1(i) { + let e = Xn( /*p*/ i[41].index || 0 ) + "", t; @@ -3071,7 +3071,7 @@ function t1(i) { }, p(n, l) { l[0] & /*progress*/ - 128 && e !== (e = Wn( + 128 && e !== (e = Xn( /*p*/ n[41].index || 0 ) + "") && Ze(t, e); @@ -3081,11 +3081,11 @@ function t1(i) { } }; } -function n1(i) { - let e = Wn( +function l1(i) { + let e = Xn( /*p*/ i[41].index || 0 - ) + "", t, n, l = Wn( + ) + "", t, n, l = Xn( /*p*/ i[41].length ) + "", s; @@ -3098,11 +3098,11 @@ function n1(i) { }, p(o, r) { r[0] & /*progress*/ - 128 && e !== (e = Wn( + 128 && e !== (e = Xn( /*p*/ o[41].index || 0 ) + "") && Ze(t, e), r[0] & /*progress*/ - 128 && l !== (l = Wn( + 128 && l !== (l = Xn( /*p*/ o[41].length ) + "") && Ze(s, l); @@ -3112,28 +3112,28 @@ function n1(i) { } }; } -function Ro(i) { +function Ao(i) { let e, t = ( /*p*/ - i[41].index != null && Eo(i) + i[41].index != null && Ro(i) ); return { c() { - t && t.c(), e = Nn(); + t && t.c(), e = On(); }, m(n, l) { t && t.m(n, l), j(n, e, l); }, p(n, l) { /*p*/ - n[41].index != null ? t ? t.p(n, l) : (t = Eo(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + n[41].index != null ? t ? t.p(n, l) : (t = Ro(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { n && T(e), t && t.d(n); } }; } -function Ao(i) { +function Wo(i) { let e, t = ( /*eta*/ i[0] ? `/${/*formatted_eta*/ @@ -3165,19 +3165,19 @@ function Ao(i) { } }; } -function i1(i) { +function s1(i) { let e, t; - return e = new Fd({ + return e = new Vd({ props: { margin: ( /*variant*/ i[8] === "default" ) } }), { c() { - ar(e.$$.fragment); + fr(e.$$.fragment); }, m(n, l) { - dr(e, n, l), t = !0; + mr(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -3186,34 +3186,34 @@ function i1(i) { n[8] === "default"), e.$set(s); }, i(n) { - t || (lt(e.$$.fragment, n), t = !0); + t || (it(e.$$.fragment, n), t = !0); }, o(n) { - ht(e.$$.fragment, n), t = !1; + dt(e.$$.fragment, n), t = !1; }, d(n) { - fr(e, n); + ur(e, n); } }; } -function l1(i) { +function o1(i) { let e, t, n, l, s, o = `${/*last_progress_level*/ i[15] * 100}%`, r = ( /*progress*/ - i[7] != null && Wo(i) + i[7] != null && Xo(i) ); return { c() { - e = dt("div"), t = dt("div"), r && r.c(), n = Pe(), l = dt("div"), s = dt("div"), st(t, "class", "progress-level-inner svelte-16nch4a"), st(s, "class", "progress-bar svelte-16nch4a"), Gt(s, "width", o), st(l, "class", "progress-bar-wrap svelte-16nch4a"), st(e, "class", "progress-level svelte-16nch4a"); + e = _t("div"), t = _t("div"), r && r.c(), n = Pe(), l = _t("div"), s = _t("div"), lt(t, "class", "progress-level-inner svelte-16nch4a"), lt(s, "class", "progress-bar svelte-16nch4a"), Kt(s, "width", o), lt(l, "class", "progress-bar-wrap svelte-16nch4a"), lt(e, "class", "progress-level svelte-16nch4a"); }, m(a, f) { - j(a, e, f), fn(e, t), r && r.m(t, null), fn(e, n), fn(e, l), fn(l, s), i[31](s); + j(a, e, f), cn(e, t), r && r.m(t, null), cn(e, n), cn(e, l), cn(l, s), i[31](s); }, p(a, f) { /*progress*/ - a[7] != null ? r ? r.p(a, f) : (r = Wo(a), r.c(), r.m(t, null)) : r && (r.d(1), r = null), f[0] & /*last_progress_level*/ + a[7] != null ? r ? r.p(a, f) : (r = Xo(a), r.c(), r.m(t, null)) : r && (r.d(1), r = null), f[0] & /*last_progress_level*/ 32768 && o !== (o = `${/*last_progress_level*/ - a[15] * 100}%`) && Gt(s, "width", o); + a[15] * 100}%`) && Kt(s, "width", o); }, i: ks, o: ks, @@ -3222,18 +3222,18 @@ function l1(i) { } }; } -function Wo(i) { +function Xo(i) { let e, t = xi( /*progress*/ i[7] ), n = []; for (let l = 0; l < t.length; l += 1) - n[l] = To(qo(i, t, l)); + n[l] = jo(Lo(i, t, l)); return { c() { for (let l = 0; l < n.length; l += 1) n[l].c(); - e = Nn(); + e = On(); }, m(l, s) { for (let o = 0; o < n.length; o += 1) @@ -3249,8 +3249,8 @@ function Wo(i) { ); let o; for (o = 0; o < t.length; o += 1) { - const r = qo(l, t, o); - n[o] ? n[o].p(r, s) : (n[o] = To(r), n[o].c(), n[o].m(e.parentNode, e)); + const r = Lo(l, t, o); + n[o] ? n[o].p(r, s) : (n[o] = jo(r), n[o].c(), n[o].m(e.parentNode, e)); } for (; o < n.length; o += 1) n[o].d(1); @@ -3258,17 +3258,17 @@ function Wo(i) { } }, d(l) { - l && T(e), cr(n, l); + l && T(e), _r(n, l); } }; } -function Xo(i) { +function Yo(i) { let e, t, n, l, s = ( /*i*/ - i[43] !== 0 && s1() + i[43] !== 0 && a1() ), o = ( /*p*/ - i[41].desc != null && Yo(i) + i[41].desc != null && Io(i) ), r = ( /*p*/ i[41].desc != null && /*progress_level*/ @@ -3276,35 +3276,35 @@ function Xo(i) { i[14][ /*i*/ i[43] - ] != null && Io() + ] != null && Ho() ), a = ( /*progress_level*/ - i[14] != null && Ho(i) + i[14] != null && To(i) ); return { c() { - s && s.c(), e = Pe(), o && o.c(), t = Pe(), r && r.c(), n = Pe(), a && a.c(), l = Nn(); + s && s.c(), e = Pe(), o && o.c(), t = Pe(), r && r.c(), n = Pe(), a && a.c(), l = On(); }, m(f, c) { s && s.m(f, c), j(f, e, c), o && o.m(f, c), j(f, t, c), r && r.m(f, c), j(f, n, c), a && a.m(f, c), j(f, l, c); }, p(f, c) { /*p*/ - f[41].desc != null ? o ? o.p(f, c) : (o = Yo(f), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null), /*p*/ + f[41].desc != null ? o ? o.p(f, c) : (o = Io(f), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null), /*p*/ f[41].desc != null && /*progress_level*/ f[14] && /*progress_level*/ f[14][ /*i*/ f[43] - ] != null ? r || (r = Io(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ - f[14] != null ? a ? a.p(f, c) : (a = Ho(f), a.c(), a.m(l.parentNode, l)) : a && (a.d(1), a = null); + ] != null ? r || (r = Ho(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ + f[14] != null ? a ? a.p(f, c) : (a = To(f), a.c(), a.m(l.parentNode, l)) : a && (a.d(1), a = null); }, d(f) { f && (T(e), T(t), T(n), T(l)), s && s.d(f), o && o.d(f), r && r.d(f), a && a.d(f); } }; } -function s1(i) { +function a1(i) { let e; return { c() { @@ -3318,7 +3318,7 @@ function s1(i) { } }; } -function Yo(i) { +function Io(i) { let e = ( /*p*/ i[41].desc + "" @@ -3340,7 +3340,7 @@ function Yo(i) { } }; } -function Io(i) { +function Ho(i) { let e; return { c() { @@ -3354,7 +3354,7 @@ function Io(i) { } }; } -function Ho(i) { +function To(i) { let e = (100 * /*progress_level*/ (i[14][ /*i*/ @@ -3380,7 +3380,7 @@ function Ho(i) { } }; } -function To(i) { +function jo(i) { let e, t = ( /*p*/ (i[41].desc != null || /*progress_level*/ @@ -3388,11 +3388,11 @@ function To(i) { i[14][ /*i*/ i[43] - ] != null) && Xo(i) + ] != null) && Yo(i) ); return { c() { - t && t.c(), e = Nn(); + t && t.c(), e = On(); }, m(n, l) { t && t.m(n, l), j(n, e, l); @@ -3404,34 +3404,34 @@ function To(i) { n[14][ /*i*/ n[43] - ] != null ? t ? t.p(n, l) : (t = Xo(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + ] != null ? t ? t.p(n, l) : (t = Yo(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { n && T(e), t && t.d(n); } }; } -function jo(i) { +function Fo(i) { let e, t, n, l; const s = ( /*#slots*/ i[30]["additional-loading-text"] - ), o = rr( + ), o = cr( s, i, /*$$scope*/ i[29], - Do + qo ); return { c() { - e = dt("p"), t = ce( + e = _t("p"), t = ce( /*loading_text*/ i[9] - ), n = Pe(), o && o.c(), st(e, "class", "loading svelte-16nch4a"); + ), n = Pe(), o && o.c(), lt(e, "class", "loading svelte-16nch4a"); }, m(r, a) { - j(r, e, a), fn(e, t), j(r, n, a), o && o.m(r, a), l = !0; + j(r, e, a), cn(e, t), j(r, n, a), o && o.m(r, a), l = !0; }, p(r, a) { (!l || a[0] & /*loading_text*/ @@ -3440,39 +3440,39 @@ function jo(i) { /*loading_text*/ r[9] ), o && o.p && (!l || a[0] & /*$$scope*/ - 536870912) && hr( + 536870912) && gr( o, s, r, /*$$scope*/ r[29], - l ? _r( + l ? hr( s, /*$$scope*/ r[29], a, - Kd - ) : ur( + Qd + ) : dr( /*$$scope*/ r[29] ), - Do + qo ); }, i(r) { - l || (lt(o, r), l = !0); + l || (it(o, r), l = !0); }, o(r) { - ht(o, r), l = !1; + dt(o, r), l = !1; }, d(r) { r && (T(e), T(n)), o && o.d(r); } }; } -function o1(i) { +function r1(i) { let e, t, n, l, s; - const o = [Qd, Jd], r = []; + const o = [$d, xd], r = []; function a(f, c) { return ( /*status*/ @@ -3484,7 +3484,7 @@ function o1(i) { } return ~(t = a(i)) && (n = r[t] = o[t](i)), { c() { - e = dt("div"), n && n.c(), st(e, "class", l = "wrap " + /*variant*/ + e = _t("div"), n && n.c(), lt(e, "class", l = "wrap " + /*variant*/ i[8] + " " + /*show_progress*/ i[6] + " svelte-16nch4a"), Oe(e, "hide", !/*status*/ i[4] || /*status*/ @@ -3508,12 +3508,12 @@ function o1(i) { "border", /*border*/ i[12] - ), Gt( + ), Kt( e, "position", /*absolute*/ i[10] ? "absolute" : "static" - ), Gt( + ), Kt( e, "padding", /*absolute*/ @@ -3525,12 +3525,12 @@ function o1(i) { }, p(f, c) { let u = t; - t = a(f), t === u ? ~t && r[t].p(f, c) : (n && (vs(), ht(r[u], 1, 1, () => { + t = a(f), t === u ? ~t && r[t].p(f, c) : (n && (vs(), dt(r[u], 1, 1, () => { r[u] = null; - }), ps()), ~t ? (n = r[t], n ? n.p(f, c) : (n = r[t] = o[t](f), n.c()), lt(n, 1), n.m(e, null)) : n = null), (!s || c[0] & /*variant, show_progress*/ + }), ps()), ~t ? (n = r[t], n ? n.p(f, c) : (n = r[t] = o[t](f), n.c()), it(n, 1), n.m(e, null)) : n = null), (!s || c[0] & /*variant, show_progress*/ 320 && l !== (l = "wrap " + /*variant*/ f[8] + " " + /*show_progress*/ - f[6] + " svelte-16nch4a")) && st(e, "class", l), (!s || c[0] & /*variant, show_progress, status, show_progress*/ + f[6] + " svelte-16nch4a")) && lt(e, "class", l), (!s || c[0] & /*variant, show_progress, status, show_progress*/ 336) && Oe(e, "hide", !/*status*/ f[4] || /*status*/ f[4] === "complete" || /*show_progress*/ @@ -3557,13 +3557,13 @@ function o1(i) { /*border*/ f[12] ), c[0] & /*absolute*/ - 1024 && Gt( + 1024 && Kt( e, "position", /*absolute*/ f[10] ? "absolute" : "static" ), c[0] & /*absolute*/ - 1024 && Gt( + 1024 && Kt( e, "padding", /*absolute*/ @@ -3571,17 +3571,17 @@ function o1(i) { ); }, i(f) { - s || (lt(n), s = !0); + s || (it(n), s = !0); }, o(f) { - ht(n), s = !1; + dt(n), s = !1; }, d(f) { f && T(e), ~t && r[t].d(), i[33](null); } }; } -var a1 = function(i, e, t, n) { +var f1 = function(i, e, t, n) { function l(s) { return s instanceof t ? s : new t(function(o) { o(s); @@ -3609,12 +3609,12 @@ var a1 = function(i, e, t, n) { }); }; let Li = [], Gl = !1; -function r1(i) { - return a1(this, arguments, void 0, function* (e, t = !0) { +function c1(i) { + return f1(this, arguments, void 0, function* (e, t = !0) { if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) { if (Li.push(e), !Gl) Gl = !0; else return; - yield Od(), requestAnimationFrame(() => { + yield Zd(), requestAnimationFrame(() => { let n = [0, 0]; for (let l = 0; l < Li.length; l++) { const o = Li[l].getBoundingClientRect(); @@ -3625,11 +3625,11 @@ function r1(i) { } }); } -function f1(i, e, t) { +function u1(i, e, t) { let n, { $$slots: l = {}, $$scope: s } = e; this && this.__awaiter; - const o = Zd(); - let { i18n: r } = e, { eta: a = null } = e, { queue_position: f } = e, { queue_size: c } = e, { status: u } = e, { scroll_to_output: _ = !1 } = e, { timer: d = !0 } = e, { show_progress: m = "full" } = e, { message: h = null } = e, { progress: g = null } = e, { variant: p = "default" } = e, { loading_text: w = "Loading..." } = e, { absolute: b = !0 } = e, { translucent: k = !1 } = e, { border: v = !1 } = e, { autoscroll: y } = e, S, C = !1, z = 0, D = 0, q = null, W = null, F = 0, J = null, ie, P = null, $ = !0; + const o = Kd(); + let { i18n: r } = e, { eta: a = null } = e, { queue_position: f } = e, { queue_size: c } = e, { status: u } = e, { scroll_to_output: _ = !1 } = e, { timer: d = !0 } = e, { show_progress: m = "full" } = e, { message: h = null } = e, { progress: g = null } = e, { variant: p = "default" } = e, { loading_text: w = "Loading..." } = e, { absolute: b = !0 } = e, { translucent: k = !1 } = e, { border: v = !1 } = e, { autoscroll: y } = e, S, C = !1, z = 0, D = 0, q = null, W = null, F = 0, J = null, le, P = null, $ = !0; const R = () => { t(0, a = t(27, q = t(19, Q = null))), t(25, z = performance.now()), t(26, D = 0), C = !0, V(); }; @@ -3641,20 +3641,20 @@ function f1(i, e, t) { function A() { t(26, D = 0), t(0, a = t(27, q = t(19, Q = null))), C && (C = !1); } - Pd(() => { + Gd(() => { C && A(); }); let Q = null; function ae(X) { - zo[X ? "unshift" : "push"](() => { - P = X, t(16, P), t(7, g), t(14, J), t(15, ie); + Bo[X ? "unshift" : "push"](() => { + P = X, t(16, P), t(7, g), t(14, J), t(15, le); }); } const Z = () => { o("clear_status"); }; function G(X) { - zo[X ? "unshift" : "push"](() => { + Bo[X ? "unshift" : "push"](() => { S = X, t(13, S); }); } @@ -3670,9 +3670,9 @@ function f1(i, e, t) { return X.index / X.length; if (X.progress != null) return X.progress; - })) : t(14, J = null), J ? (t(15, ie = J[J.length - 1]), P && (ie === 0 ? t(16, P.style.transition = "0", P) : t(16, P.style.transition = "150ms", P))) : t(15, ie = void 0)), i.$$.dirty[0] & /*status*/ + })) : t(14, J = null), J ? (t(15, le = J[J.length - 1]), P && (le === 0 ? t(16, P.style.transition = "0", P) : t(16, P.style.transition = "150ms", P))) : t(15, le = void 0)), i.$$.dirty[0] & /*status*/ 16 && (u === "pending" ? R() : A()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ - 20979728 && S && _ && (u === "pending" || u === "complete") && r1(S, y), i.$$.dirty[0] & /*status, message*/ + 20979728 && S && _ && (u === "pending" || u === "complete") && c1(S, y), i.$$.dirty[0] & /*status, message*/ 8388624, i.$$.dirty[0] & /*timer_diff*/ 67108864 && t(20, n = D.toFixed(1)); }, [ @@ -3691,7 +3691,7 @@ function f1(i, e, t) { v, S, J, - ie, + le, P, F, $, @@ -3712,14 +3712,14 @@ function f1(i, e, t) { G ]; } -class c1 extends Ud { +class _1 extends Nd { constructor(e) { - super(), Vd( + super(), Od( this, e, - f1, - o1, - Nd, + u1, + r1, + Pd, { i18n: 1, eta: 0, @@ -3743,30 +3743,30 @@ class c1 extends Ud { ); } } -const { setContext: L2, getContext: u1 } = window.__gradio__svelte__internal, _1 = "WORKER_PROXY_CONTEXT_KEY"; -function mr() { - return u1(_1); +const { setContext: E2, getContext: d1 } = window.__gradio__svelte__internal, h1 = "WORKER_PROXY_CONTEXT_KEY"; +function br() { + return d1(h1); } -function d1(i) { +function m1(i) { return i.host === window.location.host || i.host === "localhost:7860" || i.host === "127.0.0.1:7860" || // Ref: https://github.com/gradio-app/gradio/blob/v3.32.0/js/app/src/Index.svelte#L194 i.host === "lite.local"; } -function gr(i, e) { +function wr(i, e) { const t = e.toLowerCase(); for (const [n, l] of Object.entries(i)) if (n.toLowerCase() === t) return l; } -function br(i) { +function pr(i) { if (i == null) return !1; const e = new URL(i, window.location.href); - return !(!d1(e) || e.protocol !== "http:" && e.protocol !== "https:"); + return !(!m1(e) || e.protocol !== "http:" && e.protocol !== "https:"); } -async function h1(i) { - if (i == null || !br(i)) +async function g1(i) { + if (i == null || !pr(i)) return i; - const e = mr(); + const e = br(); if (e == null) return i; const n = new URL(i, window.location.href).pathname; @@ -3779,36 +3779,36 @@ async function h1(i) { if (l.status !== 200) throw new Error(`Failed to get file ${n} from the Wasm worker.`); const s = new Blob([l.body], { - type: gr(l.headers, "content-type") + type: wr(l.headers, "content-type") }); return URL.createObjectURL(s); }); } const { - SvelteComponent: m1, + SvelteComponent: b1, assign: $i, - check_outros: wr, - compute_rest_props: Fo, + check_outros: vr, + compute_rest_props: Uo, create_slot: Ws, detach: hl, - element: pr, - empty: vr, - exclude_internal_props: g1, + element: kr, + empty: yr, + exclude_internal_props: w1, get_all_dirty_from_scope: Xs, get_slot_changes: Ys, - get_spread_update: kr, - group_outros: yr, - init: b1, + get_spread_update: Cr, + group_outros: Sr, + init: p1, insert: ml, - listen: Cr, - prevent_default: w1, - safe_not_equal: p1, + listen: zr, + prevent_default: v1, + safe_not_equal: k1, set_attributes: el, - transition_in: mn, - transition_out: gn, + transition_in: gn, + transition_out: bn, update_slot_base: Is -} = window.__gradio__svelte__internal, { createEventDispatcher: v1 } = window.__gradio__svelte__internal; -function k1(i) { +} = window.__gradio__svelte__internal, { createEventDispatcher: y1 } = window.__gradio__svelte__internal; +function C1(i) { let e, t, n, l, s; const o = ( /*#slots*/ @@ -3840,10 +3840,10 @@ function k1(i) { f = $i(f, a[c]); return { c() { - e = pr("a"), r && r.c(), el(e, f); + e = kr("a"), r && r.c(), el(e, f); }, m(c, u) { - ml(c, e, u), r && r.m(e, null), n = !0, l || (s = Cr( + ml(c, e, u), r && r.m(e, null), n = !0, l || (s = zr( e, "click", /*dispatch*/ @@ -3869,7 +3869,7 @@ function k1(i) { c[7] ), null - ), el(e, f = kr(a, [ + ), el(e, f = Cr(a, [ (!n || u & /*href*/ 1) && { href: ( /*href*/ @@ -3888,19 +3888,19 @@ function k1(i) { ])); }, i(c) { - n || (mn(r, c), n = !0); + n || (gn(r, c), n = !0); }, o(c) { - gn(r, c), n = !1; + bn(r, c), n = !1; }, d(c) { c && hl(e), r && r.d(c), l = !1, s(); } }; } -function y1(i) { +function S1(i) { let e, t, n, l; - const s = [S1, C1], o = []; + const s = [B1, z1], o = []; function r(a, f) { return ( /*is_downloading*/ @@ -3909,29 +3909,29 @@ function y1(i) { } return e = r(i), t = o[e] = s[e](i), { c() { - t.c(), n = vr(); + t.c(), n = yr(); }, m(a, f) { o[e].m(a, f), ml(a, n, f), l = !0; }, p(a, f) { let c = e; - e = r(a), e === c ? o[e].p(a, f) : (yr(), gn(o[c], 1, 1, () => { + e = r(a), e === c ? o[e].p(a, f) : (Sr(), bn(o[c], 1, 1, () => { o[c] = null; - }), wr(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), mn(t, 1), t.m(n.parentNode, n)); + }), vr(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), gn(t, 1), t.m(n.parentNode, n)); }, i(a) { - l || (mn(t), l = !0); + l || (gn(t), l = !0); }, o(a) { - gn(t), l = !1; + bn(t), l = !1; }, d(a) { a && hl(n), o[e].d(a); } }; } -function C1(i) { +function z1(i) { let e, t, n, l; const s = ( /*#slots*/ @@ -3955,10 +3955,10 @@ function C1(i) { a = $i(a, r[f]); return { c() { - e = pr("a"), o && o.c(), el(e, a); + e = kr("a"), o && o.c(), el(e, a); }, m(f, c) { - ml(f, e, c), o && o.m(e, null), t = !0, n || (l = Cr(e, "click", w1( + ml(f, e, c), o && o.m(e, null), t = !0, n || (l = zr(e, "click", v1( /*wasm_click_handler*/ i[5] )), n = !0); @@ -3982,7 +3982,7 @@ function C1(i) { f[7] ), null - ), el(e, a = kr(r, [ + ), el(e, a = Cr(r, [ c & /*$$restProps*/ 64 && /*$$restProps*/ f[6], @@ -3994,17 +3994,17 @@ function C1(i) { ])); }, i(f) { - t || (mn(o, f), t = !0); + t || (gn(o, f), t = !0); }, o(f) { - gn(o, f), t = !1; + bn(o, f), t = !1; }, d(f) { f && hl(e), o && o.d(f), n = !1, l(); } }; } -function S1(i) { +function B1(i) { let e; const t = ( /*#slots*/ @@ -4045,54 +4045,54 @@ function S1(i) { ); }, i(l) { - e || (mn(n, l), e = !0); + e || (gn(n, l), e = !0); }, o(l) { - gn(n, l), e = !1; + bn(n, l), e = !1; }, d(l) { n && n.d(l); } }; } -function z1(i) { +function D1(i) { let e, t, n, l, s; - const o = [y1, k1], r = []; + const o = [S1, C1], r = []; function a(f, c) { return c & /*href*/ 1 && (e = null), e == null && (e = !!/*worker_proxy*/ - (f[4] && br( + (f[4] && pr( /*href*/ f[0] ))), e ? 0 : 1; } return t = a(i, -1), n = r[t] = o[t](i), { c() { - n.c(), l = vr(); + n.c(), l = yr(); }, m(f, c) { r[t].m(f, c), ml(f, l, c), s = !0; }, p(f, [c]) { let u = t; - t = a(f, c), t === u ? r[t].p(f, c) : (yr(), gn(r[u], 1, 1, () => { + t = a(f, c), t === u ? r[t].p(f, c) : (Sr(), bn(r[u], 1, 1, () => { r[u] = null; - }), wr(), n = r[t], n ? n.p(f, c) : (n = r[t] = o[t](f), n.c()), mn(n, 1), n.m(l.parentNode, l)); + }), vr(), n = r[t], n ? n.p(f, c) : (n = r[t] = o[t](f), n.c()), gn(n, 1), n.m(l.parentNode, l)); }, i(f) { - s || (mn(n), s = !0); + s || (gn(n), s = !0); }, o(f) { - gn(n), s = !1; + bn(n), s = !1; }, d(f) { f && hl(l), r[t].d(f); } }; } -function B1(i, e, t) { +function q1(i, e, t) { const n = ["href", "download"]; - let l = Fo(e, n), { $$slots: s = {}, $$scope: o } = e; + let l = Uo(e, n), { $$slots: s = {}, $$scope: o } = e; var r = this && this.__awaiter || function(m, h, g, p) { function w(b) { return b instanceof g ? b : new g(function(k) { @@ -4121,9 +4121,9 @@ function B1(i, e, t) { }); }; let { href: a = void 0 } = e, { download: f } = e; - const c = v1(); + const c = y1(); let u = !1; - const _ = mr(); + const _ = br(); function d() { return r(this, void 0, void 0, function* () { if (u) @@ -4144,7 +4144,7 @@ function B1(i, e, t) { const p = new Blob( [g.body], { - type: gr(g.headers, "content-type") + type: wr(g.headers, "content-type") } ), w = URL.createObjectURL(p), b = document.createElement("a"); b.href = w, b.download = f, b.click(), URL.revokeObjectURL(w); @@ -4154,7 +4154,7 @@ function B1(i, e, t) { }); } return i.$$set = (m) => { - e = $i($i({}, e), g1(m)), t(6, l = Fo(e, n)), "href" in m && t(0, a = m.href), "download" in m && t(1, f = m.download), "$$scope" in m && t(7, o = m.$$scope); + e = $i($i({}, e), w1(m)), t(6, l = Uo(e, n)), "href" in m && t(0, a = m.href), "download" in m && t(1, f = m.download), "$$scope" in m && t(7, o = m.$$scope); }, [ a, f, @@ -4167,23 +4167,23 @@ function B1(i, e, t) { s ]; } -class D1 extends m1 { +class L1 extends b1 { constructor(e) { - super(), b1(this, e, B1, z1, p1, { href: 0, download: 1 }); + super(), p1(this, e, q1, D1, k1, { href: 0, download: 1 }); } } -var q1 = Object.defineProperty, L1 = (i, e, t) => e in i ? q1(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, vt = (i, e, t) => (L1(i, typeof e != "symbol" ? e + "" : e, t), t), Sr = (i, e, t) => { +var M1 = Object.defineProperty, E1 = (i, e, t) => e in i ? M1(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, vt = (i, e, t) => (E1(i, typeof e != "symbol" ? e + "" : e, t), t), Br = (i, e, t) => { if (!e.has(i)) throw TypeError("Cannot " + t); -}, $n = (i, e, t) => (Sr(i, e, "read from private field"), t ? t.call(i) : e.get(i)), M1 = (i, e, t) => { +}, ei = (i, e, t) => (Br(i, e, "read from private field"), t ? t.call(i) : e.get(i)), R1 = (i, e, t) => { if (e.has(i)) throw TypeError("Cannot add the same private member more than once"); e instanceof WeakSet ? e.add(i) : e.set(i, t); -}, E1 = (i, e, t, n) => (Sr(i, e, "write to private field"), e.set(i, t), t), Zt; +}, A1 = (i, e, t, n) => (Br(i, e, "write to private field"), e.set(i, t), t), Gt; new Intl.Collator(0, { numeric: 1 }).compare; -async function zr(i, e) { +async function Dr(i, e) { return i.map( - (t) => new R1({ + (t) => new W1({ path: t.name, orig_name: t.name, blob: t, @@ -4193,7 +4193,7 @@ async function zr(i, e) { }) ); } -class R1 { +class W1 { constructor({ path: e, url: t, @@ -4208,12 +4208,12 @@ class R1 { } } typeof process < "u" && process.versions && process.versions.node; -class M2 extends TransformStream { +class R2 extends TransformStream { /** Constructs a new instance. */ constructor(e = { allowCR: !1 }) { super({ transform: (t, n) => { - for (t = $n(this, Zt) + t; ; ) { + for (t = ei(this, Gt) + t; ; ) { const l = t.indexOf(` `), s = e.allowCR ? t.indexOf("\r") : -1; if (s !== -1 && s !== t.length - 1 && (l === -1 || l - 1 > s)) { @@ -4225,36 +4225,36 @@ class M2 extends TransformStream { const o = t[l - 1] === "\r" ? l - 1 : l; n.enqueue(t.slice(0, o)), t = t.slice(l + 1); } - E1(this, Zt, t); + A1(this, Gt, t); }, flush: (t) => { - if ($n(this, Zt) === "") + if (ei(this, Gt) === "") return; - const n = e.allowCR && $n(this, Zt).endsWith("\r") ? $n(this, Zt).slice(0, -1) : $n(this, Zt); + const n = e.allowCR && ei(this, Gt).endsWith("\r") ? ei(this, Gt).slice(0, -1) : ei(this, Gt); t.enqueue(n); } - }), M1(this, Zt, ""); + }), R1(this, Gt, ""); } } -Zt = /* @__PURE__ */ new WeakMap(); +Gt = /* @__PURE__ */ new WeakMap(); const { - SvelteComponent: A1, + SvelteComponent: X1, append: Ee, - attr: on, - detach: Br, - element: an, - init: W1, - insert: Dr, - noop: Uo, - safe_not_equal: X1, + attr: an, + detach: qr, + element: rn, + init: Y1, + insert: Lr, + noop: Vo, + safe_not_equal: I1, set_data: tl, set_style: Kl, space: ys, - text: Xn, - toggle_class: Vo -} = window.__gradio__svelte__internal, { onMount: Y1, createEventDispatcher: I1, onDestroy: H1 } = window.__gradio__svelte__internal; -function No(i) { - let e, t, n, l, s = ai( + text: Yn, + toggle_class: No +} = window.__gradio__svelte__internal, { onMount: H1, createEventDispatcher: T1, onDestroy: j1 } = window.__gradio__svelte__internal; +function Oo(i) { + let e, t, n, l, s = ri( /*file_to_display*/ i[2] ) + "", o, r, a, f, c = ( @@ -4263,21 +4263,21 @@ function No(i) { ), u; return { c() { - e = an("div"), t = an("span"), n = an("div"), l = an("progress"), o = Xn(s), a = ys(), f = an("span"), u = Xn(c), Kl(l, "visibility", "hidden"), Kl(l, "height", "0"), Kl(l, "width", "0"), l.value = r = ai( + e = rn("div"), t = rn("span"), n = rn("div"), l = rn("progress"), o = Yn(s), a = ys(), f = rn("span"), u = Yn(c), Kl(l, "visibility", "hidden"), Kl(l, "height", "0"), Kl(l, "width", "0"), l.value = r = ri( /*file_to_display*/ i[2] - ), on(l, "max", "100"), on(l, "class", "svelte-cr2edf"), on(n, "class", "progress-bar svelte-cr2edf"), on(f, "class", "file-name svelte-cr2edf"), on(e, "class", "file svelte-cr2edf"); + ), an(l, "max", "100"), an(l, "class", "svelte-cr2edf"), an(n, "class", "progress-bar svelte-cr2edf"), an(f, "class", "file-name svelte-cr2edf"), an(e, "class", "file svelte-cr2edf"); }, m(_, d) { - Dr(_, e, d), Ee(e, t), Ee(t, n), Ee(n, l), Ee(l, o), Ee(e, a), Ee(e, f), Ee(f, u); + Lr(_, e, d), Ee(e, t), Ee(t, n), Ee(n, l), Ee(l, o), Ee(e, a), Ee(e, f), Ee(f, u); }, p(_, d) { d & /*file_to_display*/ - 4 && s !== (s = ai( + 4 && s !== (s = ri( /*file_to_display*/ _[2] ) + "") && tl(o, s), d & /*file_to_display*/ - 4 && r !== (r = ai( + 4 && r !== (r = ri( /*file_to_display*/ _[2] )) && (l.value = r), d & /*file_to_display*/ @@ -4285,11 +4285,11 @@ function No(i) { _[2].orig_name + "") && tl(u, c); }, d(_) { - _ && Br(e); + _ && qr(e); } }; } -function T1(i) { +function F1(i) { let e, t, n, l = ( /*files_with_progress*/ i[0].length + "" @@ -4298,11 +4298,11 @@ function T1(i) { i[0].length > 1 ? "files" : "file" ), a, f, c, u = ( /*file_to_display*/ - i[2] && No(i) + i[2] && Oo(i) ); return { c() { - e = an("div"), t = an("span"), n = Xn("Uploading "), s = Xn(l), o = ys(), a = Xn(r), f = Xn("..."), c = ys(), u && u.c(), on(t, "class", "uploading svelte-cr2edf"), on(e, "class", "wrap svelte-cr2edf"), Vo( + e = rn("div"), t = rn("span"), n = Yn("Uploading "), s = Yn(l), o = ys(), a = Yn(r), f = Yn("..."), c = ys(), u && u.c(), an(t, "class", "uploading svelte-cr2edf"), an(e, "class", "wrap svelte-cr2edf"), No( e, "progress", /*progress*/ @@ -4310,7 +4310,7 @@ function T1(i) { ); }, m(_, d) { - Dr(_, e, d), Ee(e, t), Ee(t, n), Ee(t, s), Ee(t, o), Ee(t, a), Ee(t, f), Ee(e, c), u && u.m(e, null); + Lr(_, e, d), Ee(e, t), Ee(t, n), Ee(t, s), Ee(t, o), Ee(t, a), Ee(t, f), Ee(e, c), u && u.m(e, null); }, p(_, [d]) { d & /*files_with_progress*/ @@ -4318,31 +4318,31 @@ function T1(i) { _[0].length + "") && tl(s, l), d & /*files_with_progress*/ 1 && r !== (r = /*files_with_progress*/ _[0].length > 1 ? "files" : "file") && tl(a, r), /*file_to_display*/ - _[2] ? u ? u.p(_, d) : (u = No(_), u.c(), u.m(e, null)) : u && (u.d(1), u = null), d & /*progress*/ - 2 && Vo( + _[2] ? u ? u.p(_, d) : (u = Oo(_), u.c(), u.m(e, null)) : u && (u.d(1), u = null), d & /*progress*/ + 2 && No( e, "progress", /*progress*/ _[1] ); }, - i: Uo, - o: Uo, + i: Vo, + o: Vo, d(_) { - _ && Br(e), u && u.d(); + _ && qr(e), u && u.d(); } }; } -function ai(i) { +function ri(i) { return i.progress * 100 / (i.size || 0) || 0; } -function j1(i) { +function U1(i) { let e = 0; return i.forEach((t) => { - e += ai(t); + e += ri(t); }), document.documentElement.style.setProperty("--upload-progress-width", (e / i.length).toFixed(2) + "%"), e / i.length; } -function F1(i, e, t) { +function V1(i, e, t) { var n = this && this.__awaiter || function(h, g, p, w) { function b(k) { return k instanceof p ? k : new p(function(v) { @@ -4371,11 +4371,11 @@ function F1(i, e, t) { }); }; let { upload_id: l } = e, { root: s } = e, { files: o } = e, { stream_handler: r } = e, a, f = !1, c, u, _ = o.map((h) => Object.assign(Object.assign({}, h), { progress: 0 })); - const d = I1(); + const d = T1(); function m(h, g) { t(0, _ = _.map((p) => (p.orig_name === h && (p.progress += g), p))); } - return Y1(() => n(void 0, void 0, void 0, function* () { + return H1(() => n(void 0, void 0, void 0, function* () { if (a = yield r(new URL(`${s}/upload_progress?upload_id=${l}`)), a == null) throw new Error("Event source is not defined"); a.onmessage = function(h) { @@ -4384,13 +4384,13 @@ function F1(i, e, t) { f || t(1, f = !0), g.msg === "done" ? (a == null || a.close(), d("done")) : (t(7, c = g), m(g.orig_name, g.chunk_size)); }); }; - })), H1(() => { + })), j1(() => { (a != null || a != null) && a.close(); }), i.$$set = (h) => { "upload_id" in h && t(3, l = h.upload_id), "root" in h && t(4, s = h.root), "files" in h && t(5, o = h.files), "stream_handler" in h && t(6, r = h.stream_handler); }, i.$$.update = () => { i.$$.dirty & /*files_with_progress*/ - 1 && j1(_), i.$$.dirty & /*current_file_upload, files_with_progress*/ + 1 && U1(_), i.$$.dirty & /*current_file_upload, files_with_progress*/ 129 && t(2, u = c || _[0]); }, [ _, @@ -4403,9 +4403,9 @@ function F1(i, e, t) { c ]; } -class U1 extends A1 { +class N1 extends X1 { constructor(e) { - super(), W1(this, e, F1, T1, X1, { + super(), Y1(this, e, V1, F1, I1, { upload_id: 3, root: 4, files: 5, @@ -4414,42 +4414,42 @@ class U1 extends A1 { } } const { - SvelteComponent: V1, - append: Oo, + SvelteComponent: O1, + append: Po, attr: ke, - binding_callbacks: N1, - bubble: Qt, - check_outros: qr, - create_component: O1, - create_slot: Lr, - destroy_component: P1, + binding_callbacks: P1, + bubble: xt, + check_outros: Mr, + create_component: Z1, + create_slot: Er, + destroy_component: G1, detach: gl, element: Cs, - empty: Mr, - get_all_dirty_from_scope: Er, - get_slot_changes: Rr, - group_outros: Ar, - init: Z1, + empty: Rr, + get_all_dirty_from_scope: Ar, + get_slot_changes: Wr, + group_outros: Xr, + init: K1, insert: bl, listen: Ie, - mount_component: G1, - prevent_default: xt, - run_all: K1, - safe_not_equal: J1, - set_style: Wr, - space: Q1, - stop_propagation: $t, + mount_component: J1, + prevent_default: $t, + run_all: Q1, + safe_not_equal: x1, + set_style: Yr, + space: $1, + stop_propagation: en, toggle_class: we, - transition_in: Kt, - transition_out: bn, - update_slot_base: Xr -} = window.__gradio__svelte__internal, { createEventDispatcher: x1, tick: $1 } = window.__gradio__svelte__internal; -function eh(i) { + transition_in: Jt, + transition_out: wn, + update_slot_base: Ir +} = window.__gradio__svelte__internal, { createEventDispatcher: eh, tick: th } = window.__gradio__svelte__internal; +function nh(i) { let e, t, n, l, s, o, r, a, f, c, u; const _ = ( /*#slots*/ i[26].default - ), d = Lr( + ), d = Er( _, i, /*$$scope*/ @@ -4458,7 +4458,7 @@ function eh(i) { ); return { c() { - e = Cs("button"), d && d.c(), t = Q1(), n = Cs("input"), ke(n, "aria-label", "file upload"), ke(n, "data-testid", "file-upload"), ke(n, "type", "file"), ke(n, "accept", l = /*accept_file_types*/ + e = Cs("button"), d && d.c(), t = $1(), n = Cs("input"), ke(n, "aria-label", "file upload"), ke(n, "data-testid", "file-upload"), ke(n, "type", "file"), ke(n, "accept", l = /*accept_file_types*/ i[16] || void 0), n.multiple = s = /*file_count*/ i[6] === "multiple" || void 0, ke(n, "webkitdirectory", o = /*file_count*/ i[6] === "directory" || void 0), ke(n, "mozdirectory", r = /*file_count*/ @@ -4488,41 +4488,41 @@ function eh(i) { "disable_click", /*disable_click*/ i[7] - ), Wr(e, "height", "100%"); + ), Yr(e, "height", "100%"); }, m(m, h) { - bl(m, e, h), d && d.m(e, null), Oo(e, t), Oo(e, n), i[34](n), f = !0, c || (u = [ + bl(m, e, h), d && d.m(e, null), Po(e, t), Po(e, n), i[34](n), f = !0, c || (u = [ Ie( n, "change", /*load_files_from_upload*/ i[18] ), - Ie(e, "drag", $t(xt( + Ie(e, "drag", en($t( /*drag_handler*/ i[27] ))), - Ie(e, "dragstart", $t(xt( + Ie(e, "dragstart", en($t( /*dragstart_handler*/ i[28] ))), - Ie(e, "dragend", $t(xt( + Ie(e, "dragend", en($t( /*dragend_handler*/ i[29] ))), - Ie(e, "dragover", $t(xt( + Ie(e, "dragover", en($t( /*dragover_handler*/ i[30] ))), - Ie(e, "dragenter", $t(xt( + Ie(e, "dragenter", en($t( /*dragenter_handler*/ i[31] ))), - Ie(e, "dragleave", $t(xt( + Ie(e, "dragleave", en($t( /*dragleave_handler*/ i[32] ))), - Ie(e, "drop", $t(xt( + Ie(e, "drop", en($t( /*drop_handler*/ i[33] ))), @@ -4554,19 +4554,19 @@ function eh(i) { }, p(m, h) { d && d.p && (!f || h[0] & /*$$scope*/ - 33554432) && Xr( + 33554432) && Ir( d, _, m, /*$$scope*/ m[25], - f ? Rr( + f ? Wr( _, /*$$scope*/ m[25], h, null - ) : Er( + ) : Ar( /*$$scope*/ m[25] ), @@ -4614,50 +4614,50 @@ function eh(i) { ); }, i(m) { - f || (Kt(d, m), f = !0); + f || (Jt(d, m), f = !0); }, o(m) { - bn(d, m), f = !1; + wn(d, m), f = !1; }, d(m) { - m && gl(e), d && d.d(m), i[34](null), c = !1, K1(u); + m && gl(e), d && d.d(m), i[34](null), c = !1, Q1(u); } }; } -function th(i) { +function ih(i) { let e, t, n = !/*hidden*/ - i[9] && Po(i); + i[9] && Zo(i); return { c() { - n && n.c(), e = Mr(); + n && n.c(), e = Rr(); }, m(l, s) { n && n.m(l, s), bl(l, e, s), t = !0; }, p(l, s) { /*hidden*/ - l[9] ? n && (Ar(), bn(n, 1, 1, () => { + l[9] ? n && (Xr(), wn(n, 1, 1, () => { n = null; - }), qr()) : n ? (n.p(l, s), s[0] & /*hidden*/ - 512 && Kt(n, 1)) : (n = Po(l), n.c(), Kt(n, 1), n.m(e.parentNode, e)); + }), Mr()) : n ? (n.p(l, s), s[0] & /*hidden*/ + 512 && Jt(n, 1)) : (n = Zo(l), n.c(), Jt(n, 1), n.m(e.parentNode, e)); }, i(l) { - t || (Kt(n), t = !0); + t || (Jt(n), t = !0); }, o(l) { - bn(n), t = !1; + wn(n), t = !1; }, d(l) { l && gl(e), n && n.d(l); } }; } -function nh(i) { +function lh(i) { let e, t, n, l, s; const o = ( /*#slots*/ i[26].default - ), r = Lr( + ), r = Er( o, i, /*$$scope*/ @@ -4687,7 +4687,7 @@ function nh(i) { "flex", /*flex*/ i[5] - ), Wr(e, "height", "100%"); + ), Yr(e, "height", "100%"); }, m(a, f) { bl(a, e, f), r && r.m(e, null), n = !0, l || (s = Ie( @@ -4699,19 +4699,19 @@ function nh(i) { }, p(a, f) { r && r.p && (!n || f[0] & /*$$scope*/ - 33554432) && Xr( + 33554432) && Ir( r, o, a, /*$$scope*/ a[25], - n ? Rr( + n ? Wr( o, /*$$scope*/ a[25], f, null - ) : Er( + ) : Ar( /*$$scope*/ a[25] ), @@ -4745,19 +4745,19 @@ function nh(i) { ); }, i(a) { - n || (Kt(r, a), n = !0); + n || (Jt(r, a), n = !0); }, o(a) { - bn(r, a), n = !1; + wn(r, a), n = !1; }, d(a) { a && gl(e), r && r.d(a), l = !1, s(); } }; } -function Po(i) { +function Zo(i) { let e, t; - return e = new U1({ + return e = new N1({ props: { root: ( /*root*/ @@ -4778,10 +4778,10 @@ function Po(i) { } }), { c() { - O1(e.$$.fragment); + Z1(e.$$.fragment); }, m(n, l) { - G1(e, n, l), t = !0; + J1(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -4796,19 +4796,19 @@ function Po(i) { n[11]), e.$set(s); }, i(n) { - t || (Kt(e.$$.fragment, n), t = !0); + t || (Jt(e.$$.fragment, n), t = !0); }, o(n) { - bn(e.$$.fragment, n), t = !1; + wn(e.$$.fragment, n), t = !1; }, d(n) { - P1(e, n); + G1(e, n); } }; } -function ih(i) { +function sh(i) { let e, t, n, l; - const s = [nh, th, eh], o = []; + const s = [lh, ih, nh], o = []; function r(a, f) { return ( /*filetype*/ @@ -4821,29 +4821,29 @@ function ih(i) { } return e = r(i), t = o[e] = s[e](i), { c() { - t.c(), n = Mr(); + t.c(), n = Rr(); }, m(a, f) { o[e].m(a, f), bl(a, n, f), l = !0; }, p(a, f) { let c = e; - e = r(a), e === c ? o[e].p(a, f) : (Ar(), bn(o[c], 1, 1, () => { + e = r(a), e === c ? o[e].p(a, f) : (Xr(), wn(o[c], 1, 1, () => { o[c] = null; - }), qr(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), Kt(t, 1), t.m(n.parentNode, n)); + }), Mr(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), Jt(t, 1), t.m(n.parentNode, n)); }, i(a) { - l || (Kt(t), l = !0); + l || (Jt(t), l = !0); }, o(a) { - bn(t), l = !1; + wn(t), l = !1; }, d(a) { a && gl(n), o[e].d(a); } }; } -function lh(i, e, t) { +function oh(i, e, t) { if (!i || i === "*" || i === "file/*" || Array.isArray(i) && i.some((l) => l === "*" || l === "file/*")) return !0; let n; @@ -4858,27 +4858,27 @@ function lh(i, e, t) { return l.endsWith("/*") && t.startsWith(s + "/"); }); } -function sh(i, e, t) { +function ah(i, e, t) { let { $$slots: n = {}, $$scope: l } = e; var s = this && this.__awaiter || function(E, H, ee, re) { function M(Ge) { - return Ge instanceof ee ? Ge : new ee(function(ot) { - ot(Ge); + return Ge instanceof ee ? Ge : new ee(function(st) { + st(Ge); }); } - return new (ee || (ee = Promise))(function(Ge, ot) { + return new (ee || (ee = Promise))(function(Ge, st) { function Ke(Xe) { try { Je(re.next(Xe)); - } catch (gt) { - ot(gt); + } catch (mt) { + st(mt); } } function We(Xe) { try { Je(re.throw(Xe)); - } catch (gt) { - ot(gt); + } catch (mt) { + st(mt); } } function Je(Xe) { @@ -4888,7 +4888,7 @@ function sh(i, e, t) { }); }; let { filetype: o = null } = e, { dragging: r = !1 } = e, { boundedheight: a = !0 } = e, { center: f = !0 } = e, { flex: c = !0 } = e, { file_count: u = "single" } = e, { disable_click: _ = !1 } = e, { root: d } = e, { hidden: m = !1 } = e, { format: h = "file" } = e, { uploading: g = !1 } = e, { hidden_upload: p = null } = e, { show_progress: w = !0 } = e, { max_file_size: b = null } = e, { upload: k } = e, { stream_handler: v } = e, y, S, C; - const z = x1(), D = ["image", "video", "audio", "text", "file"], q = (E) => E.startsWith(".") || E.endsWith("/*") ? E : D.includes(E) ? E + "/*" : "." + E; + const z = eh(), D = ["image", "video", "audio", "text", "file"], q = (E) => E.startsWith(".") || E.endsWith("/*") ? E : D.includes(E) ? E + "/*" : "." + E; function W() { t(20, r = !r); } @@ -4909,9 +4909,9 @@ function sh(i, e, t) { function J() { _ || p && (t(2, p.value = "", p), p.click()); } - function ie(E) { + function le(E) { return s(this, void 0, void 0, function* () { - yield $1(), t(14, y = Math.random().toString(36).substring(2, 15)), t(1, g = !0); + yield th(), t(14, y = Math.random().toString(36).substring(2, 15)), t(1, g = !0); try { const H = yield k(E, d, y, b ?? 1 / 0); return z("load", u === "single" ? H == null ? void 0 : H[0] : H), t(1, g = !1), H || []; @@ -4925,7 +4925,7 @@ function sh(i, e, t) { if (!E.length) return; let H = E.map((ee) => new File([ee], ee instanceof File ? ee.name : "file", { type: ee.type })); - return t(15, S = yield zr(H)), yield ie(S); + return t(15, S = yield Dr(H)), yield le(S); }); } function $(E) { @@ -4949,34 +4949,34 @@ function sh(i, e, t) { if (t(20, r = !1), !(!((H = E.dataTransfer) === null || H === void 0) && H.files)) return; const ee = Array.from(E.dataTransfer.files).filter((re) => { const M = "." + re.name.split(".").pop(); - return M && lh(C, M, re.type) || (M && Array.isArray(o) ? o.includes(M) : M === o) ? !0 : (z("error", `Invalid file type only ${o} allowed.`), !1); + return M && oh(C, M, re.type) || (M && Array.isArray(o) ? o.includes(M) : M === o) ? !0 : (z("error", `Invalid file type only ${o} allowed.`), !1); }); yield P(ee); }); } function V(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function A(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function Q(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function ae(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function Z(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function G(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function X(E) { - Qt.call(this, i, E); + xt.call(this, i, E); } function ne(E) { - N1[E ? "unshift" : "push"](() => { + P1[E ? "unshift" : "push"](() => { p = E, t(2, p); }); } @@ -5023,14 +5023,14 @@ function sh(i, e, t) { ne ]; } -class oh extends V1 { +class rh extends O1 { constructor(e) { - super(), Z1( + super(), K1( this, e, + ah, sh, - ih, - J1, + x1, { filetype: 0, dragging: 20, @@ -5067,67 +5067,67 @@ class oh extends V1 { } } const { - SvelteComponent: ah, + SvelteComponent: fh, append: Mi, attr: Jl, - create_component: rh, - destroy_component: fh, - detach: ch, + create_component: ch, + destroy_component: uh, + detach: _h, element: Ql, - init: uh, - insert: _h, - listen: dh, - mount_component: hh, - noop: mh, - safe_not_equal: gh, - set_style: bh, - space: wh, - text: ph, - transition_in: vh, - transition_out: kh -} = window.__gradio__svelte__internal, { createEventDispatcher: yh } = window.__gradio__svelte__internal; -function Ch(i) { + init: dh, + insert: hh, + listen: mh, + mount_component: gh, + noop: bh, + safe_not_equal: wh, + set_style: ph, + space: vh, + text: kh, + transition_in: yh, + transition_out: Ch +} = window.__gradio__svelte__internal, { createEventDispatcher: Sh } = window.__gradio__svelte__internal; +function zh(i) { let e, t, n, l, s, o = "Click to Access Webcam", r, a, f, c; - return l = new $a({}), { + return l = new tr({}), { c() { - e = Ql("button"), t = Ql("div"), n = Ql("span"), rh(l.$$.fragment), s = wh(), r = ph(o), Jl(n, "class", "icon-wrap svelte-fjcd9c"), Jl(t, "class", "wrap svelte-fjcd9c"), Jl(e, "class", "svelte-fjcd9c"), bh(e, "height", "100%"); + e = Ql("button"), t = Ql("div"), n = Ql("span"), ch(l.$$.fragment), s = vh(), r = kh(o), Jl(n, "class", "icon-wrap svelte-fjcd9c"), Jl(t, "class", "wrap svelte-fjcd9c"), Jl(e, "class", "svelte-fjcd9c"), ph(e, "height", "100%"); }, m(u, _) { - _h(u, e, _), Mi(e, t), Mi(t, n), hh(l, n, null), Mi(t, s), Mi(t, r), a = !0, f || (c = dh( + hh(u, e, _), Mi(e, t), Mi(t, n), gh(l, n, null), Mi(t, s), Mi(t, r), a = !0, f || (c = mh( e, "click", /*click_handler*/ i[1] ), f = !0); }, - p: mh, + p: bh, i(u) { - a || (vh(l.$$.fragment, u), a = !0); + a || (yh(l.$$.fragment, u), a = !0); }, o(u) { - kh(l.$$.fragment, u), a = !1; + Ch(l.$$.fragment, u), a = !1; }, d(u) { - u && ch(e), fh(l), f = !1, c(); + u && _h(e), uh(l), f = !1, c(); } }; } -function Sh(i) { - const e = yh(); +function Bh(i) { + const e = Sh(); return [e, () => e("click")]; } -class zh extends ah { +class Dh extends fh { constructor(e) { - super(), uh(this, e, Sh, Ch, gh, {}); + super(), dh(this, e, Bh, zh, wh, {}); } } -function Bh() { +function qh() { return navigator.mediaDevices.enumerateDevices(); } -function Dh(i, e) { +function Lh(i, e) { e.srcObject = i, e.muted = !0, e.play(); } -async function Zo(i, e, t) { +async function Go(i, e, t) { const n = { width: { ideal: 1920 }, height: { ideal: 1440 } @@ -5135,53 +5135,53 @@ async function Zo(i, e, t) { video: t ? { deviceId: { exact: t }, ...n } : n, audio: i }; - return navigator.mediaDevices.getUserMedia(l).then((s) => (Dh(s, e), s)); + return navigator.mediaDevices.getUserMedia(l).then((s) => (Lh(s, e), s)); } -function qh(i) { +function Mh(i) { return i.filter( (t) => t.kind === "videoinput" ); } const { - SvelteComponent: Lh, - action_destroyer: Mh, - add_render_callback: Eh, + SvelteComponent: Eh, + action_destroyer: Rh, + add_render_callback: Ah, append: Et, attr: he, - binding_callbacks: Rh, - check_outros: ci, - create_component: On, - create_in_transition: Ah, - destroy_component: Pn, - destroy_each: Wh, + binding_callbacks: Wh, + check_outros: ui, + create_component: Pn, + create_in_transition: Xh, + destroy_component: Zn, + destroy_each: Yh, detach: Re, element: Fe, empty: Hs, - ensure_array_like: Go, - group_outros: ui, - init: Xh, + ensure_array_like: Ko, + group_outros: _i, + init: Ih, insert: Ae, listen: nl, - mount_component: Zn, + mount_component: Gn, noop: Ts, - run_all: Yh, - safe_not_equal: Ih, - set_data: Yr, + run_all: Hh, + safe_not_equal: Th, + set_data: Hr, set_input_value: Ss, - space: mi, - stop_propagation: Hh, - text: Ir, + space: gi, + stop_propagation: jh, + text: Tr, toggle_class: Ei, transition_in: pe, transition_out: Ce -} = window.__gradio__svelte__internal, { createEventDispatcher: Th, onMount: jh } = window.__gradio__svelte__internal; -function Ko(i, e, t) { +} = window.__gradio__svelte__internal, { createEventDispatcher: Fh, onMount: Uh } = window.__gradio__svelte__internal; +function Jo(i, e, t) { const n = i.slice(); return n[32] = e[t], n; } -function Fh(i) { +function Vh(i) { let e, t, n, l, s, o, r, a, f, c, u; - const _ = [Nh, Vh], d = []; + const _ = [Ph, Oh], d = []; function m(p, w) { return ( /*mode*/ @@ -5191,14 +5191,14 @@ function Fh(i) { } n = m(i), l = d[n] = _[n](i); let h = !/*recording*/ - i[8] && Jo(i), g = ( + i[8] && Qo(i), g = ( /*options_open*/ i[10] && /*selected_device*/ - i[7] && Qo(i) + i[7] && xo(i) ); return { c() { - e = Fe("div"), t = Fe("button"), l.c(), o = mi(), h && h.c(), r = mi(), g && g.c(), a = Hs(), he(t, "aria-label", s = /*mode*/ + e = Fe("div"), t = Fe("button"), l.c(), o = gi(), h && h.c(), r = gi(), g && g.c(), a = Hs(), he(t, "aria-label", s = /*mode*/ i[1] === "image" ? "capture photo" : "start recording"), he(t, "class", "svelte-8hqvb6"), he(e, "class", "button-wrap svelte-8hqvb6"); }, m(p, w) { @@ -5211,20 +5211,20 @@ function Fh(i) { }, p(p, w) { let b = n; - n = m(p), n === b ? d[n].p(p, w) : (ui(), Ce(d[b], 1, 1, () => { + n = m(p), n === b ? d[n].p(p, w) : (_i(), Ce(d[b], 1, 1, () => { d[b] = null; - }), ci(), l = d[n], l ? l.p(p, w) : (l = d[n] = _[n](p), l.c()), pe(l, 1), l.m(t, null)), (!f || w[0] & /*mode*/ + }), ui(), l = d[n], l ? l.p(p, w) : (l = d[n] = _[n](p), l.c()), pe(l, 1), l.m(t, null)), (!f || w[0] & /*mode*/ 2 && s !== (s = /*mode*/ p[1] === "image" ? "capture photo" : "start recording")) && he(t, "aria-label", s), /*recording*/ - p[8] ? h && (ui(), Ce(h, 1, 1, () => { + p[8] ? h && (_i(), Ce(h, 1, 1, () => { h = null; - }), ci()) : h ? (h.p(p, w), w[0] & /*recording*/ - 256 && pe(h, 1)) : (h = Jo(p), h.c(), pe(h, 1), h.m(e, null)), /*options_open*/ + }), ui()) : h ? (h.p(p, w), w[0] & /*recording*/ + 256 && pe(h, 1)) : (h = Qo(p), h.c(), pe(h, 1), h.m(e, null)), /*options_open*/ p[10] && /*selected_device*/ p[7] ? g ? (g.p(p, w), w[0] & /*options_open, selected_device*/ - 1152 && pe(g, 1)) : (g = Qo(p), g.c(), pe(g, 1), g.m(a.parentNode, a)) : g && (ui(), Ce(g, 1, 1, () => { + 1152 && pe(g, 1)) : (g = xo(p), g.c(), pe(g, 1), g.m(a.parentNode, a)) : g && (_i(), Ce(g, 1, 1, () => { g = null; - }), ci()); + }), ui()); }, i(p) { f || (pe(l), pe(h), pe(g), f = !0); @@ -5237,41 +5237,41 @@ function Fh(i) { } }; } -function Uh(i) { +function Nh(i) { let e, t, n, l; - return t = new zh({}), t.$on( + return t = new Dh({}), t.$on( "click", /*click_handler*/ i[20] ), { c() { - e = Fe("div"), On(t.$$.fragment), he(e, "title", "grant webcam access"); + e = Fe("div"), Pn(t.$$.fragment), he(e, "title", "grant webcam access"); }, m(s, o) { - Ae(s, e, o), Zn(t, e, null), l = !0; + Ae(s, e, o), Gn(t, e, null), l = !0; }, p: Ts, i(s) { - l || (pe(t.$$.fragment, s), s && (n || Eh(() => { - n = Ah(e, Md, { delay: 100, duration: 200 }), n.start(); + l || (pe(t.$$.fragment, s), s && (n || Ah(() => { + n = Xh(e, Rd, { delay: 100, duration: 200 }), n.start(); })), l = !0); }, o(s) { Ce(t.$$.fragment, s), l = !1; }, d(s) { - s && Re(e), Pn(t); + s && Re(e), Zn(t); } }; } -function Vh(i) { +function Oh(i) { let e, t, n; - return t = new cu({}), { + return t = new _u({}), { c() { - e = Fe("div"), On(t.$$.fragment), he(e, "class", "icon svelte-8hqvb6"), he(e, "title", "capture photo"); + e = Fe("div"), Pn(t.$$.fragment), he(e, "class", "icon svelte-8hqvb6"), he(e, "title", "capture photo"); }, m(l, s) { - Ae(l, e, s), Zn(t, e, null), n = !0; + Ae(l, e, s), Gn(t, e, null), n = !0; }, p: Ts, i(l) { @@ -5281,13 +5281,13 @@ function Vh(i) { Ce(t.$$.fragment, l), n = !1; }, d(l) { - l && Re(e), Pn(t); + l && Re(e), Zn(t); } }; } -function Nh(i) { +function Ph(i) { let e, t, n, l; - const s = [Ph, Oh], o = []; + const s = [Gh, Zh], o = []; function r(a, f) { return ( /*recording*/ @@ -5303,9 +5303,9 @@ function Nh(i) { }, p(a, f) { let c = e; - e = r(a), e !== c && (ui(), Ce(o[c], 1, 1, () => { + e = r(a), e !== c && (_i(), Ce(o[c], 1, 1, () => { o[c] = null; - }), ci(), t = o[e], t || (t = o[e] = s[e](a), t.c()), pe(t, 1), t.m(n.parentNode, n)); + }), ui(), t = o[e], t || (t = o[e] = s[e](a), t.c()), pe(t, 1), t.m(n.parentNode, n)); }, i(a) { l || (pe(t), l = !0); @@ -5318,14 +5318,14 @@ function Nh(i) { } }; } -function Oh(i) { +function Zh(i) { let e, t, n; - return t = new wu({}), { + return t = new vu({}), { c() { - e = Fe("div"), On(t.$$.fragment), he(e, "class", "icon red svelte-8hqvb6"), he(e, "title", "start recording"); + e = Fe("div"), Pn(t.$$.fragment), he(e, "class", "icon red svelte-8hqvb6"), he(e, "title", "start recording"); }, m(l, s) { - Ae(l, e, s), Zn(t, e, null), n = !0; + Ae(l, e, s), Gn(t, e, null), n = !0; }, i(l) { n || (pe(t.$$.fragment, l), n = !0); @@ -5334,18 +5334,18 @@ function Oh(i) { Ce(t.$$.fragment, l), n = !1; }, d(l) { - l && Re(e), Pn(t); + l && Re(e), Zn(t); } }; } -function Ph(i) { +function Gh(i) { let e, t, n; - return t = new L_({}), { + return t = new E_({}), { c() { - e = Fe("div"), On(t.$$.fragment), he(e, "class", "icon red svelte-8hqvb6"), he(e, "title", "stop recording"); + e = Fe("div"), Pn(t.$$.fragment), he(e, "class", "icon red svelte-8hqvb6"), he(e, "title", "stop recording"); }, m(l, s) { - Ae(l, e, s), Zn(t, e, null), n = !0; + Ae(l, e, s), Gn(t, e, null), n = !0; }, i(l) { n || (pe(t.$$.fragment, l), n = !0); @@ -5354,18 +5354,18 @@ function Ph(i) { Ce(t.$$.fragment, l), n = !1; }, d(l) { - l && Re(e), Pn(t); + l && Re(e), Zn(t); } }; } -function Jo(i) { +function Qo(i) { let e, t, n, l, s; return t = new As({}), { c() { - e = Fe("button"), On(t.$$.fragment), he(e, "class", "icon svelte-8hqvb6"), he(e, "aria-label", "select input source"); + e = Fe("button"), Pn(t.$$.fragment), he(e, "class", "icon svelte-8hqvb6"), he(e, "aria-label", "select input source"); }, m(o, r) { - Ae(o, e, r), Zn(t, e, null), n = !0, l || (s = nl( + Ae(o, e, r), Gn(t, e, null), n = !0, l || (s = nl( e, "click", /*click_handler_1*/ @@ -5380,31 +5380,31 @@ function Jo(i) { Ce(t.$$.fragment, o), n = !1; }, d(o) { - o && Re(e), Pn(t), l = !1, s(); + o && Re(e), Zn(t), l = !1, s(); } }; } -function Qo(i) { +function xo(i) { let e, t, n, l, s, o, r; n = new As({}); function a(u, _) { return ( /*available_video_devices*/ - u[6].length === 0 ? Gh : Zh + u[6].length === 0 ? Jh : Kh ); } let f = a(i), c = f(i); return { c() { - e = Fe("select"), t = Fe("button"), On(n.$$.fragment), l = mi(), c.c(), he(t, "class", "inset-icon svelte-8hqvb6"), he(e, "class", "select-wrap svelte-8hqvb6"), he(e, "aria-label", "select source"); + e = Fe("select"), t = Fe("button"), Pn(n.$$.fragment), l = gi(), c.c(), he(t, "class", "inset-icon svelte-8hqvb6"), he(e, "class", "select-wrap svelte-8hqvb6"), he(e, "aria-label", "select source"); }, m(u, _) { - Ae(u, e, _), Et(e, t), Zn(n, t, null), Et(t, l), c.m(e, null), s = !0, o || (r = [ - nl(t, "click", Hh( + Ae(u, e, _), Et(e, t), Gn(n, t, null), Et(t, l), c.m(e, null), s = !0, o || (r = [ + nl(t, "click", jh( /*click_handler_2*/ i[22] )), - Mh(js.call( + Rh(js.call( null, e, /*handle_click_outside*/ @@ -5428,17 +5428,17 @@ function Qo(i) { Ce(n.$$.fragment, u), s = !1; }, d(u) { - u && Re(e), Pn(n), c.d(), o = !1, Yh(r); + u && Re(e), Zn(n), c.d(), o = !1, Hh(r); } }; } -function Zh(i) { - let e, t = Go( +function Kh(i) { + let e, t = Ko( /*available_video_devices*/ i[6] ), n = []; for (let l = 0; l < t.length; l += 1) - n[l] = xo(Ko(i, t, l)); + n[l] = $o(Jo(i, t, l)); return { c() { for (let l = 0; l < n.length; l += 1) @@ -5453,14 +5453,14 @@ function Zh(i) { p(l, s) { if (s[0] & /*available_video_devices, selected_device*/ 192) { - t = Go( + t = Ko( /*available_video_devices*/ l[6] ); let o; for (o = 0; o < t.length; o += 1) { - const r = Ko(l, t, o); - n[o] ? n[o].p(r, s) : (n[o] = xo(r), n[o].c(), n[o].m(e.parentNode, e)); + const r = Jo(l, t, o); + n[o] ? n[o].p(r, s) : (n[o] = $o(r), n[o].c(), n[o].m(e.parentNode, e)); } for (; o < n.length; o += 1) n[o].d(1); @@ -5468,18 +5468,18 @@ function Zh(i) { } }, d(l) { - l && Re(e), Wh(n, l); + l && Re(e), Yh(n, l); } }; } -function Gh(i) { +function Jh(i) { let e, t = ( /*i18n*/ i[3]("common.no_devices") + "" ), n; return { c() { - e = Fe("option"), n = Ir(t), e.__value = "", Ss(e, e.__value), he(e, "class", "svelte-8hqvb6"); + e = Fe("option"), n = Tr(t), e.__value = "", Ss(e, e.__value), he(e, "class", "svelte-8hqvb6"); }, m(l, s) { Ae(l, e, s), Et(e, n); @@ -5487,21 +5487,21 @@ function Gh(i) { p(l, s) { s[0] & /*i18n*/ 8 && t !== (t = /*i18n*/ - l[3]("common.no_devices") + "") && Yr(n, t); + l[3]("common.no_devices") + "") && Hr(n, t); }, d(l) { l && Re(e); } }; } -function xo(i) { +function $o(i) { let e, t = ( /*device*/ i[32].label + "" ), n, l, s, o; return { c() { - e = Fe("option"), n = Ir(t), l = mi(), e.__value = s = /*device*/ + e = Fe("option"), n = Tr(t), l = gi(), e.__value = s = /*device*/ i[32].deviceId, Ss(e, e.__value), e.selected = o = /*selected_device*/ i[7].deviceId === /*device*/ i[32].deviceId, he(e, "class", "svelte-8hqvb6"); @@ -5512,7 +5512,7 @@ function xo(i) { p(r, a) { a[0] & /*available_video_devices*/ 64 && t !== (t = /*device*/ - r[32].label + "") && Yr(n, t), a[0] & /*available_video_devices*/ + r[32].label + "") && Hr(n, t), a[0] & /*available_video_devices*/ 64 && s !== (s = /*device*/ r[32].deviceId) && (e.__value = s, Ss(e, e.__value)), a[0] & /*selected_device, available_video_devices*/ 192 && o !== (o = /*selected_device*/ @@ -5524,9 +5524,9 @@ function xo(i) { } }; } -function Kh(i) { +function Qh(i) { let e, t, n, l, s, o; - const r = [Uh, Fh], a = []; + const r = [Nh, Vh], a = []; function f(c, u) { return ( /*webcam_accessed*/ @@ -5535,7 +5535,7 @@ function Kh(i) { } return l = f(i), s = a[l] = r[l](i), { c() { - e = Fe("div"), t = Fe("video"), n = mi(), s.c(), he(t, "class", "svelte-8hqvb6"), Ei( + e = Fe("div"), t = Fe("video"), n = gi(), s.c(), he(t, "class", "svelte-8hqvb6"), Ei( t, "flip", /*mirror_webcam*/ @@ -5557,9 +5557,9 @@ function Kh(i) { 512) && Ei(t, "hide", !/*webcam_accessed*/ c[9]); let _ = l; - l = f(c), l === _ ? a[l].p(c, u) : (ui(), Ce(a[_], 1, 1, () => { + l = f(c), l === _ ? a[l].p(c, u) : (_i(), Ce(a[_], 1, 1, () => { a[_] = null; - }), ci(), s = a[l], s ? s.p(c, u) : (s = a[l] = r[l](c), s.c()), pe(s, 1), s.m(e, null)); + }), ui(), s = a[l], s ? s.p(c, u) : (s = a[l] = r[l](c), s.c()), pe(s, 1), s.m(e, null)); }, i(c) { o || (pe(s), o = !0); @@ -5582,7 +5582,7 @@ function js(i, e) { } }; } -function Jh(i, e, t) { +function xh(i, e, t) { var n = this && this.__awaiter || function(R, V, A, Q) { function ae(Z) { return Z instanceof A ? Z : new A(function(G) { @@ -5611,20 +5611,20 @@ function Jh(i, e, t) { }); }; let l, s = [], o = null, r, { streaming: a = !1 } = e, { pending: f = !1 } = e, { root: c = "" } = e, { mode: u = "image" } = e, { mirror_webcam: _ } = e, { include_audio: d } = e, { i18n: m } = e, { upload: h } = e; - const g = Th(); - jh(() => r = document.createElement("canvas")); + const g = Fh(); + Uh(() => r = document.createElement("canvas")); const p = (R) => n(void 0, void 0, void 0, function* () { const A = R.target.value; - yield Zo(d, l, A).then((Q) => n(void 0, void 0, void 0, function* () { + yield Go(d, l, A).then((Q) => n(void 0, void 0, void 0, function* () { y = Q, t(7, o = s.find((ae) => ae.deviceId === A) || null), t(10, W = !1); })); }); function w() { return n(this, void 0, void 0, function* () { try { - Zo(d, l).then((R) => n(this, void 0, void 0, function* () { - t(9, D = !0), t(6, s = yield Bh()), y = R; - })).then(() => qh(s)).then((R) => { + Go(d, l).then((R) => n(this, void 0, void 0, function* () { + t(9, D = !0), t(6, s = yield qh()), y = R; + })).then(() => Mh(s)).then((R) => { t(6, s = R); const V = y.getTracks().map((A) => { var Q; @@ -5660,7 +5660,7 @@ function Jh(i, e, t) { var Q; if (A.target) { let ae = new File([R], "sample." + S.substring(6)); - const Z = yield zr([ae]); + const Z = yield Dr([ae]); let G = ((Q = yield h(Z, c)) === null || Q === void 0 ? void 0 : Q.filter(Boolean))[0]; g("capture", G), g("stop_recording"); } @@ -5699,11 +5699,11 @@ function Jh(i, e, t) { R.preventDefault(), R.stopPropagation(), t(10, W = !1); } function J(R) { - Rh[R ? "unshift" : "push"](() => { + Wh[R ? "unshift" : "push"](() => { l = R, t(5, l); }); } - const ie = async () => w(), P = () => t(10, W = !0), $ = () => t(10, W = !1); + const le = async () => w(), P = () => t(10, W = !0), $ = () => t(10, W = !1); return i.$$set = (R) => { "streaming" in R && t(0, a = R.streaming), "pending" in R && t(15, f = R.pending), "root" in R && t(16, c = R.root), "mode" in R && t(1, u = R.mode), "mirror_webcam" in R && t(2, _ = R.mirror_webcam), "include_audio" in R && t(17, d = R.include_audio), "i18n" in R && t(3, m = R.i18n), "upload" in R && t(18, h = R.upload); }, [ @@ -5727,19 +5727,19 @@ function Jh(i, e, t) { d, h, J, - ie, + le, P, $ ]; } -class Qh extends Lh { +class $h extends Eh { constructor(e) { - super(), Xh( + super(), Ih( this, e, - Jh, - Kh, - Ih, + xh, + Qh, + Th, { streaming: 0, pending: 15, @@ -5760,259 +5760,259 @@ class Qh extends Lh { } } const { - SvelteComponent: xh, - append: Ut, + SvelteComponent: e0, + append: Vt, attr: I, - detach: $h, - init: e0, - insert: t0, + detach: t0, + init: n0, + insert: i0, noop: xl, - safe_not_equal: n0, - set_style: Vt, + safe_not_equal: l0, + set_style: Nt, svg_element: kt } = window.__gradio__svelte__internal; -function i0(i) { +function s0(i) { let e, t, n, l, s, o, r, a, f; return { c() { - e = kt("svg"), t = kt("rect"), n = kt("rect"), l = kt("rect"), s = kt("rect"), o = kt("line"), r = kt("line"), a = kt("line"), f = kt("line"), I(t, "x", "2"), I(t, "y", "2"), I(t, "width", "5"), I(t, "height", "5"), I(t, "rx", "1"), I(t, "ry", "1"), I(t, "stroke-width", "2"), I(t, "fill", "none"), I(n, "x", "17"), I(n, "y", "2"), I(n, "width", "5"), I(n, "height", "5"), I(n, "rx", "1"), I(n, "ry", "1"), I(n, "stroke-width", "2"), I(n, "fill", "none"), I(l, "x", "2"), I(l, "y", "17"), I(l, "width", "5"), I(l, "height", "5"), I(l, "rx", "1"), I(l, "ry", "1"), I(l, "stroke-width", "2"), I(l, "fill", "none"), I(s, "x", "17"), I(s, "y", "17"), I(s, "width", "5"), I(s, "height", "5"), I(s, "rx", "1"), I(s, "ry", "1"), I(s, "stroke-width", "2"), I(s, "fill", "none"), I(o, "x1", "7.5"), I(o, "y1", "4.5"), I(o, "x2", "16"), I(o, "y2", "4.5"), Vt(o, "stroke-width", "2px"), I(r, "x1", "7.5"), I(r, "y1", "19.5"), I(r, "x2", "16"), I(r, "y2", "19.5"), Vt(r, "stroke-width", "2px"), I(a, "x1", "4.5"), I(a, "y1", "8"), I(a, "x2", "4.5"), I(a, "y2", "16"), Vt(a, "stroke-width", "2px"), I(f, "x1", "19.5"), I(f, "y1", "8"), I(f, "x2", "19.5"), I(f, "y2", "16"), Vt(f, "stroke-width", "2px"), I(e, "width", "100%"), I(e, "height", "100%"), I(e, "viewBox", "0 0 24 24"), I(e, "version", "1.1"), I(e, "xmlns", "http://www.w3.org/2000/svg"), I(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), I(e, "xml:space", "preserve"), I(e, "stroke", "currentColor"), Vt(e, "fill-rule", "evenodd"), Vt(e, "clip-rule", "evenodd"), Vt(e, "stroke-linecap", "round"), Vt(e, "stroke-linejoin", "round"); + e = kt("svg"), t = kt("rect"), n = kt("rect"), l = kt("rect"), s = kt("rect"), o = kt("line"), r = kt("line"), a = kt("line"), f = kt("line"), I(t, "x", "2"), I(t, "y", "2"), I(t, "width", "5"), I(t, "height", "5"), I(t, "rx", "1"), I(t, "ry", "1"), I(t, "stroke-width", "2"), I(t, "fill", "none"), I(n, "x", "17"), I(n, "y", "2"), I(n, "width", "5"), I(n, "height", "5"), I(n, "rx", "1"), I(n, "ry", "1"), I(n, "stroke-width", "2"), I(n, "fill", "none"), I(l, "x", "2"), I(l, "y", "17"), I(l, "width", "5"), I(l, "height", "5"), I(l, "rx", "1"), I(l, "ry", "1"), I(l, "stroke-width", "2"), I(l, "fill", "none"), I(s, "x", "17"), I(s, "y", "17"), I(s, "width", "5"), I(s, "height", "5"), I(s, "rx", "1"), I(s, "ry", "1"), I(s, "stroke-width", "2"), I(s, "fill", "none"), I(o, "x1", "7.5"), I(o, "y1", "4.5"), I(o, "x2", "16"), I(o, "y2", "4.5"), Nt(o, "stroke-width", "2px"), I(r, "x1", "7.5"), I(r, "y1", "19.5"), I(r, "x2", "16"), I(r, "y2", "19.5"), Nt(r, "stroke-width", "2px"), I(a, "x1", "4.5"), I(a, "y1", "8"), I(a, "x2", "4.5"), I(a, "y2", "16"), Nt(a, "stroke-width", "2px"), I(f, "x1", "19.5"), I(f, "y1", "8"), I(f, "x2", "19.5"), I(f, "y2", "16"), Nt(f, "stroke-width", "2px"), I(e, "width", "100%"), I(e, "height", "100%"), I(e, "viewBox", "0 0 24 24"), I(e, "version", "1.1"), I(e, "xmlns", "http://www.w3.org/2000/svg"), I(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), I(e, "xml:space", "preserve"), I(e, "stroke", "currentColor"), Nt(e, "fill-rule", "evenodd"), Nt(e, "clip-rule", "evenodd"), Nt(e, "stroke-linecap", "round"), Nt(e, "stroke-linejoin", "round"); }, m(c, u) { - t0(c, e, u), Ut(e, t), Ut(e, n), Ut(e, l), Ut(e, s), Ut(e, o), Ut(e, r), Ut(e, a), Ut(e, f); + i0(c, e, u), Vt(e, t), Vt(e, n), Vt(e, l), Vt(e, s), Vt(e, o), Vt(e, r), Vt(e, a), Vt(e, f); }, p: xl, i: xl, o: xl, d(c) { - c && $h(e); + c && t0(e); } }; } -class l0 extends xh { +class o0 extends e0 { constructor(e) { - super(), e0(this, e, null, i0, n0, {}); + super(), n0(this, e, null, s0, l0, {}); } } const { - SvelteComponent: s0, - append: o0, - attr: nt, - detach: a0, - init: r0, - insert: f0, + SvelteComponent: a0, + append: r0, + attr: tt, + detach: f0, + init: c0, + insert: u0, noop: $l, - safe_not_equal: c0, + safe_not_equal: _0, set_style: Ri, - svg_element: $o + svg_element: ea } = window.__gradio__svelte__internal; -function u0(i) { +function d0(i) { let e, t; return { c() { - e = $o("svg"), t = $o("path"), nt(t, "d", "M 14.4 2.85 V 11.1 V 3.95 C 14.4 3.0387 15.1388 2.3 16.05 2.3 C 16.9612 2.3 17.7 3.0387 17.7 3.95 V 11.1 V 7.25 C 17.7 6.3387 18.4388 5.6 19.35 5.6 C 20.2612 5.6 21 6.3387 21 7.25 V 16.6 C 21 20.2451 18.0451 23.2 14.4 23.2 H 13.16 C 11.4831 23.2 9.8692 22.5618 8.6459 21.4149 L 3.1915 16.3014 C 2.403 15.5622 2.3829 14.3171 3.1472 13.5528 C 3.8943 12.8057 5.1057 12.8057 5.8528 13.5528 L 7.8 15.5 V 6.15 C 7.8 5.2387 8.5387 4.5 9.45 4.5 C 10.3612 4.5 11.1 5.2387 11.1 6.15 V 11.1 V 2.85 C 11.1 1.9387 11.8388 1.2 12.75 1.2 C 13.6612 1.2 14.4 1.9387 14.4 2.85 Z"), nt(t, "fill", "none"), nt(t, "stroke-width", "2"), nt(e, "width", "100%"), nt(e, "height", "100%"), nt(e, "viewBox", "0 0 24 24"), nt(e, "version", "1.1"), nt(e, "xmlns", "http://www.w3.org/2000/svg"), nt(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), nt(e, "xml:space", "preserve"), nt(e, "stroke", "currentColor"), Ri(e, "fill-rule", "evenodd"), Ri(e, "clip-rule", "evenodd"), Ri(e, "stroke-linecap", "round"), Ri(e, "stroke-linejoin", "round"); + e = ea("svg"), t = ea("path"), tt(t, "d", "M 14.4 2.85 V 11.1 V 3.95 C 14.4 3.0387 15.1388 2.3 16.05 2.3 C 16.9612 2.3 17.7 3.0387 17.7 3.95 V 11.1 V 7.25 C 17.7 6.3387 18.4388 5.6 19.35 5.6 C 20.2612 5.6 21 6.3387 21 7.25 V 16.6 C 21 20.2451 18.0451 23.2 14.4 23.2 H 13.16 C 11.4831 23.2 9.8692 22.5618 8.6459 21.4149 L 3.1915 16.3014 C 2.403 15.5622 2.3829 14.3171 3.1472 13.5528 C 3.8943 12.8057 5.1057 12.8057 5.8528 13.5528 L 7.8 15.5 V 6.15 C 7.8 5.2387 8.5387 4.5 9.45 4.5 C 10.3612 4.5 11.1 5.2387 11.1 6.15 V 11.1 V 2.85 C 11.1 1.9387 11.8388 1.2 12.75 1.2 C 13.6612 1.2 14.4 1.9387 14.4 2.85 Z"), tt(t, "fill", "none"), tt(t, "stroke-width", "2"), tt(e, "width", "100%"), tt(e, "height", "100%"), tt(e, "viewBox", "0 0 24 24"), tt(e, "version", "1.1"), tt(e, "xmlns", "http://www.w3.org/2000/svg"), tt(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), tt(e, "xml:space", "preserve"), tt(e, "stroke", "currentColor"), Ri(e, "fill-rule", "evenodd"), Ri(e, "clip-rule", "evenodd"), Ri(e, "stroke-linecap", "round"), Ri(e, "stroke-linejoin", "round"); }, m(n, l) { - f0(n, e, l), o0(e, t); + u0(n, e, l), r0(e, t); }, p: $l, i: $l, o: $l, d(n) { - n && a0(e); + n && f0(e); } }; } -class _0 extends s0 { +class h0 extends a0 { constructor(e) { - super(), r0(this, e, null, u0, c0, {}); + super(), c0(this, e, null, d0, _0, {}); } } const { - SvelteComponent: d0, - append: h0, - attr: it, - detach: m0, - init: g0, - insert: b0, + SvelteComponent: m0, + append: g0, + attr: nt, + detach: b0, + init: w0, + insert: p0, noop: es, - safe_not_equal: w0, + safe_not_equal: v0, set_style: Ai, - svg_element: ea + svg_element: ta } = window.__gradio__svelte__internal; -function p0(i) { +function k0(i) { let e, t; return { c() { - e = ea("svg"), t = ea("path"), it(t, "d", "M10 12L14 16M14 12L10 16M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6"), it(t, "fill", "none"), it(t, "stroke-width", "2"), it(e, "width", "100%"), it(e, "height", "100%"), it(e, "viewBox", "0 0 24 24"), it(e, "version", "1.1"), it(e, "xmlns", "http://www.w3.org/2000/svg"), it(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), it(e, "xml:space", "preserve"), it(e, "stroke", "currentColor"), Ai(e, "fill-rule", "evenodd"), Ai(e, "clip-rule", "evenodd"), Ai(e, "stroke-linecap", "round"), Ai(e, "stroke-linejoin", "round"); + e = ta("svg"), t = ta("path"), nt(t, "d", "M10 12L14 16M14 12L10 16M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6"), nt(t, "fill", "none"), nt(t, "stroke-width", "2"), nt(e, "width", "100%"), nt(e, "height", "100%"), nt(e, "viewBox", "0 0 24 24"), nt(e, "version", "1.1"), nt(e, "xmlns", "http://www.w3.org/2000/svg"), nt(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), nt(e, "xml:space", "preserve"), nt(e, "stroke", "currentColor"), Ai(e, "fill-rule", "evenodd"), Ai(e, "clip-rule", "evenodd"), Ai(e, "stroke-linecap", "round"), Ai(e, "stroke-linejoin", "round"); }, m(n, l) { - b0(n, e, l), h0(e, t); + p0(n, e, l), g0(e, t); }, p: es, i: es, o: es, d(n) { - n && m0(e); + n && b0(e); } }; } -class v0 extends d0 { +class y0 extends m0 { constructor(e) { - super(), g0(this, e, null, p0, w0, {}); + super(), w0(this, e, null, k0, v0, {}); } } const { - SvelteComponent: k0, - append: ta, + SvelteComponent: C0, + append: na, attr: yt, - detach: y0, - init: C0, - insert: S0, + detach: S0, + init: z0, + insert: B0, noop: ts, - safe_not_equal: z0, + safe_not_equal: D0, set_style: Wi, svg_element: ns } = window.__gradio__svelte__internal; -function B0(i) { +function q0(i) { let e, t, n; return { c() { e = ns("svg"), t = ns("path"), n = ns("path"), yt(t, "d", "M12,2.5L2.5,12c-.7.7-.7,1.8,0,2.4l7.1,7.1c.7.7,1.8.7,2.4,0l9.5-9.5c.3-.3.5-.8.5-1.2V3.7c0-1-.8-1.7-1.7-1.7h-7.1c-.5,0-.9.2-1.2.5ZM7.3,14.1l4.7-4.7M9.9,16.7l2.2-2.2"), yt(n, "d", "M18.5,6.3c0,.5-.4.9-.9.9s-.9-.4-.9-.9.4-.9.9-.9.9.4.9.9Z"), yt(e, "width", "100%"), yt(e, "height", "100%"), yt(e, "viewBox", "0 0 24 24"), yt(e, "xmlns", "http://www.w3.org/2000/svg"), yt(e, "fill", "none"), yt(e, "stroke", "currentColor"), yt(e, "stroke-width", "2"), Wi(e, "fill-rule", "evenodd"), Wi(e, "clip-rule", "evenodd"), Wi(e, "stroke-linecap", "round"), Wi(e, "stroke-linejoin", "round"); }, m(l, s) { - S0(l, e, s), ta(e, t), ta(e, n); + B0(l, e, s), na(e, t), na(e, n); }, p: ts, i: ts, o: ts, d(l) { - l && y0(e); + l && S0(e); } }; } -class D0 extends k0 { +class L0 extends C0 { constructor(e) { - super(), C0(this, e, null, B0, z0, {}); + super(), z0(this, e, null, q0, D0, {}); } } const { - SvelteComponent: q0, - append: L0, - attr: Nt, - detach: M0, - init: E0, - insert: R0, + SvelteComponent: M0, + append: E0, + attr: Ot, + detach: R0, + init: A0, + insert: W0, noop: is, - safe_not_equal: A0, + safe_not_equal: X0, set_style: Xi, - svg_element: na + svg_element: ia } = window.__gradio__svelte__internal; -function W0(i) { +function Y0(i) { let e, t; return { c() { - e = na("svg"), t = na("path"), Nt(t, "d", "M7 10.0288C7.47142 10 8.05259 10 8.8 10H15.2C15.9474 10 16.5286 10 17 10.0288M7 10.0288C6.41168 10.0647 5.99429 10.1455 5.63803 10.327C5.07354 10.6146 4.6146 11.0735 4.32698 11.638C4 12.2798 4 13.1198 4 14.8V16.2C4 17.8802 4 18.7202 4.32698 19.362C4.6146 19.9265 5.07354 20.3854 5.63803 20.673C6.27976 21 7.11984 21 8.8 21H15.2C16.8802 21 17.7202 21 18.362 20.673C18.9265 20.3854 19.3854 19.9265 19.673 19.362C20 18.7202 20 17.8802 20 16.2V14.8C20 13.1198 20 12.2798 19.673 11.638C19.3854 11.0735 18.9265 10.6146 18.362 10.327C18.0057 10.1455 17.5883 10.0647 17 10.0288M7 10.0288V8C7 5.23858 9.23858 3 12 3C14.7614 3 17 5.23858 17 8V10.0288"), Nt(e, "width", "100%"), Nt(e, "height", "100%"), Nt(e, "viewBox", "0 0 24 24"), Nt(e, "fill", "none"), Nt(e, "stroke", "currentColor"), Nt(e, "stroke-width", "2"), Xi(e, "fill-rule", "evenodd"), Xi(e, "clip-rule", "evenodd"), Xi(e, "stroke-linecap", "round"), Xi(e, "stroke-linejoin", "round"), Nt(e, "xmlns", "http://www.w3.org/2000/svg"); + e = ia("svg"), t = ia("path"), Ot(t, "d", "M7 10.0288C7.47142 10 8.05259 10 8.8 10H15.2C15.9474 10 16.5286 10 17 10.0288M7 10.0288C6.41168 10.0647 5.99429 10.1455 5.63803 10.327C5.07354 10.6146 4.6146 11.0735 4.32698 11.638C4 12.2798 4 13.1198 4 14.8V16.2C4 17.8802 4 18.7202 4.32698 19.362C4.6146 19.9265 5.07354 20.3854 5.63803 20.673C6.27976 21 7.11984 21 8.8 21H15.2C16.8802 21 17.7202 21 18.362 20.673C18.9265 20.3854 19.3854 19.9265 19.673 19.362C20 18.7202 20 17.8802 20 16.2V14.8C20 13.1198 20 12.2798 19.673 11.638C19.3854 11.0735 18.9265 10.6146 18.362 10.327C18.0057 10.1455 17.5883 10.0647 17 10.0288M7 10.0288V8C7 5.23858 9.23858 3 12 3C14.7614 3 17 5.23858 17 8V10.0288"), Ot(e, "width", "100%"), Ot(e, "height", "100%"), Ot(e, "viewBox", "0 0 24 24"), Ot(e, "fill", "none"), Ot(e, "stroke", "currentColor"), Ot(e, "stroke-width", "2"), Xi(e, "fill-rule", "evenodd"), Xi(e, "clip-rule", "evenodd"), Xi(e, "stroke-linecap", "round"), Xi(e, "stroke-linejoin", "round"), Ot(e, "xmlns", "http://www.w3.org/2000/svg"); }, m(n, l) { - R0(n, e, l), L0(e, t); + W0(n, e, l), E0(e, t); }, p: is, i: is, o: is, d(n) { - n && M0(e); + n && R0(e); } }; } -class X0 extends q0 { +class I0 extends M0 { constructor(e) { - super(), E0(this, e, null, W0, A0, {}); + super(), A0(this, e, null, Y0, X0, {}); } } const { - SvelteComponent: Y0, - append: I0, - attr: Ot, - detach: H0, - init: T0, - insert: j0, + SvelteComponent: H0, + append: T0, + attr: Pt, + detach: j0, + init: F0, + insert: U0, noop: ls, - safe_not_equal: F0, + safe_not_equal: V0, set_style: Yi, - svg_element: ia + svg_element: la } = window.__gradio__svelte__internal; -function U0(i) { +function N0(i) { let e, t; return { c() { - e = ia("svg"), t = ia("path"), Ot(t, "d", "M16.584 6C15.8124 4.2341 14.0503 3 12 3C9.23858 3 7 5.23858 7 8V10.0288M7 10.0288C7.47142 10 8.05259 10 8.8 10H15.2C16.8802 10 17.7202 10 18.362 10.327C18.9265 10.6146 19.3854 11.0735 19.673 11.638C20 12.2798 20 13.1198 20 14.8V16.2C20 17.8802 20 18.7202 19.673 19.362C19.3854 19.9265 18.9265 20.3854 18.362 20.673C17.7202 21 16.8802 21 15.2 21H8.8C7.11984 21 6.27976 21 5.63803 20.673C5.07354 20.3854 4.6146 19.9265 4.32698 19.362C4 18.7202 4 17.8802 4 16.2V14.8C4 13.1198 4 12.2798 4.32698 11.638C4.6146 11.0735 5.07354 10.6146 5.63803 10.327C5.99429 10.1455 6.41168 10.0647 7 10.0288Z"), Ot(e, "width", "100%"), Ot(e, "height", "100%"), Ot(e, "viewBox", "0 0 24 24"), Ot(e, "fill", "none"), Ot(e, "stroke", "currentColor"), Ot(e, "stroke-width", "2"), Yi(e, "fill-rule", "evenodd"), Yi(e, "clip-rule", "evenodd"), Yi(e, "stroke-linecap", "round"), Yi(e, "stroke-linejoin", "round"), Ot(e, "xmlns", "http://www.w3.org/2000/svg"); + e = la("svg"), t = la("path"), Pt(t, "d", "M16.584 6C15.8124 4.2341 14.0503 3 12 3C9.23858 3 7 5.23858 7 8V10.0288M7 10.0288C7.47142 10 8.05259 10 8.8 10H15.2C16.8802 10 17.7202 10 18.362 10.327C18.9265 10.6146 19.3854 11.0735 19.673 11.638C20 12.2798 20 13.1198 20 14.8V16.2C20 17.8802 20 18.7202 19.673 19.362C19.3854 19.9265 18.9265 20.3854 18.362 20.673C17.7202 21 16.8802 21 15.2 21H8.8C7.11984 21 6.27976 21 5.63803 20.673C5.07354 20.3854 4.6146 19.9265 4.32698 19.362C4 18.7202 4 17.8802 4 16.2V14.8C4 13.1198 4 12.2798 4.32698 11.638C4.6146 11.0735 5.07354 10.6146 5.63803 10.327C5.99429 10.1455 6.41168 10.0647 7 10.0288Z"), Pt(e, "width", "100%"), Pt(e, "height", "100%"), Pt(e, "viewBox", "0 0 24 24"), Pt(e, "fill", "none"), Pt(e, "stroke", "currentColor"), Pt(e, "stroke-width", "2"), Yi(e, "fill-rule", "evenodd"), Yi(e, "clip-rule", "evenodd"), Yi(e, "stroke-linecap", "round"), Yi(e, "stroke-linejoin", "round"), Pt(e, "xmlns", "http://www.w3.org/2000/svg"); }, m(n, l) { - j0(n, e, l), I0(e, t); + U0(n, e, l), T0(e, t); }, p: ls, i: ls, o: ls, d(n) { - n && H0(e); + n && j0(e); } }; } -class V0 extends Y0 { +class O0 extends H0 { constructor(e) { - super(), T0(this, e, null, U0, F0, {}); + super(), F0(this, e, null, N0, V0, {}); } } const { - SvelteComponent: N0, - append: la, + SvelteComponent: P0, + append: sa, attr: ss, - bubble: sa, - create_component: O0, - destroy_component: P0, - detach: Hr, - element: oa, - init: Z0, - insert: Tr, + bubble: oa, + create_component: Z0, + destroy_component: G0, + detach: jr, + element: aa, + init: K0, + insert: Fr, listen: os, - mount_component: G0, - run_all: K0, - safe_not_equal: J0, - set_data: Q0, - set_input_value: aa, - space: x0, - text: $0, - transition_in: em, - transition_out: tm -} = window.__gradio__svelte__internal, { createEventDispatcher: nm, afterUpdate: im } = window.__gradio__svelte__internal; -function lm(i) { + mount_component: J0, + run_all: Q0, + safe_not_equal: x0, + set_data: $0, + set_input_value: ra, + space: em, + text: tm, + transition_in: nm, + transition_out: im +} = window.__gradio__svelte__internal, { createEventDispatcher: lm, afterUpdate: sm } = window.__gradio__svelte__internal; +function om(i) { let e; return { c() { - e = $0( + e = tm( /*label*/ i[1] ); }, m(t, n) { - Tr(t, e, n); + Fr(t, e, n); }, p(t, n) { n & /*label*/ - 2 && Q0( + 2 && $0( e, /*label*/ t[1] ); }, d(t) { - t && Hr(e); + t && jr(e); } }; } -function sm(i) { +function am(i) { let e, t, n, l, s, o, r; - return t = new Pa({ + return t = new Ga({ props: { show_label: ( /*show_label*/ @@ -6022,16 +6022,16 @@ function sm(i) { /*info*/ i[2] ), - $$slots: { default: [lm] }, + $$slots: { default: [om] }, $$scope: { ctx: i } } }), { c() { - e = oa("label"), O0(t.$$.fragment), n = x0(), l = oa("input"), ss(l, "type", "color"), l.disabled = /*disabled*/ + e = aa("label"), Z0(t.$$.fragment), n = em(), l = aa("input"), ss(l, "type", "color"), l.disabled = /*disabled*/ i[3], ss(l, "class", "svelte-16l8u73"), ss(e, "class", "block"); }, m(a, f) { - Tr(a, e, f), G0(t, e, null), la(e, n), la(e, l), aa( + Fr(a, e, f), J0(t, e, null), sa(e, n), sa(e, l), ra( l, /*value*/ i[0] @@ -6066,37 +6066,37 @@ function sm(i) { 2050 && (c.$$scope = { dirty: f, ctx: a }), t.$set(c), (!s || f & /*disabled*/ 8) && (l.disabled = /*disabled*/ a[3]), f & /*value*/ - 1 && aa( + 1 && ra( l, /*value*/ a[0] ); }, i(a) { - s || (em(t.$$.fragment, a), s = !0); + s || (nm(t.$$.fragment, a), s = !0); }, o(a) { - tm(t.$$.fragment, a), s = !1; + im(t.$$.fragment, a), s = !1; }, d(a) { - a && Hr(e), P0(t), o = !1, K0(r); + a && jr(e), G0(t), o = !1, Q0(r); } }; } -function om(i, e, t) { +function rm(i, e, t) { let { value: n = "#000000" } = e, { value_is_output: l = !1 } = e, { label: s } = e, { info: o = void 0 } = e, { disabled: r = !1 } = e, { show_label: a = !0 } = e; - const f = nm(); + const f = lm(); function c() { f("change", n), l || f("input"); } - im(() => { + sm(() => { t(5, l = !1); }); function u(m) { - sa.call(this, i, m); + oa.call(this, i, m); } function _(m) { - sa.call(this, i, m); + oa.call(this, i, m); } function d() { n = this.value, t(0, n); @@ -6118,9 +6118,9 @@ function om(i, e, t) { d ]; } -class am extends N0 { +class fm extends P0 { constructor(e) { - super(), Z0(this, e, om, sm, J0, { + super(), K0(this, e, rm, am, x0, { value: 0, value_is_output: 5, label: 1, @@ -6131,39 +6131,39 @@ class am extends N0 { } } const { - SvelteComponent: rm, - append: jr, + SvelteComponent: cm, + append: Ur, attr: fe, - bubble: fm, - check_outros: cm, - create_slot: Fr, - detach: wi, + bubble: um, + check_outros: _m, + create_slot: Vr, + detach: pi, element: wl, - empty: um, - get_all_dirty_from_scope: Ur, - get_slot_changes: Vr, - group_outros: _m, - init: dm, - insert: pi, - listen: hm, - safe_not_equal: mm, + empty: dm, + get_all_dirty_from_scope: Nr, + get_slot_changes: Or, + group_outros: hm, + init: mm, + insert: vi, + listen: gm, + safe_not_equal: bm, set_style: Le, - space: Nr, + space: Pr, src_url_equal: il, - toggle_class: Yn, + toggle_class: In, transition_in: ll, transition_out: sl, - update_slot_base: Or + update_slot_base: Zr } = window.__gradio__svelte__internal; -function gm(i) { +function wm(i) { let e, t, n, l, s, o, r = ( /*icon*/ - i[7] && ra(i) + i[7] && fa(i) ); const a = ( /*#slots*/ i[12].default - ), f = Fr( + ), f = Vr( a, i, /*$$scope*/ @@ -6172,7 +6172,7 @@ function gm(i) { ); return { c() { - e = wl("button"), r && r.c(), t = Nr(), f && f.c(), fe(e, "class", n = /*size*/ + e = wl("button"), r && r.c(), t = Pr(), f && f.c(), fe(e, "class", n = /*size*/ i[4] + " " + /*variant*/ i[3] + " " + /*elem_classes*/ i[1].join(" ") + " svelte-8huxfn"), fe( @@ -6181,7 +6181,7 @@ function gm(i) { /*elem_id*/ i[0] ), e.disabled = /*disabled*/ - i[8], Yn(e, "hidden", !/*visible*/ + i[8], In(e, "hidden", !/*visible*/ i[2]), Le( e, "flex-grow", @@ -6197,7 +6197,7 @@ function gm(i) { i[10]}px, 100%))` : null); }, m(c, u) { - pi(c, e, u), r && r.m(e, null), jr(e, t), f && f.m(e, null), l = !0, s || (o = hm( + vi(c, e, u), r && r.m(e, null), Ur(e, t), f && f.m(e, null), l = !0, s || (o = gm( e, "click", /*click_handler*/ @@ -6206,20 +6206,20 @@ function gm(i) { }, p(c, u) { /*icon*/ - c[7] ? r ? r.p(c, u) : (r = ra(c), r.c(), r.m(e, t)) : r && (r.d(1), r = null), f && f.p && (!l || u & /*$$scope*/ - 2048) && Or( + c[7] ? r ? r.p(c, u) : (r = fa(c), r.c(), r.m(e, t)) : r && (r.d(1), r = null), f && f.p && (!l || u & /*$$scope*/ + 2048) && Zr( f, a, c, /*$$scope*/ c[11], - l ? Vr( + l ? Or( a, /*$$scope*/ c[11], u, null - ) : Ur( + ) : Nr( /*$$scope*/ c[11] ), @@ -6237,7 +6237,7 @@ function gm(i) { ), (!l || u & /*disabled*/ 256) && (e.disabled = /*disabled*/ c[8]), (!l || u & /*size, variant, elem_classes, visible*/ - 30) && Yn(e, "hidden", !/*visible*/ + 30) && In(e, "hidden", !/*visible*/ c[2]), u & /*scale*/ 512 && Le( e, @@ -6262,19 +6262,19 @@ function gm(i) { sl(f, c), l = !1; }, d(c) { - c && wi(e), r && r.d(), f && f.d(c), s = !1, o(); + c && pi(e), r && r.d(), f && f.d(c), s = !1, o(); } }; } -function bm(i) { +function pm(i) { let e, t, n, l, s = ( /*icon*/ - i[7] && fa(i) + i[7] && ca(i) ); const o = ( /*#slots*/ i[12].default - ), r = Fr( + ), r = Vr( o, i, /*$$scope*/ @@ -6283,7 +6283,7 @@ function bm(i) { ); return { c() { - e = wl("a"), s && s.c(), t = Nr(), r && r.c(), fe( + e = wl("a"), s && s.c(), t = Pr(), r && r.c(), fe( e, "href", /*link*/ @@ -6301,8 +6301,8 @@ function bm(i) { "id", /*elem_id*/ i[0] - ), Yn(e, "hidden", !/*visible*/ - i[2]), Yn( + ), In(e, "hidden", !/*visible*/ + i[2]), In( e, "disabled", /*disabled*/ @@ -6327,24 +6327,24 @@ function bm(i) { i[10]}px, 100%))` : null); }, m(a, f) { - pi(a, e, f), s && s.m(e, null), jr(e, t), r && r.m(e, null), l = !0; + vi(a, e, f), s && s.m(e, null), Ur(e, t), r && r.m(e, null), l = !0; }, p(a, f) { /*icon*/ - a[7] ? s ? s.p(a, f) : (s = fa(a), s.c(), s.m(e, t)) : s && (s.d(1), s = null), r && r.p && (!l || f & /*$$scope*/ - 2048) && Or( + a[7] ? s ? s.p(a, f) : (s = ca(a), s.c(), s.m(e, t)) : s && (s.d(1), s = null), r && r.p && (!l || f & /*$$scope*/ + 2048) && Zr( r, o, a, /*$$scope*/ a[11], - l ? Vr( + l ? Or( o, /*$$scope*/ a[11], f, null - ) : Ur( + ) : Nr( /*$$scope*/ a[11] ), @@ -6372,9 +6372,9 @@ function bm(i) { /*elem_id*/ a[0] ), (!l || f & /*size, variant, elem_classes, visible*/ - 30) && Yn(e, "hidden", !/*visible*/ + 30) && In(e, "hidden", !/*visible*/ a[2]), (!l || f & /*size, variant, elem_classes, disabled*/ - 282) && Yn( + 282) && In( e, "disabled", /*disabled*/ @@ -6409,11 +6409,11 @@ function bm(i) { sl(r, a), l = !1; }, d(a) { - a && wi(e), s && s.d(), r && r.d(a); + a && pi(e), s && s.d(), r && r.d(a); } }; } -function ra(i) { +function fa(i) { let e, t, n; return { c() { @@ -6422,7 +6422,7 @@ function ra(i) { i[5]} icon`); }, m(l, s) { - pi(l, e, s); + vi(l, e, s); }, p(l, s) { s & /*icon*/ @@ -6432,11 +6432,11 @@ function ra(i) { l[5]} icon`) && fe(e, "alt", n); }, d(l) { - l && wi(e); + l && pi(e); } }; } -function fa(i) { +function ca(i) { let e, t, n; return { c() { @@ -6445,7 +6445,7 @@ function fa(i) { i[5]} icon`); }, m(l, s) { - pi(l, e, s); + vi(l, e, s); }, p(l, s) { s & /*icon*/ @@ -6455,13 +6455,13 @@ function fa(i) { l[5]} icon`) && fe(e, "alt", n); }, d(l) { - l && wi(e); + l && pi(e); } }; } -function wm(i) { +function vm(i) { let e, t, n, l; - const s = [bm, gm], o = []; + const s = [pm, wm], o = []; function r(a, f) { return ( /*link*/ @@ -6471,16 +6471,16 @@ function wm(i) { } return e = r(i), t = o[e] = s[e](i), { c() { - t.c(), n = um(); + t.c(), n = dm(); }, m(a, f) { - o[e].m(a, f), pi(a, n, f), l = !0; + o[e].m(a, f), vi(a, n, f), l = !0; }, p(a, [f]) { let c = e; - e = r(a), e === c ? o[e].p(a, f) : (_m(), sl(o[c], 1, 1, () => { + e = r(a), e === c ? o[e].p(a, f) : (hm(), sl(o[c], 1, 1, () => { o[c] = null; - }), cm(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), ll(t, 1), t.m(n.parentNode, n)); + }), _m(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), ll(t, 1), t.m(n.parentNode, n)); }, i(a) { l || (ll(t), l = !0); @@ -6489,14 +6489,14 @@ function wm(i) { sl(t), l = !1; }, d(a) { - a && wi(n), o[e].d(a); + a && pi(n), o[e].d(a); } }; } -function pm(i, e, t) { +function km(i, e, t) { let { $$slots: n = {}, $$scope: l } = e, { elem_id: s = "" } = e, { elem_classes: o = [] } = e, { visible: r = !0 } = e, { variant: a = "secondary" } = e, { size: f = "lg" } = e, { value: c = null } = e, { link: u = null } = e, { icon: _ = null } = e, { disabled: d = !1 } = e, { scale: m = null } = e, { min_width: h = void 0 } = e; function g(p) { - fm.call(this, i, p); + um.call(this, i, p); } return i.$$set = (p) => { "elem_id" in p && t(0, s = p.elem_id), "elem_classes" in p && t(1, o = p.elem_classes), "visible" in p && t(2, r = p.visible), "variant" in p && t(3, a = p.variant), "size" in p && t(4, f = p.size), "value" in p && t(5, c = p.value), "link" in p && t(6, u = p.link), "icon" in p && t(7, _ = p.icon), "disabled" in p && t(8, d = p.disabled), "scale" in p && t(9, m = p.scale), "min_width" in p && t(10, h = p.min_width), "$$scope" in p && t(11, l = p.$$scope); @@ -6517,9 +6517,9 @@ function pm(i, e, t) { g ]; } -class zs extends rm { +class zs extends cm { constructor(e) { - super(), dm(this, e, pm, wm, mm, { + super(), mm(this, e, km, vm, bm, { elem_id: 0, elem_classes: 1, visible: 2, @@ -6535,56 +6535,56 @@ class zs extends rm { } } const { - SvelteComponent: vm, - add_render_callback: Pr, + SvelteComponent: ym, + add_render_callback: Gr, append: Ii, attr: Te, - binding_callbacks: ca, - check_outros: km, - create_bidirectional_transition: ua, - destroy_each: ym, - detach: _i, + binding_callbacks: ua, + check_outros: Cm, + create_bidirectional_transition: _a, + destroy_each: Sm, + detach: di, element: ol, - empty: Cm, - ensure_array_like: _a, - group_outros: Sm, - init: zm, - insert: di, + empty: zm, + ensure_array_like: da, + group_outros: Bm, + init: Dm, + insert: hi, listen: Bs, - prevent_default: Bm, - run_all: Dm, - safe_not_equal: qm, - set_data: Lm, - set_style: Ln, + prevent_default: qm, + run_all: Lm, + safe_not_equal: Mm, + set_data: Em, + set_style: Mn, space: Ds, - text: Mm, - toggle_class: ct, + text: Rm, + toggle_class: ft, transition_in: as, - transition_out: da -} = window.__gradio__svelte__internal, { createEventDispatcher: Em } = window.__gradio__svelte__internal; -function ha(i, e, t) { + transition_out: ha +} = window.__gradio__svelte__internal, { createEventDispatcher: Am } = window.__gradio__svelte__internal; +function ma(i, e, t) { const n = i.slice(); return n[26] = e[t], n; } -function ma(i) { - let e, t, n, l, s, o = _a( +function ga(i) { + let e, t, n, l, s, o = da( /*filtered_indices*/ i[1] ), r = []; for (let a = 0; a < o.length; a += 1) - r[a] = ga(ha(i, o, a)); + r[a] = ba(ma(i, o, a)); return { c() { e = ol("ul"); for (let a = 0; a < r.length; a += 1) r[a].c(); - Te(e, "class", "options svelte-yuohum"), Te(e, "role", "listbox"), Ln( + Te(e, "class", "options svelte-yuohum"), Te(e, "role", "listbox"), Mn( e, "bottom", /*bottom*/ i[9] - ), Ln(e, "max-height", `calc(${/*max_height*/ - i[10]}px - var(--window-padding))`), Ln( + ), Mn(e, "max-height", `calc(${/*max_height*/ + i[10]}px - var(--window-padding))`), Mn( e, "width", /*input_width*/ @@ -6592,10 +6592,10 @@ function ma(i) { ); }, m(a, f) { - di(a, e, f); + hi(a, e, f); for (let c = 0; c < r.length; c += 1) r[c] && r[c].m(e, null); - i[22](e), n = !0, l || (s = Bs(e, "mousedown", Bm( + i[22](e), n = !0, l || (s = Bs(e, "mousedown", qm( /*mousedown_handler*/ i[21] )), l = !0); @@ -6603,29 +6603,29 @@ function ma(i) { p(a, f) { if (f & /*filtered_indices, choices, selected_indices, active_index*/ 51) { - o = _a( + o = da( /*filtered_indices*/ a[1] ); let c; for (c = 0; c < o.length; c += 1) { - const u = ha(a, o, c); - r[c] ? r[c].p(u, f) : (r[c] = ga(u), r[c].c(), r[c].m(e, null)); + const u = ma(a, o, c); + r[c] ? r[c].p(u, f) : (r[c] = ba(u), r[c].c(), r[c].m(e, null)); } for (; c < r.length; c += 1) r[c].d(1); r.length = o.length; } f & /*bottom*/ - 512 && Ln( + 512 && Mn( e, "bottom", /*bottom*/ a[9] ), f & /*max_height*/ - 1024 && Ln(e, "max-height", `calc(${/*max_height*/ + 1024 && Mn(e, "max-height", `calc(${/*max_height*/ a[10]}px - var(--window-padding))`), f & /*input_width*/ - 256 && Ln( + 256 && Mn( e, "width", /*input_width*/ @@ -6633,19 +6633,19 @@ function ma(i) { ); }, i(a) { - n || (a && Pr(() => { - n && (t || (t = ua(e, po, { duration: 200, y: 5 }, !0)), t.run(1)); + n || (a && Gr(() => { + n && (t || (t = _a(e, vo, { duration: 200, y: 5 }, !0)), t.run(1)); }), n = !0); }, o(a) { - a && (t || (t = ua(e, po, { duration: 200, y: 5 }, !1)), t.run(0)), n = !1; + a && (t || (t = _a(e, vo, { duration: 200, y: 5 }, !1)), t.run(0)), n = !1; }, d(a) { - a && _i(e), ym(r, a), i[22](null), a && t && t.end(), l = !1, s(); + a && di(e), Sm(r, a), i[22](null), a && t && t.end(), l = !1, s(); } }; } -function ga(i) { +function ba(i) { let e, t, n, l = ( /*choices*/ i[0][ @@ -6655,7 +6655,7 @@ function ga(i) { ), s, o, r, a, f; return { c() { - e = ol("li"), t = ol("span"), t.textContent = "✓", n = Ds(), s = Mm(l), o = Ds(), Te(t, "class", "inner-item svelte-yuohum"), ct(t, "hide", !/*selected_indices*/ + e = ol("li"), t = ol("span"), t.textContent = "✓", n = Ds(), s = Rm(l), o = Ds(), Te(t, "class", "inner-item svelte-yuohum"), ft(t, "hide", !/*selected_indices*/ i[4].includes( /*index*/ i[26] @@ -6668,7 +6668,7 @@ function ga(i) { i[4].includes( /*index*/ i[26] - )), ct( + )), ft( e, "selected", /*selected_indices*/ @@ -6676,19 +6676,19 @@ function ga(i) { /*index*/ i[26] ) - ), ct( + ), ft( e, "active", /*index*/ i[26] === /*active_index*/ i[5] - ), ct( + ), ft( e, "bg-gray-100", /*index*/ i[26] === /*active_index*/ i[5] - ), ct( + ), ft( e, "dark:bg-gray-600", /*index*/ @@ -6697,11 +6697,11 @@ function ga(i) { ); }, m(c, u) { - di(c, e, u), Ii(e, t), Ii(e, n), Ii(e, s), Ii(e, o); + hi(c, e, u), Ii(e, t), Ii(e, n), Ii(e, s), Ii(e, o); }, p(c, u) { u & /*selected_indices, filtered_indices*/ - 18 && ct(t, "hide", !/*selected_indices*/ + 18 && ft(t, "hide", !/*selected_indices*/ c[4].includes( /*index*/ c[26] @@ -6710,7 +6710,7 @@ function ga(i) { c[0][ /*index*/ c[26] - ][0] + "") && Lm(s, l), u & /*filtered_indices*/ + ][0] + "") && Em(s, l), u & /*filtered_indices*/ 2 && r !== (r = /*index*/ c[26]) && Te(e, "data-index", r), u & /*choices, filtered_indices*/ 3 && a !== (a = /*choices*/ @@ -6723,7 +6723,7 @@ function ga(i) { /*index*/ c[26] )) && Te(e, "aria-selected", f), u & /*selected_indices, filtered_indices*/ - 18 && ct( + 18 && ft( e, "selected", /*selected_indices*/ @@ -6732,21 +6732,21 @@ function ga(i) { c[26] ) ), u & /*filtered_indices, active_index*/ - 34 && ct( + 34 && ft( e, "active", /*index*/ c[26] === /*active_index*/ c[5] ), u & /*filtered_indices, active_index*/ - 34 && ct( + 34 && ft( e, "bg-gray-100", /*index*/ c[26] === /*active_index*/ c[5] ), u & /*filtered_indices, active_index*/ - 34 && ct( + 34 && ft( e, "dark:bg-gray-600", /*index*/ @@ -6755,27 +6755,27 @@ function ga(i) { ); }, d(c) { - c && _i(e); + c && di(e); } }; } -function Rm(i) { +function Wm(i) { let e, t, n, l, s; - Pr( + Gr( /*onwindowresize*/ i[19] ); let o = ( /*show_options*/ i[2] && !/*disabled*/ - i[3] && ma(i) + i[3] && ga(i) ); return { c() { - e = ol("div"), t = Ds(), o && o.c(), n = Cm(), Te(e, "class", "reference"); + e = ol("div"), t = Ds(), o && o.c(), n = zm(), Te(e, "class", "reference"); }, m(r, a) { - di(r, e, a), i[20](e), di(r, t, a), o && o.m(r, a), di(r, n, a), l || (s = [ + hi(r, e, a), i[20](e), hi(r, t, a), o && o.m(r, a), hi(r, n, a), l || (s = [ Bs( window, "scroll", @@ -6794,22 +6794,22 @@ function Rm(i) { /*show_options*/ r[2] && !/*disabled*/ r[3] ? o ? (o.p(r, a), a & /*show_options, disabled*/ - 12 && as(o, 1)) : (o = ma(r), o.c(), as(o, 1), o.m(n.parentNode, n)) : o && (Sm(), da(o, 1, 1, () => { + 12 && as(o, 1)) : (o = ga(r), o.c(), as(o, 1), o.m(n.parentNode, n)) : o && (Bm(), ha(o, 1, 1, () => { o = null; - }), km()); + }), Cm()); }, i(r) { as(o); }, o(r) { - da(o); + ha(o); }, d(r) { - r && (_i(e), _i(t), _i(n)), i[20](null), o && o.d(r), l = !1, Dm(s); + r && (di(e), di(t), di(n)), i[20](null), o && o.d(r), l = !1, Lm(s); } }; } -function Am(i, e, t) { +function Xm(i, e, t) { var n, l; let { choices: s } = e, { filtered_indices: o } = e, { show_options: r = !1 } = e, { disabled: a = !1 } = e, { selected_indices: f = [] } = e, { active_index: c = null } = e, u, _, d, m, h, g, p, w, b; function k() { @@ -6825,18 +6825,18 @@ function Am(i, e, t) { 10 )); } - const S = Em(); + const S = Am(); function C() { t(11, b = window.innerHeight); } function z(W) { - ca[W ? "unshift" : "push"](() => { + ua[W ? "unshift" : "push"](() => { h = W, t(6, h); }); } const D = (W) => S("change", W); function q(W) { - ca[W ? "unshift" : "push"](() => { + ua[W ? "unshift" : "push"](() => { g = W, t(7, g); }); } @@ -6886,9 +6886,9 @@ function Am(i, e, t) { q ]; } -class Wm extends vm { +class Ym extends ym { constructor(e) { - super(), zm(this, e, Am, Rm, qm, { + super(), Dm(this, e, Xm, Wm, Mm, { choices: 0, filtered_indices: 1, show_options: 2, @@ -6898,16 +6898,16 @@ class Wm extends vm { }); } } -function Xm(i, e) { +function Im(i, e) { return (i % e + e) % e; } -function ba(i, e) { +function wa(i, e) { return i.reduce((t, n, l) => ((!e || n[0].toLowerCase().includes(e.toLowerCase())) && t.push(l), t), []); } -function Ym(i, e, t) { +function Hm(i, e, t) { i("change", e), t || i("input"); } -function Im(i, e, t) { +function Tm(i, e, t) { if (i.key === "Escape") return [!1, e]; if ((i.key === "ArrowDown" || i.key === "ArrowUp") && t.length >= 0) @@ -6915,40 +6915,40 @@ function Im(i, e, t) { e = i.key === "ArrowDown" ? t[0] : t[t.length - 1]; else { const n = t.indexOf(e), l = i.key === "ArrowUp" ? -1 : 1; - e = t[Xm(n + l, t.length)]; + e = t[Im(n + l, t.length)]; } return [!0, e]; } const { - SvelteComponent: Hm, - append: en, + SvelteComponent: jm, + append: tn, attr: He, - binding_callbacks: Tm, - check_outros: jm, + binding_callbacks: Fm, + check_outros: Um, create_component: qs, destroy_component: Ls, detach: Fs, - element: Rn, - group_outros: Fm, - init: Um, + element: An, + group_outros: Vm, + init: Nm, insert: Us, - listen: ei, + listen: ti, mount_component: Ms, - run_all: Vm, - safe_not_equal: Nm, - set_data: Om, - set_input_value: wa, + run_all: Om, + safe_not_equal: Pm, + set_data: Zm, + set_input_value: pa, space: rs, - text: Pm, - toggle_class: Mn, - transition_in: An, - transition_out: ri -} = window.__gradio__svelte__internal, { onMount: Zm } = window.__gradio__svelte__internal, { createEventDispatcher: Gm, afterUpdate: Km } = window.__gradio__svelte__internal; -function Jm(i) { + text: Gm, + toggle_class: En, + transition_in: Wn, + transition_out: fi +} = window.__gradio__svelte__internal, { onMount: Km } = window.__gradio__svelte__internal, { createEventDispatcher: Jm, afterUpdate: Qm } = window.__gradio__svelte__internal; +function xm(i) { let e; return { c() { - e = Pm( + e = Gm( /*label*/ i[0] ); @@ -6958,7 +6958,7 @@ function Jm(i) { }, p(t, n) { n[0] & /*label*/ - 1 && Om( + 1 && Zm( e, /*label*/ t[0] @@ -6969,29 +6969,29 @@ function Jm(i) { } }; } -function pa(i) { +function va(i) { let e, t, n; return t = new As({}), { c() { - e = Rn("div"), qs(t.$$.fragment), He(e, "class", "icon-wrap svelte-1m1zvyj"); + e = An("div"), qs(t.$$.fragment), He(e, "class", "icon-wrap svelte-1m1zvyj"); }, m(l, s) { Us(l, e, s), Ms(t, e, null), n = !0; }, i(l) { - n || (An(t.$$.fragment, l), n = !0); + n || (Wn(t.$$.fragment, l), n = !0); }, o(l) { - ri(t.$$.fragment, l), n = !1; + fi(t.$$.fragment, l), n = !1; }, d(l) { l && Fs(e), Ls(t); } }; } -function Qm(i) { +function $m(i) { let e, t, n, l, s, o, r, a, f, c, u, _, d, m; - t = new Pa({ + t = new Ga({ props: { show_label: ( /*show_label*/ @@ -7001,13 +7001,13 @@ function Qm(i) { /*info*/ i[1] ), - $$slots: { default: [Jm] }, + $$slots: { default: [xm] }, $$scope: { ctx: i } } }); let h = !/*disabled*/ - i[3] && pa(); - return u = new Wm({ + i[3] && va(); + return u = new Ym({ props: { show_options: ( /*show_options*/ @@ -7043,7 +7043,7 @@ function Qm(i) { i[16] ), { c() { - e = Rn("div"), qs(t.$$.fragment), n = rs(), l = Rn("div"), s = Rn("div"), o = Rn("div"), r = Rn("input"), f = rs(), h && h.c(), c = rs(), qs(u.$$.fragment), He(r, "role", "listbox"), He(r, "aria-controls", "dropdown-options"), He( + e = An("div"), qs(t.$$.fragment), n = rs(), l = An("div"), s = An("div"), o = An("div"), r = An("input"), f = rs(), h && h.c(), c = rs(), qs(u.$$.fragment), He(r, "role", "listbox"), He(r, "aria-controls", "dropdown-options"), He( r, "aria-expanded", /*show_options*/ @@ -7055,17 +7055,17 @@ function Qm(i) { i[0] ), He(r, "class", "border-none svelte-1m1zvyj"), r.disabled = /*disabled*/ i[3], He(r, "autocomplete", "off"), r.readOnly = a = !/*filterable*/ - i[7], Mn(r, "subdued", !/*choices_names*/ + i[7], En(r, "subdued", !/*choices_names*/ i[13].includes( /*input_text*/ i[9] ) && !/*allow_custom_value*/ - i[6]), He(o, "class", "secondary-wrap svelte-1m1zvyj"), He(s, "class", "wrap-inner svelte-1m1zvyj"), Mn( + i[6]), He(o, "class", "secondary-wrap svelte-1m1zvyj"), He(s, "class", "wrap-inner svelte-1m1zvyj"), En( s, "show_options", /*show_options*/ i[12] - ), He(l, "class", "wrap svelte-1m1zvyj"), He(e, "class", "svelte-1m1zvyj"), Mn( + ), He(l, "class", "wrap svelte-1m1zvyj"), He(e, "class", "svelte-1m1zvyj"), En( e, "container", /*container*/ @@ -7073,36 +7073,36 @@ function Qm(i) { ); }, m(g, p) { - Us(g, e, p), Ms(t, e, null), en(e, n), en(e, l), en(l, s), en(s, o), en(o, r), wa( + Us(g, e, p), Ms(t, e, null), tn(e, n), tn(e, l), tn(l, s), tn(s, o), tn(o, r), pa( r, /*input_text*/ i[9] - ), i[29](r), en(o, f), h && h.m(o, null), en(l, c), Ms(u, l, null), _ = !0, d || (m = [ - ei( + ), i[29](r), tn(o, f), h && h.m(o, null), tn(l, c), Ms(u, l, null), _ = !0, d || (m = [ + ti( r, "input", /*input_input_handler*/ i[28] ), - ei( + ti( r, "keydown", /*handle_key_down*/ i[19] ), - ei( + ti( r, "keyup", /*keyup_handler*/ i[30] ), - ei( + ti( r, "blur", /*handle_blur*/ i[18] ), - ei( + ti( r, "focus", /*handle_focus*/ @@ -7136,22 +7136,22 @@ function Qm(i) { 128 && a !== (a = !/*filterable*/ g[7])) && (r.readOnly = a), p[0] & /*input_text*/ 512 && r.value !== /*input_text*/ - g[9] && wa( + g[9] && pa( r, /*input_text*/ g[9] ), (!_ || p[0] & /*choices_names, input_text, allow_custom_value*/ - 8768) && Mn(r, "subdued", !/*choices_names*/ + 8768) && En(r, "subdued", !/*choices_names*/ g[13].includes( /*input_text*/ g[9] ) && !/*allow_custom_value*/ g[6]), /*disabled*/ - g[3] ? h && (Fm(), ri(h, 1, 1, () => { + g[3] ? h && (Vm(), fi(h, 1, 1, () => { h = null; - }), jm()) : h ? p[0] & /*disabled*/ - 8 && An(h, 1) : (h = pa(), h.c(), An(h, 1), h.m(o, null)), (!_ || p[0] & /*show_options*/ - 4096) && Mn( + }), Um()) : h ? p[0] & /*disabled*/ + 8 && Wn(h, 1) : (h = va(), h.c(), Wn(h, 1), h.m(o, null)), (!_ || p[0] & /*show_options*/ + 4096) && En( s, "show_options", /*show_options*/ @@ -7174,7 +7174,7 @@ function Qm(i) { ]), p[0] & /*active_index*/ 16384 && (b.active_index = /*active_index*/ g[14]), u.$set(b), (!_ || p[0] & /*container*/ - 32) && Mn( + 32) && En( e, "container", /*container*/ @@ -7182,19 +7182,19 @@ function Qm(i) { ); }, i(g) { - _ || (An(t.$$.fragment, g), An(h), An(u.$$.fragment, g), _ = !0); + _ || (Wn(t.$$.fragment, g), Wn(h), Wn(u.$$.fragment, g), _ = !0); }, o(g) { - ri(t.$$.fragment, g), ri(h), ri(u.$$.fragment, g), _ = !1; + fi(t.$$.fragment, g), fi(h), fi(u.$$.fragment, g), _ = !1; }, d(g) { - g && Fs(e), Ls(t), i[29](null), h && h.d(), Ls(u), d = !1, Vm(m); + g && Fs(e), Ls(t), i[29](null), h && h.d(), Ls(u), d = !1, Om(m); } }; } -function xm(i, e, t) { +function eg(i, e, t) { let { label: n } = e, { info: l = void 0 } = e, { value: s = [] } = e, o = [], { value_is_output: r = !1 } = e, { choices: a } = e, f, { disabled: c = !1 } = e, { show_label: u } = e, { container: _ = !0 } = e, { allow_custom_value: d = !1 } = e, { filterable: m = !0 } = e, h, g = !1, p, w, b = "", k = "", v = !1, y = [], S = null, C = null, z; - const D = Gm(); + const D = Jm(); s ? (z = a.map((A) => A[1]).indexOf(s), C = z, C === -1 ? (o = s, C = null) : ([b, o] = a[C], k = b), W()) : a.length > 0 && (z = 0, C = 0, [b, s] = a[C], o = s, k = b); function q() { t(13, p = a.map((A) => A[0])), t(24, w = a.map((A) => A[1])); @@ -7212,22 +7212,22 @@ function xm(i, e, t) { function J(A) { t(10, y = a.map((Q, ae) => ae)), t(12, g = !0), D("focus"); } - function ie() { + function le() { d ? t(20, s = b) : t(9, b = p[w.indexOf(s)]), t(12, g = !1), t(14, S = null), D("blur"); } function P(A) { - t(12, [g, S] = Im(A, S, y), g, (t(14, S), t(2, a), t(23, f), t(6, d), t(9, b), t(10, y), t(8, h), t(25, k), t(11, C), t(27, z), t(26, v), t(24, w))), A.key === "Enter" && (S !== null ? (t(11, C = S), t(12, g = !1), h.blur(), t(14, S = null)) : p.includes(b) ? (t(11, C = p.indexOf(b)), t(12, g = !1), t(14, S = null), h.blur()) : d && (t(20, s = b), t(11, C = null), t(12, g = !1), t(14, S = null), h.blur()), D("enter", s)); + t(12, [g, S] = Tm(A, S, y), g, (t(14, S), t(2, a), t(23, f), t(6, d), t(9, b), t(10, y), t(8, h), t(25, k), t(11, C), t(27, z), t(26, v), t(24, w))), A.key === "Enter" && (S !== null ? (t(11, C = S), t(12, g = !1), h.blur(), t(14, S = null)) : p.includes(b) ? (t(11, C = p.indexOf(b)), t(12, g = !1), t(14, S = null), h.blur()) : d && (t(20, s = b), t(11, C = null), t(12, g = !1), t(14, S = null), h.blur()), D("enter", s)); } - Km(() => { + Qm(() => { t(21, r = !1), t(26, v = !0); - }), Zm(() => { + }), Km(() => { h.focus(); }); function $() { b = this.value, t(9, b), t(11, C), t(27, z), t(26, v), t(2, a), t(24, w); } function R(A) { - Tm[A ? "unshift" : "push"](() => { + Fm[A ? "unshift" : "push"](() => { h = A, t(8, h); }); } @@ -7241,10 +7241,10 @@ function xm(i, e, t) { value: w[C], selected: !0 })), i.$$.dirty[0] & /*value, old_value, value_is_output*/ - 7340032 && s != o && (W(), Ym(D, s, r), t(22, o = s)), i.$$.dirty[0] & /*choices*/ + 7340032 && s != o && (W(), Hm(D, s, r), t(22, o = s)), i.$$.dirty[0] & /*choices*/ 4 && q(), i.$$.dirty[0] & /*choices, old_choices, allow_custom_value, input_text, filtered_indices, filter_input*/ - 8390468 && a !== f && (d || W(), t(23, f = a), t(10, y = ba(a, b)), !d && y.length > 0 && t(14, S = y[0]), h == document.activeElement && t(12, g = !0)), i.$$.dirty[0] & /*input_text, old_input_text, choices, allow_custom_value, filtered_indices*/ - 33556036 && b !== k && (t(10, y = ba(a, b)), t(25, k = b), !d && y.length > 0 && t(14, S = y[0])); + 8390468 && a !== f && (d || W(), t(23, f = a), t(10, y = wa(a, b)), !d && y.length > 0 && t(14, S = y[0]), h == document.activeElement && t(12, g = !0)), i.$$.dirty[0] & /*input_text, old_input_text, choices, allow_custom_value, filtered_indices*/ + 33556036 && b !== k && (t(10, y = wa(a, b)), t(25, k = b), !d && y.length > 0 && t(14, S = y[0])); }, [ n, l, @@ -7264,7 +7264,7 @@ function xm(i, e, t) { D, F, J, - ie, + le, P, s, r, @@ -7279,14 +7279,14 @@ function xm(i, e, t) { V ]; } -class $m extends Hm { +class tg extends jm { constructor(e) { - super(), Um( + super(), Nm( this, e, - xm, - Qm, - Nm, + eg, + $m, + Pm, { label: 0, info: 1, @@ -7305,30 +7305,30 @@ class $m extends Hm { } } const { - SvelteComponent: eg, + SvelteComponent: ng, append: Ne, - attr: In, + attr: Hn, check_outros: Es, - create_component: cn, - destroy_component: un, - detach: Gn, - element: _t, + create_component: un, + destroy_component: _n, + detach: Kn, + element: ut, group_outros: Rs, - init: tg, - insert: Kn, - listen: ng, - mount_component: _n, - safe_not_equal: ig, - set_style: Hn, - space: ti, + init: ig, + insert: Jn, + listen: lg, + mount_component: dn, + safe_not_equal: sg, + set_style: Tn, + space: ni, text: Vs, - toggle_class: va, + toggle_class: ka, transition_in: Se, transition_out: je -} = window.__gradio__svelte__internal, { createEventDispatcher: lg } = window.__gradio__svelte__internal, { onMount: sg, onDestroy: og } = window.__gradio__svelte__internal; -function ka(i) { +} = window.__gradio__svelte__internal, { createEventDispatcher: og } = window.__gradio__svelte__internal, { onMount: ag, onDestroy: rg } = window.__gradio__svelte__internal; +function ya(i) { let e, t, n, l, s, o, r; - const a = [rg, ag], f = []; + const a = [cg, fg], f = []; function c(u, _) { return ( /*labelDetailLock*/ @@ -7337,15 +7337,15 @@ function ka(i) { } return n = c(i), l = f[n] = a[n](i), { c() { - e = _t("div"), t = _t("button"), l.c(), In(t, "class", "icon svelte-d9x7u0"), In(t, "aria-label", "Lock label detail"), va( + e = ut("div"), t = ut("button"), l.c(), Hn(t, "class", "icon svelte-d9x7u0"), Hn(t, "aria-label", "Lock label detail"), ka( t, "selected", /*labelDetailLock*/ i[2] === !0 - ), Hn(e, "margin-right", "8px"); + ), Tn(e, "margin-right", "8px"); }, m(u, _) { - Kn(u, e, _), Ne(e, t), f[n].m(t, null), s = !0, o || (r = ng( + Jn(u, e, _), Ne(e, t), f[n].m(t, null), s = !0, o || (r = lg( t, "click", /*onLockClick*/ @@ -7357,7 +7357,7 @@ function ka(i) { n = c(u), n !== d && (Rs(), je(f[d], 1, 1, () => { f[d] = null; }), Es(), l = f[n], l || (l = f[n] = a[n](u), l.c()), Se(l, 1), l.m(t, null)), (!s || _ & /*labelDetailLock*/ - 4) && va( + 4) && ka( t, "selected", /*labelDetailLock*/ @@ -7371,18 +7371,18 @@ function ka(i) { je(l), s = !1; }, d(u) { - u && Gn(e), f[n].d(), o = !1, r(); + u && Kn(e), f[n].d(), o = !1, r(); } }; } -function ag(i) { +function fg(i) { let e, t; - return e = new V0({}), { + return e = new O0({}), { c() { - cn(e.$$.fragment); + un(e.$$.fragment); }, m(n, l) { - _n(e, n, l), t = !0; + dn(e, n, l), t = !0; }, i(n) { t || (Se(e.$$.fragment, n), t = !0); @@ -7391,18 +7391,18 @@ function ag(i) { je(e.$$.fragment, n), t = !1; }, d(n) { - un(e, n); + _n(e, n); } }; } -function rg(i) { +function cg(i) { let e, t; - return e = new X0({}), { + return e = new I0({}), { c() { - cn(e.$$.fragment); + un(e.$$.fragment); }, m(n, l) { - _n(e, n, l), t = !0; + dn(e, n, l), t = !0; }, i(n) { t || (Se(e.$$.fragment, n), t = !0); @@ -7411,30 +7411,30 @@ function rg(i) { je(e.$$.fragment, n), t = !1; }, d(n) { - un(e, n); + _n(e, n); } }; } -function fg(i) { +function ug(i) { let e; return { c() { e = Vs("Cancel"); }, m(t, n) { - Kn(t, e, n); + Jn(t, e, n); }, d(t) { - t && Gn(e); + t && Kn(e); } }; } -function ya(i) { +function Ca(i) { let e, t, n; return t = new zs({ props: { variant: "stop", - $$slots: { default: [cg] }, + $$slots: { default: [_g] }, $$scope: { ctx: i } } }), t.$on( @@ -7443,10 +7443,10 @@ function ya(i) { i[14] ), { c() { - e = _t("div"), cn(t.$$.fragment), Hn(e, "margin-right", "8px"); + e = ut("div"), un(t.$$.fragment), Tn(e, "margin-right", "8px"); }, m(l, s) { - Kn(l, e, s), _n(t, e, null), n = !0; + Jn(l, e, s), dn(t, e, null), n = !0; }, p(l, s) { const o = {}; @@ -7460,42 +7460,42 @@ function ya(i) { je(t.$$.fragment, l), n = !1; }, d(l) { - l && Gn(e), un(t); + l && Kn(e), _n(t); } }; } -function cg(i) { +function _g(i) { let e; return { c() { e = Vs("Remove"); }, m(t, n) { - Kn(t, e, n); + Jn(t, e, n); }, d(t) { - t && Gn(e); + t && Kn(e); } }; } -function ug(i) { +function dg(i) { let e; return { c() { e = Vs("OK"); }, m(t, n) { - Kn(t, e, n); + Jn(t, e, n); }, d(t) { - t && Gn(e); + t && Kn(e); } }; } -function _g(i) { +function hg(i) { let e, t, n, l, s, o, r, a, f, c, u, _, d, m, h, g, p, w = !/*showRemove*/ - i[4] && ka(i); - o = new $m({ + i[4] && ya(i); + o = new tg({ props: { value: ( /*currentLabel*/ @@ -7517,7 +7517,7 @@ function _g(i) { "enter", /*onDropDownEnter*/ i[8] - ), f = new am({ + ), f = new fm({ props: { value: ( /*currentColor*/ @@ -7532,7 +7532,7 @@ function _g(i) { i[7] ), _ = new zs({ props: { - $$slots: { default: [fg] }, + $$slots: { default: [ug] }, $$scope: { ctx: i } } }), _.$on( @@ -7542,12 +7542,12 @@ function _g(i) { ); let b = ( /*showRemove*/ - i[4] && ya(i) + i[4] && Ca(i) ); return g = new zs({ props: { variant: "primary", - $$slots: { default: [ug] }, + $$slots: { default: [dg] }, $$scope: { ctx: i } } }), g.$on( @@ -7556,17 +7556,17 @@ function _g(i) { i[15] ), { c() { - e = _t("div"), t = _t("div"), n = _t("span"), w && w.c(), l = ti(), s = _t("div"), cn(o.$$.fragment), r = ti(), a = _t("div"), cn(f.$$.fragment), c = ti(), u = _t("div"), cn(_.$$.fragment), d = ti(), b && b.c(), m = ti(), h = _t("div"), cn(g.$$.fragment), Hn(s, "margin-right", "10px"), Hn(a, "margin-right", "40px"), Hn(a, "margin-bottom", "8px"), Hn(u, "margin-right", "8px"), In(n, "class", "model-content svelte-d9x7u0"), In(t, "class", "modal-container svelte-d9x7u0"), In(e, "class", "modal svelte-d9x7u0"), In(e, "id", "model-box-edit"); + e = ut("div"), t = ut("div"), n = ut("span"), w && w.c(), l = ni(), s = ut("div"), un(o.$$.fragment), r = ni(), a = ut("div"), un(f.$$.fragment), c = ni(), u = ut("div"), un(_.$$.fragment), d = ni(), b && b.c(), m = ni(), h = ut("div"), un(g.$$.fragment), Tn(s, "margin-right", "10px"), Tn(a, "margin-right", "40px"), Tn(a, "margin-bottom", "8px"), Tn(u, "margin-right", "8px"), Hn(n, "class", "model-content svelte-d9x7u0"), Hn(t, "class", "modal-container svelte-d9x7u0"), Hn(e, "class", "modal svelte-d9x7u0"), Hn(e, "id", "model-box-edit"); }, m(k, v) { - Kn(k, e, v), Ne(e, t), Ne(t, n), w && w.m(n, null), Ne(n, l), Ne(n, s), _n(o, s, null), Ne(n, r), Ne(n, a), _n(f, a, null), Ne(n, c), Ne(n, u), _n(_, u, null), Ne(n, d), b && b.m(n, null), Ne(n, m), Ne(n, h), _n(g, h, null), p = !0; + Jn(k, e, v), Ne(e, t), Ne(t, n), w && w.m(n, null), Ne(n, l), Ne(n, s), dn(o, s, null), Ne(n, r), Ne(n, a), dn(f, a, null), Ne(n, c), Ne(n, u), dn(_, u, null), Ne(n, d), b && b.m(n, null), Ne(n, m), Ne(n, h), dn(g, h, null), p = !0; }, p(k, [v]) { /*showRemove*/ k[4] ? w && (Rs(), je(w, 1, 1, () => { w = null; }), Es()) : w ? (w.p(k, v), v & /*showRemove*/ - 16 && Se(w, 1)) : (w = ka(k), w.c(), Se(w, 1), w.m(n, l)); + 16 && Se(w, 1)) : (w = ya(k), w.c(), Se(w, 1), w.m(n, l)); const y = {}; v & /*currentLabel*/ 1 && (y.value = /*currentLabel*/ @@ -7581,7 +7581,7 @@ function _g(i) { v & /*$$scope*/ 262144 && (C.$$scope = { dirty: v, ctx: k }), _.$set(C), /*showRemove*/ k[4] ? b ? (b.p(k, v), v & /*showRemove*/ - 16 && Se(b, 1)) : (b = ya(k), b.c(), Se(b, 1), b.m(n, m)) : b && (Rs(), je(b, 1, 1, () => { + 16 && Se(b, 1)) : (b = Ca(k), b.c(), Se(b, 1), b.m(n, m)) : b && (Rs(), je(b, 1, 1, () => { b = null; }), Es()); const z = {}; @@ -7595,13 +7595,13 @@ function _g(i) { je(w), je(o.$$.fragment, k), je(f.$$.fragment, k), je(_.$$.fragment, k), je(b), je(g.$$.fragment, k), p = !1; }, d(k) { - k && Gn(e), w && w.d(), un(o), un(f), un(_), b && b.d(), un(g); + k && Kn(e), w && w.d(), _n(o), _n(f), _n(_), b && b.d(), _n(g); } }; } -function dg(i, e, t) { +function mg(i, e, t) { let { label: n = "" } = e, { currentLabel: l = "" } = e, { choices: s = [] } = e, { choicesColors: o = [] } = e, { color: r = "" } = e, { currentColor: a = "" } = e, { showRemove: f = !0 } = e, { labelDetailLock: c = !1 } = e; - const u = lg(); + const u = og(); function _(v) { u("change", { label: l, @@ -7633,9 +7633,9 @@ function dg(i, e, t) { break; } } - sg(() => { + ag(() => { document.addEventListener("keydown", p), t(0, l = n), t(1, a = r); - }), og(() => { + }), rg(() => { document.removeEventListener("keydown", p); }); const w = () => _(0), b = () => _(-1), k = () => _(1); @@ -7660,9 +7660,9 @@ function dg(i, e, t) { k ]; } -class Ns extends eg { +class Ns extends ng { constructor(e) { - super(), tg(this, e, dg, _g, ig, { + super(), ig(this, e, mg, hg, sg, { label: 10, currentLabel: 0, choices: 3, @@ -7899,7 +7899,7 @@ class cs { this.applyUserScale(); } } -const tn = [ +const nn = [ "rgb(255, 168, 77)", "rgb(92, 172, 238)", "rgb(255, 99, 71)", @@ -7914,7 +7914,7 @@ const tn = [ "rgb(255, 193, 7)", "rgb(255, 250, 138)" ], Hi = (i, e, t) => Math.min(Math.max(i, e), t); -class hg { +class gg { constructor(e, t) { this.stopDrag = () => { this.pointersCache.size === 0 ? (this.isDragging = !1, document.removeEventListener("pointermove", this.handleDrag), document.removeEventListener("pointerup", this.stopDrag)) : this.pointersCache.size === 1 && (this.isDragging = !0, this.startDragX = this.pointersCache.values().next().value.clientX, this.startDragY = this.pointersCache.values().next().value.clientY); @@ -7940,41 +7940,41 @@ class hg { } } const { - SvelteComponent: mg, - append: ut, + SvelteComponent: bg, + append: ct, attr: ye, - binding_callbacks: gg, + binding_callbacks: wg, bubble: us, - check_outros: Tn, + check_outros: jn, create_component: qt, destroy_component: Lt, detach: St, element: Bt, - empty: bg, - group_outros: jn, - init: wg, + empty: pg, + group_outros: Fn, + init: vg, insert: zt, listen: Me, mount_component: Mt, - noop: Zr, - run_all: Gr, - safe_not_equal: pg, + noop: Kr, + run_all: Jr, + safe_not_equal: kg, set_style: Ti, space: Dt, toggle_class: ji, transition_in: te, transition_out: ue -} = window.__gradio__svelte__internal, { onMount: vg, onDestroy: kg, createEventDispatcher: yg } = window.__gradio__svelte__internal; -function Ca(i) { +} = window.__gradio__svelte__internal, { onMount: yg, onDestroy: Cg, createEventDispatcher: Sg } = window.__gradio__svelte__internal; +function Sa(i) { let e, t, n, l, s, o, r, a, f, c, u, _, d, m, h, g, p; - n = new l0({}), o = new _0({}); + n = new o0({}), o = new h0({}); let w = ( /*showRemoveButton*/ - i[1] && Sa(i) + i[1] && za(i) ), b = !/*disableEditBoxes*/ i[5] && /*labelDetailLock*/ - i[15] && za(i); - return u = new Y_({}), m = new k_({}), { + i[15] && Ba(i); + return u = new H_({}), m = new C_({}), { c() { e = Bt("span"), t = Bt("button"), qt(n.$$.fragment), l = Dt(), s = Bt("button"), qt(o.$$.fragment), r = Dt(), w && w.c(), a = Dt(), b && b.c(), f = Dt(), c = Bt("button"), qt(u.$$.fragment), _ = Dt(), d = Bt("button"), qt(m.$$.fragment), ye(t, "class", "icon svelte-1m8vz1h"), ye(t, "aria-label", "Create box"), ji( t, @@ -7991,7 +7991,7 @@ function Ca(i) { ), ye(c, "class", "icon svelte-1m8vz1h"), ye(c, "aria-label", "Rotate counterclockwise"), ye(d, "class", "icon svelte-1m8vz1h"), ye(d, "aria-label", "Rotate clockwise"), ye(e, "class", "canvas-control svelte-1m8vz1h"); }, m(k, v) { - zt(k, e, v), ut(e, t), Mt(n, t, null), ut(e, l), ut(e, s), Mt(o, s, null), ut(e, r), w && w.m(e, null), ut(e, a), b && b.m(e, null), ut(e, f), ut(e, c), Mt(u, c, null), ut(e, _), ut(e, d), Mt(m, d, null), h = !0, g || (p = [ + zt(k, e, v), ct(e, t), Mt(n, t, null), ct(e, l), ct(e, s), Mt(o, s, null), ct(e, r), w && w.m(e, null), ct(e, a), b && b.m(e, null), ct(e, f), ct(e, c), Mt(u, c, null), ct(e, _), ct(e, d), Mt(m, d, null), h = !0, g || (p = [ Me( t, "click", @@ -8035,14 +8035,14 @@ function Ca(i) { k[8].drag ), /*showRemoveButton*/ k[1] ? w ? (w.p(k, v), v[0] & /*showRemoveButton*/ - 2 && te(w, 1)) : (w = Sa(k), w.c(), te(w, 1), w.m(e, a)) : w && (jn(), ue(w, 1, 1, () => { + 2 && te(w, 1)) : (w = za(k), w.c(), te(w, 1), w.m(e, a)) : w && (Fn(), ue(w, 1, 1, () => { w = null; - }), Tn()), !/*disableEditBoxes*/ + }), jn()), !/*disableEditBoxes*/ k[5] && /*labelDetailLock*/ k[15] ? b ? (b.p(k, v), v[0] & /*disableEditBoxes, labelDetailLock*/ - 32800 && te(b, 1)) : (b = za(k), b.c(), te(b, 1), b.m(e, f)) : b && (jn(), ue(b, 1, 1, () => { + 32800 && te(b, 1)) : (b = Ba(k), b.c(), te(b, 1), b.m(e, f)) : b && (Fn(), ue(b, 1, 1, () => { b = null; - }), Tn()); + }), jn()); }, i(k) { h || (te(n.$$.fragment, k), te(o.$$.fragment, k), te(w), te(b), te(u.$$.fragment, k), te(m.$$.fragment, k), h = !0); @@ -8051,13 +8051,13 @@ function Ca(i) { ue(n.$$.fragment, k), ue(o.$$.fragment, k), ue(w), ue(b), ue(u.$$.fragment, k), ue(m.$$.fragment, k), h = !1; }, d(k) { - k && St(e), Lt(n), Lt(o), w && w.d(), b && b.d(), Lt(u), Lt(m), g = !1, Gr(p); + k && St(e), Lt(n), Lt(o), w && w.d(), b && b.d(), Lt(u), Lt(m), g = !1, Jr(p); } }; } -function Sa(i) { +function za(i) { let e, t, n, l, s; - return t = new v0({}), { + return t = new y0({}), { c() { e = Bt("button"), qt(t.$$.fragment), ye(e, "class", "icon svelte-1m8vz1h"), ye(e, "aria-label", "Remove boxes"); }, @@ -8069,7 +8069,7 @@ function Sa(i) { i[43] ), l = !0); }, - p: Zr, + p: Kr, i(o) { n || (te(t.$$.fragment, o), n = !0); }, @@ -8081,9 +8081,9 @@ function Sa(i) { } }; } -function za(i) { +function Ba(i) { let e, t, n, l, s; - return t = new D0({}), { + return t = new L0({}), { c() { e = Bt("button"), qt(t.$$.fragment), ye(e, "class", "icon svelte-1m8vz1h"), ye(e, "aria-label", "Edit label"); }, @@ -8095,7 +8095,7 @@ function za(i) { i[44] ), l = !0); }, - p: Zr, + p: Kr, i(o) { n || (te(t.$$.fragment, o), n = !0); }, @@ -8107,7 +8107,7 @@ function za(i) { } }; } -function Ba(i) { +function Da(i) { let e, t; return e = new Ns({ props: { @@ -8135,7 +8135,7 @@ function Ba(i) { /*selectedBox*/ i[10] >= 0 && /*selectedBox*/ i[10] < /*value*/ - i[0].boxes.length ? wn( + i[0].boxes.length ? pn( /*value*/ i[0].boxes[ /*selectedBox*/ @@ -8179,7 +8179,7 @@ function Ba(i) { 1025 && (s.color = /*selectedBox*/ n[10] >= 0 && /*selectedBox*/ n[10] < /*value*/ - n[0].boxes.length ? wn( + n[0].boxes.length ? pn( /*value*/ n[0].boxes[ /*selectedBox*/ @@ -8198,7 +8198,7 @@ function Ba(i) { } }; } -function Da(i) { +function qa(i) { let e, t; return e = new Ns({ props: { @@ -8227,7 +8227,7 @@ function Da(i) { /*selectedBox*/ i[10] >= 0 && /*selectedBox*/ i[10] < /*value*/ - i[0].boxes.length ? wn( + i[0].boxes.length ? pn( /*value*/ i[0].boxes[ /*selectedBox*/ @@ -8275,7 +8275,7 @@ function Da(i) { 1025 && (s.color = /*selectedBox*/ n[10] >= 0 && /*selectedBox*/ n[10] < /*value*/ - n[0].boxes.length ? wn( + n[0].boxes.length ? pn( /*value*/ n[0].boxes[ /*selectedBox*/ @@ -8296,7 +8296,7 @@ function Da(i) { } }; } -function qa(i) { +function La(i) { let e, t; return e = new Ns({ props: { @@ -8325,7 +8325,7 @@ function qa(i) { /*selectedBox*/ i[10] >= 0 && /*selectedBox*/ i[10] < /*value*/ - i[0].boxes.length ? wn( + i[0].boxes.length ? pn( /*value*/ i[0].boxes[ /*selectedBox*/ @@ -8373,7 +8373,7 @@ function qa(i) { 1025 && (s.color = /*selectedBox*/ n[10] >= 0 && /*selectedBox*/ n[10] < /*value*/ - n[0].boxes.length ? wn( + n[0].boxes.length ? pn( /*value*/ n[0].boxes[ /*selectedBox*/ @@ -8394,23 +8394,23 @@ function qa(i) { } }; } -function Cg(i) { +function zg(i) { let e, t, n, l, s, o, r, a, f, c, u = ( /*interactive*/ - i[2] && Ca(i) + i[2] && Sa(i) ), _ = ( /*editModalVisible*/ - i[12] && Ba(i) + i[12] && Da(i) ), d = ( /*newModalVisible*/ - i[13] && Da(i) + i[13] && qa(i) ), m = ( /*editDefaultLabelVisible*/ - i[14] && qa(i) + i[14] && La(i) ); return { c() { - e = Bt("div"), t = Bt("canvas"), n = Dt(), u && u.c(), l = Dt(), _ && _.c(), s = Dt(), d && d.c(), o = Dt(), m && m.c(), r = bg(), Ti( + e = Bt("div"), t = Bt("canvas"), n = Dt(), u && u.c(), l = Dt(), _ && _.c(), s = Dt(), d && d.c(), o = Dt(), m && m.c(), r = pg(), Ti( t, "height", /*height*/ @@ -8423,7 +8423,7 @@ function Cg(i) { ), ye(t, "class", "canvas-annotator svelte-1m8vz1h"), ye(e, "class", "canvas-container svelte-1m8vz1h"), ye(e, "tabindex", "-1"); }, m(h, g) { - zt(h, e, g), ut(e, t), i[40](t), zt(h, n, g), u && u.m(h, g), zt(h, l, g), _ && _.m(h, g), zt(h, s, g), d && d.m(h, g), zt(h, o, g), m && m.m(h, g), zt(h, r, g), a = !0, f || (c = [ + zt(h, e, g), ct(e, t), i[40](t), zt(h, n, g), u && u.m(h, g), zt(h, l, g), _ && _.m(h, g), zt(h, s, g), d && d.m(h, g), zt(h, o, g), m && m.m(h, g), zt(h, r, g), a = !0, f || (c = [ Me( t, "pointerdown", @@ -8489,21 +8489,21 @@ function Cg(i) { h[7] ), /*interactive*/ h[2] ? u ? (u.p(h, g), g[0] & /*interactive*/ - 4 && te(u, 1)) : (u = Ca(h), u.c(), te(u, 1), u.m(l.parentNode, l)) : u && (jn(), ue(u, 1, 1, () => { + 4 && te(u, 1)) : (u = Sa(h), u.c(), te(u, 1), u.m(l.parentNode, l)) : u && (Fn(), ue(u, 1, 1, () => { u = null; - }), Tn()), /*editModalVisible*/ + }), jn()), /*editModalVisible*/ h[12] ? _ ? (_.p(h, g), g[0] & /*editModalVisible*/ - 4096 && te(_, 1)) : (_ = Ba(h), _.c(), te(_, 1), _.m(s.parentNode, s)) : _ && (jn(), ue(_, 1, 1, () => { + 4096 && te(_, 1)) : (_ = Da(h), _.c(), te(_, 1), _.m(s.parentNode, s)) : _ && (Fn(), ue(_, 1, 1, () => { _ = null; - }), Tn()), /*newModalVisible*/ + }), jn()), /*newModalVisible*/ h[13] ? d ? (d.p(h, g), g[0] & /*newModalVisible*/ - 8192 && te(d, 1)) : (d = Da(h), d.c(), te(d, 1), d.m(o.parentNode, o)) : d && (jn(), ue(d, 1, 1, () => { + 8192 && te(d, 1)) : (d = qa(h), d.c(), te(d, 1), d.m(o.parentNode, o)) : d && (Fn(), ue(d, 1, 1, () => { d = null; - }), Tn()), /*editDefaultLabelVisible*/ + }), jn()), /*editDefaultLabelVisible*/ h[14] ? m ? (m.p(h, g), g[0] & /*editDefaultLabelVisible*/ - 16384 && te(m, 1)) : (m = qa(h), m.c(), te(m, 1), m.m(r.parentNode, r)) : m && (jn(), ue(m, 1, 1, () => { + 16384 && te(m, 1)) : (m = La(h), m.c(), te(m, 1), m.m(r.parentNode, r)) : m && (Fn(), ue(m, 1, 1, () => { m = null; - }), Tn()); + }), jn()); }, i(h) { a || (te(u), te(_), te(d), te(m), a = !0); @@ -8512,29 +8512,30 @@ function Cg(i) { ue(u), ue(_), ue(d), ue(m), a = !1; }, d(h) { - h && (St(e), St(n), St(l), St(s), St(o), St(r)), i[40](null), u && u.d(h), _ && _.d(h), d && d.d(h), m && m.d(h), f = !1, Gr(c); + h && (St(e), St(n), St(l), St(s), St(o), St(r)), i[40](null), u && u.d(h), _ && _.d(h), d && d.d(h), m && m.d(h), f = !1, Jr(c); } }; } +const Ma = 100; function Fi(i) { var e = parseInt(i.slice(1, 3), 16), t = parseInt(i.slice(3, 5), 16), n = parseInt(i.slice(5, 7), 16); return "rgb(" + e + ", " + t + ", " + n + ")"; } -function wn(i) { +function pn(i) { const e = i.match(/(\d+(\.\d+)?)/g), t = parseInt(e[0]), n = parseInt(e[1]), l = parseInt(e[2]); return "#" + (1 << 24 | t << 16 | n << 8 | l).toString(16).slice(1); } -function Sg(i, e, t) { +function Bg(i, e, t) { var n; (function(B) { B[B.creation = 0] = "creation", B[B.drag = 1] = "drag"; })(n || (n = {})); let { imageUrl: l = null } = e, { interactive: s } = e, { boxAlpha: o = 0.5 } = e, { boxMinSize: r = 10 } = e, { handleSize: a } = e, { boxThickness: f } = e, { boxSelectedThickness: c } = e, { value: u } = e, { choices: _ = [] } = e, { choicesColors: d = [] } = e, { disableEditBoxes: m = !1 } = e, { height: h = "100%" } = e, { width: g = "100%" } = e, { singleBox: p = !1 } = e, { showRemoveButton: w = null } = e, { handlesCursor: b = !0 } = e, { useDefaultLabel: k = !1 } = e; w === null && (w = m); - let v, y, S = null, C = -1, z = n.drag, D = /* @__PURE__ */ new Map(), q = new hg(ne, D); + let v, y, S = null, C = -1, z = n.drag, D = /* @__PURE__ */ new Map(), q = new gg(ne, D); u !== null && u.boxes.length == 0 && (z = n.creation); - let W = 0, F = 0, J = 0, ie = 0, P = 1, $ = 0, R = 0, V = !1, A = !1, Q = !1, ae = k, Z = { label: "", color: "" }, G = { x: 0, y: 0, distance: 0 }; - const X = yg(); + let W = 0, F = 0, J = 0, le = 0, P = 1, $ = 0, R = 0, V = !1, A = !1, Q = !1, ae = k, Z = { label: "", color: "" }, G = { x: 0, y: 0, distance: 0 }; + const X = Sg(); function ne() { if (y) { if (y.clearRect(0, 0, v.width, v.height), y.save(), y.translate(q.offsetX, q.offsetY), y.scale(q.scale, q.scale), S !== null) { @@ -8563,36 +8564,39 @@ function Sg(i, e, t) { Y.setSelected(!1); }), B >= 0 && B < u.boxes.length && u.boxes[B].setSelected(!0), ne(); } - const H = (B, Y) => Math.sqrt(Math.pow(B.clientX - Y.clientX, 2) + Math.pow(B.clientY - Y.clientY, 2)); + const H = (B, Y) => { + const U = Math.sqrt(Math.pow(B.clientX - Y.clientX, 2) + Math.pow(B.clientY - Y.clientY, 2)); + return U < Ma ? Ma : U; + }; function ee(B) { if (s) { - if (v.setPointerCapture(B.pointerId), D.set(B.pointerId, B), D.size == 1) + if (B.preventDefault(), v.setPointerCapture(B.pointerId), D.set(B.pointerId, B), D.size == 1) z === n.creation ? Je(B) : z === n.drag && re(B); else if (D.size == 2) { - q.isDragging = !1, u.boxes.forEach((Qe) => { - Qe.isCreating = !1, Qe.isDragging = !1, Qe.isResizing = !1; + q.isDragging = !1, u.boxes.forEach((Tt) => { + Tt.isCreating = !1, Tt.isDragging = !1, Tt.isResizing = !1; }); - const Y = Array.from(D.values()), U = Y[0], x = Y[1], le = H(U, x), se = (U.clientX + x.clientX) / 2, me = (U.clientY + x.clientY) / 2; - G.distance = le, G.x = se, G.y = me; + const Y = Array.from(D.values()), U = Y[0], x = Y[1], se = H(U, x), ie = v.getBoundingClientRect(), me = (U.clientX + x.clientX) / 2 - ie.left, pt = (U.clientY + x.clientY) / 2 - ie.top; + G.distance = se, G.x = me, G.y = pt; } } } function re(B) { const Y = v.getBoundingClientRect(), U = B.clientX - Y.left, x = B.clientY - Y.top; - let le = !1; - for (const [se, me] of u.boxes.entries()) { - const Qe = me.indexOfPointInsideHandle(U, x); - if (Qe >= 0) { - le = !0, E(se), me.startResize(Qe, B); + let se = !1; + for (const [ie, me] of u.boxes.entries()) { + const pt = me.indexOfPointInsideHandle(U, x); + if (pt >= 0) { + se = !0, E(ie), me.startResize(pt, B); return; } } - for (const [se, me] of u.boxes.entries()) + for (const [ie, me] of u.boxes.entries()) if (me.isPointInsideBox(U, x)) { - le = !0, E(se), me.startDrag(B); + se = !0, E(ie), me.startDrag(B); return; } - p || E(-1), le || q.startDrag(B); + p || E(-1), se || q.startDrag(B); } function M(B) { s && (D.delete(B.pointerId), v.releasePointerCapture(B.pointerId), X("change")); @@ -8600,16 +8604,16 @@ function Sg(i, e, t) { function Ge(B) { s && (D.delete(B.pointerId), v.releasePointerCapture(B.pointerId), X("change")); } - function ot(B) { + function st(B) { if (s) - if (B.pointerType === "mouse") { + if (B.preventDefault(), B.pointerType === "mouse") { if (!b || u === null || z !== n.drag) return; const Y = v.getBoundingClientRect(), U = B.clientX - Y.left, x = B.clientY - Y.top; - for (const [le, se] of u.boxes.entries()) { - const me = se.indexOfPointInsideHandle(U, x); + for (const [se, ie] of u.boxes.entries()) { + const me = ie.indexOfPointInsideHandle(U, x); if (me >= 0) { - t(9, v.style.cursor = se.resizeHandles[me].cursor, v); + t(9, v.style.cursor = ie.resizeHandles[me].cursor, v); return; } } @@ -8618,10 +8622,10 @@ function Sg(i, e, t) { if (!D.has(B.pointerId)) return; if (D.set(B.pointerId, B), D.size === 2) { - const Y = Array.from(D.values()), U = Y[0], x = Y[1], le = H(U, x), se = (U.clientX + x.clientX) / 2, me = (U.clientY + x.clientY) / 2, Qe = parseFloat((q.scale * (le / G.distance)).toFixed(2)), ki = Qe < 1 ? 1 : Qe, Os = ki / q.scale; - q.offsetX = G.x - (G.x - q.offsetX) * Os, q.offsetY = G.y - (G.y - q.offsetY) * Os; - const uf = se - G.x, _f = me - G.y; - q.offsetX += uf, q.offsetY += _f, q.scale = ki, G.x = se, G.y = me, G.distance = le, ne(); + const Y = Array.from(D.values()), U = Y[0], x = Y[1], se = H(U, x), ie = v.getBoundingClientRect(), me = (U.clientX + x.clientX) / 2 - ie.left, pt = (U.clientY + x.clientY) / 2 - ie.top, Tt = parseFloat((q.scale * (se / G.distance)).toFixed(2)), Os = Tt < 1 ? 1 : Tt, Ps = Os / q.scale; + q.offsetX = G.x - (G.x - q.offsetX) * Ps, q.offsetY = G.y - (G.y - q.offsetY) * Ps; + const df = me - G.x, hf = pt - G.y; + q.offsetX += df, q.offsetY += hf, q.scale = Os, G.x = me, G.y = pt, G.distance = se, ne(); } } } @@ -8637,24 +8641,24 @@ function Sg(i, e, t) { if (!s) return; B.preventDefault(); - const Y = 1 / (1 + B.deltaY / 1e3 * 0.5), U = parseFloat((q.scale * Y).toFixed(2)), x = U < 1 ? 1 : U, le = v.getBoundingClientRect(), se = B.clientX - le.left, me = B.clientY - le.top, Qe = (se - q.offsetX) / q.scale, ki = (me - q.offsetY) / q.scale; - q.offsetX = se - Qe * x, q.offsetY = me - ki * x, q.scale = x, ne(); + const Y = 1 / (1 + B.deltaY / 1e3 * 0.5), U = parseFloat((q.scale * Y).toFixed(2)), x = U < 1 ? 1 : U, se = v.getBoundingClientRect(), ie = B.clientX - se.left, me = B.clientY - se.top, pt = (ie - q.offsetX) / q.scale, Tt = (me - q.offsetY) / q.scale; + q.offsetX = ie - pt * x, q.offsetY = me - Tt * x, q.scale = x, ne(); } function Je(B) { const Y = v.getBoundingClientRect(), U = (B.clientX - Y.left - q.offsetX) / P / q.scale, x = (B.clientY - Y.top - q.offsetY) / P / q.scale; - let le; - d.length > 0 ? le = Fi(d[0]) : p ? u.boxes.length > 0 ? le = u.boxes[0].color : le = tn[0] : le = tn[u.boxes.length % tn.length]; - let se = new cs(ne, vi, q, D, W, F, J, ie, "", U, x, U, x, le, o, r, a, f, c); - se.startCreating(B, Y.left, Y.top), p ? t(0, u.boxes = [se], u) : t(0, u.boxes = [se, ...u.boxes], u), E(0), ne(), X("change"); + let se; + d.length > 0 ? se = Fi(d[0]) : p ? u.boxes.length > 0 ? se = u.boxes[0].color : se = nn[0] : se = nn[u.boxes.length % nn.length]; + let ie = new cs(ne, ki, q, D, W, F, J, le, "", U, x, U, x, se, o, r, a, f, c); + ie.startCreating(B, Y.left, Y.top), p ? t(0, u.boxes = [ie], u) : t(0, u.boxes = [ie, ...u.boxes], u), E(0), ne(), X("change"); } function Xe() { t(11, z = n.creation), t(9, v.style.cursor = "crosshair", v); } - function gt() { + function mt() { t(11, z = n.drag), t(9, v.style.cursor = "default", v); } - function vi() { - C >= 0 && C < u.boxes.length && (u.boxes[C].getArea() < 1 ? Ht() : (m || (ae ? yn() : t(13, A = !0)), p && gt())); + function ki() { + C >= 0 && C < u.boxes.length && (u.boxes[C].getArea() < 1 ? Ht() : (m || (ae ? Cn() : t(13, A = !0)), p && mt())); } function pl() { C >= 0 && C < u.boxes.length && !m && t(12, V = !0); @@ -8665,28 +8669,28 @@ function Sg(i, e, t) { function L(B) { t(12, V = !1); const { detail: Y } = B; - let U = Y.label, x = Y.color, le = Y.ret; + let U = Y.label, x = Y.color, se = Y.ret; if (C >= 0 && C < u.boxes.length) { - let se = u.boxes[C]; - le == 1 ? (se.label = U, se.color = Fi(x), ne(), X("change")) : le == -1 && Ht(); + let ie = u.boxes[C]; + se == 1 ? (ie.label = U, ie.color = Fi(x), ne(), X("change")) : se == -1 && Ht(); } } function It(B) { t(13, A = !1); const { detail: Y } = B; - let U = Y.label, x = Y.color, le = Y.ret, se = Y.lock; + let U = Y.label, x = Y.color, se = Y.ret, ie = Y.lock; if (C >= 0 && C < u.boxes.length) { let me = u.boxes[C]; - le == 1 ? (t(15, ae = se), Z.label = U, Z.color = x, me.label = U, me.color = Fi(x), ne(), X("change")) : Ht(); + se == 1 ? (t(15, ae = ie), Z.label = U, Z.color = x, me.label = U, me.color = Fi(x), ne(), X("change")) : Ht(); } } - function bt(B) { + function gt(B) { t(14, Q = !1); const { detail: Y } = B; - let U = Y.label, x = Y.color, le = Y.ret, se = Y.lock; - le == 1 && (t(15, ae = se), Z.label = U, Z.color = x); + let U = Y.label, x = Y.color, se = Y.ret, ie = Y.lock; + se == 1 && (t(15, ae = ie), Z.label = U, Z.color = x); } - function yn() { + function Cn() { if (C >= 0 && C < u.boxes.length) { let B = u.boxes[C]; B.label = Z.label, Z.color !== "" && (B.color = Fi(Z.color)), ne(), X("change"); @@ -8695,86 +8699,86 @@ function Sg(i, e, t) { function Ht() { C >= 0 && C < u.boxes.length && (u.boxes.splice(C, 1), E(-1), p && Xe(), X("change")); } - function wt(B) { - t(0, u.orientation = ((u.orientation + B) % 4 + 4) % 4, u), q.orientation = u.orientation, at(); + function bt(B) { + t(0, u.orientation = ((u.orientation + B) % 4 + 4) % 4, u), q.orientation = u.orientation, ot(); for (const Y of u.boxes) Y.onRotate(B); ne(); } - function at() { + function ot() { if (v) { if (P = 1, t(9, v.width = v.clientWidth, v), q.setRotatedImage(S), S !== null) { if (q.imageRotatedWidth > v.width) - P = v.width / q.imageRotatedWidth, $ = Math.round(q.imageRotatedWidth * P), R = Math.round(q.imageRotatedHeight * P), W = 0, F = 0, J = $, ie = R, t(9, v.height = R, v); + P = v.width / q.imageRotatedWidth, $ = Math.round(q.imageRotatedWidth * P), R = Math.round(q.imageRotatedHeight * P), W = 0, F = 0, J = $, le = R, t(9, v.height = R, v); else { $ = q.imageRotatedWidth, R = q.imageRotatedHeight; var B = (v.width - $) / 2; - W = B, F = 0, J = B + $, ie = R, t(9, v.height = R, v); + W = B, F = 0, J = B + $, le = R, t(9, v.height = R, v); } q.imageWidth = $, q.imageHeight = R; } else - W = 0, F = 0, J = v.width, ie = v.height, t(9, v.height = v.clientHeight, v); - if (q.resize(v.width, v.height, W, F), J > 0 && ie > 0) + W = 0, F = 0, J = v.width, le = v.height, t(9, v.height = v.clientHeight, v); + if (q.resize(v.width, v.height, W, F), J > 0 && le > 0) for (const Y of u.boxes) - Y.canvasXmin = W, Y.canvasYmin = F, Y.canvasXmax = J, Y.canvasYmax = ie, Y.setScaleFactor(P); + Y.canvasXmin = W, Y.canvasYmin = F, Y.canvasXmax = J, Y.canvasYmax = le, Y.setScaleFactor(P); ne(), X("change"); } } - const kl = new ResizeObserver(at); + const kl = new ResizeObserver(ot); function yl() { for (let B = 0; B < u.boxes.length; B++) { let Y = u.boxes[B]; if (!(Y instanceof cs)) { let U = "", x = ""; - Y.hasOwnProperty("color") ? (U = Y.color, Array.isArray(U) && U.length === 3 && (U = `rgb(${U[0]}, ${U[1]}, ${U[2]})`)) : U = tn[B % tn.length], Y.hasOwnProperty("label") && (x = Y.label), Y = new cs(ne, vi, q, D, W, F, J, ie, x, Y.xmin, Y.ymin, Y.xmax, Y.ymax, U, o, r, a, f, c), t(0, u.boxes[B] = Y, u); + Y.hasOwnProperty("color") ? (U = Y.color, Array.isArray(U) && U.length === 3 && (U = `rgb(${U[0]}, ${U[1]}, ${U[2]})`)) : U = nn[B % nn.length], Y.hasOwnProperty("label") && (x = Y.label), Y = new cs(ne, ki, q, D, W, F, J, le, x, Y.xmin, Y.ymin, Y.xmax, Y.ymax, U, o, r, a, f, c), t(0, u.boxes[B] = Y, u); } } } - function Cn() { + function Sn() { l !== null && (S === null || S.src != l) && (S = new Image(), S.src = l, S.onload = function() { - at(), ne(); + ot(), ne(); }); } - vg(() => { + yg(() => { if (Array.isArray(_) && _.length > 0) { if (!Array.isArray(d) || d.length == 0) for (let B = 0; B < _.length; B++) { - let Y = tn[B % tn.length]; - d.push(wn(Y)); + let Y = nn[B % nn.length]; + d.push(pn(Y)); } Z.label = _[0][0], Z.color = d[0]; } - y = v.getContext("2d"), kl.observe(v), C < 0 && u !== null && u.boxes.length > 0 && E(0), Cn(), at(), ne(); + y = v.getContext("2d"), kl.observe(v), C < 0 && u !== null && u.boxes.length > 0 && E(0), Sn(), ot(), ne(); }); - function pt() { + function wt() { document.addEventListener("keydown", Ke); } - function Jn() { + function Qn() { document.removeEventListener("keydown", Ke); } - kg(() => { + Cg(() => { document.removeEventListener("keydown", Ke); }); - function ef(B) { - gg[B ? "unshift" : "push"](() => { + function nf(B) { + wg[B ? "unshift" : "push"](() => { v = B, t(9, v); }); } - const tf = () => Xe(), nf = () => gt(), lf = () => Ht(), sf = () => t(14, Q = !0), of = () => wt(-1), af = () => wt(1); - function rf(B) { + const lf = () => Xe(), sf = () => mt(), of = () => Ht(), af = () => t(14, Q = !0), rf = () => bt(-1), ff = () => bt(1); + function cf(B) { us.call(this, i, B); } - function ff(B) { + function uf(B) { us.call(this, i, B); } - function cf(B) { + function _f(B) { us.call(this, i, B); } return i.$$set = (B) => { "imageUrl" in B && t(31, l = B.imageUrl), "interactive" in B && t(2, s = B.interactive), "boxAlpha" in B && t(32, o = B.boxAlpha), "boxMinSize" in B && t(33, r = B.boxMinSize), "handleSize" in B && t(34, a = B.handleSize), "boxThickness" in B && t(35, f = B.boxThickness), "boxSelectedThickness" in B && t(36, c = B.boxSelectedThickness), "value" in B && t(0, u = B.value), "choices" in B && t(3, _ = B.choices), "choicesColors" in B && t(4, d = B.choicesColors), "disableEditBoxes" in B && t(5, m = B.disableEditBoxes), "height" in B && t(6, h = B.height), "width" in B && t(7, g = B.width), "singleBox" in B && t(37, p = B.singleBox), "showRemoveButton" in B && t(1, w = B.showRemoveButton), "handlesCursor" in B && t(38, b = B.handlesCursor), "useDefaultLabel" in B && t(39, k = B.useDefaultLabel); }, i.$$.update = () => { i.$$.dirty[0] & /*value*/ - 1 && (q.orientation = u.orientation, Cn(), yl(), at(), ne()); + 1 && (q.orientation = u.orientation, Sn(), yl(), ot(), ne()); }, [ u, w, @@ -8795,18 +8799,18 @@ function Sg(i, e, t) { ee, M, Ge, - ot, + st, We, Xe, - gt, + mt, vl, L, It, - bt, + gt, Ht, + bt, wt, - pt, - Jn, + Qn, l, o, r, @@ -8816,8 +8820,6 @@ function Sg(i, e, t) { p, b, k, - ef, - tf, nf, lf, sf, @@ -8825,17 +8827,19 @@ function Sg(i, e, t) { af, rf, ff, - cf + cf, + uf, + _f ]; } -class zg extends mg { +class Dg extends bg { constructor(e) { - super(), wg( + super(), vg( this, e, - Sg, - Cg, - pg, + Bg, + zg, + kg, { imageUrl: 31, interactive: 2, @@ -8861,19 +8865,19 @@ class zg extends mg { } } const { - SvelteComponent: Bg, - add_flush_callback: Dg, - bind: qg, - binding_callbacks: Lg, - create_component: Mg, - destroy_component: Eg, - init: Rg, - mount_component: Ag, - safe_not_equal: Wg, - transition_in: Xg, - transition_out: Yg -} = window.__gradio__svelte__internal, { createEventDispatcher: Ig } = window.__gradio__svelte__internal; -function Hg(i) { + SvelteComponent: qg, + add_flush_callback: Lg, + bind: Mg, + binding_callbacks: Eg, + create_component: Rg, + destroy_component: Ag, + init: Wg, + mount_component: Xg, + safe_not_equal: Yg, + transition_in: Ig, + transition_out: Hg +} = window.__gradio__svelte__internal, { createEventDispatcher: Tg } = window.__gradio__svelte__internal; +function jg(i) { let e, t, n; function l(o) { i[20](o); @@ -8947,16 +8951,16 @@ function Hg(i) { return ( /*value*/ i[0] !== void 0 && (s.value = /*value*/ - i[0]), e = new zg({ props: s }), Lg.push(() => qg(e, "value", l)), e.$on( + i[0]), e = new Dg({ props: s }), Eg.push(() => Mg(e, "value", l)), e.$on( "change", /*change_handler*/ i[21] ), { c() { - Mg(e.$$.fragment); + Rg(e.$$.fragment); }, m(o, r) { - Ag(e, o, r), n = !0; + Xg(e, o, r), n = !0; }, p(o, [r]) { const a = {}; @@ -8994,23 +8998,23 @@ function Hg(i) { 65536 && (a.imageUrl = /*resolved_src*/ o[16]), !t && r & /*value*/ 1 && (t = !0, a.value = /*value*/ - o[0], Dg(() => t = !1)), e.$set(a); + o[0], Lg(() => t = !1)), e.$set(a); }, i(o) { - n || (Xg(e.$$.fragment, o), n = !0); + n || (Ig(e.$$.fragment, o), n = !0); }, o(o) { - Yg(e.$$.fragment, o), n = !1; + Hg(e.$$.fragment, o), n = !1; }, d(o) { - Eg(e, o); + Ag(e, o); } } ); } -function Tg(i, e, t) { +function Fg(i, e, t) { let { src: n = void 0 } = e, { interactive: l } = e, { boxesAlpha: s } = e, { labelList: o } = e, { labelColors: r } = e, { boxMinSize: a } = e, { handleSize: f } = e, { boxThickness: c } = e, { height: u } = e, { width: _ } = e, { boxSelectedThickness: d } = e, { value: m } = e, { disableEditBoxes: h } = e, { singleBox: g } = e, { showRemoveButton: p } = e, { handlesCursor: w } = e, { useDefaultLabel: b } = e, k, v; - const y = Ig(); + const y = Tg(); function S(z) { m = z, t(0, m); } @@ -9022,7 +9026,7 @@ function Tg(i, e, t) { 786432) { t(16, k = n), t(19, v = n); const z = n; - h1(z).then((D) => { + g1(z).then((D) => { v === z && t(16, k = D); }); } @@ -9051,9 +9055,9 @@ function Tg(i, e, t) { C ]; } -class jg extends Bg { +class Ug extends qg { constructor(e) { - super(), Rg(this, e, Tg, Hg, Wg, { + super(), Wg(this, e, Fg, jg, Yg, { src: 18, interactive: 1, boxesAlpha: 2, @@ -9074,43 +9078,43 @@ class jg extends Bg { }); } } -class La { +class Ea { constructor() { this.boxes = [], this.orientation = 0; } } const { - SvelteComponent: Fg, + SvelteComponent: Vg, add_flush_callback: al, - append: En, - attr: fi, + append: Rn, + attr: ci, bind: rl, - binding_callbacks: gi, - bubble: ni, - check_outros: ln, + binding_callbacks: bi, + bubble: ii, + check_outros: sn, create_component: Rt, - create_slot: Ug, + create_slot: Ng, destroy_component: At, - detach: dn, - element: hi, - empty: Vg, - get_all_dirty_from_scope: Ng, - get_slot_changes: Og, - group_outros: sn, - init: Pg, - insert: hn, + detach: hn, + element: mi, + empty: Og, + get_all_dirty_from_scope: Pg, + get_slot_changes: Zg, + group_outros: on, + init: Gg, + insert: mn, mount_component: Wt, - noop: Zg, - safe_not_equal: Gg, - space: nn, - toggle_class: Ma, + noop: Kg, + safe_not_equal: Jg, + space: ln, + toggle_class: Ra, transition_in: K, transition_out: oe, - update_slot_base: Kg -} = window.__gradio__svelte__internal, { createEventDispatcher: Jg, tick: Qg } = window.__gradio__svelte__internal; -function Ea(i) { + update_slot_base: Qg +} = window.__gradio__svelte__internal, { createEventDispatcher: xg, tick: $g } = window.__gradio__svelte__internal; +function Aa(i) { let e, t; - return e = new D1({ + return e = new L1({ props: { href: ( /*value*/ @@ -9120,7 +9124,7 @@ function Ea(i) { /*value*/ i[1].image.orig_name || "image" ), - $$slots: { default: [xg] }, + $$slots: { default: [e2] }, $$scope: { ctx: i } } }), { @@ -9151,11 +9155,11 @@ function Ea(i) { } }; } -function xg(i) { +function e2(i) { let e, t; return e = new fl({ props: { - Icon: ju, + Icon: Uu, label: ( /*i18n*/ i[8]("common.download") @@ -9185,9 +9189,9 @@ function xg(i) { } }; } -function Ra(i) { +function Wa(i) { let e, t; - return e = new fd({ + return e = new ud({ props: { i18n: ( /*i18n*/ @@ -9236,22 +9240,22 @@ function Ra(i) { } }; } -function Aa(i) { +function Xa(i) { let e, t, n; return t = new fl({ - props: { Icon: Ka, label: "Remove Image" } + props: { Icon: Qa, label: "Remove Image" } }), t.$on( "click", /*clear*/ i[36] ), { c() { - e = hi("div"), Rt(t.$$.fragment); + e = mi("div"), Rt(t.$$.fragment); }, m(l, s) { - hn(l, e, s), Wt(t, e, null), n = !0; + mn(l, e, s), Wt(t, e, null), n = !0; }, - p: Zg, + p: Kg, i(l) { n || (K(t.$$.fragment, l), n = !0); }, @@ -9259,16 +9263,16 @@ function Aa(i) { oe(t.$$.fragment, l), n = !1; }, d(l) { - l && dn(e), At(t); + l && hn(e), At(t); } }; } -function Wa(i) { +function Ya(i) { let e; const t = ( /*#slots*/ i[37].default - ), n = Ug( + ), n = Ng( t, i, /*$$scope*/ @@ -9284,19 +9288,19 @@ function Wa(i) { }, p(l, s) { n && n.p && (!e || s[1] & /*$$scope*/ - 4194304) && Kg( + 4194304) && Qg( n, t, l, /*$$scope*/ l[53], - e ? Og( + e ? Zg( t, /*$$scope*/ l[53], s, null - ) : Ng( + ) : Pg( /*$$scope*/ l[53] ), @@ -9314,24 +9318,24 @@ function Wa(i) { } }; } -function $g(i) { +function t2(i) { let e, t, n = ( /*value*/ - i[1] === null && Wa(i) + i[1] === null && Ya(i) ); return { c() { - n && n.c(), e = Vg(); + n && n.c(), e = Og(); }, m(l, s) { - n && n.m(l, s), hn(l, e, s), t = !0; + n && n.m(l, s), mn(l, e, s), t = !0; }, p(l, s) { /*value*/ l[1] === null ? n ? (n.p(l, s), s[0] & /*value*/ - 2 && K(n, 1)) : (n = Wa(l), n.c(), K(n, 1), n.m(e.parentNode, e)) : n && (sn(), oe(n, 1, 1, () => { + 2 && K(n, 1)) : (n = Ya(l), n.c(), K(n, 1), n.m(e.parentNode, e)) : n && (on(), oe(n, 1, 1, () => { n = null; - }), ln()); + }), sn()); }, i(l) { t || (K(n), t = !0); @@ -9340,13 +9344,13 @@ function $g(i) { oe(n), t = !1; }, d(l) { - l && dn(e), n && n.d(l); + l && hn(e), n && n.d(l); } }; } -function Xa(i) { +function Ia(i) { let e, t; - return e = new Qh({ + return e = new $h({ props: { root: ( /*root*/ @@ -9411,7 +9415,7 @@ function Xa(i) { } }; } -function Ya(i) { +function Ha(i) { let e, t, n, l; function s(r) { i[50](r); @@ -9485,13 +9489,13 @@ function Ya(i) { return ( /*value*/ i[1] !== void 0 && (o.value = /*value*/ - i[1]), t = new jg({ props: o }), gi.push(() => rl(t, "value", s)), t.$on( + i[1]), t = new Ug({ props: o }), bi.push(() => rl(t, "value", s)), t.$on( "change", /*change_handler*/ i[51] ), { c() { - e = hi("div"), Rt(t.$$.fragment), fi(e, "class", "image-frame svelte-1gjdske"), Ma( + e = mi("div"), Rt(t.$$.fragment), ci(e, "class", "image-frame svelte-1gjdske"), Ra( e, "selectable", /*selectable*/ @@ -9499,7 +9503,7 @@ function Ya(i) { ); }, m(r, a) { - hn(r, e, a), Wt(t, e, null), l = !0; + mn(r, e, a), Wt(t, e, null), l = !0; }, p(r, a) { const f = {}; @@ -9538,7 +9542,7 @@ function Ya(i) { r[1].image.url), !n && a[0] & /*value*/ 2 && (n = !0, f.value = /*value*/ r[1], al(() => n = !1)), t.$set(f), (!l || a[0] & /*selectable*/ - 32) && Ma( + 32) && Ra( e, "selectable", /*selectable*/ @@ -9552,12 +9556,12 @@ function Ya(i) { oe(t.$$.fragment, r), l = !1; }, d(r) { - r && dn(e), At(t); + r && hn(e), At(t); } } ); } -function Ia(i) { +function Ta(i) { let e, t, n; function l(o) { i[52](o); @@ -9579,7 +9583,7 @@ function Ia(i) { return ( /*active_source*/ i[0] !== void 0 && (s.active_source = /*active_source*/ - i[0]), e = new zd({ props: s }), gi.push(() => rl(e, "active_source", l)), { + i[0]), e = new Dd({ props: s }), bi.push(() => rl(e, "active_source", l)), { c() { Rt(e.$$.fragment); }, @@ -9606,7 +9610,7 @@ function Ia(i) { } ); } -function e2(i) { +function n2(i) { let e, t, n, l, s, o, r, a, f, c, u, _, d, m, h = ( /*sources*/ (i[4].length > 1 || /*sources*/ @@ -9614,13 +9618,13 @@ function e2(i) { i[1] === null && /*interactive*/ i[7] ), g; - e = new Bc({ + e = new qc({ props: { show_label: ( /*show_label*/ i[3] ), - Icon: Ja, + Icon: xa, label: ( /*label*/ i[2] || "Image Annotator" @@ -9630,16 +9634,16 @@ function e2(i) { let p = ( /*showDownloadButton*/ i[10] && /*value*/ - i[1] !== null && Ea(i) + i[1] !== null && Aa(i) ), w = ( /*showShareButton*/ i[9] && /*value*/ - i[1] !== null && Ra(i) + i[1] !== null && Wa(i) ), b = ( /*showClearButton*/ i[11] && /*value*/ i[1] !== null && /*interactive*/ - i[7] && Aa(i) + i[7] && Xa(i) ); function k(D) { i[42](D); @@ -9675,14 +9679,14 @@ function e2(i) { /*stream_handler*/ i[27] ), - $$slots: { default: [$g] }, + $$slots: { default: [t2] }, $$scope: { ctx: i } }; /*uploading*/ i[29] !== void 0 && (y.uploading = /*uploading*/ i[29]), /*dragging*/ i[30] !== void 0 && (y.dragging = /*dragging*/ - i[30]), f = new oh({ props: y }), i[41](f), gi.push(() => rl(f, "uploading", k)), gi.push(() => rl(f, "dragging", v)), f.$on( + i[30]), f = new rh({ props: y }), i[41](f), bi.push(() => rl(f, "uploading", k)), bi.push(() => rl(f, "dragging", v)), f.$on( "load", /*handle_upload*/ i[32] @@ -9694,17 +9698,17 @@ function e2(i) { let S = ( /*value*/ i[1] === null && /*active_source*/ - i[0] === "webcam" && Xa(i) + i[0] === "webcam" && Ia(i) ), C = ( /*value*/ - i[1] !== null && Ya(i) - ), z = h && Ia(i); + i[1] !== null && Ha(i) + ), z = h && Ta(i); return { c() { - Rt(e.$$.fragment), t = nn(), n = hi("div"), p && p.c(), l = nn(), w && w.c(), s = nn(), b && b.c(), o = nn(), r = hi("div"), a = hi("div"), Rt(f.$$.fragment), _ = nn(), S && S.c(), d = nn(), C && C.c(), m = nn(), z && z.c(), fi(n, "class", "icon-buttons svelte-1gjdske"), fi(a, "class", "upload-container svelte-1gjdske"), fi(r, "data-testid", "image"), fi(r, "class", "image-container svelte-1gjdske"); + Rt(e.$$.fragment), t = ln(), n = mi("div"), p && p.c(), l = ln(), w && w.c(), s = ln(), b && b.c(), o = ln(), r = mi("div"), a = mi("div"), Rt(f.$$.fragment), _ = ln(), S && S.c(), d = ln(), C && C.c(), m = ln(), z && z.c(), ci(n, "class", "icon-buttons svelte-1gjdske"), ci(a, "class", "upload-container svelte-1gjdske"), ci(r, "data-testid", "image"), ci(r, "class", "image-container svelte-1gjdske"); }, m(D, q) { - Wt(e, D, q), hn(D, t, q), hn(D, n, q), p && p.m(n, null), En(n, l), w && w.m(n, null), En(n, s), b && b.m(n, null), hn(D, o, q), hn(D, r, q), En(r, a), Wt(f, a, null), En(a, _), S && S.m(a, null), En(a, d), C && C.m(a, null), En(r, m), z && z.m(r, null), g = !0; + Wt(e, D, q), mn(D, t, q), mn(D, n, q), p && p.m(n, null), Rn(n, l), w && w.m(n, null), Rn(n, s), b && b.m(n, null), mn(D, o, q), mn(D, r, q), Rn(r, a), Wt(f, a, null), Rn(a, _), S && S.m(a, null), Rn(a, d), C && C.m(a, null), Rn(r, m), z && z.m(r, null), g = !0; }, p(D, q) { const W = {}; @@ -9715,20 +9719,20 @@ function e2(i) { D[2] || "Image Annotator"), e.$set(W), /*showDownloadButton*/ D[10] && /*value*/ D[1] !== null ? p ? (p.p(D, q), q[0] & /*showDownloadButton, value*/ - 1026 && K(p, 1)) : (p = Ea(D), p.c(), K(p, 1), p.m(n, l)) : p && (sn(), oe(p, 1, 1, () => { + 1026 && K(p, 1)) : (p = Aa(D), p.c(), K(p, 1), p.m(n, l)) : p && (on(), oe(p, 1, 1, () => { p = null; - }), ln()), /*showShareButton*/ + }), sn()), /*showShareButton*/ D[9] && /*value*/ D[1] !== null ? w ? (w.p(D, q), q[0] & /*showShareButton, value*/ - 514 && K(w, 1)) : (w = Ra(D), w.c(), K(w, 1), w.m(n, s)) : w && (sn(), oe(w, 1, 1, () => { + 514 && K(w, 1)) : (w = Wa(D), w.c(), K(w, 1), w.m(n, s)) : w && (on(), oe(w, 1, 1, () => { w = null; - }), ln()), /*showClearButton*/ + }), sn()), /*showClearButton*/ D[11] && /*value*/ D[1] !== null && /*interactive*/ D[7] ? b ? (b.p(D, q), q[0] & /*showClearButton, value, interactive*/ - 2178 && K(b, 1)) : (b = Aa(D), b.c(), K(b, 1), b.m(n, null)) : b && (sn(), oe(b, 1, 1, () => { + 2178 && K(b, 1)) : (b = Xa(D), b.c(), K(b, 1), b.m(n, null)) : b && (on(), oe(b, 1, 1, () => { b = null; - }), ln()); + }), sn()); const F = {}; q[0] & /*value, active_source*/ 3 && (F.hidden = /*value*/ @@ -9754,21 +9758,21 @@ function e2(i) { D[30], al(() => u = !1)), f.$set(F), /*value*/ D[1] === null && /*active_source*/ D[0] === "webcam" ? S ? (S.p(D, q), q[0] & /*value, active_source*/ - 3 && K(S, 1)) : (S = Xa(D), S.c(), K(S, 1), S.m(a, d)) : S && (sn(), oe(S, 1, 1, () => { + 3 && K(S, 1)) : (S = Ia(D), S.c(), K(S, 1), S.m(a, d)) : S && (on(), oe(S, 1, 1, () => { S = null; - }), ln()), /*value*/ + }), sn()), /*value*/ D[1] !== null ? C ? (C.p(D, q), q[0] & /*value*/ - 2 && K(C, 1)) : (C = Ya(D), C.c(), K(C, 1), C.m(a, null)) : C && (sn(), oe(C, 1, 1, () => { + 2 && K(C, 1)) : (C = Ha(D), C.c(), K(C, 1), C.m(a, null)) : C && (on(), oe(C, 1, 1, () => { C = null; - }), ln()), q[0] & /*sources, value, interactive*/ + }), sn()), q[0] & /*sources, value, interactive*/ 146 && (h = /*sources*/ (D[4].length > 1 || /*sources*/ D[4].includes("clipboard")) && /*value*/ D[1] === null && /*interactive*/ D[7]), h ? z ? (z.p(D, q), q[0] & /*sources, value, interactive*/ - 146 && K(z, 1)) : (z = Ia(D), z.c(), K(z, 1), z.m(r, null)) : z && (sn(), oe(z, 1, 1, () => { + 146 && K(z, 1)) : (z = Ta(D), z.c(), K(z, 1), z.m(r, null)) : z && (on(), oe(z, 1, 1, () => { z = null; - }), ln()); + }), sn()); }, i(D) { g || (K(e.$$.fragment, D), K(p), K(w), K(b), K(f.$$.fragment, D), K(S), K(C), K(z), g = !0); @@ -9777,50 +9781,50 @@ function e2(i) { oe(e.$$.fragment, D), oe(p), oe(w), oe(b), oe(f.$$.fragment, D), oe(S), oe(C), oe(z), g = !1; }, d(D) { - D && (dn(t), dn(n), dn(o), dn(r)), At(e, D), p && p.d(), w && w.d(), b && b.d(), i[41](null), At(f), S && S.d(), C && C.d(), z && z.d(); + D && (hn(t), hn(n), hn(o), hn(r)), At(e, D), p && p.d(), w && w.d(), b && b.d(), i[41](null), At(f), S && S.d(), C && C.d(), z && z.d(); } }; } -function t2(i, e, t) { +function i2(i, e, t) { let { $$slots: n = {}, $$scope: l } = e; - var s = this && this.__awaiter || function(L, It, bt, yn) { - function Ht(wt) { - return wt instanceof bt ? wt : new bt(function(at) { - at(wt); + var s = this && this.__awaiter || function(L, It, gt, Cn) { + function Ht(bt) { + return bt instanceof gt ? bt : new gt(function(ot) { + ot(bt); }); } - return new (bt || (bt = Promise))(function(wt, at) { - function kl(pt) { + return new (gt || (gt = Promise))(function(bt, ot) { + function kl(wt) { try { - Cn(yn.next(pt)); - } catch (Jn) { - at(Jn); + Sn(Cn.next(wt)); + } catch (Qn) { + ot(Qn); } } - function yl(pt) { + function yl(wt) { try { - Cn(yn.throw(pt)); - } catch (Jn) { - at(Jn); + Sn(Cn.throw(wt)); + } catch (Qn) { + ot(Qn); } } - function Cn(pt) { - pt.done ? wt(pt.value) : Ht(pt.value).then(kl, yl); + function Sn(wt) { + wt.done ? bt(wt.value) : Ht(wt.value).then(kl, yl); } - Cn((yn = yn.apply(L, It || [])).next()); + Sn((Cn = Cn.apply(L, It || [])).next()); }); }; - let { value: o } = e, { label: r = void 0 } = e, { show_label: a } = e, { sources: f = ["upload", "webcam", "clipboard"] } = e, { selectable: c = !1 } = e, { root: u } = e, { interactive: _ } = e, { i18n: d } = e, { showShareButton: m } = e, { showDownloadButton: h } = e, { showClearButton: g } = e, { boxesAlpha: p } = e, { labelList: w } = e, { labelColors: b } = e, { boxMinSize: k } = e, { handleSize: v } = e, { height: y } = e, { width: S } = e, { boxThickness: C } = e, { disableEditBoxes: z } = e, { singleBox: D } = e, { showRemoveButton: q } = e, { handlesCursor: W } = e, { boxSelectedThickness: F } = e, { max_file_size: J = null } = e, { cli_upload: ie } = e, { stream_handler: P } = e, { useDefaultLabel: $ } = e, R, V = !1, { active_source: A = null } = e; + let { value: o } = e, { label: r = void 0 } = e, { show_label: a } = e, { sources: f = ["upload", "webcam", "clipboard"] } = e, { selectable: c = !1 } = e, { root: u } = e, { interactive: _ } = e, { i18n: d } = e, { showShareButton: m } = e, { showDownloadButton: h } = e, { showClearButton: g } = e, { boxesAlpha: p } = e, { labelList: w } = e, { labelColors: b } = e, { boxMinSize: k } = e, { handleSize: v } = e, { height: y } = e, { width: S } = e, { boxThickness: C } = e, { disableEditBoxes: z } = e, { singleBox: D } = e, { showRemoveButton: q } = e, { handlesCursor: W } = e, { boxSelectedThickness: F } = e, { max_file_size: J = null } = e, { cli_upload: le } = e, { stream_handler: P } = e, { useDefaultLabel: $ } = e, R, V = !1, { active_source: A = null } = e; function Q({ detail: L }) { - t(1, o = new La()), t(1, o.image = L, o), Z("upload"); + t(1, o = new Ea()), t(1, o.image = L, o), Z("upload"); } function ae(L) { return s(this, void 0, void 0, function* () { - const It = yield R.load_files([new File([L], "webcam.png")]), bt = (It == null ? void 0 : It[0]) || null; - bt ? (t(1, o = new La()), t(1, o.image = bt, o)) : t(1, o = null), yield Qg(), Z("change"); + const It = yield R.load_files([new File([L], "webcam.png")]), gt = (It == null ? void 0 : It[0]) || null; + gt ? (t(1, o = new Ea()), t(1, o.image = gt, o)) : t(1, o = null), yield $g(), Z("change"); }); } - const Z = Jg(); + const Z = xg(); let G = !1; function X(L) { return s(this, void 0, void 0, function* () { @@ -9834,15 +9838,15 @@ function t2(i, e, t) { function ne() { t(1, o = null), Z("clear"), Z("change"); } - const E = async (L) => L === null ? "" : ``; + const E = async (L) => L === null ? "" : ``; function H(L) { - ni.call(this, i, L); + ii.call(this, i, L); } function ee(L) { - ni.call(this, i, L); + ii.call(this, i, L); } function re(L) { - gi[L ? "unshift" : "push"](() => { + bi[L ? "unshift" : "push"](() => { R = L, t(31, R); }); } @@ -9852,18 +9856,18 @@ function t2(i, e, t) { function Ge(L) { G = L, t(30, G); } - function ot(L) { - ni.call(this, i, L); + function st(L) { + ii.call(this, i, L); } const Ke = (L) => ae(L.detail), We = (L) => ae(L.detail); function Je(L) { - ni.call(this, i, L); + ii.call(this, i, L); } function Xe(L) { - ni.call(this, i, L); + ii.call(this, i, L); } - const gt = (L) => ae(L.detail); - function vi(L) { + const mt = (L) => ae(L.detail); + function ki(L) { o = L, t(1, o); } const pl = () => Z("change"); @@ -9871,7 +9875,7 @@ function t2(i, e, t) { A = L, t(0, A), t(4, f); } return i.$$set = (L) => { - "value" in L && t(1, o = L.value), "label" in L && t(2, r = L.label), "show_label" in L && t(3, a = L.show_label), "sources" in L && t(4, f = L.sources), "selectable" in L && t(5, c = L.selectable), "root" in L && t(6, u = L.root), "interactive" in L && t(7, _ = L.interactive), "i18n" in L && t(8, d = L.i18n), "showShareButton" in L && t(9, m = L.showShareButton), "showDownloadButton" in L && t(10, h = L.showDownloadButton), "showClearButton" in L && t(11, g = L.showClearButton), "boxesAlpha" in L && t(12, p = L.boxesAlpha), "labelList" in L && t(13, w = L.labelList), "labelColors" in L && t(14, b = L.labelColors), "boxMinSize" in L && t(15, k = L.boxMinSize), "handleSize" in L && t(16, v = L.handleSize), "height" in L && t(17, y = L.height), "width" in L && t(18, S = L.width), "boxThickness" in L && t(19, C = L.boxThickness), "disableEditBoxes" in L && t(20, z = L.disableEditBoxes), "singleBox" in L && t(21, D = L.singleBox), "showRemoveButton" in L && t(22, q = L.showRemoveButton), "handlesCursor" in L && t(23, W = L.handlesCursor), "boxSelectedThickness" in L && t(24, F = L.boxSelectedThickness), "max_file_size" in L && t(25, J = L.max_file_size), "cli_upload" in L && t(26, ie = L.cli_upload), "stream_handler" in L && t(27, P = L.stream_handler), "useDefaultLabel" in L && t(28, $ = L.useDefaultLabel), "active_source" in L && t(0, A = L.active_source), "$$scope" in L && t(53, l = L.$$scope); + "value" in L && t(1, o = L.value), "label" in L && t(2, r = L.label), "show_label" in L && t(3, a = L.show_label), "sources" in L && t(4, f = L.sources), "selectable" in L && t(5, c = L.selectable), "root" in L && t(6, u = L.root), "interactive" in L && t(7, _ = L.interactive), "i18n" in L && t(8, d = L.i18n), "showShareButton" in L && t(9, m = L.showShareButton), "showDownloadButton" in L && t(10, h = L.showDownloadButton), "showClearButton" in L && t(11, g = L.showClearButton), "boxesAlpha" in L && t(12, p = L.boxesAlpha), "labelList" in L && t(13, w = L.labelList), "labelColors" in L && t(14, b = L.labelColors), "boxMinSize" in L && t(15, k = L.boxMinSize), "handleSize" in L && t(16, v = L.handleSize), "height" in L && t(17, y = L.height), "width" in L && t(18, S = L.width), "boxThickness" in L && t(19, C = L.boxThickness), "disableEditBoxes" in L && t(20, z = L.disableEditBoxes), "singleBox" in L && t(21, D = L.singleBox), "showRemoveButton" in L && t(22, q = L.showRemoveButton), "handlesCursor" in L && t(23, W = L.handlesCursor), "boxSelectedThickness" in L && t(24, F = L.boxSelectedThickness), "max_file_size" in L && t(25, J = L.max_file_size), "cli_upload" in L && t(26, le = L.cli_upload), "stream_handler" in L && t(27, P = L.stream_handler), "useDefaultLabel" in L && t(28, $ = L.useDefaultLabel), "active_source" in L && t(0, A = L.active_source), "$$scope" in L && t(53, l = L.$$scope); }, i.$$.update = () => { i.$$.dirty[0] & /*uploading*/ 536870912 && V && ne(), i.$$.dirty[0] & /*dragging*/ @@ -9904,7 +9908,7 @@ function t2(i, e, t) { W, F, J, - ie, + le, P, $, V, @@ -9922,26 +9926,26 @@ function t2(i, e, t) { re, M, Ge, - ot, + st, Ke, We, Je, Xe, - gt, - vi, + mt, + ki, pl, vl, l ]; } -class n2 extends Fg { +class l2 extends Vg { constructor(e) { - super(), Pg( + super(), Gg( this, e, - t2, - e2, - Gg, + i2, + n2, + Jg, { value: 1, label: 2, @@ -9979,60 +9983,60 @@ class n2 extends Fg { } } const { - SvelteComponent: i2, + SvelteComponent: s2, attr: Ki, - detach: Kr, - element: Jr, - init: l2, - insert: Qr, - noop: Ha, - safe_not_equal: s2, - src_url_equal: Ta, - toggle_class: Pt + detach: Qr, + element: xr, + init: o2, + insert: $r, + noop: ja, + safe_not_equal: a2, + src_url_equal: Fa, + toggle_class: Zt } = window.__gradio__svelte__internal; -function ja(i) { +function Ua(i) { let e, t; return { c() { - e = Jr("img"), Ta(e.src, t = /*value*/ + e = xr("img"), Fa(e.src, t = /*value*/ i[0].url) || Ki(e, "src", t), Ki(e, "alt", ""); }, m(n, l) { - Qr(n, e, l); + $r(n, e, l); }, p(n, l) { l & /*value*/ - 1 && !Ta(e.src, t = /*value*/ + 1 && !Fa(e.src, t = /*value*/ n[0].url) && Ki(e, "src", t); }, d(n) { - n && Kr(e); + n && Qr(e); } }; } -function o2(i) { +function r2(i) { let e, t = ( /*value*/ - i[0] && ja(i) + i[0] && Ua(i) ); return { c() { - e = Jr("div"), t && t.c(), Ki(e, "class", "container svelte-1sgcyba"), Pt( + e = xr("div"), t && t.c(), Ki(e, "class", "container svelte-1sgcyba"), Zt( e, "table", /*type*/ i[1] === "table" - ), Pt( + ), Zt( e, "gallery", /*type*/ i[1] === "gallery" - ), Pt( + ), Zt( e, "selected", /*selected*/ i[2] - ), Pt( + ), Zt( e, "border", /*value*/ @@ -10040,92 +10044,92 @@ function o2(i) { ); }, m(n, l) { - Qr(n, e, l), t && t.m(e, null); + $r(n, e, l), t && t.m(e, null); }, p(n, [l]) { /*value*/ - n[0] ? t ? t.p(n, l) : (t = ja(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null), l & /*type*/ - 2 && Pt( + n[0] ? t ? t.p(n, l) : (t = Ua(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null), l & /*type*/ + 2 && Zt( e, "table", /*type*/ n[1] === "table" ), l & /*type*/ - 2 && Pt( + 2 && Zt( e, "gallery", /*type*/ n[1] === "gallery" ), l & /*selected*/ - 4 && Pt( + 4 && Zt( e, "selected", /*selected*/ n[2] ), l & /*value*/ - 1 && Pt( + 1 && Zt( e, "border", /*value*/ n[0] ); }, - i: Ha, - o: Ha, + i: ja, + o: ja, d(n) { - n && Kr(e), t && t.d(); + n && Qr(e), t && t.d(); } }; } -function a2(i, e, t) { +function f2(i, e, t) { let { value: n } = e, { type: l } = e, { selected: s = !1 } = e; return i.$$set = (o) => { "value" in o && t(0, n = o.value), "type" in o && t(1, l = o.type), "selected" in o && t(2, s = o.selected); }, [n, l, s]; } -class E2 extends i2 { +class A2 extends s2 { constructor(e) { - super(), l2(this, e, a2, o2, s2, { value: 0, type: 1, selected: 2 }); + super(), o2(this, e, f2, r2, a2, { value: 0, type: 1, selected: 2 }); } } const { - SvelteComponent: r2, - add_flush_callback: Fa, - assign: f2, - bind: Ua, - binding_callbacks: Va, - check_outros: c2, - create_component: pn, - destroy_component: vn, - detach: xr, - empty: u2, + SvelteComponent: c2, + add_flush_callback: Va, + assign: u2, + bind: Na, + binding_callbacks: Oa, + check_outros: _2, + create_component: vn, + destroy_component: kn, + detach: ef, + empty: d2, flush: O, - get_spread_object: _2, - get_spread_update: d2, - group_outros: h2, - init: m2, - insert: $r, - mount_component: kn, - safe_not_equal: g2, - space: b2, + get_spread_object: h2, + get_spread_update: m2, + group_outros: g2, + init: b2, + insert: tf, + mount_component: yn, + safe_not_equal: w2, + space: p2, transition_in: Xt, transition_out: Yt } = window.__gradio__svelte__internal; -function w2(i) { +function v2(i) { let e, t; - return e = new iu({ + return e = new su({ props: { unpadded_box: !0, size: "large", - $$slots: { default: [k2] }, + $$slots: { default: [C2] }, $$scope: { ctx: i } } }), { c() { - pn(e.$$.fragment); + vn(e.$$.fragment); }, m(n, l) { - kn(e, n, l), t = !0; + yn(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -10139,13 +10143,13 @@ function w2(i) { Yt(e.$$.fragment, n), t = !1; }, d(n) { - vn(e, n); + kn(e, n); } }; } -function p2(i) { +function k2(i) { let e, t; - return e = new ir({ + return e = new sr({ props: { i18n: ( /*gradio*/ @@ -10156,10 +10160,10 @@ function p2(i) { } }), { c() { - pn(e.$$.fragment); + vn(e.$$.fragment); }, m(n, l) { - kn(e, n, l), t = !0; + yn(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -10174,13 +10178,13 @@ function p2(i) { Yt(e.$$.fragment, n), t = !1; }, d(n) { - vn(e, n); + kn(e, n); } }; } -function v2(i) { +function y2(i) { let e, t; - return e = new ir({ + return e = new sr({ props: { i18n: ( /*gradio*/ @@ -10190,10 +10194,10 @@ function v2(i) { } }), { c() { - pn(e.$$.fragment); + vn(e.$$.fragment); }, m(n, l) { - kn(e, n, l), t = !0; + yn(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -10208,18 +10212,18 @@ function v2(i) { Yt(e.$$.fragment, n), t = !1; }, d(n) { - vn(e, n); + kn(e, n); } }; } -function k2(i) { +function C2(i) { let e, t; - return e = new Ja({}), { + return e = new xa({}), { c() { - pn(e.$$.fragment); + vn(e.$$.fragment); }, m(n, l) { - kn(e, n, l), t = !0; + yn(e, n, l), t = !0; }, i(n) { t || (Xt(e.$$.fragment, n), t = !0); @@ -10228,13 +10232,13 @@ function k2(i) { Yt(e.$$.fragment, n), t = !1; }, d(n) { - vn(e, n); + kn(e, n); } }; } -function y2(i) { +function S2(i) { let e, t, n, l; - const s = [v2, p2, w2], o = []; + const s = [y2, k2, v2], o = []; function r(a, f) { return ( /*active_source*/ @@ -10246,16 +10250,16 @@ function y2(i) { } return e = r(i), t = o[e] = s[e](i), { c() { - t.c(), n = u2(); + t.c(), n = d2(); }, m(a, f) { - o[e].m(a, f), $r(a, n, f), l = !0; + o[e].m(a, f), tf(a, n, f), l = !0; }, p(a, f) { let c = e; - e = r(a), e === c ? o[e].p(a, f) : (h2(), Yt(o[c], 1, 1, () => { + e = r(a), e === c ? o[e].p(a, f) : (g2(), Yt(o[c], 1, 1, () => { o[c] = null; - }), c2(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), Xt(t, 1), t.m(n.parentNode, n)); + }), _2(), t = o[e], t ? t.p(a, f) : (t = o[e] = s[e](a), t.c()), Xt(t, 1), t.m(n.parentNode, n)); }, i(a) { l || (Xt(t), l = !0); @@ -10264,11 +10268,11 @@ function y2(i) { Yt(t), l = !1; }, d(a) { - a && xr(n), o[e].d(a); + a && ef(n), o[e].d(a); } }; } -function C2(i) { +function z2(i) { let e, t, n, l, s, o; const r = [ { @@ -10286,8 +10290,8 @@ function C2(i) { ]; let a = {}; for (let _ = 0; _ < r.length; _ += 1) - a = f2(a, r[_]); - e = new c1({ props: a }); + a = u2(a, r[_]); + e = new _1({ props: a }); function f(_) { i[34](_); } @@ -10403,7 +10407,7 @@ function C2(i) { /*use_default_label*/ i[30] ), - $$slots: { default: [y2] }, + $$slots: { default: [S2] }, $$scope: { ctx: i } }; return ( @@ -10411,7 +10415,7 @@ function C2(i) { i[33] !== void 0 && (u.active_source = /*active_source*/ i[33]), /*value*/ i[0] !== void 0 && (u.value = /*value*/ - i[0]), n = new n2({ props: u }), Va.push(() => Ua(n, "active_source", f)), Va.push(() => Ua(n, "value", c)), n.$on( + i[0]), n = new l2({ props: u }), Oa.push(() => Na(n, "active_source", f)), Oa.push(() => Na(n, "value", c)), n.$on( "change", /*change_handler*/ i[36] @@ -10445,15 +10449,15 @@ function C2(i) { i[43] ), { c() { - pn(e.$$.fragment), t = b2(), pn(n.$$.fragment); + vn(e.$$.fragment), t = p2(), vn(n.$$.fragment); }, m(_, d) { - kn(e, _, d), $r(_, t, d), kn(n, _, d), o = !0; + yn(e, _, d), tf(_, t, d), yn(n, _, d), o = !0; }, p(_, d) { const m = d[0] & /*loading_status*/ 2 | d[1] & /*gradio*/ - 1 ? d2(r, [ + 1 ? m2(r, [ d[1] & /*gradio*/ 1 && { autoscroll: ( @@ -10467,7 +10471,7 @@ function C2(i) { _[31].i18n ) }, d[0] & /*loading_status*/ - 2 && _2( + 2 && h2( /*loading_status*/ _[1] ) @@ -10531,9 +10535,9 @@ function C2(i) { _[30]), d[1] & /*$$scope, gradio, active_source*/ 8197 && (h.$$scope = { dirty: d, ctx: _ }), !l && d[1] & /*active_source*/ 4 && (l = !0, h.active_source = /*active_source*/ - _[33], Fa(() => l = !1)), !s && d[0] & /*value*/ + _[33], Va(() => l = !1)), !s && d[0] & /*value*/ 1 && (s = !0, h.value = /*value*/ - _[0], Fa(() => s = !1)), n.$set(h); + _[0], Va(() => s = !1)), n.$set(h); }, i(_) { o || (Xt(e.$$.fragment, _), Xt(n.$$.fragment, _), o = !0); @@ -10542,14 +10546,14 @@ function C2(i) { Yt(e.$$.fragment, _), Yt(n.$$.fragment, _), o = !1; }, d(_) { - _ && xr(t), vn(e, _), vn(n, _); + _ && ef(t), kn(e, _), kn(n, _); } } ); } -function S2(i) { +function B2(i) { let e, t; - return e = new qf({ + return e = new Mf({ props: { visible: ( /*visible*/ @@ -10586,15 +10590,15 @@ function S2(i) { /*min_width*/ i[13] ), - $$slots: { default: [C2] }, + $$slots: { default: [z2] }, $$scope: { ctx: i } } }), { c() { - pn(e.$$.fragment); + vn(e.$$.fragment); }, m(n, l) { - kn(e, n, l), t = !0; + yn(e, n, l), t = !0; }, p(n, l) { const s = {}; @@ -10625,12 +10629,12 @@ function S2(i) { Yt(e.$$.fragment, n), t = !1; }, d(n) { - vn(e, n); + kn(e, n); } }; } -function z2(i, e, t) { - let { elem_id: n = "" } = e, { elem_classes: l = [] } = e, { visible: s = !0 } = e, { value: o = null } = e, { label: r } = e, { show_label: a } = e, { root: f } = e, { height: c } = e, { width: u } = e, { _selectable: _ = !1 } = e, { container: d = !0 } = e, { scale: m = null } = e, { min_width: h = void 0 } = e, { loading_status: g } = e, { sources: p = ["upload", "webcam", "clipboard"] } = e, { show_download_button: w } = e, { show_share_button: b } = e, { show_clear_button: k } = e, { interactive: v } = e, { boxes_alpha: y } = e, { label_list: S } = e, { label_colors: C } = e, { box_min_size: z } = e, { handle_size: D } = e, { box_thickness: q } = e, { box_selected_thickness: W } = e, { disable_edit_boxes: F } = e, { single_box: J } = e, { show_remove_button: ie } = e, { handles_cursor: P } = e, { use_default_label: $ } = e, { gradio: R } = e, V, A = null; +function D2(i, e, t) { + let { elem_id: n = "" } = e, { elem_classes: l = [] } = e, { visible: s = !0 } = e, { value: o = null } = e, { label: r } = e, { show_label: a } = e, { root: f } = e, { height: c } = e, { width: u } = e, { _selectable: _ = !1 } = e, { container: d = !0 } = e, { scale: m = null } = e, { min_width: h = void 0 } = e, { loading_status: g } = e, { sources: p = ["upload", "webcam", "clipboard"] } = e, { show_download_button: w } = e, { show_share_button: b } = e, { show_clear_button: k } = e, { interactive: v } = e, { boxes_alpha: y } = e, { label_list: S } = e, { label_colors: C } = e, { box_min_size: z } = e, { handle_size: D } = e, { box_thickness: q } = e, { box_selected_thickness: W } = e, { disable_edit_boxes: F } = e, { single_box: J } = e, { show_remove_button: le } = e, { handles_cursor: P } = e, { use_default_label: $ } = e, { gradio: R } = e, V, A = null; function Q(M) { A = M, t(33, A); } @@ -10643,7 +10647,7 @@ function z2(i, e, t) { t(1, g = g || {}), t(1, g.status = "error", g), R.dispatch("error", M); }; return i.$$set = (M) => { - "elem_id" in M && t(2, n = M.elem_id), "elem_classes" in M && t(3, l = M.elem_classes), "visible" in M && t(4, s = M.visible), "value" in M && t(0, o = M.value), "label" in M && t(5, r = M.label), "show_label" in M && t(6, a = M.show_label), "root" in M && t(7, f = M.root), "height" in M && t(8, c = M.height), "width" in M && t(9, u = M.width), "_selectable" in M && t(10, _ = M._selectable), "container" in M && t(11, d = M.container), "scale" in M && t(12, m = M.scale), "min_width" in M && t(13, h = M.min_width), "loading_status" in M && t(1, g = M.loading_status), "sources" in M && t(14, p = M.sources), "show_download_button" in M && t(15, w = M.show_download_button), "show_share_button" in M && t(16, b = M.show_share_button), "show_clear_button" in M && t(17, k = M.show_clear_button), "interactive" in M && t(18, v = M.interactive), "boxes_alpha" in M && t(19, y = M.boxes_alpha), "label_list" in M && t(20, S = M.label_list), "label_colors" in M && t(21, C = M.label_colors), "box_min_size" in M && t(22, z = M.box_min_size), "handle_size" in M && t(23, D = M.handle_size), "box_thickness" in M && t(24, q = M.box_thickness), "box_selected_thickness" in M && t(25, W = M.box_selected_thickness), "disable_edit_boxes" in M && t(26, F = M.disable_edit_boxes), "single_box" in M && t(27, J = M.single_box), "show_remove_button" in M && t(28, ie = M.show_remove_button), "handles_cursor" in M && t(29, P = M.handles_cursor), "use_default_label" in M && t(30, $ = M.use_default_label), "gradio" in M && t(31, R = M.gradio); + "elem_id" in M && t(2, n = M.elem_id), "elem_classes" in M && t(3, l = M.elem_classes), "visible" in M && t(4, s = M.visible), "value" in M && t(0, o = M.value), "label" in M && t(5, r = M.label), "show_label" in M && t(6, a = M.show_label), "root" in M && t(7, f = M.root), "height" in M && t(8, c = M.height), "width" in M && t(9, u = M.width), "_selectable" in M && t(10, _ = M._selectable), "container" in M && t(11, d = M.container), "scale" in M && t(12, m = M.scale), "min_width" in M && t(13, h = M.min_width), "loading_status" in M && t(1, g = M.loading_status), "sources" in M && t(14, p = M.sources), "show_download_button" in M && t(15, w = M.show_download_button), "show_share_button" in M && t(16, b = M.show_share_button), "show_clear_button" in M && t(17, k = M.show_clear_button), "interactive" in M && t(18, v = M.interactive), "boxes_alpha" in M && t(19, y = M.boxes_alpha), "label_list" in M && t(20, S = M.label_list), "label_colors" in M && t(21, C = M.label_colors), "box_min_size" in M && t(22, z = M.box_min_size), "handle_size" in M && t(23, D = M.handle_size), "box_thickness" in M && t(24, q = M.box_thickness), "box_selected_thickness" in M && t(25, W = M.box_selected_thickness), "disable_edit_boxes" in M && t(26, F = M.disable_edit_boxes), "single_box" in M && t(27, J = M.single_box), "show_remove_button" in M && t(28, le = M.show_remove_button), "handles_cursor" in M && t(29, P = M.handles_cursor), "use_default_label" in M && t(30, $ = M.use_default_label), "gradio" in M && t(31, R = M.gradio); }, [ o, g, @@ -10673,7 +10677,7 @@ function z2(i, e, t) { W, F, J, - ie, + le, P, $, R, @@ -10691,14 +10695,14 @@ function z2(i, e, t) { re ]; } -class R2 extends r2 { +class W2 extends c2 { constructor(e) { - super(), m2( + super(), b2( this, e, - z2, - S2, - g2, + D2, + B2, + w2, { elem_id: 2, elem_classes: 3, @@ -10931,6 +10935,6 @@ class R2 extends r2 { } } export { - E2 as BaseExample, - R2 as default + A2 as BaseExample, + W2 as default };