diff --git "a/src/backend/gradio_folium/templates/component/index.js" "b/src/backend/gradio_folium/templates/component/index.js" --- "a/src/backend/gradio_folium/templates/component/index.js" +++ "b/src/backend/gradio_folium/templates/component/index.js" @@ -1,251 +1,251 @@ const { - SvelteComponent: Jn, - assign: Yn, - create_slot: Kn, - detach: $n, - element: er, - get_all_dirty_from_scope: tr, - get_slot_changes: nr, - get_spread_update: rr, - init: ir, - insert: sr, - safe_not_equal: lr, - set_dynamic_element_data: Et, - set_style: L, - toggle_class: z, - transition_in: _n, - transition_out: mn, - update_slot_base: or + SvelteComponent: kt, + assign: yt, + create_slot: vt, + detach: Ct, + element: qt, + get_all_dirty_from_scope: Ft, + get_slot_changes: Lt, + get_spread_update: Mt, + init: St, + insert: zt, + safe_not_equal: Vt, + set_dynamic_element_data: ze, + set_style: S, + toggle_class: E, + transition_in: ot, + transition_out: rt, + update_slot_base: Nt } = window.__gradio__svelte__internal; -function ar(e) { - let t, n, r; +function At(n) { + let e, t, l; const i = ( /*#slots*/ - e[17].default - ), s = Kn( + n[17].default + ), f = vt( i, - e, + n, /*$$scope*/ - e[16], + n[16], null ); - let l = [ + let s = [ { "data-testid": ( /*test_id*/ - e[7] + n[7] ) }, { id: ( /*elem_id*/ - e[2] + n[2] ) }, { - class: n = "block " + /*elem_classes*/ - e[3].join(" ") + " svelte-1t38q2d" + class: t = "block " + /*elem_classes*/ + n[3].join(" ") + " svelte-1t38q2d" } ], o = {}; - for (let a = 0; a < l.length; a += 1) - o = Yn(o, l[a]); + for (let r = 0; r < s.length; r += 1) + o = yt(o, s[r]); return { c() { - t = er( + e = qt( /*tag*/ - e[14] - ), s && s.c(), Et( + n[14] + ), f && f.c(), ze( /*tag*/ - e[14] - )(t, o), z( - t, + n[14] + )(e, o), E( + e, "hidden", /*visible*/ - e[10] === !1 - ), z( - t, + n[10] === !1 + ), E( + e, "padded", /*padding*/ - e[6] - ), z( - t, + n[6] + ), E( + e, "border_focus", /*border_mode*/ - e[5] === "focus" - ), z(t, "hide-container", !/*explicit_call*/ - e[8] && !/*container*/ - e[9]), L(t, "height", typeof /*height*/ - e[0] == "number" ? ( + n[5] === "focus" + ), E(e, "hide-container", !/*explicit_call*/ + n[8] && !/*container*/ + n[9]), S(e, "height", typeof /*height*/ + n[0] == "number" ? ( /*height*/ - e[0] + "px" - ) : void 0), L(t, "width", typeof /*width*/ - e[1] == "number" ? `calc(min(${/*width*/ - e[1]}px, 100%))` : void 0), L( - t, + n[0] + "px" + ) : void 0), S(e, "width", typeof /*width*/ + n[1] == "number" ? `calc(min(${/*width*/ + n[1]}px, 100%))` : void 0), S( + e, "border-style", /*variant*/ - e[4] - ), L( - t, + n[4] + ), S( + e, "overflow", /*allow_overflow*/ - e[11] ? "visible" : "hidden" - ), L( - t, + n[11] ? "visible" : "hidden" + ), S( + e, "flex-grow", /*scale*/ - e[12] - ), L(t, "min-width", `calc(min(${/*min_width*/ - e[13]}px, 100%))`), L(t, "border-width", "var(--block-border-width)"); + n[12] + ), S(e, "min-width", `calc(min(${/*min_width*/ + n[13]}px, 100%))`), S(e, "border-width", "var(--block-border-width)"); }, - m(a, u) { - sr(a, t, u), s && s.m(t, null), r = !0; + m(r, a) { + zt(r, e, a), f && f.m(e, null), l = !0; }, - p(a, u) { - s && s.p && (!r || u & /*$$scope*/ - 65536) && or( - s, + p(r, a) { + f && f.p && (!l || a & /*$$scope*/ + 65536) && Nt( + f, i, - a, + r, /*$$scope*/ - a[16], - r ? nr( + r[16], + l ? Lt( i, /*$$scope*/ - a[16], - u, + r[16], + a, null - ) : tr( + ) : Ft( /*$$scope*/ - a[16] + r[16] ), null - ), Et( + ), ze( /*tag*/ - a[14] - )(t, o = rr(l, [ - (!r || u & /*test_id*/ + r[14] + )(e, o = Mt(s, [ + (!l || a & /*test_id*/ 128) && { "data-testid": ( /*test_id*/ - a[7] + r[7] ) }, - (!r || u & /*elem_id*/ + (!l || a & /*elem_id*/ 4) && { id: ( /*elem_id*/ - a[2] + r[2] ) }, - (!r || u & /*elem_classes*/ - 8 && n !== (n = "block " + /*elem_classes*/ - a[3].join(" ") + " svelte-1t38q2d")) && { class: n } - ])), z( - t, + (!l || a & /*elem_classes*/ + 8 && t !== (t = "block " + /*elem_classes*/ + r[3].join(" ") + " svelte-1t38q2d")) && { class: t } + ])), E( + e, "hidden", /*visible*/ - a[10] === !1 - ), z( - t, + r[10] === !1 + ), E( + e, "padded", /*padding*/ - a[6] - ), z( - t, + r[6] + ), E( + e, "border_focus", /*border_mode*/ - a[5] === "focus" - ), z(t, "hide-container", !/*explicit_call*/ - a[8] && !/*container*/ - a[9]), u & /*height*/ - 1 && L(t, "height", typeof /*height*/ - a[0] == "number" ? ( + r[5] === "focus" + ), E(e, "hide-container", !/*explicit_call*/ + r[8] && !/*container*/ + r[9]), a & /*height*/ + 1 && S(e, "height", typeof /*height*/ + r[0] == "number" ? ( /*height*/ - a[0] + "px" - ) : void 0), u & /*width*/ - 2 && L(t, "width", typeof /*width*/ - a[1] == "number" ? `calc(min(${/*width*/ - a[1]}px, 100%))` : void 0), u & /*variant*/ - 16 && L( - t, + r[0] + "px" + ) : void 0), a & /*width*/ + 2 && S(e, "width", typeof /*width*/ + r[1] == "number" ? `calc(min(${/*width*/ + r[1]}px, 100%))` : void 0), a & /*variant*/ + 16 && S( + e, "border-style", /*variant*/ - a[4] - ), u & /*allow_overflow*/ - 2048 && L( - t, + r[4] + ), a & /*allow_overflow*/ + 2048 && S( + e, "overflow", /*allow_overflow*/ - a[11] ? "visible" : "hidden" - ), u & /*scale*/ - 4096 && L( - t, + r[11] ? "visible" : "hidden" + ), a & /*scale*/ + 4096 && S( + e, "flex-grow", /*scale*/ - a[12] - ), u & /*min_width*/ - 8192 && L(t, "min-width", `calc(min(${/*min_width*/ - a[13]}px, 100%))`); + r[12] + ), a & /*min_width*/ + 8192 && S(e, "min-width", `calc(min(${/*min_width*/ + r[13]}px, 100%))`); }, - i(a) { - r || (_n(s, a), r = !0); + i(r) { + l || (ot(f, r), l = !0); }, - o(a) { - mn(s, a), r = !1; + o(r) { + rt(f, r), l = !1; }, - d(a) { - a && $n(t), s && s.d(a); + d(r) { + r && Ct(e), f && f.d(r); } }; } -function ur(e) { - let t, n = ( +function Bt(n) { + let e, t = ( /*tag*/ - e[14] && ar(e) + n[14] && At(n) ); return { c() { - n && n.c(); + t && t.c(); }, - m(r, i) { - n && n.m(r, i), t = !0; + m(l, i) { + t && t.m(l, i), e = !0; }, - p(r, [i]) { + p(l, [i]) { /*tag*/ - r[14] && n.p(r, i); + l[14] && t.p(l, i); }, - i(r) { - t || (_n(n, r), t = !0); + i(l) { + e || (ot(t, l), e = !0); }, - o(r) { - mn(n, r), t = !1; + o(l) { + rt(t, l), e = !1; }, - d(r) { - n && n.d(r); + d(l) { + t && t.d(l); } }; } -function fr(e, t, n) { - let { $$slots: r = {}, $$scope: i } = t, { height: s = void 0 } = t, { width: l = void 0 } = t, { elem_id: o = "" } = t, { elem_classes: a = [] } = t, { variant: u = "solid" } = t, { border_mode: f = "base" } = t, { padding: c = !0 } = t, { type: h = "normal" } = t, { test_id: _ = void 0 } = t, { explicit_call: d = !1 } = t, { container: E = !0 } = t, { visible: w = !0 } = t, { allow_overflow: N = !0 } = t, { scale: b = null } = t, { min_width: m = 0 } = t, T = h === "fieldset" ? "fieldset" : "div"; - return e.$$set = (p) => { - "height" in p && n(0, s = p.height), "width" in p && n(1, l = p.width), "elem_id" in p && n(2, o = p.elem_id), "elem_classes" in p && n(3, a = p.elem_classes), "variant" in p && n(4, u = p.variant), "border_mode" in p && n(5, f = p.border_mode), "padding" in p && n(6, c = p.padding), "type" in p && n(15, h = p.type), "test_id" in p && n(7, _ = p.test_id), "explicit_call" in p && n(8, d = p.explicit_call), "container" in p && n(9, E = p.container), "visible" in p && n(10, w = p.visible), "allow_overflow" in p && n(11, N = p.allow_overflow), "scale" in p && n(12, b = p.scale), "min_width" in p && n(13, m = p.min_width), "$$scope" in p && n(16, i = p.$$scope); +function It(n, e, t) { + let { $$slots: l = {}, $$scope: i } = e, { height: f = void 0 } = e, { width: s = void 0 } = e, { elem_id: o = "" } = e, { elem_classes: r = [] } = e, { variant: a = "solid" } = e, { border_mode: _ = "base" } = e, { padding: u = !0 } = e, { type: c = "normal" } = e, { test_id: m = void 0 } = e, { explicit_call: h = !1 } = e, { container: L = !0 } = e, { visible: q = !0 } = e, { allow_overflow: M = !0 } = e, { scale: g = null } = e, { min_width: d = 0 } = e, C = c === "fieldset" ? "fieldset" : "div"; + return n.$$set = (w) => { + "height" in w && t(0, f = w.height), "width" in w && t(1, s = w.width), "elem_id" in w && t(2, o = w.elem_id), "elem_classes" in w && t(3, r = w.elem_classes), "variant" in w && t(4, a = w.variant), "border_mode" in w && t(5, _ = w.border_mode), "padding" in w && t(6, u = w.padding), "type" in w && t(15, c = w.type), "test_id" in w && t(7, m = w.test_id), "explicit_call" in w && t(8, h = w.explicit_call), "container" in w && t(9, L = w.container), "visible" in w && t(10, q = w.visible), "allow_overflow" in w && t(11, M = w.allow_overflow), "scale" in w && t(12, g = w.scale), "min_width" in w && t(13, d = w.min_width), "$$scope" in w && t(16, i = w.$$scope); }, [ + f, s, - l, o, + r, a, - u, - f, - c, _, - d, - E, - w, - N, - b, + u, m, - T, h, + L, + q, + M, + g, + d, + C, + c, i, - r + l ]; } -class hr extends Jn { - constructor(t) { - super(), ir(this, t, fr, ur, lr, { +class Pt extends kt { + constructor(e) { + super(), St(this, e, It, Bt, Vt, { height: 0, width: 1, elem_id: 2, @@ -265,93 +265,93 @@ class hr extends Jn { } } const { - SvelteComponent: cr, - append: qe, - attr: Pe, - create_component: _r, - destroy_component: mr, - detach: dr, - element: wt, - init: br, - insert: pr, - mount_component: gr, - safe_not_equal: vr, - set_data: yr, - space: Er, - text: wr, - toggle_class: Z, - transition_in: xr, - transition_out: Tr + SvelteComponent: Zt, + append: he, + attr: re, + create_component: Tt, + destroy_component: jt, + detach: Et, + element: Ve, + init: Dt, + insert: Rt, + mount_component: Ht, + safe_not_equal: Yt, + set_data: Ut, + space: Xt, + text: Gt, + toggle_class: D, + transition_in: Ot, + transition_out: Jt } = window.__gradio__svelte__internal; -function Hr(e) { - let t, n, r, i, s, l; - return r = new /*Icon*/ - e[1]({}), { +function Kt(n) { + let e, t, l, i, f, s; + return l = new /*Icon*/ + n[1]({}), { c() { - t = wt("label"), n = wt("span"), _r(r.$$.fragment), i = Er(), s = wr( + e = Ve("label"), t = Ve("span"), Tt(l.$$.fragment), i = Xt(), f = Gt( /*label*/ - e[0] - ), Pe(n, "class", "svelte-9gxdi0"), Pe(t, "for", ""), Pe(t, "data-testid", "block-label"), Pe(t, "class", "svelte-9gxdi0"), Z(t, "hide", !/*show_label*/ - e[2]), Z(t, "sr-only", !/*show_label*/ - e[2]), Z( - t, + n[0] + ), re(t, "class", "svelte-9gxdi0"), re(e, "for", ""), re(e, "data-testid", "block-label"), re(e, "class", "svelte-9gxdi0"), D(e, "hide", !/*show_label*/ + n[2]), D(e, "sr-only", !/*show_label*/ + n[2]), D( + e, "float", /*float*/ - e[4] - ), Z( - t, + n[4] + ), D( + e, "hide-label", /*disable*/ - e[3] + n[3] ); }, - m(o, a) { - pr(o, t, a), qe(t, n), gr(r, n, null), qe(t, i), qe(t, s), l = !0; + m(o, r) { + Rt(o, e, r), he(e, t), Ht(l, t, null), he(e, i), he(e, f), s = !0; }, - p(o, [a]) { - (!l || a & /*label*/ - 1) && yr( - s, + p(o, [r]) { + (!s || r & /*label*/ + 1) && Ut( + f, /*label*/ o[0] - ), (!l || a & /*show_label*/ - 4) && Z(t, "hide", !/*show_label*/ - o[2]), (!l || a & /*show_label*/ - 4) && Z(t, "sr-only", !/*show_label*/ - o[2]), (!l || a & /*float*/ - 16) && Z( - t, + ), (!s || r & /*show_label*/ + 4) && D(e, "hide", !/*show_label*/ + o[2]), (!s || r & /*show_label*/ + 4) && D(e, "sr-only", !/*show_label*/ + o[2]), (!s || r & /*float*/ + 16) && D( + e, "float", /*float*/ o[4] - ), (!l || a & /*disable*/ - 8) && Z( - t, + ), (!s || r & /*disable*/ + 8) && D( + e, "hide-label", /*disable*/ o[3] ); }, i(o) { - l || (xr(r.$$.fragment, o), l = !0); + s || (Ot(l.$$.fragment, o), s = !0); }, o(o) { - Tr(r.$$.fragment, o), l = !1; + Jt(l.$$.fragment, o), s = !1; }, d(o) { - o && dr(t), mr(r); + o && Et(e), jt(l); } }; } -function Br(e, t, n) { - let { label: r = null } = t, { Icon: i } = t, { show_label: s = !0 } = t, { disable: l = !1 } = t, { float: o = !0 } = t; - return e.$$set = (a) => { - "label" in a && n(0, r = a.label), "Icon" in a && n(1, i = a.Icon), "show_label" in a && n(2, s = a.show_label), "disable" in a && n(3, l = a.disable), "float" in a && n(4, o = a.float); - }, [r, i, s, l, o]; +function Qt(n, e, t) { + let { label: l = null } = e, { Icon: i } = e, { show_label: f = !0 } = e, { disable: s = !1 } = e, { float: o = !0 } = e; + return n.$$set = (r) => { + "label" in r && t(0, l = r.label), "Icon" in r && t(1, i = r.Icon), "show_label" in r && t(2, f = r.show_label), "disable" in r && t(3, s = r.disable), "float" in r && t(4, o = r.float); + }, [l, i, f, s, o]; } -class Sr extends cr { - constructor(t) { - super(), br(this, t, Br, Hr, vr, { +class Wt extends Zt { + constructor(e) { + super(), Dt(this, e, Qt, Kt, Yt, { label: 0, Icon: 1, show_label: 2, @@ -361,195 +361,195 @@ class Sr extends cr { } } const { - SvelteComponent: Ar, - append: Pr, - attr: ze, - binding_callbacks: Nr, - create_slot: Ir, - detach: Cr, - element: xt, - get_all_dirty_from_scope: Lr, - get_slot_changes: Or, - init: Mr, - insert: Rr, - safe_not_equal: Ur, - toggle_class: W, - transition_in: Dr, - transition_out: Fr, - update_slot_base: kr + SvelteComponent: xt, + append: $t, + attr: we, + binding_callbacks: el, + create_slot: tl, + detach: ll, + element: Ne, + get_all_dirty_from_scope: nl, + get_slot_changes: il, + init: fl, + insert: sl, + safe_not_equal: ol, + toggle_class: R, + transition_in: rl, + transition_out: al, + update_slot_base: _l } = window.__gradio__svelte__internal; -function Gr(e) { - let t, n, r; +function cl(n) { + let e, t, l; const i = ( /*#slots*/ - e[5].default - ), s = Ir( + n[5].default + ), f = tl( i, - e, + n, /*$$scope*/ - e[4], + n[4], null ); return { c() { - t = xt("div"), n = xt("div"), s && s.c(), ze(n, "class", "icon svelte-3w3rth"), ze(t, "class", "empty svelte-3w3rth"), ze(t, "aria-label", "Empty value"), W( - t, + e = Ne("div"), t = Ne("div"), f && f.c(), we(t, "class", "icon svelte-3w3rth"), we(e, "class", "empty svelte-3w3rth"), we(e, "aria-label", "Empty value"), R( + e, "small", /*size*/ - e[0] === "small" - ), W( - t, + n[0] === "small" + ), R( + e, "large", /*size*/ - e[0] === "large" - ), W( - t, + n[0] === "large" + ), R( + e, "unpadded_box", /*unpadded_box*/ - e[1] - ), W( - t, + n[1] + ), R( + e, "small_parent", /*parent_height*/ - e[3] + n[3] ); }, - m(l, o) { - Rr(l, t, o), Pr(t, n), s && s.m(n, null), e[6](t), r = !0; + m(s, o) { + sl(s, e, o), $t(e, t), f && f.m(t, null), n[6](e), l = !0; }, - p(l, [o]) { - s && s.p && (!r || o & /*$$scope*/ - 16) && kr( - s, + p(s, [o]) { + f && f.p && (!l || o & /*$$scope*/ + 16) && _l( + f, i, - l, + s, /*$$scope*/ - l[4], - r ? Or( + s[4], + l ? il( i, /*$$scope*/ - l[4], + s[4], o, null - ) : Lr( + ) : nl( /*$$scope*/ - l[4] + s[4] ), null - ), (!r || o & /*size*/ - 1) && W( - t, + ), (!l || o & /*size*/ + 1) && R( + e, "small", /*size*/ - l[0] === "small" - ), (!r || o & /*size*/ - 1) && W( - t, + s[0] === "small" + ), (!l || o & /*size*/ + 1) && R( + e, "large", /*size*/ - l[0] === "large" - ), (!r || o & /*unpadded_box*/ - 2) && W( - t, + s[0] === "large" + ), (!l || o & /*unpadded_box*/ + 2) && R( + e, "unpadded_box", /*unpadded_box*/ - l[1] - ), (!r || o & /*parent_height*/ - 8) && W( - t, + s[1] + ), (!l || o & /*parent_height*/ + 8) && R( + e, "small_parent", /*parent_height*/ - l[3] + s[3] ); }, - i(l) { - r || (Dr(s, l), r = !0); + i(s) { + l || (rl(f, s), l = !0); }, - o(l) { - Fr(s, l), r = !1; + o(s) { + al(f, s), l = !1; }, - d(l) { - l && Cr(t), s && s.d(l), e[6](null); + d(s) { + s && ll(e), f && f.d(s), n[6](null); } }; } -function Vr(e) { - let t, n = e[0], r = 1; - for (; r < e.length; ) { - const i = e[r], s = e[r + 1]; - if (r += 2, (i === "optionalAccess" || i === "optionalCall") && n == null) +function ul(n) { + let e, t = n[0], l = 1; + for (; l < n.length; ) { + const i = n[l], f = n[l + 1]; + if (l += 2, (i === "optionalAccess" || i === "optionalCall") && t == null) return; - i === "access" || i === "optionalAccess" ? (t = n, n = s(n)) : (i === "call" || i === "optionalCall") && (n = s((...l) => n.call(t, ...l)), t = void 0); + i === "access" || i === "optionalAccess" ? (e = t, t = f(t)) : (i === "call" || i === "optionalCall") && (t = f((...s) => t.call(e, ...s)), e = void 0); } - return n; + return t; } -function jr(e, t, n) { - let r, { $$slots: i = {}, $$scope: s } = t, { size: l = "small" } = t, { unpadded_box: o = !1 } = t, a; - function u(c) { - if (!c) +function dl(n, e, t) { + let l, { $$slots: i = {}, $$scope: f } = e, { size: s = "small" } = e, { unpadded_box: o = !1 } = e, r; + function a(u) { + if (!u) return !1; - const { height: h } = c.getBoundingClientRect(), { height: _ } = Vr([ - c, + const { height: c } = u.getBoundingClientRect(), { height: m } = ul([ + u, "access", - (d) => d.parentElement, + (h) => h.parentElement, "optionalAccess", - (d) => d.getBoundingClientRect, + (h) => h.getBoundingClientRect, "call", - (d) => d() - ]) || { height: h }; - return h > _ + 2; + (h) => h() + ]) || { height: c }; + return c > m + 2; } - function f(c) { - Nr[c ? "unshift" : "push"](() => { - a = c, n(2, a); + function _(u) { + el[u ? "unshift" : "push"](() => { + r = u, t(2, r); }); } - return e.$$set = (c) => { - "size" in c && n(0, l = c.size), "unpadded_box" in c && n(1, o = c.unpadded_box), "$$scope" in c && n(4, s = c.$$scope); - }, e.$$.update = () => { - e.$$.dirty & /*el*/ - 4 && n(3, r = u(a)); - }, [l, o, a, r, s, i, f]; -} -class Xr extends Ar { - constructor(t) { - super(), Mr(this, t, jr, Gr, Ur, { size: 0, unpadded_box: 1 }); + return n.$$set = (u) => { + "size" in u && t(0, s = u.size), "unpadded_box" in u && t(1, o = u.unpadded_box), "$$scope" in u && t(4, f = u.$$scope); + }, n.$$.update = () => { + n.$$.dirty & /*el*/ + 4 && t(3, l = a(r)); + }, [s, o, r, l, f, i, _]; +} +class ml extends xt { + constructor(e) { + super(), fl(this, e, dl, cl, ol, { size: 0, unpadded_box: 1 }); } } const { - SvelteComponent: qr, - append: ie, - attr: S, - detach: zr, - init: Zr, - insert: Wr, - noop: Ze, - safe_not_equal: Qr, - svg_element: $ + SvelteComponent: bl, + append: J, + attr: v, + detach: gl, + init: hl, + insert: wl, + noop: pe, + safe_not_equal: pl, + svg_element: X } = window.__gradio__svelte__internal; -function Jr(e) { - let t, n, r, i, s, l, o; +function kl(n) { + let e, t, l, i, f, s, o; return { c() { - t = $("svg"), n = $("circle"), r = $("circle"), i = $("circle"), s = $("circle"), l = $("circle"), o = $("path"), S(n, "cx", "20"), S(n, "cy", "4"), S(n, "r", "2"), S(n, "fill", "currentColor"), S(r, "cx", "8"), S(r, "cy", "16"), S(r, "r", "2"), S(r, "fill", "currentColor"), S(i, "cx", "28"), S(i, "cy", "12"), S(i, "r", "2"), S(i, "fill", "currentColor"), S(s, "cx", "11"), S(s, "cy", "7"), S(s, "r", "2"), S(s, "fill", "currentColor"), S(l, "cx", "16"), S(l, "cy", "24"), S(l, "r", "2"), S(l, "fill", "currentColor"), S(o, "fill", "currentColor"), S(o, "d", "M30 3.413L28.586 2L4 26.585V2H2v26a2 2 0 0 0 2 2h26v-2H5.413Z"), S(t, "xmlns", "http://www.w3.org/2000/svg"), S(t, "xmlns:xlink", "http://www.w3.org/1999/xlink"), S(t, "aria-hidden", "true"), S(t, "role", "img"), S(t, "class", "iconify iconify--carbon"), S(t, "width", "100%"), S(t, "height", "100%"), S(t, "preserveAspectRatio", "xMidYMid meet"), S(t, "viewBox", "0 0 32 32"); + e = X("svg"), t = X("circle"), l = X("circle"), i = X("circle"), f = X("circle"), s = X("circle"), o = X("path"), v(t, "cx", "20"), v(t, "cy", "4"), v(t, "r", "2"), v(t, "fill", "currentColor"), v(l, "cx", "8"), v(l, "cy", "16"), v(l, "r", "2"), v(l, "fill", "currentColor"), v(i, "cx", "28"), v(i, "cy", "12"), v(i, "r", "2"), v(i, "fill", "currentColor"), v(f, "cx", "11"), v(f, "cy", "7"), v(f, "r", "2"), v(f, "fill", "currentColor"), v(s, "cx", "16"), v(s, "cy", "24"), v(s, "r", "2"), v(s, "fill", "currentColor"), v(o, "fill", "currentColor"), v(o, "d", "M30 3.413L28.586 2L4 26.585V2H2v26a2 2 0 0 0 2 2h26v-2H5.413Z"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), v(e, "aria-hidden", "true"), v(e, "role", "img"), v(e, "class", "iconify iconify--carbon"), v(e, "width", "100%"), v(e, "height", "100%"), v(e, "preserveAspectRatio", "xMidYMid meet"), v(e, "viewBox", "0 0 32 32"); }, - m(a, u) { - Wr(a, t, u), ie(t, n), ie(t, r), ie(t, i), ie(t, s), ie(t, l), ie(t, o); + m(r, a) { + wl(r, e, a), J(e, t), J(e, l), J(e, i), J(e, f), J(e, s), J(e, o); }, - p: Ze, - i: Ze, - o: Ze, - d(a) { - a && zr(t); + p: pe, + i: pe, + o: pe, + d(r) { + r && gl(e); } }; } -class dn extends qr { - constructor(t) { - super(), Zr(this, t, null, Jr, Qr, {}); +class at extends bl { + constructor(e) { + super(), hl(this, e, null, kl, pl, {}); } } -const Yr = [ +const yl = [ { color: "red", primary: 600, secondary: 100 }, { color: "green", primary: 600, secondary: 100 }, { color: "blue", primary: 600, secondary: 100 }, @@ -560,7 +560,7 @@ const Yr = [ { color: "cyan", primary: 600, secondary: 100 }, { color: "lime", primary: 500, secondary: 100 }, { color: "pink", primary: 600, secondary: 100 } -], Tt = { +], Ae = { inherit: "inherit", current: "currentColor", transparent: "transparent", @@ -853,4252 +853,1126 @@ const Yr = [ 950: "#4c0519" } }; -Yr.reduce( - (e, { color: t, primary: n, secondary: r }) => ({ - ...e, - [t]: { - primary: Tt[t][n], - secondary: Tt[t][r] +yl.reduce( + (n, { color: e, primary: t, secondary: l }) => ({ + ...n, + [e]: { + primary: Ae[e][t], + secondary: Ae[e][l] } }), {} ); -function ne() { -} -function Kr(e) { - return e(); -} -function $r(e) { - e.forEach(Kr); -} -function ei(e) { - return typeof e == "function"; -} -function ti(e, t) { - return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function"; -} -function bn(e, ...t) { - if (e == null) { - for (const r of t) - r(void 0); - return ne; - } - const n = e.subscribe(...t); - return n.unsubscribe ? () => n.unsubscribe() : n; -} -function ni(e) { - let t; - return bn(e, (n) => t = n)(), t; -} -const pn = typeof window < "u"; -let Ht = pn ? () => window.performance.now() : () => Date.now(), gn = pn ? (e) => requestAnimationFrame(e) : ne; -const oe = /* @__PURE__ */ new Set(); -function vn(e) { - oe.forEach((t) => { - t.c(e) || (oe.delete(t), t.f()); - }), oe.size !== 0 && gn(vn); -} -function ri(e) { - let t; - return oe.size === 0 && gn(vn), { - promise: new Promise((n) => { - oe.add(t = { c: e, f: n }); +function Q(n) { + let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0; + for (; n > 1e3 && t < e.length - 1; ) + n /= 1e3, t++; + let l = e[t]; + return (Number.isInteger(n) ? n : n.toFixed(1)) + l; +} +function ce() { +} +function vl(n, e) { + return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function"; +} +const _t = typeof window < "u"; +let Be = _t ? () => window.performance.now() : () => Date.now(), ct = _t ? (n) => requestAnimationFrame(n) : ce; +const W = /* @__PURE__ */ new Set(); +function ut(n) { + W.forEach((e) => { + e.c(n) || (W.delete(e), e.f()); + }), W.size !== 0 && ct(ut); +} +function Cl(n) { + let e; + return W.size === 0 && ct(ut), { + promise: new Promise((t) => { + W.add(e = { c: n, f: t }); }), abort() { - oe.delete(t); + W.delete(e); } }; } -const se = []; -function ii(e, t) { - return { - subscribe: we(e, t).subscribe - }; -} -function we(e, t = ne) { - let n; - const r = /* @__PURE__ */ new Set(); +const K = []; +function ql(n, e = ce) { + let t; + const l = /* @__PURE__ */ new Set(); function i(o) { - if (ti(e, o) && (e = o, n)) { - const a = !se.length; - for (const u of r) - u[1](), se.push(u, e); - if (a) { - for (let u = 0; u < se.length; u += 2) - se[u][0](se[u + 1]); - se.length = 0; + if (vl(n, o) && (n = o, t)) { + const r = !K.length; + for (const a of l) + a[1](), K.push(a, n); + if (r) { + for (let a = 0; a < K.length; a += 2) + K[a][0](K[a + 1]); + K.length = 0; } } } - function s(o) { - i(o(e)); + function f(o) { + i(o(n)); } - function l(o, a = ne) { - const u = [o, a]; - return r.add(u), r.size === 1 && (n = t(i, s) || ne), o(e), () => { - r.delete(u), r.size === 0 && n && (n(), n = null); + function s(o, r = ce) { + const a = [o, r]; + return l.add(a), l.size === 1 && (t = e(i, f) || ce), o(n), () => { + l.delete(a), l.size === 0 && t && (t(), t = null); }; } - return { set: i, update: s, subscribe: l }; -} -function me(e, t, n) { - const r = !Array.isArray(e), i = r ? [e] : e; - if (!i.every(Boolean)) - throw new Error("derived() expects stores as input, got a falsy value"); - const s = t.length < 2; - return ii(n, (l, o) => { - let a = !1; - const u = []; - let f = 0, c = ne; - const h = () => { - if (f) - return; - c(); - const d = t(r ? u[0] : u, l, o); - s ? l(d) : c = ei(d) ? d : ne; - }, _ = i.map( - (d, E) => bn( - d, - (w) => { - u[E] = w, f &= ~(1 << E), a && h(); - }, - () => { - f |= 1 << E; - } - ) - ); - return a = !0, h(), function() { - $r(_), c(), a = !1; - }; - }); + return { set: i, update: f, subscribe: s }; } -function Bt(e) { - return Object.prototype.toString.call(e) === "[object Date]"; +function Ie(n) { + return Object.prototype.toString.call(n) === "[object Date]"; } -function tt(e, t, n, r) { - if (typeof n == "number" || Bt(n)) { - const i = r - n, s = (n - t) / (e.dt || 1 / 60), l = e.opts.stiffness * i, o = e.opts.damping * s, a = (l - o) * e.inv_mass, u = (s + a) * e.dt; - return Math.abs(u) < e.opts.precision && Math.abs(i) < e.opts.precision ? r : (e.settled = !1, Bt(n) ? new Date(n.getTime() + u) : n + u); +function ve(n, e, t, l) { + if (typeof t == "number" || Ie(t)) { + const i = l - t, f = (t - e) / (n.dt || 1 / 60), s = n.opts.stiffness * i, o = n.opts.damping * f, r = (s - o) * n.inv_mass, a = (f + r) * n.dt; + return Math.abs(a) < n.opts.precision && Math.abs(i) < n.opts.precision ? l : (n.settled = !1, Ie(t) ? new Date(t.getTime() + a) : t + a); } else { - if (Array.isArray(n)) - return n.map( - (i, s) => tt(e, t[s], n[s], r[s]) + if (Array.isArray(t)) + return t.map( + (i, f) => ve(n, e[f], t[f], l[f]) ); - if (typeof n == "object") { + if (typeof t == "object") { const i = {}; - for (const s in n) - i[s] = tt(e, t[s], n[s], r[s]); + for (const f in t) + i[f] = ve(n, e[f], t[f], l[f]); return i; } else - throw new Error(`Cannot spring ${typeof n} values`); + throw new Error(`Cannot spring ${typeof t} values`); } } -function St(e, t = {}) { - const n = we(e), { stiffness: r = 0.15, damping: i = 0.8, precision: s = 0.01 } = t; - let l, o, a, u = e, f = e, c = 1, h = 0, _ = !1; - function d(w, N = {}) { - f = w; - const b = a = {}; - return e == null || N.hard || E.stiffness >= 1 && E.damping >= 1 ? (_ = !0, l = Ht(), u = w, n.set(e = f), Promise.resolve()) : (N.soft && (h = 1 / ((N.soft === !0 ? 0.5 : +N.soft) * 60), c = 0), o || (l = Ht(), _ = !1, o = ri((m) => { - if (_) - return _ = !1, o = null, !1; - c = Math.min(c + h, 1); - const T = { - inv_mass: c, - opts: E, +function Pe(n, e = {}) { + const t = ql(n), { stiffness: l = 0.15, damping: i = 0.8, precision: f = 0.01 } = e; + let s, o, r, a = n, _ = n, u = 1, c = 0, m = !1; + function h(q, M = {}) { + _ = q; + const g = r = {}; + return n == null || M.hard || L.stiffness >= 1 && L.damping >= 1 ? (m = !0, s = Be(), a = q, t.set(n = _), Promise.resolve()) : (M.soft && (c = 1 / ((M.soft === !0 ? 0.5 : +M.soft) * 60), u = 0), o || (s = Be(), m = !1, o = Cl((d) => { + if (m) + return m = !1, o = null, !1; + u = Math.min(u + c, 1); + const C = { + inv_mass: u, + opts: L, settled: !0, - dt: (m - l) * 60 / 1e3 - }, p = tt(T, u, e, f); - return l = m, u = e, n.set(e = p), T.settled && (o = null), !T.settled; - })), new Promise((m) => { + dt: (d - s) * 60 / 1e3 + }, w = ve(C, a, n, _); + return s = d, a = n, t.set(n = w), C.settled && (o = null), !C.settled; + })), new Promise((d) => { o.promise.then(() => { - b === a && m(); + g === r && d(); }); })); } - const E = { - set: d, - update: (w, N) => d(w(f, e), N), - subscribe: n.subscribe, - stiffness: r, + const L = { + set: h, + update: (q, M) => h(q(_, n), M), + subscribe: t.subscribe, + stiffness: l, damping: i, - precision: s - }; - return E; -} -function si(e) { - return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; -} -var li = function(t) { - return oi(t) && !ai(t); -}; -function oi(e) { - return !!e && typeof e == "object"; -} -function ai(e) { - var t = Object.prototype.toString.call(e); - return t === "[object RegExp]" || t === "[object Date]" || hi(e); -} -var ui = typeof Symbol == "function" && Symbol.for, fi = ui ? Symbol.for("react.element") : 60103; -function hi(e) { - return e.$$typeof === fi; -} -function ci(e) { - return Array.isArray(e) ? [] : {}; -} -function ye(e, t) { - return t.clone !== !1 && t.isMergeableObject(e) ? ae(ci(e), e, t) : e; -} -function _i(e, t, n) { - return e.concat(t).map(function(r) { - return ye(r, n); - }); -} -function mi(e, t) { - if (!t.customMerge) - return ae; - var n = t.customMerge(e); - return typeof n == "function" ? n : ae; -} -function di(e) { - return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) { - return Object.propertyIsEnumerable.call(e, t); - }) : []; -} -function At(e) { - return Object.keys(e).concat(di(e)); -} -function yn(e, t) { - try { - return t in e; - } catch { - return !1; - } -} -function bi(e, t) { - return yn(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t)); -} -function pi(e, t, n) { - var r = {}; - return n.isMergeableObject(e) && At(e).forEach(function(i) { - r[i] = ye(e[i], n); - }), At(t).forEach(function(i) { - bi(e, i) || (yn(e, i) && n.isMergeableObject(t[i]) ? r[i] = mi(i, n)(e[i], t[i], n) : r[i] = ye(t[i], n)); - }), r; -} -function ae(e, t, n) { - n = n || {}, n.arrayMerge = n.arrayMerge || _i, n.isMergeableObject = n.isMergeableObject || li, n.cloneUnlessOtherwiseSpecified = ye; - var r = Array.isArray(t), i = Array.isArray(e), s = r === i; - return s ? r ? n.arrayMerge(e, t, n) : pi(e, t, n) : ye(t, n); -} -ae.all = function(t, n) { - if (!Array.isArray(t)) - throw new Error("first argument should be an array"); - return t.reduce(function(r, i) { - return ae(r, i, n); - }, {}); -}; -var gi = ae, vi = gi; -const yi = /* @__PURE__ */ si(vi); -var nt = function(e, t) { - return nt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) { - n.__proto__ = r; - } || function(n, r) { - for (var i in r) - Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]); - }, nt(e, t); -}; -function ke(e, t) { - if (typeof t != "function" && t !== null) - throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); - nt(e, t); - function n() { - this.constructor = e; - } - e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n()); -} -var A = function() { - return A = Object.assign || function(t) { - for (var n, r = 1, i = arguments.length; r < i; r++) { - n = arguments[r]; - for (var s in n) - Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]); - } - return t; - }, A.apply(this, arguments); -}; -function We(e, t, n) { - if (n || arguments.length === 2) - for (var r = 0, i = t.length, s; r < i; r++) - (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]); - return e.concat(s || Array.prototype.slice.call(t)); -} -var x; -(function(e) { - e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG"; -})(x || (x = {})); -var P; -(function(e) { - e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag"; -})(P || (P = {})); -var ue; -(function(e) { - e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime"; -})(ue || (ue = {})); -function Pt(e) { - return e.type === P.literal; -} -function Ei(e) { - return e.type === P.argument; -} -function En(e) { - return e.type === P.number; -} -function wn(e) { - return e.type === P.date; -} -function xn(e) { - return e.type === P.time; -} -function Tn(e) { - return e.type === P.select; -} -function Hn(e) { - return e.type === P.plural; -} -function wi(e) { - return e.type === P.pound; -} -function Bn(e) { - return e.type === P.tag; -} -function Sn(e) { - return !!(e && typeof e == "object" && e.type === ue.number); -} -function rt(e) { - return !!(e && typeof e == "object" && e.type === ue.dateTime); -} -var An = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, xi = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g; -function Ti(e) { - var t = {}; - return e.replace(xi, function(n) { - var r = n.length; - switch (n[0]) { - case "G": - t.era = r === 4 ? "long" : r === 5 ? "narrow" : "short"; - break; - case "y": - t.year = r === 2 ? "2-digit" : "numeric"; - break; - case "Y": - case "u": - case "U": - case "r": - throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead"); - case "q": - case "Q": - throw new RangeError("`q/Q` (quarter) patterns are not supported"); - case "M": - case "L": - t.month = ["numeric", "2-digit", "short", "long", "narrow"][r - 1]; - break; - case "w": - case "W": - throw new RangeError("`w/W` (week) patterns are not supported"); - case "d": - t.day = ["numeric", "2-digit"][r - 1]; - break; - case "D": - case "F": - case "g": - throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead"); - case "E": - t.weekday = r === 4 ? "short" : r === 5 ? "narrow" : "short"; - break; - case "e": - if (r < 4) - throw new RangeError("`e..eee` (weekday) patterns are not supported"); - t.weekday = ["short", "long", "narrow", "short"][r - 4]; - break; - case "c": - if (r < 4) - throw new RangeError("`c..ccc` (weekday) patterns are not supported"); - t.weekday = ["short", "long", "narrow", "short"][r - 4]; - break; - case "a": - t.hour12 = !0; - break; - case "b": - case "B": - throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead"); - case "h": - t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][r - 1]; - break; - case "H": - t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][r - 1]; - break; - case "K": - t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][r - 1]; - break; - case "k": - t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][r - 1]; - break; - case "j": - case "J": - case "C": - throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead"); - case "m": - t.minute = ["numeric", "2-digit"][r - 1]; - break; - case "s": - t.second = ["numeric", "2-digit"][r - 1]; - break; - case "S": - case "A": - throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead"); - case "z": - t.timeZoneName = r < 4 ? "short" : "long"; - break; - case "Z": - case "O": - case "v": - case "V": - case "X": - case "x": - throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead"); - } - return ""; - }), t; -} -var Hi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i; -function Bi(e) { - if (e.length === 0) - throw new Error("Number skeleton cannot be empty"); - for (var t = e.split(Hi).filter(function(h) { - return h.length > 0; - }), n = [], r = 0, i = t; r < i.length; r++) { - var s = i[r], l = s.split("/"); - if (l.length === 0) - throw new Error("Invalid number skeleton"); - for (var o = l[0], a = l.slice(1), u = 0, f = a; u < f.length; u++) { - var c = f[u]; - if (c.length === 0) - throw new Error("Invalid number skeleton"); - } - n.push({ stem: o, options: a }); - } - return n; -} -function Si(e) { - return e.replace(/^(.*?)-/, ""); -} -var Nt = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Pn = /^(@+)?(\+|#+)?[rs]?$/g, Ai = /(\*)(0+)|(#+)(0+)|(0+)/g, Nn = /^(0+)$/; -function It(e) { - var t = {}; - return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Pn, function(n, r, i) { - return typeof i != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : i === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof i == "string" ? i.length : 0)), ""; - }), t; -} -function In(e) { - switch (e) { - case "sign-auto": - return { - signDisplay: "auto" - }; - case "sign-accounting": - case "()": - return { - currencySign: "accounting" - }; - case "sign-always": - case "+!": - return { - signDisplay: "always" - }; - case "sign-accounting-always": - case "()!": - return { - signDisplay: "always", - currencySign: "accounting" - }; - case "sign-except-zero": - case "+?": - return { - signDisplay: "exceptZero" - }; - case "sign-accounting-except-zero": - case "()?": - return { - signDisplay: "exceptZero", - currencySign: "accounting" - }; - case "sign-never": - case "+_": - return { - signDisplay: "never" - }; - } -} -function Pi(e) { - var t; - if (e[0] === "E" && e[1] === "E" ? (t = { - notation: "engineering" - }, e = e.slice(2)) : e[0] === "E" && (t = { - notation: "scientific" - }, e = e.slice(1)), t) { - var n = e.slice(0, 2); - if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Nn.test(e)) - throw new Error("Malformed concise eng/scientific notation"); - t.minimumIntegerDigits = e.length; - } - return t; -} -function Ct(e) { - var t = {}, n = In(e); - return n || t; -} -function Ni(e) { - for (var t = {}, n = 0, r = e; n < r.length; n++) { - var i = r[n]; - switch (i.stem) { - case "percent": - case "%": - t.style = "percent"; - continue; - case "%x100": - t.style = "percent", t.scale = 100; - continue; - case "currency": - t.style = "currency", t.currency = i.options[0]; - continue; - case "group-off": - case ",_": - t.useGrouping = !1; - continue; - case "precision-integer": - case ".": - t.maximumFractionDigits = 0; - continue; - case "measure-unit": - case "unit": - t.style = "unit", t.unit = Si(i.options[0]); - continue; - case "compact-short": - case "K": - t.notation = "compact", t.compactDisplay = "short"; - continue; - case "compact-long": - case "KK": - t.notation = "compact", t.compactDisplay = "long"; - continue; - case "scientific": - t = A(A(A({}, t), { notation: "scientific" }), i.options.reduce(function(a, u) { - return A(A({}, a), Ct(u)); - }, {})); - continue; - case "engineering": - t = A(A(A({}, t), { notation: "engineering" }), i.options.reduce(function(a, u) { - return A(A({}, a), Ct(u)); - }, {})); - continue; - case "notation-simple": - t.notation = "standard"; - continue; - case "unit-width-narrow": - t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow"; - continue; - case "unit-width-short": - t.currencyDisplay = "code", t.unitDisplay = "short"; - continue; - case "unit-width-full-name": - t.currencyDisplay = "name", t.unitDisplay = "long"; - continue; - case "unit-width-iso-code": - t.currencyDisplay = "symbol"; - continue; - case "scale": - t.scale = parseFloat(i.options[0]); - continue; - case "integer-width": - if (i.options.length > 1) - throw new RangeError("integer-width stems only accept a single optional option"); - i.options[0].replace(Ai, function(a, u, f, c, h, _) { - if (u) - t.minimumIntegerDigits = f.length; - else { - if (c && h) - throw new Error("We currently do not support maximum integer digits"); - if (_) - throw new Error("We currently do not support exact integer digits"); - } - return ""; - }); - continue; - } - if (Nn.test(i.stem)) { - t.minimumIntegerDigits = i.stem.length; - continue; - } - if (Nt.test(i.stem)) { - if (i.options.length > 1) - throw new RangeError("Fraction-precision stems only accept a single optional option"); - i.stem.replace(Nt, function(a, u, f, c, h, _) { - return f === "*" ? t.minimumFractionDigits = u.length : c && c[0] === "#" ? t.maximumFractionDigits = c.length : h && _ ? (t.minimumFractionDigits = h.length, t.maximumFractionDigits = h.length + _.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), ""; - }); - var s = i.options[0]; - s === "w" ? t = A(A({}, t), { trailingZeroDisplay: "stripIfInteger" }) : s && (t = A(A({}, t), It(s))); - continue; - } - if (Pn.test(i.stem)) { - t = A(A({}, t), It(i.stem)); - continue; - } - var l = In(i.stem); - l && (t = A(A({}, t), l)); - var o = Pi(i.stem); - o && (t = A(A({}, t), o)); - } - return t; -} -var Ne = { - AX: [ - "H" - ], - BQ: [ - "H" - ], - CP: [ - "H" - ], - CZ: [ - "H" - ], - DK: [ - "H" - ], - FI: [ - "H" - ], - ID: [ - "H" - ], - IS: [ - "H" - ], - ML: [ - "H" - ], - NE: [ - "H" - ], - RU: [ - "H" - ], - SE: [ - "H" - ], - SJ: [ - "H" - ], - SK: [ - "H" - ], - AS: [ - "h", - "H" - ], - BT: [ - "h", - "H" - ], - DJ: [ - "h", - "H" - ], - ER: [ - "h", - "H" - ], - GH: [ - "h", - "H" - ], - IN: [ - "h", - "H" - ], - LS: [ - "h", - "H" - ], - PG: [ - "h", - "H" - ], - PW: [ - "h", - "H" - ], - SO: [ - "h", - "H" - ], - TO: [ - "h", - "H" - ], - VU: [ - "h", - "H" - ], - WS: [ - "h", - "H" - ], - "001": [ - "H", - "h" - ], - AL: [ - "h", - "H", - "hB" - ], - TD: [ - "h", - "H", - "hB" - ], - "ca-ES": [ - "H", - "h", - "hB" - ], - CF: [ - "H", - "h", - "hB" - ], - CM: [ - "H", - "h", - "hB" - ], - "fr-CA": [ - "H", - "h", - "hB" - ], - "gl-ES": [ - "H", - "h", - "hB" - ], - "it-CH": [ - "H", - "h", - "hB" - ], - "it-IT": [ - "H", - "h", - "hB" - ], - LU: [ - "H", - "h", - "hB" - ], - NP: [ - "H", - "h", - "hB" - ], - PF: [ - "H", - "h", - "hB" - ], - SC: [ - "H", - "h", - "hB" - ], - SM: [ - "H", - "h", - "hB" - ], - SN: [ - "H", - "h", - "hB" - ], - TF: [ - "H", - "h", - "hB" - ], - VA: [ - "H", - "h", - "hB" - ], - CY: [ - "h", - "H", - "hb", - "hB" - ], - GR: [ - "h", - "H", - "hb", - "hB" - ], - CO: [ - "h", - "H", - "hB", - "hb" - ], - DO: [ - "h", - "H", - "hB", - "hb" - ], - KP: [ - "h", - "H", - "hB", - "hb" - ], - KR: [ - "h", - "H", - "hB", - "hb" - ], - NA: [ - "h", - "H", - "hB", - "hb" - ], - PA: [ - "h", - "H", - "hB", - "hb" - ], - PR: [ - "h", - "H", - "hB", - "hb" - ], - VE: [ - "h", - "H", - "hB", - "hb" - ], - AC: [ - "H", - "h", - "hb", - "hB" - ], - AI: [ - "H", - "h", - "hb", - "hB" - ], - BW: [ - "H", - "h", - "hb", - "hB" - ], - BZ: [ - "H", - "h", - "hb", - "hB" - ], - CC: [ - "H", - "h", - "hb", - "hB" - ], - CK: [ - "H", - "h", - "hb", - "hB" - ], - CX: [ - "H", - "h", - "hb", - "hB" - ], - DG: [ - "H", - "h", - "hb", - "hB" - ], - FK: [ - "H", - "h", - "hb", - "hB" - ], - GB: [ - "H", - "h", - "hb", - "hB" - ], - GG: [ - "H", - "h", - "hb", - "hB" - ], - GI: [ - "H", - "h", - "hb", - "hB" - ], - IE: [ - "H", - "h", - "hb", - "hB" - ], - IM: [ - "H", - "h", - "hb", - "hB" - ], - IO: [ - "H", - "h", - "hb", - "hB" - ], - JE: [ - "H", - "h", - "hb", - "hB" - ], - LT: [ - "H", - "h", - "hb", - "hB" - ], - MK: [ - "H", - "h", - "hb", - "hB" - ], - MN: [ - "H", - "h", - "hb", - "hB" - ], - MS: [ - "H", - "h", - "hb", - "hB" - ], - NF: [ - "H", - "h", - "hb", - "hB" - ], - NG: [ - "H", - "h", - "hb", - "hB" - ], - NR: [ - "H", - "h", - "hb", - "hB" - ], - NU: [ - "H", - "h", - "hb", - "hB" - ], - PN: [ - "H", - "h", - "hb", - "hB" - ], - SH: [ - "H", - "h", - "hb", - "hB" - ], - SX: [ - "H", - "h", - "hb", - "hB" - ], - TA: [ - "H", - "h", - "hb", - "hB" - ], - ZA: [ - "H", - "h", - "hb", - "hB" - ], - "af-ZA": [ - "H", - "h", - "hB", - "hb" - ], - AR: [ - "H", - "h", - "hB", - "hb" - ], - CL: [ - "H", - "h", - "hB", - "hb" - ], - CR: [ - "H", - "h", - "hB", - "hb" - ], - CU: [ - "H", - "h", - "hB", - "hb" - ], - EA: [ - "H", - "h", - "hB", - "hb" - ], - "es-BO": [ - "H", - "h", - "hB", - "hb" - ], - "es-BR": [ - "H", - "h", - "hB", - "hb" - ], - "es-EC": [ - "H", - "h", - "hB", - "hb" - ], - "es-ES": [ - "H", - "h", - "hB", - "hb" - ], - "es-GQ": [ - "H", - "h", - "hB", - "hb" - ], - "es-PE": [ - "H", - "h", - "hB", - "hb" - ], - GT: [ - "H", - "h", - "hB", - "hb" - ], - HN: [ - "H", - "h", - "hB", - "hb" - ], - IC: [ - "H", - "h", - "hB", - "hb" - ], - KG: [ - "H", - "h", - "hB", - "hb" - ], - KM: [ - "H", - "h", - "hB", - "hb" - ], - LK: [ - "H", - "h", - "hB", - "hb" - ], - MA: [ - "H", - "h", - "hB", - "hb" - ], - MX: [ - "H", - "h", - "hB", - "hb" - ], - NI: [ - "H", - "h", - "hB", - "hb" - ], - PY: [ - "H", - "h", - "hB", - "hb" - ], - SV: [ - "H", - "h", - "hB", - "hb" - ], - UY: [ - "H", - "h", - "hB", - "hb" - ], - JP: [ - "H", - "h", - "K" - ], - AD: [ - "H", - "hB" - ], - AM: [ - "H", - "hB" - ], - AO: [ - "H", - "hB" - ], - AT: [ - "H", - "hB" - ], - AW: [ - "H", - "hB" - ], - BE: [ - "H", - "hB" - ], - BF: [ - "H", - "hB" - ], - BJ: [ - "H", - "hB" - ], - BL: [ - "H", - "hB" - ], - BR: [ - "H", - "hB" - ], - CG: [ - "H", - "hB" - ], - CI: [ - "H", - "hB" - ], - CV: [ - "H", - "hB" - ], - DE: [ - "H", - "hB" - ], - EE: [ - "H", - "hB" - ], - FR: [ - "H", - "hB" - ], - GA: [ - "H", - "hB" - ], - GF: [ - "H", - "hB" - ], - GN: [ - "H", - "hB" - ], - GP: [ - "H", - "hB" - ], - GW: [ - "H", - "hB" - ], - HR: [ - "H", - "hB" - ], - IL: [ - "H", - "hB" - ], - IT: [ - "H", - "hB" - ], - KZ: [ - "H", - "hB" - ], - MC: [ - "H", - "hB" - ], - MD: [ - "H", - "hB" - ], - MF: [ - "H", - "hB" - ], - MQ: [ - "H", - "hB" - ], - MZ: [ - "H", - "hB" - ], - NC: [ - "H", - "hB" - ], - NL: [ - "H", - "hB" - ], - PM: [ - "H", - "hB" - ], - PT: [ - "H", - "hB" - ], - RE: [ - "H", - "hB" - ], - RO: [ - "H", - "hB" - ], - SI: [ - "H", - "hB" - ], - SR: [ - "H", - "hB" - ], - ST: [ - "H", - "hB" - ], - TG: [ - "H", - "hB" - ], - TR: [ - "H", - "hB" - ], - WF: [ - "H", - "hB" - ], - YT: [ - "H", - "hB" - ], - BD: [ - "h", - "hB", - "H" - ], - PK: [ - "h", - "hB", - "H" - ], - AZ: [ - "H", - "hB", - "h" - ], - BA: [ - "H", - "hB", - "h" - ], - BG: [ - "H", - "hB", - "h" - ], - CH: [ - "H", - "hB", - "h" - ], - GE: [ - "H", - "hB", - "h" - ], - LI: [ - "H", - "hB", - "h" - ], - ME: [ - "H", - "hB", - "h" - ], - RS: [ - "H", - "hB", - "h" - ], - UA: [ - "H", - "hB", - "h" - ], - UZ: [ - "H", - "hB", - "h" - ], - XK: [ - "H", - "hB", - "h" - ], - AG: [ - "h", - "hb", - "H", - "hB" - ], - AU: [ - "h", - "hb", - "H", - "hB" - ], - BB: [ - "h", - "hb", - "H", - "hB" - ], - BM: [ - "h", - "hb", - "H", - "hB" - ], - BS: [ - "h", - "hb", - "H", - "hB" - ], - CA: [ - "h", - "hb", - "H", - "hB" - ], - DM: [ - "h", - "hb", - "H", - "hB" - ], - "en-001": [ - "h", - "hb", - "H", - "hB" - ], - FJ: [ - "h", - "hb", - "H", - "hB" - ], - FM: [ - "h", - "hb", - "H", - "hB" - ], - GD: [ - "h", - "hb", - "H", - "hB" - ], - GM: [ - "h", - "hb", - "H", - "hB" - ], - GU: [ - "h", - "hb", - "H", - "hB" - ], - GY: [ - "h", - "hb", - "H", - "hB" - ], - JM: [ - "h", - "hb", - "H", - "hB" - ], - KI: [ - "h", - "hb", - "H", - "hB" - ], - KN: [ - "h", - "hb", - "H", - "hB" - ], - KY: [ - "h", - "hb", - "H", - "hB" - ], - LC: [ - "h", - "hb", - "H", - "hB" - ], - LR: [ - "h", - "hb", - "H", - "hB" - ], - MH: [ - "h", - "hb", - "H", - "hB" - ], - MP: [ - "h", - "hb", - "H", - "hB" - ], - MW: [ - "h", - "hb", - "H", - "hB" - ], - NZ: [ - "h", - "hb", - "H", - "hB" - ], - SB: [ - "h", - "hb", - "H", - "hB" - ], - SG: [ - "h", - "hb", - "H", - "hB" - ], - SL: [ - "h", - "hb", - "H", - "hB" - ], - SS: [ - "h", - "hb", - "H", - "hB" - ], - SZ: [ - "h", - "hb", - "H", - "hB" - ], - TC: [ - "h", - "hb", - "H", - "hB" - ], - TT: [ - "h", - "hb", - "H", - "hB" - ], - UM: [ - "h", - "hb", - "H", - "hB" - ], - US: [ - "h", - "hb", - "H", - "hB" - ], - VC: [ - "h", - "hb", - "H", - "hB" - ], - VG: [ - "h", - "hb", - "H", - "hB" - ], - VI: [ - "h", - "hb", - "H", - "hB" - ], - ZM: [ - "h", - "hb", - "H", - "hB" - ], - BO: [ - "H", - "hB", - "h", - "hb" - ], - EC: [ - "H", - "hB", - "h", - "hb" - ], - ES: [ - "H", - "hB", - "h", - "hb" - ], - GQ: [ - "H", - "hB", - "h", - "hb" - ], - PE: [ - "H", - "hB", - "h", - "hb" - ], - AE: [ - "h", - "hB", - "hb", - "H" - ], - "ar-001": [ - "h", - "hB", - "hb", - "H" - ], - BH: [ - "h", - "hB", - "hb", - "H" - ], - DZ: [ - "h", - "hB", - "hb", - "H" - ], - EG: [ - "h", - "hB", - "hb", - "H" - ], - EH: [ - "h", - "hB", - "hb", - "H" - ], - HK: [ - "h", - "hB", - "hb", - "H" - ], - IQ: [ - "h", - "hB", - "hb", - "H" - ], - JO: [ - "h", - "hB", - "hb", - "H" - ], - KW: [ - "h", - "hB", - "hb", - "H" - ], - LB: [ - "h", - "hB", - "hb", - "H" - ], - LY: [ - "h", - "hB", - "hb", - "H" - ], - MO: [ - "h", - "hB", - "hb", - "H" - ], - MR: [ - "h", - "hB", - "hb", - "H" - ], - OM: [ - "h", - "hB", - "hb", - "H" - ], - PH: [ - "h", - "hB", - "hb", - "H" - ], - PS: [ - "h", - "hB", - "hb", - "H" - ], - QA: [ - "h", - "hB", - "hb", - "H" - ], - SA: [ - "h", - "hB", - "hb", - "H" - ], - SD: [ - "h", - "hB", - "hb", - "H" - ], - SY: [ - "h", - "hB", - "hb", - "H" - ], - TN: [ - "h", - "hB", - "hb", - "H" - ], - YE: [ - "h", - "hB", - "hb", - "H" - ], - AF: [ - "H", - "hb", - "hB", - "h" - ], - LA: [ - "H", - "hb", - "hB", - "h" - ], - CN: [ - "H", - "hB", - "hb", - "h" - ], - LV: [ - "H", - "hB", - "hb", - "h" - ], - TL: [ - "H", - "hB", - "hb", - "h" - ], - "zu-ZA": [ - "H", - "hB", - "hb", - "h" - ], - CD: [ - "hB", - "H" - ], - IR: [ - "hB", - "H" - ], - "hi-IN": [ - "hB", - "h", - "H" - ], - "kn-IN": [ - "hB", - "h", - "H" - ], - "ml-IN": [ - "hB", - "h", - "H" - ], - "te-IN": [ - "hB", - "h", - "H" - ], - KH: [ - "hB", - "h", - "H", - "hb" - ], - "ta-IN": [ - "hB", - "h", - "hb", - "H" - ], - BN: [ - "hb", - "hB", - "h", - "H" - ], - MY: [ - "hb", - "hB", - "h", - "H" - ], - ET: [ - "hB", - "hb", - "h", - "H" - ], - "gu-IN": [ - "hB", - "hb", - "h", - "H" - ], - "mr-IN": [ - "hB", - "hb", - "h", - "H" - ], - "pa-IN": [ - "hB", - "hb", - "h", - "H" - ], - TW: [ - "hB", - "hb", - "h", - "H" - ], - KE: [ - "hB", - "hb", - "H", - "h" - ], - MM: [ - "hB", - "hb", - "H", - "h" - ], - TZ: [ - "hB", - "hb", - "H", - "h" - ], - UG: [ - "hB", - "hb", - "H", - "h" - ] -}; -function Ii(e, t) { - for (var n = "", r = 0; r < e.length; r++) { - var i = e.charAt(r); - if (i === "j") { - for (var s = 0; r + 1 < e.length && e.charAt(r + 1) === i; ) - s++, r++; - var l = 1 + (s & 1), o = s < 2 ? 1 : 3 + (s >> 1), a = "a", u = Ci(t); - for ((u == "H" || u == "k") && (o = 0); o-- > 0; ) - n += a; - for (; l-- > 0; ) - n = u + n; - } else - i === "J" ? n += "H" : n += i; - } - return n; -} -function Ci(e) { - var t = e.hourCycle; - if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet - e.hourCycles && // @ts-ignore - e.hourCycles.length && (t = e.hourCycles[0]), t) - switch (t) { - case "h24": - return "k"; - case "h23": - return "H"; - case "h12": - return "h"; - case "h11": - return "K"; - default: - throw new Error("Invalid hourCycle"); - } - var n = e.language, r; - n !== "root" && (r = e.maximize().region); - var i = Ne[r || ""] || Ne[n || ""] || Ne["".concat(n, "-001")] || Ne["001"]; - return i[0]; -} -var Qe, Li = new RegExp("^".concat(An.source, "*")), Oi = new RegExp("".concat(An.source, "*$")); -function H(e, t) { - return { start: e, end: t }; -} -var Mi = !!String.prototype.startsWith, Ri = !!String.fromCodePoint, Ui = !!Object.fromEntries, Di = !!String.prototype.codePointAt, Fi = !!String.prototype.trimStart, ki = !!String.prototype.trimEnd, Gi = !!Number.isSafeInteger, Vi = Gi ? Number.isSafeInteger : function(e) { - return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991; -}, it = !0; -try { - var ji = Ln("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - it = ((Qe = ji.exec("a")) === null || Qe === void 0 ? void 0 : Qe[0]) === "a"; -} catch { - it = !1; -} -var Lt = Mi ? ( - // Native - function(t, n, r) { - return t.startsWith(n, r); - } -) : ( - // For IE11 - function(t, n, r) { - return t.slice(r, r + n.length) === n; - } -), st = Ri ? String.fromCodePoint : ( - // IE11 - function() { - for (var t = [], n = 0; n < arguments.length; n++) - t[n] = arguments[n]; - for (var r = "", i = t.length, s = 0, l; i > s; ) { - if (l = t[s++], l > 1114111) - throw RangeError(l + " is not a valid code point"); - r += l < 65536 ? String.fromCharCode(l) : String.fromCharCode(((l -= 65536) >> 10) + 55296, l % 1024 + 56320); - } - return r; - } -), Ot = ( - // native - Ui ? Object.fromEntries : ( - // Ponyfill - function(t) { - for (var n = {}, r = 0, i = t; r < i.length; r++) { - var s = i[r], l = s[0], o = s[1]; - n[l] = o; - } - return n; - } - ) -), Cn = Di ? ( - // Native - function(t, n) { - return t.codePointAt(n); - } -) : ( - // IE 11 - function(t, n) { - var r = t.length; - if (!(n < 0 || n >= r)) { - var i = t.charCodeAt(n), s; - return i < 55296 || i > 56319 || n + 1 === r || (s = t.charCodeAt(n + 1)) < 56320 || s > 57343 ? i : (i - 55296 << 10) + (s - 56320) + 65536; - } - } -), Xi = Fi ? ( - // Native - function(t) { - return t.trimStart(); - } -) : ( - // Ponyfill - function(t) { - return t.replace(Li, ""); - } -), qi = ki ? ( - // Native - function(t) { - return t.trimEnd(); - } -) : ( - // Ponyfill - function(t) { - return t.replace(Oi, ""); - } -); -function Ln(e, t) { - return new RegExp(e, t); -} -var lt; -if (it) { - var Mt = Ln("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu"); - lt = function(t, n) { - var r; - Mt.lastIndex = n; - var i = Mt.exec(t); - return (r = i[1]) !== null && r !== void 0 ? r : ""; + precision: f }; -} else - lt = function(t, n) { - for (var r = []; ; ) { - var i = Cn(t, n); - if (i === void 0 || On(i) || Qi(i)) - break; - r.push(i), n += i >= 65536 ? 2 : 1; - } - return st.apply(void 0, r); - }; -var zi = ( - /** @class */ - function() { - function e(t, n) { - n === void 0 && (n = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons; - } - return e.prototype.parse = function() { - if (this.offset() !== 0) - throw Error("parser can only be used once"); - return this.parseMessage(0, "", !1); - }, e.prototype.parseMessage = function(t, n, r) { - for (var i = []; !this.isEOF(); ) { - var s = this.char(); - if (s === 123) { - var l = this.parseArgument(t, r); - if (l.err) - return l; - i.push(l.val); - } else { - if (s === 125 && t > 0) - break; - if (s === 35 && (n === "plural" || n === "selectordinal")) { - var o = this.clonePosition(); - this.bump(), i.push({ - type: P.pound, - location: H(o, this.clonePosition()) - }); - } else if (s === 60 && !this.ignoreTag && this.peek() === 47) { - if (r) - break; - return this.error(x.UNMATCHED_CLOSING_TAG, H(this.clonePosition(), this.clonePosition())); - } else if (s === 60 && !this.ignoreTag && ot(this.peek() || 0)) { - var l = this.parseTag(t, n); - if (l.err) - return l; - i.push(l.val); - } else { - var l = this.parseLiteral(t, n); - if (l.err) - return l; - i.push(l.val); - } - } - } - return { val: i, err: null }; - }, e.prototype.parseTag = function(t, n) { - var r = this.clonePosition(); - this.bump(); - var i = this.parseTagName(); - if (this.bumpSpace(), this.bumpIf("/>")) - return { - val: { - type: P.literal, - value: "<".concat(i, "/>"), - location: H(r, this.clonePosition()) - }, - err: null - }; - if (this.bumpIf(">")) { - var s = this.parseMessage(t + 1, n, !0); - if (s.err) - return s; - var l = s.val, o = this.clonePosition(); - if (this.bumpIf("") ? { - val: { - type: P.tag, - value: i, - children: l, - location: H(r, this.clonePosition()) - }, - err: null - } : this.error(x.INVALID_TAG, H(o, this.clonePosition()))); - } else - return this.error(x.UNCLOSED_TAG, H(r, this.clonePosition())); - } else - return this.error(x.INVALID_TAG, H(r, this.clonePosition())); - }, e.prototype.parseTagName = function() { - var t = this.offset(); - for (this.bump(); !this.isEOF() && Wi(this.char()); ) - this.bump(); - return this.message.slice(t, this.offset()); - }, e.prototype.parseLiteral = function(t, n) { - for (var r = this.clonePosition(), i = ""; ; ) { - var s = this.tryParseQuote(n); - if (s) { - i += s; - continue; - } - var l = this.tryParseUnquoted(t, n); - if (l) { - i += l; - continue; - } - var o = this.tryParseLeftAngleBracket(); - if (o) { - i += o; - continue; - } - break; - } - var a = H(r, this.clonePosition()); - return { - val: { type: P.literal, value: i, location: a }, - err: null - }; - }, e.prototype.tryParseLeftAngleBracket = function() { - return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail. - !Zi(this.peek() || 0)) ? (this.bump(), "<") : null; - }, e.prototype.tryParseQuote = function(t) { - if (this.isEOF() || this.char() !== 39) - return null; - switch (this.peek()) { - case 39: - return this.bump(), this.bump(), "'"; - case 123: - case 60: - case 62: - case 125: - break; - case 35: - if (t === "plural" || t === "selectordinal") - break; - return null; - default: - return null; - } - this.bump(); - var n = [this.char()]; - for (this.bump(); !this.isEOF(); ) { - var r = this.char(); - if (r === 39) - if (this.peek() === 39) - n.push(39), this.bump(); - else { - this.bump(); - break; - } - else - n.push(r); - this.bump(); - } - return st.apply(void 0, n); - }, e.prototype.tryParseUnquoted = function(t, n) { - if (this.isEOF()) - return null; - var r = this.char(); - return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), st(r)); - }, e.prototype.parseArgument = function(t, n) { - var r = this.clonePosition(); - if (this.bump(), this.bumpSpace(), this.isEOF()) - return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE, H(r, this.clonePosition())); - if (this.char() === 125) - return this.bump(), this.error(x.EMPTY_ARGUMENT, H(r, this.clonePosition())); - var i = this.parseIdentifierIfPossible().value; - if (!i) - return this.error(x.MALFORMED_ARGUMENT, H(r, this.clonePosition())); - if (this.bumpSpace(), this.isEOF()) - return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE, H(r, this.clonePosition())); - switch (this.char()) { - case 125: - return this.bump(), { - val: { - type: P.argument, - // value does not include the opening and closing braces. - value: i, - location: H(r, this.clonePosition()) - }, - err: null - }; - case 44: - return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE, H(r, this.clonePosition())) : this.parseArgumentOptions(t, n, i, r); - default: - return this.error(x.MALFORMED_ARGUMENT, H(r, this.clonePosition())); - } - }, e.prototype.parseIdentifierIfPossible = function() { - var t = this.clonePosition(), n = this.offset(), r = lt(this.message, n), i = n + r.length; - this.bumpTo(i); - var s = this.clonePosition(), l = H(t, s); - return { value: r, location: l }; - }, e.prototype.parseArgumentOptions = function(t, n, r, i) { - var s, l = this.clonePosition(), o = this.parseIdentifierIfPossible().value, a = this.clonePosition(); - switch (o) { - case "": - return this.error(x.EXPECT_ARGUMENT_TYPE, H(l, a)); - case "number": - case "date": - case "time": { - this.bumpSpace(); - var u = null; - if (this.bumpIf(",")) { - this.bumpSpace(); - var f = this.clonePosition(), c = this.parseSimpleArgStyleIfPossible(); - if (c.err) - return c; - var h = qi(c.val); - if (h.length === 0) - return this.error(x.EXPECT_ARGUMENT_STYLE, H(this.clonePosition(), this.clonePosition())); - var _ = H(f, this.clonePosition()); - u = { style: h, styleLocation: _ }; - } - var d = this.tryParseArgumentClose(i); - if (d.err) - return d; - var E = H(i, this.clonePosition()); - if (u && Lt(u == null ? void 0 : u.style, "::", 0)) { - var w = Xi(u.style.slice(2)); - if (o === "number") { - var c = this.parseNumberSkeletonFromString(w, u.styleLocation); - return c.err ? c : { - val: { type: P.number, value: r, location: E, style: c.val }, - err: null - }; - } else { - if (w.length === 0) - return this.error(x.EXPECT_DATE_TIME_SKELETON, E); - var N = w; - this.locale && (N = Ii(w, this.locale)); - var h = { - type: ue.dateTime, - pattern: N, - location: u.styleLocation, - parsedOptions: this.shouldParseSkeletons ? Ti(N) : {} - }, b = o === "date" ? P.date : P.time; - return { - val: { type: b, value: r, location: E, style: h }, - err: null - }; - } - } - return { - val: { - type: o === "number" ? P.number : o === "date" ? P.date : P.time, - value: r, - location: E, - style: (s = u == null ? void 0 : u.style) !== null && s !== void 0 ? s : null - }, - err: null - }; - } - case "plural": - case "selectordinal": - case "select": { - var m = this.clonePosition(); - if (this.bumpSpace(), !this.bumpIf(",")) - return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS, H(m, A({}, m))); - this.bumpSpace(); - var T = this.parseIdentifierIfPossible(), p = 0; - if (o !== "select" && T.value === "offset") { - if (!this.bumpIf(":")) - return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, H(this.clonePosition(), this.clonePosition())); - this.bumpSpace(); - var c = this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE); - if (c.err) - return c; - this.bumpSpace(), T = this.parseIdentifierIfPossible(), p = c.val; - } - var j = this.tryParsePluralOrSelectOptions(t, o, n, T); - if (j.err) - return j; - var d = this.tryParseArgumentClose(i); - if (d.err) - return d; - var X = H(i, this.clonePosition()); - return o === "select" ? { - val: { - type: P.select, - value: r, - options: Ot(j.val), - location: X - }, - err: null - } : { - val: { - type: P.plural, - value: r, - options: Ot(j.val), - offset: p, - pluralType: o === "plural" ? "cardinal" : "ordinal", - location: X - }, - err: null - }; - } - default: - return this.error(x.INVALID_ARGUMENT_TYPE, H(l, a)); - } - }, e.prototype.tryParseArgumentClose = function(t) { - return this.isEOF() || this.char() !== 125 ? this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE, H(t, this.clonePosition())) : (this.bump(), { val: !0, err: null }); - }, e.prototype.parseSimpleArgStyleIfPossible = function() { - for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) { - var r = this.char(); - switch (r) { - case 39: { - this.bump(); - var i = this.clonePosition(); - if (!this.bumpUntil("'")) - return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, H(i, this.clonePosition())); - this.bump(); - break; - } - case 123: { - t += 1, this.bump(); - break; - } - case 125: { - if (t > 0) - t -= 1; - else - return { - val: this.message.slice(n.offset, this.offset()), - err: null - }; - break; - } - default: - this.bump(); - break; - } - } - return { - val: this.message.slice(n.offset, this.offset()), - err: null - }; - }, e.prototype.parseNumberSkeletonFromString = function(t, n) { - var r = []; - try { - r = Bi(t); - } catch { - return this.error(x.INVALID_NUMBER_SKELETON, n); - } - return { - val: { - type: ue.number, - tokens: r, - location: n, - parsedOptions: this.shouldParseSkeletons ? Ni(r) : {} - }, - err: null - }; - }, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) { - for (var s, l = !1, o = [], a = /* @__PURE__ */ new Set(), u = i.value, f = i.location; ; ) { - if (u.length === 0) { - var c = this.clonePosition(); - if (n !== "select" && this.bumpIf("=")) { - var h = this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR, x.INVALID_PLURAL_ARGUMENT_SELECTOR); - if (h.err) - return h; - f = H(c, this.clonePosition()), u = this.message.slice(c.offset, this.offset()); - } else - break; - } - if (a.has(u)) - return this.error(n === "select" ? x.DUPLICATE_SELECT_ARGUMENT_SELECTOR : x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f); - u === "other" && (l = !0), this.bumpSpace(); - var _ = this.clonePosition(); - if (!this.bumpIf("{")) - return this.error(n === "select" ? x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, H(this.clonePosition(), this.clonePosition())); - var d = this.parseMessage(t + 1, n, r); - if (d.err) - return d; - var E = this.tryParseArgumentClose(_); - if (E.err) - return E; - o.push([ - u, - { - value: d.val, - location: H(_, this.clonePosition()) - } - ]), a.add(u), this.bumpSpace(), s = this.parseIdentifierIfPossible(), u = s.value, f = s.location; - } - return o.length === 0 ? this.error(n === "select" ? x.EXPECT_SELECT_ARGUMENT_SELECTOR : x.EXPECT_PLURAL_ARGUMENT_SELECTOR, H(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !l ? this.error(x.MISSING_OTHER_CLAUSE, H(this.clonePosition(), this.clonePosition())) : { val: o, err: null }; - }, e.prototype.tryParseDecimalInteger = function(t, n) { - var r = 1, i = this.clonePosition(); - this.bumpIf("+") || this.bumpIf("-") && (r = -1); - for (var s = !1, l = 0; !this.isEOF(); ) { - var o = this.char(); - if (o >= 48 && o <= 57) - s = !0, l = l * 10 + (o - 48), this.bump(); - else - break; - } - var a = H(i, this.clonePosition()); - return s ? (l *= r, Vi(l) ? { val: l, err: null } : this.error(n, a)) : this.error(t, a); - }, e.prototype.offset = function() { - return this.position.offset; - }, e.prototype.isEOF = function() { - return this.offset() === this.message.length; - }, e.prototype.clonePosition = function() { - return { - offset: this.position.offset, - line: this.position.line, - column: this.position.column - }; - }, e.prototype.char = function() { - var t = this.position.offset; - if (t >= this.message.length) - throw Error("out of bound"); - var n = Cn(this.message, t); - if (n === void 0) - throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary")); - return n; - }, e.prototype.error = function(t, n) { - return { - val: null, - err: { - kind: t, - message: this.message, - location: n - } - }; - }, e.prototype.bump = function() { - if (!this.isEOF()) { - var t = this.char(); - t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2); - } - }, e.prototype.bumpIf = function(t) { - if (Lt(this.message, t, this.offset())) { - for (var n = 0; n < t.length; n++) - this.bump(); - return !0; - } - return !1; - }, e.prototype.bumpUntil = function(t) { - var n = this.offset(), r = this.message.indexOf(t, n); - return r >= 0 ? (this.bumpTo(r), !0) : (this.bumpTo(this.message.length), !1); - }, e.prototype.bumpTo = function(t) { - if (this.offset() > t) - throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset())); - for (t = Math.min(t, this.message.length); ; ) { - var n = this.offset(); - if (n === t) - break; - if (n > t) - throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary")); - if (this.bump(), this.isEOF()) - break; - } - }, e.prototype.bumpSpace = function() { - for (; !this.isEOF() && On(this.char()); ) - this.bump(); - }, e.prototype.peek = function() { - if (this.isEOF()) - return null; - var t = this.char(), n = this.offset(), r = this.message.charCodeAt(n + (t >= 65536 ? 2 : 1)); - return r ?? null; - }, e; - }() -); -function ot(e) { - return e >= 97 && e <= 122 || e >= 65 && e <= 90; -} -function Zi(e) { - return ot(e) || e === 47; -} -function Wi(e) { - return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039; -} -function On(e) { - return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233; -} -function Qi(e) { - return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094; -} -function at(e) { - e.forEach(function(t) { - if (delete t.location, Tn(t) || Hn(t)) - for (var n in t.options) - delete t.options[n].location, at(t.options[n].value); - else - En(t) && Sn(t.style) || (wn(t) || xn(t)) && rt(t.style) ? delete t.style.location : Bn(t) && at(t.children); - }); -} -function Ji(e, t) { - t === void 0 && (t = {}), t = A({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t); - var n = new zi(e, t).parse(); - if (n.err) { - var r = SyntaxError(x[n.err.kind]); - throw r.location = n.err.location, r.originalMessage = n.err.message, r; - } - return t != null && t.captureLocation || at(n.val), n.val; -} -function Je(e, t) { - var n = t && t.cache ? t.cache : ns, r = t && t.serializer ? t.serializer : ts, i = t && t.strategy ? t.strategy : Ki; - return i(e, { - cache: n, - serializer: r - }); -} -function Yi(e) { - return e == null || typeof e == "number" || typeof e == "boolean"; -} -function Mn(e, t, n, r) { - var i = Yi(r) ? r : n(r), s = t.get(i); - return typeof s > "u" && (s = e.call(this, r), t.set(i, s)), s; -} -function Rn(e, t, n) { - var r = Array.prototype.slice.call(arguments, 3), i = n(r), s = t.get(i); - return typeof s > "u" && (s = e.apply(this, r), t.set(i, s)), s; -} -function ct(e, t, n, r, i) { - return n.bind(t, e, r, i); -} -function Ki(e, t) { - var n = e.length === 1 ? Mn : Rn; - return ct(e, this, n, t.cache.create(), t.serializer); -} -function $i(e, t) { - return ct(e, this, Rn, t.cache.create(), t.serializer); -} -function es(e, t) { - return ct(e, this, Mn, t.cache.create(), t.serializer); -} -var ts = function() { - return JSON.stringify(arguments); -}; -function _t() { - this.cache = /* @__PURE__ */ Object.create(null); -} -_t.prototype.get = function(e) { - return this.cache[e]; -}; -_t.prototype.set = function(e, t) { - this.cache[e] = t; -}; -var ns = { - create: function() { - return new _t(); - } -}, Ye = { - variadic: $i, - monadic: es -}, fe; -(function(e) { - e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API"; -})(fe || (fe = {})); -var Ge = ( - /** @class */ - function(e) { - ke(t, e); - function t(n, r, i) { - var s = e.call(this, n) || this; - return s.code = r, s.originalMessage = i, s; - } - return t.prototype.toString = function() { - return "[formatjs Error: ".concat(this.code, "] ").concat(this.message); - }, t; - }(Error) -), Rt = ( - /** @class */ - function(e) { - ke(t, e); - function t(n, r, i, s) { - return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), fe.INVALID_VALUE, s) || this; - } - return t; - }(Ge) -), rs = ( - /** @class */ - function(e) { - ke(t, e); - function t(n, r, i) { - return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), fe.INVALID_VALUE, i) || this; - } - return t; - }(Ge) -), is = ( - /** @class */ - function(e) { - ke(t, e); - function t(n, r) { - return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), fe.MISSING_VALUE, r) || this; - } - return t; - }(Ge) -), C; -(function(e) { - e[e.literal = 0] = "literal", e[e.object = 1] = "object"; -})(C || (C = {})); -function ss(e) { - return e.length < 2 ? e : e.reduce(function(t, n) { - var r = t[t.length - 1]; - return !r || r.type !== C.literal || n.type !== C.literal ? t.push(n) : r.value += n.value, t; - }, []); -} -function ls(e) { - return typeof e == "function"; -} -function Le(e, t, n, r, i, s, l) { - if (e.length === 1 && Pt(e[0])) - return [ - { - type: C.literal, - value: e[0].value - } - ]; - for (var o = [], a = 0, u = e; a < u.length; a++) { - var f = u[a]; - if (Pt(f)) { - o.push({ - type: C.literal, - value: f.value - }); - continue; - } - if (wi(f)) { - typeof s == "number" && o.push({ - type: C.literal, - value: n.getNumberFormat(t).format(s) - }); - continue; - } - var c = f.value; - if (!(i && c in i)) - throw new is(c, l); - var h = i[c]; - if (Ei(f)) { - (!h || typeof h == "string" || typeof h == "number") && (h = typeof h == "string" || typeof h == "number" ? String(h) : ""), o.push({ - type: typeof h == "string" ? C.literal : C.object, - value: h - }); - continue; - } - if (wn(f)) { - var _ = typeof f.style == "string" ? r.date[f.style] : rt(f.style) ? f.style.parsedOptions : void 0; - o.push({ - type: C.literal, - value: n.getDateTimeFormat(t, _).format(h) - }); - continue; - } - if (xn(f)) { - var _ = typeof f.style == "string" ? r.time[f.style] : rt(f.style) ? f.style.parsedOptions : r.time.medium; - o.push({ - type: C.literal, - value: n.getDateTimeFormat(t, _).format(h) - }); - continue; - } - if (En(f)) { - var _ = typeof f.style == "string" ? r.number[f.style] : Sn(f.style) ? f.style.parsedOptions : void 0; - _ && _.scale && (h = h * (_.scale || 1)), o.push({ - type: C.literal, - value: n.getNumberFormat(t, _).format(h) - }); - continue; - } - if (Bn(f)) { - var d = f.children, E = f.value, w = i[E]; - if (!ls(w)) - throw new rs(E, "function", l); - var N = Le(d, t, n, r, i, s), b = w(N.map(function(p) { - return p.value; - })); - Array.isArray(b) || (b = [b]), o.push.apply(o, b.map(function(p) { - return { - type: typeof p == "string" ? C.literal : C.object, - value: p - }; - })); - } - if (Tn(f)) { - var m = f.options[h] || f.options.other; - if (!m) - throw new Rt(f.value, h, Object.keys(f.options), l); - o.push.apply(o, Le(m.value, t, n, r, i)); - continue; - } - if (Hn(f)) { - var m = f.options["=".concat(h)]; - if (!m) { - if (!Intl.PluralRules) - throw new Ge(`Intl.PluralRules is not available in this environment. -Try polyfilling it using "@formatjs/intl-pluralrules" -`, fe.MISSING_INTL_API, l); - var T = n.getPluralRules(t, { type: f.pluralType }).select(h - (f.offset || 0)); - m = f.options[T] || f.options.other; - } - if (!m) - throw new Rt(f.value, h, Object.keys(f.options), l); - o.push.apply(o, Le(m.value, t, n, r, i, h - (f.offset || 0))); - continue; - } - } - return ss(o); -} -function os(e, t) { - return t ? A(A(A({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) { - return n[r] = A(A({}, e[r]), t[r] || {}), n; - }, {})) : e; -} -function as(e, t) { - return t ? Object.keys(e).reduce(function(n, r) { - return n[r] = os(e[r], t[r]), n; - }, A({}, e)) : e; -} -function Ke(e) { - return { - create: function() { - return { - get: function(t) { - return e[t]; - }, - set: function(t, n) { - e[t] = n; - } - }; - } - }; -} -function us(e) { - return e === void 0 && (e = { - number: {}, - dateTime: {}, - pluralRules: {} - }), { - getNumberFormat: Je(function() { - for (var t, n = [], r = 0; r < arguments.length; r++) - n[r] = arguments[r]; - return new ((t = Intl.NumberFormat).bind.apply(t, We([void 0], n, !1)))(); - }, { - cache: Ke(e.number), - strategy: Ye.variadic - }), - getDateTimeFormat: Je(function() { - for (var t, n = [], r = 0; r < arguments.length; r++) - n[r] = arguments[r]; - return new ((t = Intl.DateTimeFormat).bind.apply(t, We([void 0], n, !1)))(); - }, { - cache: Ke(e.dateTime), - strategy: Ye.variadic - }), - getPluralRules: Je(function() { - for (var t, n = [], r = 0; r < arguments.length; r++) - n[r] = arguments[r]; - return new ((t = Intl.PluralRules).bind.apply(t, We([void 0], n, !1)))(); - }, { - cache: Ke(e.pluralRules), - strategy: Ye.variadic - }) - }; -} -var fs = ( - /** @class */ - function() { - function e(t, n, r, i) { - var s = this; - if (n === void 0 && (n = e.defaultLocale), this.formatterCache = { - number: {}, - dateTime: {}, - pluralRules: {} - }, this.format = function(l) { - var o = s.formatToParts(l); - if (o.length === 1) - return o[0].value; - var a = o.reduce(function(u, f) { - return !u.length || f.type !== C.literal || typeof u[u.length - 1] != "string" ? u.push(f.value) : u[u.length - 1] += f.value, u; - }, []); - return a.length <= 1 ? a[0] || "" : a; - }, this.formatToParts = function(l) { - return Le(s.ast, s.locales, s.formatters, s.formats, l, void 0, s.message); - }, this.resolvedOptions = function() { - return { - locale: s.resolvedLocale.toString() - }; - }, this.getAst = function() { - return s.ast; - }, this.locales = n, this.resolvedLocale = e.resolveLocale(n), typeof t == "string") { - if (this.message = t, !e.__parse) - throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`"); - this.ast = e.__parse(t, { - ignoreTag: i == null ? void 0 : i.ignoreTag, - locale: this.resolvedLocale - }); - } else - this.ast = t; - if (!Array.isArray(this.ast)) - throw new TypeError("A message must be provided as a String or AST."); - this.formats = as(e.formats, r), this.formatters = i && i.formatters || us(this.formatterCache); - } - return Object.defineProperty(e, "defaultLocale", { - get: function() { - return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale; - }, - enumerable: !1, - configurable: !0 - }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) { - var n = Intl.NumberFormat.supportedLocalesOf(t); - return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]); - }, e.__parse = Ji, e.formats = { - number: { - integer: { - maximumFractionDigits: 0 - }, - currency: { - style: "currency" - }, - percent: { - style: "percent" - } - }, - date: { - short: { - month: "numeric", - day: "numeric", - year: "2-digit" - }, - medium: { - month: "short", - day: "numeric", - year: "numeric" - }, - long: { - month: "long", - day: "numeric", - year: "numeric" - }, - full: { - weekday: "long", - month: "long", - day: "numeric", - year: "numeric" - } - }, - time: { - short: { - hour: "numeric", - minute: "numeric" - }, - medium: { - hour: "numeric", - minute: "numeric", - second: "numeric" - }, - long: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - }, - full: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - } - } - }, e; - }() -); -function hs(e, t) { - if (t == null) - return; - if (t in e) - return e[t]; - const n = t.split("."); - let r = e; - for (let i = 0; i < n.length; i++) - if (typeof r == "object") { - if (i > 0) { - const s = n.slice(i, n.length).join("."); - if (s in r) { - r = r[s]; - break; - } - } - r = r[n[i]]; - } else - r = void 0; - return r; -} -const Q = {}, cs = (e, t, n) => n && (t in Q || (Q[t] = {}), e in Q[t] || (Q[t][e] = n), n), Un = (e, t) => { - if (t == null) - return; - if (t in Q && e in Q[t]) - return Q[t][e]; - const n = Ve(t); - for (let r = 0; r < n.length; r++) { - const i = n[r], s = ms(i, e); - if (s) - return cs(e, t, s); - } -}; -let mt; -const xe = we({}); -function _s(e) { - return mt[e] || null; -} -function Dn(e) { - return e in mt; -} -function ms(e, t) { - if (!Dn(e)) - return null; - const n = _s(e); - return hs(n, t); -} -function ds(e) { - if (e == null) - return; - const t = Ve(e); - for (let n = 0; n < t.length; n++) { - const r = t[n]; - if (Dn(r)) - return r; - } -} -function bs(e, ...t) { - delete Q[e], xe.update((n) => (n[e] = yi.all([n[e] || {}, ...t]), n)); -} -me( - [xe], - ([e]) => Object.keys(e) -); -xe.subscribe((e) => mt = e); -const Oe = {}; -function ps(e, t) { - Oe[e].delete(t), Oe[e].size === 0 && delete Oe[e]; -} -function Fn(e) { - return Oe[e]; -} -function gs(e) { - return Ve(e).map((t) => { - const n = Fn(t); - return [t, n ? [...n] : []]; - }).filter(([, t]) => t.length > 0); -} -function ut(e) { - return e == null ? !1 : Ve(e).some( - (t) => { - var n; - return (n = Fn(t)) == null ? void 0 : n.size; - } - ); -} -function vs(e, t) { - return Promise.all( - t.map((r) => (ps(e, r), r().then((i) => i.default || i))) - ).then((r) => bs(e, ...r)); -} -const ve = {}; -function kn(e) { - if (!ut(e)) - return e in ve ? ve[e] : Promise.resolve(); - const t = gs(e); - return ve[e] = Promise.all( - t.map( - ([n, r]) => vs(n, r) - ) - ).then(() => { - if (ut(e)) - return kn(e); - delete ve[e]; - }), ve[e]; -} -const ys = { - number: { - scientific: { notation: "scientific" }, - engineering: { notation: "engineering" }, - compactLong: { notation: "compact", compactDisplay: "long" }, - compactShort: { notation: "compact", compactDisplay: "short" } - }, - date: { - short: { month: "numeric", day: "numeric", year: "2-digit" }, - medium: { month: "short", day: "numeric", year: "numeric" }, - long: { month: "long", day: "numeric", year: "numeric" }, - full: { weekday: "long", month: "long", day: "numeric", year: "numeric" } - }, - time: { - short: { hour: "numeric", minute: "numeric" }, - medium: { hour: "numeric", minute: "numeric", second: "numeric" }, - long: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - }, - full: { - hour: "numeric", - minute: "numeric", - second: "numeric", - timeZoneName: "short" - } - } -}, Es = { - fallbackLocale: null, - loadingDelay: 200, - formats: ys, - warnOnMissingMessages: !0, - handleMissingMessage: void 0, - ignoreTag: !0 -}, ws = Es; -function he() { - return ws; -} -const $e = we(!1); -var xs = Object.defineProperty, Ts = Object.defineProperties, Hs = Object.getOwnPropertyDescriptors, Ut = Object.getOwnPropertySymbols, Bs = Object.prototype.hasOwnProperty, Ss = Object.prototype.propertyIsEnumerable, Dt = (e, t, n) => t in e ? xs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, As = (e, t) => { - for (var n in t || (t = {})) - Bs.call(t, n) && Dt(e, n, t[n]); - if (Ut) - for (var n of Ut(t)) - Ss.call(t, n) && Dt(e, n, t[n]); - return e; -}, Ps = (e, t) => Ts(e, Hs(t)); -let ft; -const Ue = we(null); -function Ft(e) { - return e.split("-").map((t, n, r) => r.slice(0, n + 1).join("-")).reverse(); -} -function Ve(e, t = he().fallbackLocale) { - const n = Ft(e); - return t ? [.../* @__PURE__ */ new Set([...n, ...Ft(t)])] : n; -} -function re() { - return ft ?? void 0; -} -Ue.subscribe((e) => { - ft = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e); -}); -const Ns = (e) => { - if (e && ds(e) && ut(e)) { - const { loadingDelay: t } = he(); - let n; - return typeof window < "u" && re() != null && t ? n = window.setTimeout( - () => $e.set(!0), - t - ) : $e.set(!0), kn(e).then(() => { - Ue.set(e); - }).finally(() => { - clearTimeout(n), $e.set(!1); - }); - } - return Ue.set(e); -}, Te = Ps(As({}, Ue), { - set: Ns -}), je = (e) => { - const t = /* @__PURE__ */ Object.create(null); - return (r) => { - const i = JSON.stringify(r); - return i in t ? t[i] : t[i] = e(r); - }; -}; -var Is = Object.defineProperty, De = Object.getOwnPropertySymbols, Gn = Object.prototype.hasOwnProperty, Vn = Object.prototype.propertyIsEnumerable, kt = (e, t, n) => t in e ? Is(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, dt = (e, t) => { - for (var n in t || (t = {})) - Gn.call(t, n) && kt(e, n, t[n]); - if (De) - for (var n of De(t)) - Vn.call(t, n) && kt(e, n, t[n]); - return e; -}, de = (e, t) => { - var n = {}; - for (var r in e) - Gn.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); - if (e != null && De) - for (var r of De(e)) - t.indexOf(r) < 0 && Vn.call(e, r) && (n[r] = e[r]); - return n; -}; -const Ee = (e, t) => { - const { formats: n } = he(); - if (e in n && t in n[e]) - return n[e][t]; - throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`); -}, Cs = je( - (e) => { - var t = e, { locale: n, format: r } = t, i = de(t, ["locale", "format"]); - if (n == null) - throw new Error('[svelte-i18n] A "locale" must be set to format numbers'); - return r && (i = Ee("number", r)), new Intl.NumberFormat(n, i); - } -), Ls = je( - (e) => { - var t = e, { locale: n, format: r } = t, i = de(t, ["locale", "format"]); - if (n == null) - throw new Error('[svelte-i18n] A "locale" must be set to format dates'); - return r ? i = Ee("date", r) : Object.keys(i).length === 0 && (i = Ee("date", "short")), new Intl.DateTimeFormat(n, i); - } -), Os = je( - (e) => { - var t = e, { locale: n, format: r } = t, i = de(t, ["locale", "format"]); - if (n == null) - throw new Error( - '[svelte-i18n] A "locale" must be set to format time values' - ); - return r ? i = Ee("time", r) : Object.keys(i).length === 0 && (i = Ee("time", "short")), new Intl.DateTimeFormat(n, i); - } -), Ms = (e = {}) => { - var t = e, { - locale: n = re() - } = t, r = de(t, [ - "locale" - ]); - return Cs(dt({ locale: n }, r)); -}, Rs = (e = {}) => { - var t = e, { - locale: n = re() - } = t, r = de(t, [ - "locale" - ]); - return Ls(dt({ locale: n }, r)); -}, Us = (e = {}) => { - var t = e, { - locale: n = re() - } = t, r = de(t, [ - "locale" - ]); - return Os(dt({ locale: n }, r)); -}, Ds = je( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - (e, t = re()) => new fs(e, t, he().formats, { - ignoreTag: he().ignoreTag - }) -), Fs = (e, t = {}) => { - var n, r, i, s; - let l = t; - typeof e == "object" && (l = e, e = l.id); - const { - values: o, - locale: a = re(), - default: u - } = l; - if (a == null) - throw new Error( - "[svelte-i18n] Cannot format a message without first setting the initial locale." - ); - let f = Un(e, a); - if (!f) - f = (s = (i = (r = (n = he()).handleMissingMessage) == null ? void 0 : r.call(n, { locale: a, id: e, defaultValue: u })) != null ? i : u) != null ? s : e; - else if (typeof f != "string") - return console.warn( - `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.` - ), f; - if (!o) - return f; - let c = f; - try { - c = Ds(f, a).format(o); - } catch (h) { - h instanceof Error && console.warn( - `[svelte-i18n] Message "${e}" has syntax error:`, - h.message - ); - } - return c; -}, ks = (e, t) => Us(t).format(e), Gs = (e, t) => Rs(t).format(e), Vs = (e, t) => Ms(t).format(e), js = (e, t = re()) => Un(e, t), Xs = me([Te, xe], () => Fs); -me([Te], () => ks); -me([Te], () => Gs); -me([Te], () => Vs); -me([Te, xe], () => js); -ni(Xs); -function le(e) { - let t = ["", "k", "M", "G", "T", "P", "E", "Z"], n = 0; - for (; e > 1e3 && n < t.length - 1; ) - e /= 1e3, n++; - let r = t[n]; - return (Number.isInteger(e) ? e : e.toFixed(1)) + r; + return L; } const { - SvelteComponent: qs, - append: R, - attr: B, - component_subscribe: Gt, - detach: zs, - element: Zs, - init: Ws, - insert: Qs, - noop: Vt, - safe_not_equal: Js, - set_style: Ie, - svg_element: U, - toggle_class: jt -} = window.__gradio__svelte__internal, { onMount: Ys } = window.__gradio__svelte__internal; -function Ks(e) { - let t, n, r, i, s, l, o, a, u, f, c, h; + SvelteComponent: Fl, + append: N, + attr: y, + component_subscribe: Ze, + detach: Ll, + element: Ml, + init: Sl, + insert: zl, + noop: Te, + safe_not_equal: Vl, + set_style: ae, + svg_element: A, + toggle_class: je +} = window.__gradio__svelte__internal, { onMount: Nl } = window.__gradio__svelte__internal; +function Al(n) { + let e, t, l, i, f, s, o, r, a, _, u, c; return { c() { - t = Zs("div"), n = U("svg"), r = U("g"), i = U("path"), s = U("path"), l = U("path"), o = U("path"), a = U("g"), u = U("path"), f = U("path"), c = U("path"), h = U("path"), B(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), B(i, "fill", "#FF7C00"), B(i, "fill-opacity", "0.4"), B(i, "class", "svelte-43sxxs"), B(s, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), B(s, "fill", "#FF7C00"), B(s, "class", "svelte-43sxxs"), B(l, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), B(l, "fill", "#FF7C00"), B(l, "fill-opacity", "0.4"), B(l, "class", "svelte-43sxxs"), B(o, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), B(o, "fill", "#FF7C00"), B(o, "class", "svelte-43sxxs"), Ie(r, "transform", "translate(" + /*$top*/ - e[1][0] + "px, " + /*$top*/ - e[1][1] + "px)"), B(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), B(u, "fill", "#FF7C00"), B(u, "fill-opacity", "0.4"), B(u, "class", "svelte-43sxxs"), B(f, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), B(f, "fill", "#FF7C00"), B(f, "class", "svelte-43sxxs"), B(c, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), B(c, "fill", "#FF7C00"), B(c, "fill-opacity", "0.4"), B(c, "class", "svelte-43sxxs"), B(h, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), B(h, "fill", "#FF7C00"), B(h, "class", "svelte-43sxxs"), Ie(a, "transform", "translate(" + /*$bottom*/ - e[2][0] + "px, " + /*$bottom*/ - e[2][1] + "px)"), B(n, "viewBox", "-1200 -1200 3000 3000"), B(n, "fill", "none"), B(n, "xmlns", "http://www.w3.org/2000/svg"), B(n, "class", "svelte-43sxxs"), B(t, "class", "svelte-43sxxs"), jt( - t, + e = Ml("div"), t = A("svg"), l = A("g"), i = A("path"), f = A("path"), s = A("path"), o = A("path"), r = A("g"), a = A("path"), _ = A("path"), u = A("path"), c = A("path"), y(i, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), y(i, "fill", "#FF7C00"), y(i, "fill-opacity", "0.4"), y(i, "class", "svelte-43sxxs"), y(f, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), y(f, "fill", "#FF7C00"), y(f, "class", "svelte-43sxxs"), y(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), y(s, "fill", "#FF7C00"), y(s, "fill-opacity", "0.4"), y(s, "class", "svelte-43sxxs"), y(o, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), y(o, "fill", "#FF7C00"), y(o, "class", "svelte-43sxxs"), ae(l, "transform", "translate(" + /*$top*/ + n[1][0] + "px, " + /*$top*/ + n[1][1] + "px)"), y(a, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), y(a, "fill", "#FF7C00"), y(a, "fill-opacity", "0.4"), y(a, "class", "svelte-43sxxs"), y(_, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), y(_, "fill", "#FF7C00"), y(_, "class", "svelte-43sxxs"), y(u, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), y(u, "fill", "#FF7C00"), y(u, "fill-opacity", "0.4"), y(u, "class", "svelte-43sxxs"), y(c, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), y(c, "fill", "#FF7C00"), y(c, "class", "svelte-43sxxs"), ae(r, "transform", "translate(" + /*$bottom*/ + n[2][0] + "px, " + /*$bottom*/ + n[2][1] + "px)"), y(t, "viewBox", "-1200 -1200 3000 3000"), y(t, "fill", "none"), y(t, "xmlns", "http://www.w3.org/2000/svg"), y(t, "class", "svelte-43sxxs"), y(e, "class", "svelte-43sxxs"), je( + e, "margin", /*margin*/ - e[0] + n[0] ); }, - m(_, d) { - Qs(_, t, d), R(t, n), R(n, r), R(r, i), R(r, s), R(r, l), R(r, o), R(n, a), R(a, u), R(a, f), R(a, c), R(a, h); - }, - p(_, [d]) { - d & /*$top*/ - 2 && Ie(r, "transform", "translate(" + /*$top*/ - _[1][0] + "px, " + /*$top*/ - _[1][1] + "px)"), d & /*$bottom*/ - 4 && Ie(a, "transform", "translate(" + /*$bottom*/ - _[2][0] + "px, " + /*$bottom*/ - _[2][1] + "px)"), d & /*margin*/ - 1 && jt( - t, + m(m, h) { + zl(m, e, h), N(e, t), N(t, l), N(l, i), N(l, f), N(l, s), N(l, o), N(t, r), N(r, a), N(r, _), N(r, u), N(r, c); + }, + p(m, [h]) { + h & /*$top*/ + 2 && ae(l, "transform", "translate(" + /*$top*/ + m[1][0] + "px, " + /*$top*/ + m[1][1] + "px)"), h & /*$bottom*/ + 4 && ae(r, "transform", "translate(" + /*$bottom*/ + m[2][0] + "px, " + /*$bottom*/ + m[2][1] + "px)"), h & /*margin*/ + 1 && je( + e, "margin", /*margin*/ - _[0] + m[0] ); }, - i: Vt, - o: Vt, - d(_) { - _ && zs(t); + i: Te, + o: Te, + d(m) { + m && Ll(e); } }; } -function $s(e, t, n) { - let r, i, { margin: s = !0 } = t; - const l = St([0, 0]); - Gt(e, l, (h) => n(1, r = h)); - const o = St([0, 0]); - Gt(e, o, (h) => n(2, i = h)); - let a; - async function u() { - await Promise.all([l.set([125, 140]), o.set([-125, -140])]), await Promise.all([l.set([-125, 140]), o.set([125, -140])]), await Promise.all([l.set([-125, 0]), o.set([125, -0])]), await Promise.all([l.set([125, 0]), o.set([-125, 0])]); +function Bl(n, e, t) { + let l, i, { margin: f = !0 } = e; + const s = Pe([0, 0]); + Ze(n, s, (c) => t(1, l = c)); + const o = Pe([0, 0]); + Ze(n, o, (c) => t(2, i = c)); + let r; + async function a() { + await Promise.all([s.set([125, 140]), o.set([-125, -140])]), await Promise.all([s.set([-125, 140]), o.set([125, -140])]), await Promise.all([s.set([-125, 0]), o.set([125, -0])]), await Promise.all([s.set([125, 0]), o.set([-125, 0])]); } - async function f() { - await u(), a || f(); + async function _() { + await a(), r || _(); } - async function c() { - await Promise.all([l.set([125, 0]), o.set([-125, 0])]), f(); + async function u() { + await Promise.all([s.set([125, 0]), o.set([-125, 0])]), _(); } - return Ys(() => (c(), () => a = !0)), e.$$set = (h) => { - "margin" in h && n(0, s = h.margin); - }, [s, r, i, l, o]; + return Nl(() => (u(), () => r = !0)), n.$$set = (c) => { + "margin" in c && t(0, f = c.margin); + }, [f, l, i, s, o]; } -class el extends qs { - constructor(t) { - super(), Ws(this, t, $s, Ks, Js, { margin: 0 }); +class Il extends Fl { + constructor(e) { + super(), Sl(this, e, Bl, Al, Vl, { margin: 0 }); } } const { - SvelteComponent: tl, - append: te, - attr: F, - binding_callbacks: Xt, - check_outros: jn, - create_component: nl, - create_slot: rl, - destroy_component: il, - destroy_each: Xn, - detach: v, - element: V, - empty: be, - ensure_array_like: Fe, - get_all_dirty_from_scope: sl, - get_slot_changes: ll, - group_outros: qn, - init: ol, - insert: y, - mount_component: al, - noop: ht, - safe_not_equal: ul, - set_data: M, - set_style: J, - space: k, - text: I, - toggle_class: O, - transition_in: ce, - transition_out: _e, - update_slot_base: fl -} = window.__gradio__svelte__internal, { tick: hl } = window.__gradio__svelte__internal, { onDestroy: cl } = window.__gradio__svelte__internal, _l = (e) => ({}), qt = (e) => ({}); -function zt(e, t, n) { - const r = e.slice(); - return r[38] = t[n], r[40] = n, r; -} -function Zt(e, t, n) { - const r = e.slice(); - return r[38] = t[n], r; -} -function ml(e) { - let t, n = ( + SvelteComponent: Pl, + append: O, + attr: I, + binding_callbacks: Ee, + check_outros: dt, + create_component: Zl, + create_slot: Tl, + destroy_component: jl, + destroy_each: mt, + detach: p, + element: T, + empty: ee, + ensure_array_like: me, + get_all_dirty_from_scope: El, + get_slot_changes: Dl, + group_outros: bt, + init: Rl, + insert: k, + mount_component: Hl, + noop: Ce, + safe_not_equal: Yl, + set_data: V, + set_style: H, + space: P, + text: F, + toggle_class: z, + transition_in: x, + transition_out: $, + update_slot_base: Ul +} = window.__gradio__svelte__internal, { tick: Xl } = window.__gradio__svelte__internal, { onDestroy: Gl } = window.__gradio__svelte__internal, Ol = (n) => ({}), De = (n) => ({}); +function Re(n, e, t) { + const l = n.slice(); + return l[38] = e[t], l[40] = t, l; +} +function He(n, e, t) { + const l = n.slice(); + return l[38] = e[t], l; +} +function Jl(n) { + let e, t = ( /*i18n*/ - e[1]("common.error") + "" - ), r, i, s; - const l = ( + n[1]("common.error") + "" + ), l, i, f; + const s = ( /*#slots*/ - e[29].error - ), o = rl( - l, - e, + n[29].error + ), o = Tl( + s, + n, /*$$scope*/ - e[28], - qt + n[28], + De ); return { c() { - t = V("span"), r = I(n), i = k(), o && o.c(), F(t, "class", "error svelte-14miwb5"); + e = T("span"), l = F(t), i = P(), o && o.c(), I(e, "class", "error svelte-14miwb5"); }, - m(a, u) { - y(a, t, u), te(t, r), y(a, i, u), o && o.m(a, u), s = !0; + m(r, a) { + k(r, e, a), O(e, l), k(r, i, a), o && o.m(r, a), f = !0; }, - p(a, u) { - (!s || u[0] & /*i18n*/ - 2) && n !== (n = /*i18n*/ - a[1]("common.error") + "") && M(r, n), o && o.p && (!s || u[0] & /*$$scope*/ - 268435456) && fl( + p(r, a) { + (!f || a[0] & /*i18n*/ + 2) && t !== (t = /*i18n*/ + r[1]("common.error") + "") && V(l, t), o && o.p && (!f || a[0] & /*$$scope*/ + 268435456) && Ul( o, - l, - a, + s, + r, /*$$scope*/ - a[28], - s ? ll( - l, + r[28], + f ? Dl( + s, /*$$scope*/ - a[28], - u, - _l - ) : sl( + r[28], + a, + Ol + ) : El( /*$$scope*/ - a[28] + r[28] ), - qt + De ); }, - i(a) { - s || (ce(o, a), s = !0); + i(r) { + f || (x(o, r), f = !0); }, - o(a) { - _e(o, a), s = !1; + o(r) { + $(o, r), f = !1; }, - d(a) { - a && (v(t), v(i)), o && o.d(a); + d(r) { + r && (p(e), p(i)), o && o.d(r); } }; } -function dl(e) { - let t, n, r, i, s, l, o, a, u, f = ( +function Kl(n) { + let e, t, l, i, f, s, o, r, a, _ = ( /*variant*/ - e[8] === "default" && /*show_eta_bar*/ - e[18] && /*show_progress*/ - e[6] === "full" && Wt(e) + n[8] === "default" && /*show_eta_bar*/ + n[18] && /*show_progress*/ + n[6] === "full" && Ye(n) ); - function c(m, T) { + function u(d, C) { if ( /*progress*/ - m[7] + d[7] ) - return gl; + return xl; if ( /*queue_position*/ - m[2] !== null && /*queue_size*/ - m[3] !== void 0 && /*queue_position*/ - m[2] >= 0 + d[2] !== null && /*queue_size*/ + d[3] !== void 0 && /*queue_position*/ + d[2] >= 0 ) - return pl; + return Wl; if ( /*queue_position*/ - m[2] === 0 + d[2] === 0 ) - return bl; + return Ql; } - let h = c(e), _ = h && h(e), d = ( + let c = u(n), m = c && c(n), h = ( /*timer*/ - e[5] && Yt(e) + n[5] && Ge(n) ); - const E = [wl, El], w = []; - function N(m, T) { + const L = [ln, tn], q = []; + function M(d, C) { return ( /*last_progress_level*/ - m[15] != null ? 0 : ( + d[15] != null ? 0 : ( /*show_progress*/ - m[6] === "full" ? 1 : -1 + d[6] === "full" ? 1 : -1 ) ); } - ~(s = N(e)) && (l = w[s] = E[s](e)); - let b = !/*timer*/ - e[5] && sn(e); + ~(f = M(n)) && (s = q[f] = L[f](n)); + let g = !/*timer*/ + n[5] && $e(n); return { c() { - f && f.c(), t = k(), n = V("div"), _ && _.c(), r = k(), d && d.c(), i = k(), l && l.c(), o = k(), b && b.c(), a = be(), F(n, "class", "progress-text svelte-14miwb5"), O( - n, + _ && _.c(), e = P(), t = T("div"), m && m.c(), l = P(), h && h.c(), i = P(), s && s.c(), o = P(), g && g.c(), r = ee(), I(t, "class", "progress-text svelte-14miwb5"), z( + t, "meta-text-center", /*variant*/ - e[8] === "center" - ), O( - n, + n[8] === "center" + ), z( + t, "meta-text", /*variant*/ - e[8] === "default" + n[8] === "default" ); }, - m(m, T) { - f && f.m(m, T), y(m, t, T), y(m, n, T), _ && _.m(n, null), te(n, r), d && d.m(n, null), y(m, i, T), ~s && w[s].m(m, T), y(m, o, T), b && b.m(m, T), y(m, a, T), u = !0; + m(d, C) { + _ && _.m(d, C), k(d, e, C), k(d, t, C), m && m.m(t, null), O(t, l), h && h.m(t, null), k(d, i, C), ~f && q[f].m(d, C), k(d, o, C), g && g.m(d, C), k(d, r, C), a = !0; }, - p(m, T) { + p(d, C) { /*variant*/ - m[8] === "default" && /*show_eta_bar*/ - m[18] && /*show_progress*/ - m[6] === "full" ? f ? f.p(m, T) : (f = Wt(m), f.c(), f.m(t.parentNode, t)) : f && (f.d(1), f = null), h === (h = c(m)) && _ ? _.p(m, T) : (_ && _.d(1), _ = h && h(m), _ && (_.c(), _.m(n, r))), /*timer*/ - m[5] ? d ? d.p(m, T) : (d = Yt(m), d.c(), d.m(n, null)) : d && (d.d(1), d = null), (!u || T[0] & /*variant*/ - 256) && O( - n, + d[8] === "default" && /*show_eta_bar*/ + d[18] && /*show_progress*/ + d[6] === "full" ? _ ? _.p(d, C) : (_ = Ye(d), _.c(), _.m(e.parentNode, e)) : _ && (_.d(1), _ = null), c === (c = u(d)) && m ? m.p(d, C) : (m && m.d(1), m = c && c(d), m && (m.c(), m.m(t, l))), /*timer*/ + d[5] ? h ? h.p(d, C) : (h = Ge(d), h.c(), h.m(t, null)) : h && (h.d(1), h = null), (!a || C[0] & /*variant*/ + 256) && z( + t, "meta-text-center", /*variant*/ - m[8] === "center" - ), (!u || T[0] & /*variant*/ - 256) && O( - n, + d[8] === "center" + ), (!a || C[0] & /*variant*/ + 256) && z( + t, "meta-text", /*variant*/ - m[8] === "default" + d[8] === "default" ); - let p = s; - s = N(m), s === p ? ~s && w[s].p(m, T) : (l && (qn(), _e(w[p], 1, 1, () => { - w[p] = null; - }), jn()), ~s ? (l = w[s], l ? l.p(m, T) : (l = w[s] = E[s](m), l.c()), ce(l, 1), l.m(o.parentNode, o)) : l = null), /*timer*/ - m[5] ? b && (b.d(1), b = null) : b ? b.p(m, T) : (b = sn(m), b.c(), b.m(a.parentNode, a)); + let w = f; + f = M(d), f === w ? ~f && q[f].p(d, C) : (s && (bt(), $(q[w], 1, 1, () => { + q[w] = null; + }), dt()), ~f ? (s = q[f], s ? s.p(d, C) : (s = q[f] = L[f](d), s.c()), x(s, 1), s.m(o.parentNode, o)) : s = null), /*timer*/ + d[5] ? g && (g.d(1), g = null) : g ? g.p(d, C) : (g = $e(d), g.c(), g.m(r.parentNode, r)); }, - i(m) { - u || (ce(l), u = !0); + i(d) { + a || (x(s), a = !0); }, - o(m) { - _e(l), u = !1; + o(d) { + $(s), a = !1; }, - d(m) { - m && (v(t), v(n), v(i), v(o), v(a)), f && f.d(m), _ && _.d(), d && d.d(), ~s && w[s].d(m), b && b.d(m); + d(d) { + d && (p(e), p(t), p(i), p(o), p(r)), _ && _.d(d), m && m.d(), h && h.d(), ~f && q[f].d(d), g && g.d(d); } }; } -function Wt(e) { - let t, n = `translateX(${/*eta_level*/ - (e[17] || 0) * 100 - 100}%)`; +function Ye(n) { + let e, t = `translateX(${/*eta_level*/ + (n[17] || 0) * 100 - 100}%)`; return { c() { - t = V("div"), F(t, "class", "eta-bar svelte-14miwb5"), J(t, "transform", n); + e = T("div"), I(e, "class", "eta-bar svelte-14miwb5"), H(e, "transform", t); }, - m(r, i) { - y(r, t, i); + m(l, i) { + k(l, e, i); }, - p(r, i) { + p(l, i) { i[0] & /*eta_level*/ - 131072 && n !== (n = `translateX(${/*eta_level*/ - (r[17] || 0) * 100 - 100}%)`) && J(t, "transform", n); + 131072 && t !== (t = `translateX(${/*eta_level*/ + (l[17] || 0) * 100 - 100}%)`) && H(e, "transform", t); }, - d(r) { - r && v(t); + d(l) { + l && p(e); } }; } -function bl(e) { - let t; +function Ql(n) { + let e; return { c() { - t = I("processing |"); + e = F("processing |"); }, - m(n, r) { - y(n, t, r); + m(t, l) { + k(t, e, l); }, - p: ht, - d(n) { - n && v(t); + p: Ce, + d(t) { + t && p(e); } }; } -function pl(e) { - let t, n = ( +function Wl(n) { + let e, t = ( /*queue_position*/ - e[2] + 1 + "" - ), r, i, s, l; + n[2] + 1 + "" + ), l, i, f, s; return { c() { - t = I("queue: "), r = I(n), i = I("/"), s = I( + e = F("queue: "), l = F(t), i = F("/"), f = F( /*queue_size*/ - e[3] - ), l = I(" |"); - }, - m(o, a) { - y(o, t, a), y(o, r, a), y(o, i, a), y(o, s, a), y(o, l, a); - }, - p(o, a) { - a[0] & /*queue_position*/ - 4 && n !== (n = /*queue_position*/ - o[2] + 1 + "") && M(r, n), a[0] & /*queue_size*/ - 8 && M( - s, + n[3] + ), s = F(" |"); + }, + m(o, r) { + k(o, e, r), k(o, l, r), k(o, i, r), k(o, f, r), k(o, s, r); + }, + p(o, r) { + r[0] & /*queue_position*/ + 4 && t !== (t = /*queue_position*/ + o[2] + 1 + "") && V(l, t), r[0] & /*queue_size*/ + 8 && V( + f, /*queue_size*/ o[3] ); }, d(o) { - o && (v(t), v(r), v(i), v(s), v(l)); + o && (p(e), p(l), p(i), p(f), p(s)); } }; } -function gl(e) { - let t, n = Fe( +function xl(n) { + let e, t = me( /*progress*/ - e[7] - ), r = []; - for (let i = 0; i < n.length; i += 1) - r[i] = Jt(Zt(e, n, i)); + n[7] + ), l = []; + for (let i = 0; i < t.length; i += 1) + l[i] = Xe(He(n, t, i)); return { c() { - for (let i = 0; i < r.length; i += 1) - r[i].c(); - t = be(); + for (let i = 0; i < l.length; i += 1) + l[i].c(); + e = ee(); }, - m(i, s) { - for (let l = 0; l < r.length; l += 1) - r[l] && r[l].m(i, s); - y(i, t, s); + m(i, f) { + for (let s = 0; s < l.length; s += 1) + l[s] && l[s].m(i, f); + k(i, e, f); }, - p(i, s) { - if (s[0] & /*progress*/ + p(i, f) { + if (f[0] & /*progress*/ 128) { - n = Fe( + t = me( /*progress*/ i[7] ); - let l; - for (l = 0; l < n.length; l += 1) { - const o = Zt(i, n, l); - r[l] ? r[l].p(o, s) : (r[l] = Jt(o), r[l].c(), r[l].m(t.parentNode, t)); + let s; + for (s = 0; s < t.length; s += 1) { + const o = He(i, t, s); + l[s] ? l[s].p(o, f) : (l[s] = Xe(o), l[s].c(), l[s].m(e.parentNode, e)); } - for (; l < r.length; l += 1) - r[l].d(1); - r.length = n.length; + for (; s < l.length; s += 1) + l[s].d(1); + l.length = t.length; } }, d(i) { - i && v(t), Xn(r, i); + i && p(e), mt(l, i); } }; } -function Qt(e) { - let t, n = ( +function Ue(n) { + let e, t = ( /*p*/ - e[38].unit + "" - ), r, i, s = " ", l; - function o(f, c) { + n[38].unit + "" + ), l, i, f = " ", s; + function o(_, u) { return ( /*p*/ - f[38].length != null ? yl : vl + _[38].length != null ? en : $l ); } - let a = o(e), u = a(e); + let r = o(n), a = r(n); return { c() { - u.c(), t = k(), r = I(n), i = I(" | "), l = I(s); + a.c(), e = P(), l = F(t), i = F(" | "), s = F(f); }, - m(f, c) { - u.m(f, c), y(f, t, c), y(f, r, c), y(f, i, c), y(f, l, c); + m(_, u) { + a.m(_, u), k(_, e, u), k(_, l, u), k(_, i, u), k(_, s, u); }, - p(f, c) { - a === (a = o(f)) && u ? u.p(f, c) : (u.d(1), u = a(f), u && (u.c(), u.m(t.parentNode, t))), c[0] & /*progress*/ - 128 && n !== (n = /*p*/ - f[38].unit + "") && M(r, n); + p(_, u) { + r === (r = o(_)) && a ? a.p(_, u) : (a.d(1), a = r(_), a && (a.c(), a.m(e.parentNode, e))), u[0] & /*progress*/ + 128 && t !== (t = /*p*/ + _[38].unit + "") && V(l, t); }, - d(f) { - f && (v(t), v(r), v(i), v(l)), u.d(f); + d(_) { + _ && (p(e), p(l), p(i), p(s)), a.d(_); } }; } -function vl(e) { - let t = le( +function $l(n) { + let e = Q( /*p*/ - e[38].index || 0 - ) + "", n; + n[38].index || 0 + ) + "", t; return { c() { - n = I(t); + t = F(e); }, - m(r, i) { - y(r, n, i); + m(l, i) { + k(l, t, i); }, - p(r, i) { + p(l, i) { i[0] & /*progress*/ - 128 && t !== (t = le( + 128 && e !== (e = Q( /*p*/ - r[38].index || 0 - ) + "") && M(n, t); + l[38].index || 0 + ) + "") && V(t, e); }, - d(r) { - r && v(n); + d(l) { + l && p(t); } }; } -function yl(e) { - let t = le( +function en(n) { + let e = Q( /*p*/ - e[38].index || 0 - ) + "", n, r, i = le( + n[38].index || 0 + ) + "", t, l, i = Q( /*p*/ - e[38].length - ) + "", s; + n[38].length + ) + "", f; return { c() { - n = I(t), r = I("/"), s = I(i); + t = F(e), l = F("/"), f = F(i); }, - m(l, o) { - y(l, n, o), y(l, r, o), y(l, s, o); + m(s, o) { + k(s, t, o), k(s, l, o), k(s, f, o); }, - p(l, o) { + p(s, o) { o[0] & /*progress*/ - 128 && t !== (t = le( + 128 && e !== (e = Q( /*p*/ - l[38].index || 0 - ) + "") && M(n, t), o[0] & /*progress*/ - 128 && i !== (i = le( + s[38].index || 0 + ) + "") && V(t, e), o[0] & /*progress*/ + 128 && i !== (i = Q( /*p*/ - l[38].length - ) + "") && M(s, i); + s[38].length + ) + "") && V(f, i); }, - d(l) { - l && (v(n), v(r), v(s)); + d(s) { + s && (p(t), p(l), p(f)); } }; } -function Jt(e) { - let t, n = ( +function Xe(n) { + let e, t = ( /*p*/ - e[38].index != null && Qt(e) + n[38].index != null && Ue(n) ); return { c() { - n && n.c(), t = be(); + t && t.c(), e = ee(); }, - m(r, i) { - n && n.m(r, i), y(r, t, i); + m(l, i) { + t && t.m(l, i), k(l, e, i); }, - p(r, i) { + p(l, i) { /*p*/ - r[38].index != null ? n ? n.p(r, i) : (n = Qt(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null); + l[38].index != null ? t ? t.p(l, i) : (t = Ue(l), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, - d(r) { - r && v(t), n && n.d(r); + d(l) { + l && p(e), t && t.d(l); } }; } -function Yt(e) { - let t, n = ( +function Ge(n) { + let e, t = ( /*eta*/ - e[0] ? `/${/*formatted_eta*/ - e[19]}` : "" - ), r, i; + n[0] ? `/${/*formatted_eta*/ + n[19]}` : "" + ), l, i; return { c() { - t = I( + e = F( /*formatted_timer*/ - e[20] - ), r = I(n), i = I("s"); + n[20] + ), l = F(t), i = F("s"); }, - m(s, l) { - y(s, t, l), y(s, r, l), y(s, i, l); + m(f, s) { + k(f, e, s), k(f, l, s), k(f, i, s); }, - p(s, l) { - l[0] & /*formatted_timer*/ - 1048576 && M( - t, + p(f, s) { + s[0] & /*formatted_timer*/ + 1048576 && V( + e, /*formatted_timer*/ - s[20] - ), l[0] & /*eta, formatted_eta*/ - 524289 && n !== (n = /*eta*/ - s[0] ? `/${/*formatted_eta*/ - s[19]}` : "") && M(r, n); + f[20] + ), s[0] & /*eta, formatted_eta*/ + 524289 && t !== (t = /*eta*/ + f[0] ? `/${/*formatted_eta*/ + f[19]}` : "") && V(l, t); }, - d(s) { - s && (v(t), v(r), v(i)); + d(f) { + f && (p(e), p(l), p(i)); } }; } -function El(e) { - let t, n; - return t = new el({ +function tn(n) { + let e, t; + return e = new Il({ props: { margin: ( /*variant*/ - e[8] === "default" + n[8] === "default" ) } }), { c() { - nl(t.$$.fragment); + Zl(e.$$.fragment); }, - m(r, i) { - al(t, r, i), n = !0; + m(l, i) { + Hl(e, l, i), t = !0; }, - p(r, i) { - const s = {}; + p(l, i) { + const f = {}; i[0] & /*variant*/ - 256 && (s.margin = /*variant*/ - r[8] === "default"), t.$set(s); + 256 && (f.margin = /*variant*/ + l[8] === "default"), e.$set(f); }, - i(r) { - n || (ce(t.$$.fragment, r), n = !0); + i(l) { + t || (x(e.$$.fragment, l), t = !0); }, - o(r) { - _e(t.$$.fragment, r), n = !1; + o(l) { + $(e.$$.fragment, l), t = !1; }, - d(r) { - il(t, r); + d(l) { + jl(e, l); } }; } -function wl(e) { - let t, n, r, i, s, l = `${/*last_progress_level*/ - e[15] * 100}%`, o = ( +function ln(n) { + let e, t, l, i, f, s = `${/*last_progress_level*/ + n[15] * 100}%`, o = ( /*progress*/ - e[7] != null && Kt(e) + n[7] != null && Oe(n) ); return { c() { - t = V("div"), n = V("div"), o && o.c(), r = k(), i = V("div"), s = V("div"), F(n, "class", "progress-level-inner svelte-14miwb5"), F(s, "class", "progress-bar svelte-14miwb5"), J(s, "width", l), F(i, "class", "progress-bar-wrap svelte-14miwb5"), F(t, "class", "progress-level svelte-14miwb5"); + e = T("div"), t = T("div"), o && o.c(), l = P(), i = T("div"), f = T("div"), I(t, "class", "progress-level-inner svelte-14miwb5"), I(f, "class", "progress-bar svelte-14miwb5"), H(f, "width", s), I(i, "class", "progress-bar-wrap svelte-14miwb5"), I(e, "class", "progress-level svelte-14miwb5"); }, - m(a, u) { - y(a, t, u), te(t, n), o && o.m(n, null), te(t, r), te(t, i), te(i, s), e[30](s); + m(r, a) { + k(r, e, a), O(e, t), o && o.m(t, null), O(e, l), O(e, i), O(i, f), n[30](f); }, - p(a, u) { + p(r, a) { /*progress*/ - a[7] != null ? o ? o.p(a, u) : (o = Kt(a), o.c(), o.m(n, null)) : o && (o.d(1), o = null), u[0] & /*last_progress_level*/ - 32768 && l !== (l = `${/*last_progress_level*/ - a[15] * 100}%`) && J(s, "width", l); + r[7] != null ? o ? o.p(r, a) : (o = Oe(r), o.c(), o.m(t, null)) : o && (o.d(1), o = null), a[0] & /*last_progress_level*/ + 32768 && s !== (s = `${/*last_progress_level*/ + r[15] * 100}%`) && H(f, "width", s); }, - i: ht, - o: ht, - d(a) { - a && v(t), o && o.d(), e[30](null); + i: Ce, + o: Ce, + d(r) { + r && p(e), o && o.d(), n[30](null); } }; } -function Kt(e) { - let t, n = Fe( +function Oe(n) { + let e, t = me( /*progress*/ - e[7] - ), r = []; - for (let i = 0; i < n.length; i += 1) - r[i] = rn(zt(e, n, i)); + n[7] + ), l = []; + for (let i = 0; i < t.length; i += 1) + l[i] = xe(Re(n, t, i)); return { c() { - for (let i = 0; i < r.length; i += 1) - r[i].c(); - t = be(); + for (let i = 0; i < l.length; i += 1) + l[i].c(); + e = ee(); }, - m(i, s) { - for (let l = 0; l < r.length; l += 1) - r[l] && r[l].m(i, s); - y(i, t, s); + m(i, f) { + for (let s = 0; s < l.length; s += 1) + l[s] && l[s].m(i, f); + k(i, e, f); }, - p(i, s) { - if (s[0] & /*progress_level, progress*/ + p(i, f) { + if (f[0] & /*progress_level, progress*/ 16512) { - n = Fe( + t = me( /*progress*/ i[7] ); - let l; - for (l = 0; l < n.length; l += 1) { - const o = zt(i, n, l); - r[l] ? r[l].p(o, s) : (r[l] = rn(o), r[l].c(), r[l].m(t.parentNode, t)); + let s; + for (s = 0; s < t.length; s += 1) { + const o = Re(i, t, s); + l[s] ? l[s].p(o, f) : (l[s] = xe(o), l[s].c(), l[s].m(e.parentNode, e)); } - for (; l < r.length; l += 1) - r[l].d(1); - r.length = n.length; + for (; s < l.length; s += 1) + l[s].d(1); + l.length = t.length; } }, d(i) { - i && v(t), Xn(r, i); + i && p(e), mt(l, i); } }; } -function $t(e) { - let t, n, r, i, s = ( +function Je(n) { + let e, t, l, i, f = ( /*i*/ - e[40] !== 0 && xl() - ), l = ( + n[40] !== 0 && nn() + ), s = ( /*p*/ - e[38].desc != null && en(e) + n[38].desc != null && Ke(n) ), o = ( /*p*/ - e[38].desc != null && /*progress_level*/ - e[14] && /*progress_level*/ - e[14][ + n[38].desc != null && /*progress_level*/ + n[14] && /*progress_level*/ + n[14][ /*i*/ - e[40] - ] != null && tn() - ), a = ( + n[40] + ] != null && Qe() + ), r = ( /*progress_level*/ - e[14] != null && nn(e) + n[14] != null && We(n) ); return { c() { - s && s.c(), t = k(), l && l.c(), n = k(), o && o.c(), r = k(), a && a.c(), i = be(); + f && f.c(), e = P(), s && s.c(), t = P(), o && o.c(), l = P(), r && r.c(), i = ee(); }, - m(u, f) { - s && s.m(u, f), y(u, t, f), l && l.m(u, f), y(u, n, f), o && o.m(u, f), y(u, r, f), a && a.m(u, f), y(u, i, f); + m(a, _) { + f && f.m(a, _), k(a, e, _), s && s.m(a, _), k(a, t, _), o && o.m(a, _), k(a, l, _), r && r.m(a, _), k(a, i, _); }, - p(u, f) { + p(a, _) { /*p*/ - u[38].desc != null ? l ? l.p(u, f) : (l = en(u), l.c(), l.m(n.parentNode, n)) : l && (l.d(1), l = null), /*p*/ - u[38].desc != null && /*progress_level*/ - u[14] && /*progress_level*/ - u[14][ + a[38].desc != null ? s ? s.p(a, _) : (s = Ke(a), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*p*/ + a[38].desc != null && /*progress_level*/ + a[14] && /*progress_level*/ + a[14][ /*i*/ - u[40] - ] != null ? o || (o = tn(), o.c(), o.m(r.parentNode, r)) : o && (o.d(1), o = null), /*progress_level*/ - u[14] != null ? a ? a.p(u, f) : (a = nn(u), a.c(), a.m(i.parentNode, i)) : a && (a.d(1), a = null); + a[40] + ] != null ? o || (o = Qe(), o.c(), o.m(l.parentNode, l)) : o && (o.d(1), o = null), /*progress_level*/ + a[14] != null ? r ? r.p(a, _) : (r = We(a), r.c(), r.m(i.parentNode, i)) : r && (r.d(1), r = null); }, - d(u) { - u && (v(t), v(n), v(r), v(i)), s && s.d(u), l && l.d(u), o && o.d(u), a && a.d(u); + d(a) { + a && (p(e), p(t), p(l), p(i)), f && f.d(a), s && s.d(a), o && o.d(a), r && r.d(a); } }; } -function xl(e) { - let t; +function nn(n) { + let e; return { c() { - t = I(" /"); + e = F(" /"); }, - m(n, r) { - y(n, t, r); + m(t, l) { + k(t, e, l); }, - d(n) { - n && v(t); + d(t) { + t && p(e); } }; } -function en(e) { - let t = ( +function Ke(n) { + let e = ( /*p*/ - e[38].desc + "" - ), n; + n[38].desc + "" + ), t; return { c() { - n = I(t); + t = F(e); }, - m(r, i) { - y(r, n, i); + m(l, i) { + k(l, t, i); }, - p(r, i) { + p(l, i) { i[0] & /*progress*/ - 128 && t !== (t = /*p*/ - r[38].desc + "") && M(n, t); + 128 && e !== (e = /*p*/ + l[38].desc + "") && V(t, e); }, - d(r) { - r && v(n); + d(l) { + l && p(t); } }; } -function tn(e) { - let t; +function Qe(n) { + let e; return { c() { - t = I("-"); + e = F("-"); }, - m(n, r) { - y(n, t, r); + m(t, l) { + k(t, e, l); }, - d(n) { - n && v(t); + d(t) { + t && p(e); } }; } -function nn(e) { - let t = (100 * /*progress_level*/ - (e[14][ +function We(n) { + let e = (100 * /*progress_level*/ + (n[14][ /*i*/ - e[40] - ] || 0)).toFixed(1) + "", n, r; + n[40] + ] || 0)).toFixed(1) + "", t, l; return { c() { - n = I(t), r = I("%"); + t = F(e), l = F("%"); }, - m(i, s) { - y(i, n, s), y(i, r, s); + m(i, f) { + k(i, t, f), k(i, l, f); }, - p(i, s) { - s[0] & /*progress_level*/ - 16384 && t !== (t = (100 * /*progress_level*/ + p(i, f) { + f[0] & /*progress_level*/ + 16384 && e !== (e = (100 * /*progress_level*/ (i[14][ /*i*/ i[40] - ] || 0)).toFixed(1) + "") && M(n, t); + ] || 0)).toFixed(1) + "") && V(t, e); }, d(i) { - i && (v(n), v(r)); + i && (p(t), p(l)); } }; } -function rn(e) { - let t, n = ( +function xe(n) { + let e, t = ( /*p*/ - (e[38].desc != null || /*progress_level*/ - e[14] && /*progress_level*/ - e[14][ + (n[38].desc != null || /*progress_level*/ + n[14] && /*progress_level*/ + n[14][ /*i*/ - e[40] - ] != null) && $t(e) + n[40] + ] != null) && Je(n) ); return { c() { - n && n.c(), t = be(); + t && t.c(), e = ee(); }, - m(r, i) { - n && n.m(r, i), y(r, t, i); + m(l, i) { + t && t.m(l, i), k(l, e, i); }, - p(r, i) { + p(l, i) { /*p*/ - r[38].desc != null || /*progress_level*/ - r[14] && /*progress_level*/ - r[14][ + l[38].desc != null || /*progress_level*/ + l[14] && /*progress_level*/ + l[14][ /*i*/ - r[40] - ] != null ? n ? n.p(r, i) : (n = $t(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null); + l[40] + ] != null ? t ? t.p(l, i) : (t = Je(l), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, - d(r) { - r && v(t), n && n.d(r); + d(l) { + l && p(e), t && t.d(l); } }; } -function sn(e) { - let t, n; +function $e(n) { + let e, t; return { c() { - t = V("p"), n = I( + e = T("p"), t = F( /*loading_text*/ - e[9] - ), F(t, "class", "loading svelte-14miwb5"); + n[9] + ), I(e, "class", "loading svelte-14miwb5"); }, - m(r, i) { - y(r, t, i), te(t, n); + m(l, i) { + k(l, e, i), O(e, t); }, - p(r, i) { + p(l, i) { i[0] & /*loading_text*/ - 512 && M( - n, + 512 && V( + t, /*loading_text*/ - r[9] + l[9] ); }, - d(r) { - r && v(t); + d(l) { + l && p(e); } }; } -function Tl(e) { - let t, n, r, i, s; - const l = [dl, ml], o = []; - function a(u, f) { +function fn(n) { + let e, t, l, i, f; + const s = [Kl, Jl], o = []; + function r(a, _) { return ( /*status*/ - u[4] === "pending" ? 0 : ( + a[4] === "pending" ? 0 : ( /*status*/ - u[4] === "error" ? 1 : -1 + a[4] === "error" ? 1 : -1 ) ); } - return ~(n = a(e)) && (r = o[n] = l[n](e)), { + return ~(t = r(n)) && (l = o[t] = s[t](n)), { c() { - t = V("div"), r && r.c(), F(t, "class", i = "wrap " + /*variant*/ - e[8] + " " + /*show_progress*/ - e[6] + " svelte-14miwb5"), O(t, "hide", !/*status*/ - e[4] || /*status*/ - e[4] === "complete" || /*show_progress*/ - e[6] === "hidden"), O( - t, + e = T("div"), l && l.c(), I(e, "class", i = "wrap " + /*variant*/ + n[8] + " " + /*show_progress*/ + n[6] + " svelte-14miwb5"), z(e, "hide", !/*status*/ + n[4] || /*status*/ + n[4] === "complete" || /*show_progress*/ + n[6] === "hidden"), z( + e, "translucent", /*variant*/ - e[8] === "center" && /*status*/ - (e[4] === "pending" || /*status*/ - e[4] === "error") || /*translucent*/ - e[11] || /*show_progress*/ - e[6] === "minimal" - ), O( - t, + n[8] === "center" && /*status*/ + (n[4] === "pending" || /*status*/ + n[4] === "error") || /*translucent*/ + n[11] || /*show_progress*/ + n[6] === "minimal" + ), z( + e, "generating", /*status*/ - e[4] === "generating" - ), O( - t, + n[4] === "generating" + ), z( + e, "border", /*border*/ - e[12] - ), J( - t, + n[12] + ), H( + e, "position", /*absolute*/ - e[10] ? "absolute" : "static" - ), J( - t, + n[10] ? "absolute" : "static" + ), H( + e, "padding", /*absolute*/ - e[10] ? "0" : "var(--size-8) 0" + n[10] ? "0" : "var(--size-8) 0" ); }, - m(u, f) { - y(u, t, f), ~n && o[n].m(t, null), e[31](t), s = !0; + m(a, _) { + k(a, e, _), ~t && o[t].m(e, null), n[31](e), f = !0; }, - p(u, f) { - let c = n; - n = a(u), n === c ? ~n && o[n].p(u, f) : (r && (qn(), _e(o[c], 1, 1, () => { - o[c] = null; - }), jn()), ~n ? (r = o[n], r ? r.p(u, f) : (r = o[n] = l[n](u), r.c()), ce(r, 1), r.m(t, null)) : r = null), (!s || f[0] & /*variant, show_progress*/ + p(a, _) { + let u = t; + t = r(a), t === u ? ~t && o[t].p(a, _) : (l && (bt(), $(o[u], 1, 1, () => { + o[u] = null; + }), dt()), ~t ? (l = o[t], l ? l.p(a, _) : (l = o[t] = s[t](a), l.c()), x(l, 1), l.m(e, null)) : l = null), (!f || _[0] & /*variant, show_progress*/ 320 && i !== (i = "wrap " + /*variant*/ - u[8] + " " + /*show_progress*/ - u[6] + " svelte-14miwb5")) && F(t, "class", i), (!s || f[0] & /*variant, show_progress, status, show_progress*/ - 336) && O(t, "hide", !/*status*/ - u[4] || /*status*/ - u[4] === "complete" || /*show_progress*/ - u[6] === "hidden"), (!s || f[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ - 2384) && O( - t, + a[8] + " " + /*show_progress*/ + a[6] + " svelte-14miwb5")) && I(e, "class", i), (!f || _[0] & /*variant, show_progress, status, show_progress*/ + 336) && z(e, "hide", !/*status*/ + a[4] || /*status*/ + a[4] === "complete" || /*show_progress*/ + a[6] === "hidden"), (!f || _[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ + 2384) && z( + e, "translucent", /*variant*/ - u[8] === "center" && /*status*/ - (u[4] === "pending" || /*status*/ - u[4] === "error") || /*translucent*/ - u[11] || /*show_progress*/ - u[6] === "minimal" - ), (!s || f[0] & /*variant, show_progress, status*/ - 336) && O( - t, + a[8] === "center" && /*status*/ + (a[4] === "pending" || /*status*/ + a[4] === "error") || /*translucent*/ + a[11] || /*show_progress*/ + a[6] === "minimal" + ), (!f || _[0] & /*variant, show_progress, status*/ + 336) && z( + e, "generating", /*status*/ - u[4] === "generating" - ), (!s || f[0] & /*variant, show_progress, border*/ - 4416) && O( - t, + a[4] === "generating" + ), (!f || _[0] & /*variant, show_progress, border*/ + 4416) && z( + e, "border", /*border*/ - u[12] - ), f[0] & /*absolute*/ - 1024 && J( - t, + a[12] + ), _[0] & /*absolute*/ + 1024 && H( + e, "position", /*absolute*/ - u[10] ? "absolute" : "static" - ), f[0] & /*absolute*/ - 1024 && J( - t, + a[10] ? "absolute" : "static" + ), _[0] & /*absolute*/ + 1024 && H( + e, "padding", /*absolute*/ - u[10] ? "0" : "var(--size-8) 0" + a[10] ? "0" : "var(--size-8) 0" ); }, - i(u) { - s || (ce(r), s = !0); + i(a) { + f || (x(l), f = !0); }, - o(u) { - _e(r), s = !1; + o(a) { + $(l), f = !1; }, - d(u) { - u && v(t), ~n && o[n].d(), e[31](null); + d(a) { + a && p(e), ~t && o[t].d(), n[31](null); } }; } -let Ce = [], et = !1; -async function Hl(e, t = !0) { - if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) { - if (Ce.push(e), !et) - et = !0; +let _e = [], ke = !1; +async function sn(n, e = !0) { + if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && e !== !0)) { + if (_e.push(n), !ke) + ke = !0; else return; - await hl(), requestAnimationFrame(() => { - let n = [0, 0]; - for (let r = 0; r < Ce.length; r++) { - const s = Ce[r].getBoundingClientRect(); - (r === 0 || s.top + window.scrollY <= n[0]) && (n[0] = s.top + window.scrollY, n[1] = r); + await Xl(), requestAnimationFrame(() => { + let t = [0, 0]; + for (let l = 0; l < _e.length; l++) { + const f = _e[l].getBoundingClientRect(); + (l === 0 || f.top + window.scrollY <= t[0]) && (t[0] = f.top + window.scrollY, t[1] = l); } - window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), et = !1, Ce = []; + window.scrollTo({ top: t[0] - 20, behavior: "smooth" }), ke = !1, _e = []; }); } } -function Bl(e, t, n) { - let r, { $$slots: i = {}, $$scope: s } = t, { i18n: l } = t, { eta: o = null } = t, { queue: a = !1 } = t, { queue_position: u } = t, { queue_size: f } = t, { status: c } = t, { scroll_to_output: h = !1 } = t, { timer: _ = !0 } = t, { show_progress: d = "full" } = t, { message: E = null } = t, { progress: w = null } = t, { variant: N = "default" } = t, { loading_text: b = "Loading..." } = t, { absolute: m = !0 } = t, { translucent: T = !1 } = t, { border: p = !1 } = t, { autoscroll: j } = t, X, pe = !1, Ae = 0, Y = 0, Xe = null, bt = 0, K = null, ge, q = null, pt = !0; - const Zn = () => { - n(25, Ae = performance.now()), n(26, Y = 0), pe = !0, gt(); +function on(n, e, t) { + let l, { $$slots: i = {}, $$scope: f } = e, { i18n: s } = e, { eta: o = null } = e, { queue: r = !1 } = e, { queue_position: a } = e, { queue_size: _ } = e, { status: u } = e, { scroll_to_output: c = !1 } = e, { timer: m = !0 } = e, { show_progress: h = "full" } = e, { message: L = null } = e, { progress: q = null } = e, { variant: M = "default" } = e, { loading_text: g = "Loading..." } = e, { absolute: d = !0 } = e, { translucent: C = !1 } = e, { border: w = !1 } = e, { autoscroll: be } = e, te, le = !1, oe = 0, Y = 0, ge = null, qe = 0, U = null, ne, j = null, Fe = !0; + const ht = () => { + t(25, oe = performance.now()), t(26, Y = 0), le = !0, Le(); }; - function gt() { + function Le() { requestAnimationFrame(() => { - n(26, Y = (performance.now() - Ae) / 1e3), pe && gt(); + t(26, Y = (performance.now() - oe) / 1e3), le && Le(); }); } - function vt() { - n(26, Y = 0), pe && (pe = !1); + function Me() { + t(26, Y = 0), le && (le = !1); } - cl(() => { - pe && vt(); + Gl(() => { + le && Me(); }); - let yt = null; - function Wn(g) { - Xt[g ? "unshift" : "push"](() => { - q = g, n(16, q), n(7, w), n(14, K), n(15, ge); + let Se = null; + function wt(b) { + Ee[b ? "unshift" : "push"](() => { + j = b, t(16, j), t(7, q), t(14, U), t(15, ne); }); } - function Qn(g) { - Xt[g ? "unshift" : "push"](() => { - X = g, n(13, X); + function pt(b) { + Ee[b ? "unshift" : "push"](() => { + te = b, t(13, te); }); } - return e.$$set = (g) => { - "i18n" in g && n(1, l = g.i18n), "eta" in g && n(0, o = g.eta), "queue" in g && n(21, a = g.queue), "queue_position" in g && n(2, u = g.queue_position), "queue_size" in g && n(3, f = g.queue_size), "status" in g && n(4, c = g.status), "scroll_to_output" in g && n(22, h = g.scroll_to_output), "timer" in g && n(5, _ = g.timer), "show_progress" in g && n(6, d = g.show_progress), "message" in g && n(23, E = g.message), "progress" in g && n(7, w = g.progress), "variant" in g && n(8, N = g.variant), "loading_text" in g && n(9, b = g.loading_text), "absolute" in g && n(10, m = g.absolute), "translucent" in g && n(11, T = g.translucent), "border" in g && n(12, p = g.border), "autoscroll" in g && n(24, j = g.autoscroll), "$$scope" in g && n(28, s = g.$$scope); - }, e.$$.update = () => { - e.$$.dirty[0] & /*eta, old_eta, queue, timer_start*/ - 169869313 && (o === null ? n(0, o = Xe) : a && n(0, o = (performance.now() - Ae) / 1e3 + o), o != null && (n(19, yt = o.toFixed(1)), n(27, Xe = o))), e.$$.dirty[0] & /*eta, timer_diff*/ - 67108865 && n(17, bt = o === null || o <= 0 || !Y ? null : Math.min(Y / o, 1)), e.$$.dirty[0] & /*progress*/ - 128 && w != null && n(18, pt = !1), e.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ - 114816 && (w != null ? n(14, K = w.map((g) => { - if (g.index != null && g.length != null) - return g.index / g.length; - if (g.progress != null) - return g.progress; - })) : n(14, K = null), K ? (n(15, ge = K[K.length - 1]), q && (ge === 0 ? n(16, q.style.transition = "0", q) : n(16, q.style.transition = "150ms", q))) : n(15, ge = void 0)), e.$$.dirty[0] & /*status*/ - 16 && (c === "pending" ? Zn() : vt()), e.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ - 20979728 && X && h && (c === "pending" || c === "complete") && Hl(X, j), e.$$.dirty[0] & /*status, message*/ - 8388624, e.$$.dirty[0] & /*timer_diff*/ - 67108864 && n(20, r = Y.toFixed(1)); + return n.$$set = (b) => { + "i18n" in b && t(1, s = b.i18n), "eta" in b && t(0, o = b.eta), "queue" in b && t(21, r = b.queue), "queue_position" in b && t(2, a = b.queue_position), "queue_size" in b && t(3, _ = b.queue_size), "status" in b && t(4, u = b.status), "scroll_to_output" in b && t(22, c = b.scroll_to_output), "timer" in b && t(5, m = b.timer), "show_progress" in b && t(6, h = b.show_progress), "message" in b && t(23, L = b.message), "progress" in b && t(7, q = b.progress), "variant" in b && t(8, M = b.variant), "loading_text" in b && t(9, g = b.loading_text), "absolute" in b && t(10, d = b.absolute), "translucent" in b && t(11, C = b.translucent), "border" in b && t(12, w = b.border), "autoscroll" in b && t(24, be = b.autoscroll), "$$scope" in b && t(28, f = b.$$scope); + }, n.$$.update = () => { + n.$$.dirty[0] & /*eta, old_eta, queue, timer_start*/ + 169869313 && (o === null ? t(0, o = ge) : r && t(0, o = (performance.now() - oe) / 1e3 + o), o != null && (t(19, Se = o.toFixed(1)), t(27, ge = o))), n.$$.dirty[0] & /*eta, timer_diff*/ + 67108865 && t(17, qe = o === null || o <= 0 || !Y ? null : Math.min(Y / o, 1)), n.$$.dirty[0] & /*progress*/ + 128 && q != null && t(18, Fe = !1), n.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ + 114816 && (q != null ? t(14, U = q.map((b) => { + if (b.index != null && b.length != null) + return b.index / b.length; + if (b.progress != null) + return b.progress; + })) : t(14, U = null), U ? (t(15, ne = U[U.length - 1]), j && (ne === 0 ? t(16, j.style.transition = "0", j) : t(16, j.style.transition = "150ms", j))) : t(15, ne = void 0)), n.$$.dirty[0] & /*status*/ + 16 && (u === "pending" ? ht() : Me()), n.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ + 20979728 && te && c && (u === "pending" || u === "complete") && sn(te, be), n.$$.dirty[0] & /*status, message*/ + 8388624, n.$$.dirty[0] & /*timer_diff*/ + 67108864 && t(20, l = Y.toFixed(1)); }, [ o, - l, - u, - f, - c, + s, + a, _, - d, - w, - N, - b, + u, m, - T, - p, - X, - K, - ge, - q, - bt, - pt, - yt, - r, - a, h, - E, + q, + M, + g, + d, + C, + w, + te, + U, + ne, j, - Ae, + qe, + Fe, + Se, + l, + r, + c, + L, + be, + oe, Y, - Xe, - s, + ge, + f, i, - Wn, - Qn + wt, + pt ]; } -class Sl extends tl { - constructor(t) { - super(), ol( +class rn extends Pl { + constructor(e) { + super(), Rl( this, - t, - Bl, - Tl, - ul, + e, + on, + fn, + Yl, { i18n: 1, eta: 0, @@ -5123,351 +1997,368 @@ class Sl extends tl { ); } } -function zn(e, t, n) { - if (e == null) +new Intl.Collator(0, { numeric: 1 }).compare; +function gt(n, e, t) { + if (n == null) return null; - if (typeof e == "string") - return { - name: "file_data", - data: e - }; - if (Array.isArray(e)) { - const r = []; - for (const i of e) - i === null ? r.push(null) : r.push(zn(i, t, n)); - return r; - } else - e.is_file ? e.data = Pl(e.name, t, n) : e.is_stream && (n == null ? e.data = t + "/stream/" + e.name : e.data = "/proxy=" + n + "stream/" + e.name); - return e; + if (Array.isArray(n)) { + const l = []; + for (const i of n) + i == null ? l.push(null) : l.push(gt(i, e, t)); + return l; + } + return n.is_stream ? t == null ? new ye({ + ...n, + url: e + "/stream/" + n.path + }) : new ye({ + ...n, + url: "/proxy=" + t + "stream/" + n.path + }) : new ye({ + ...n, + url: _n(n.path, e, t) + }); } -function Al(e) { +function an(n) { try { - const t = new URL(e); - return t.protocol === "http:" || t.protocol === "https:"; + const e = new URL(n); + return e.protocol === "http:" || e.protocol === "https:"; } catch { return !1; } } -function Pl(e, t, n) { - return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : Al(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`; +function _n(n, e, t) { + return n == null ? t ? `/proxy=${t}file=` : `${e}/file=` : an(n) ? n : t ? `/proxy=${t}file=${n}` : `${e}/file=${n}`; +} +class ye { + constructor({ + path: e, + url: t, + orig_name: l, + size: i, + blob: f, + is_stream: s, + mime_type: o, + alt_text: r + }) { + this.path = e, this.url = t, this.orig_name = l, this.size = i, this.blob = t ? void 0 : f, this.is_stream = s, this.mime_type = o, this.alt_text = r; + } } -new Intl.Collator(0, { numeric: 1 }).compare; const { - SvelteComponent: Nl, - assign: Il, - attr: ee, - check_outros: ln, - create_component: He, - destroy_component: Be, - detach: Me, - element: Cl, - empty: Ll, - get_spread_object: Ol, - get_spread_update: Ml, - group_outros: on, - init: Rl, - insert: Re, - mount_component: Se, - noop: an, - safe_not_equal: Ul, - space: un, - src_url_equal: fn, - transition_in: D, - transition_out: G + SvelteComponent: cn, + assign: un, + attr: G, + check_outros: et, + create_component: ie, + destroy_component: fe, + detach: ue, + element: dn, + empty: mn, + get_spread_object: bn, + get_spread_update: gn, + group_outros: tt, + init: hn, + insert: de, + mount_component: se, + noop: lt, + safe_not_equal: wn, + space: nt, + src_url_equal: it, + transition_in: B, + transition_out: Z } = window.__gradio__svelte__internal; -function hn(e) { - let t, n; - const r = [ +function ft(n) { + let e, t; + const l = [ { autoscroll: ( /*gradio*/ - e[9].autoscroll + n[9].autoscroll ) }, { i18n: ( /*gradio*/ - e[9].i18n + n[9].i18n ) }, /*loading_status*/ - e[8] + n[8] ]; let i = {}; - for (let s = 0; s < r.length; s += 1) - i = Il(i, r[s]); - return t = new Sl({ props: i }), { + for (let f = 0; f < l.length; f += 1) + i = un(i, l[f]); + return e = new rn({ props: i }), { c() { - He(t.$$.fragment); + ie(e.$$.fragment); }, - m(s, l) { - Se(t, s, l), n = !0; + m(f, s) { + se(e, f, s), t = !0; }, - p(s, l) { - const o = l & /*gradio, loading_status*/ - 768 ? Ml(r, [ - l & /*gradio*/ + p(f, s) { + const o = s & /*gradio, loading_status*/ + 768 ? gn(l, [ + s & /*gradio*/ 512 && { autoscroll: ( /*gradio*/ - s[9].autoscroll + f[9].autoscroll ) }, - l & /*gradio*/ + s & /*gradio*/ 512 && { i18n: ( /*gradio*/ - s[9].i18n + f[9].i18n ) }, - l & /*loading_status*/ - 256 && Ol( + s & /*loading_status*/ + 256 && bn( /*loading_status*/ - s[8] + f[8] ) ]) : {}; - t.$set(o); + e.$set(o); }, - i(s) { - n || (D(t.$$.fragment, s), n = !0); + i(f) { + t || (B(e.$$.fragment, f), t = !0); }, - o(s) { - G(t.$$.fragment, s), n = !1; + o(f) { + Z(e.$$.fragment, f), t = !1; }, - d(s) { - Be(t, s); + d(f) { + fe(e, f); } }; } -function Dl(e) { - let t, n; - return t = new Xr({ +function pn(n) { + let e, t; + return e = new ml({ props: { unpadded_box: !0, size: "large", - $$slots: { default: [kl] }, - $$scope: { ctx: e } + $$slots: { default: [yn] }, + $$scope: { ctx: n } } }), { c() { - He(t.$$.fragment); + ie(e.$$.fragment); }, - m(r, i) { - Se(t, r, i), n = !0; + m(l, i) { + se(e, l, i), t = !0; }, - p(r, i) { - const s = {}; + p(l, i) { + const f = {}; i & /*$$scope*/ - 32768 && (s.$$scope = { dirty: i, ctx: r }), t.$set(s); + 32768 && (f.$$scope = { dirty: i, ctx: l }), e.$set(f); }, - i(r) { - n || (D(t.$$.fragment, r), n = !0); + i(l) { + t || (B(e.$$.fragment, l), t = !0); }, - o(r) { - G(t.$$.fragment, r), n = !1; + o(l) { + Z(e.$$.fragment, l), t = !1; }, - d(r) { - Be(t, r); + d(l) { + fe(e, l); } }; } -function Fl(e) { - let t, n, r, i; +function kn(n) { + let e, t, l, i; return { c() { - t = Cl("iframe"), fn(t.src, n = /*new_value*/ - e[10].data) || ee(t, "src", n), ee(t, "title", r = /*label*/ - e[11] ?? "Folium Map"), ee(t, "height", i = /*height*/ - e[0] + "px"), ee(t, "class", "svelte-1orump4"); - }, - m(s, l) { - Re(s, t, l); - }, - p(s, l) { - l & /*new_value*/ - 1024 && !fn(t.src, n = /*new_value*/ - s[10].data) && ee(t, "src", n), l & /*label*/ - 2048 && r !== (r = /*label*/ - s[11] ?? "Folium Map") && ee(t, "title", r), l & /*height*/ + e = dn("iframe"), it(e.src, t = /*new_value*/ + n[10].url) || G(e, "src", t), G(e, "title", l = /*label*/ + n[11] ?? "Folium Map"), G(e, "height", i = /*height*/ + n[0] + "px"), G(e, "class", "svelte-1orump4"); + }, + m(f, s) { + de(f, e, s); + }, + p(f, s) { + s & /*new_value*/ + 1024 && !it(e.src, t = /*new_value*/ + f[10].url) && G(e, "src", t), s & /*label*/ + 2048 && l !== (l = /*label*/ + f[11] ?? "Folium Map") && G(e, "title", l), s & /*height*/ 1 && i !== (i = /*height*/ - s[0] + "px") && ee(t, "height", i); + f[0] + "px") && G(e, "height", i); }, - i: an, - o: an, - d(s) { - s && Me(t); + i: lt, + o: lt, + d(f) { + f && ue(e); } }; } -function kl(e) { - let t, n; - return t = new dn({}), { +function yn(n) { + let e, t; + return e = new at({}), { c() { - He(t.$$.fragment); + ie(e.$$.fragment); }, - m(r, i) { - Se(t, r, i), n = !0; + m(l, i) { + se(e, l, i), t = !0; }, - i(r) { - n || (D(t.$$.fragment, r), n = !0); + i(l) { + t || (B(e.$$.fragment, l), t = !0); }, - o(r) { - G(t.$$.fragment, r), n = !1; + o(l) { + Z(e.$$.fragment, l), t = !1; }, - d(r) { - Be(t, r); + d(l) { + fe(e, l); } }; } -function Gl(e) { - let t, n, r, i, s, l, o, a = ( +function vn(n) { + let e, t, l, i, f, s, o, r = ( /*loading_status*/ - e[8] && hn(e) + n[8] && ft(n) ); - n = new Sr({ + t = new Wt({ props: { show_label: !0, - Icon: dn, + Icon: at, label: ( /*label*/ - e[11] || "Folium Map" + n[11] || "Folium Map" ) } }); - const u = [Fl, Dl], f = []; - function c(h, _) { + const a = [kn, pn], _ = []; + function u(c, m) { return ( /*value*/ - h[4] ? 0 : 1 + c[4] ? 0 : 1 ); } - return i = c(e), s = f[i] = u[i](e), { + return i = u(n), f = _[i] = a[i](n), { c() { - a && a.c(), t = un(), He(n.$$.fragment), r = un(), s.c(), l = Ll(); + r && r.c(), e = nt(), ie(t.$$.fragment), l = nt(), f.c(), s = mn(); }, - m(h, _) { - a && a.m(h, _), Re(h, t, _), Se(n, h, _), Re(h, r, _), f[i].m(h, _), Re(h, l, _), o = !0; + m(c, m) { + r && r.m(c, m), de(c, e, m), se(t, c, m), de(c, l, m), _[i].m(c, m), de(c, s, m), o = !0; }, - p(h, _) { + p(c, m) { /*loading_status*/ - h[8] ? a ? (a.p(h, _), _ & /*loading_status*/ - 256 && D(a, 1)) : (a = hn(h), a.c(), D(a, 1), a.m(t.parentNode, t)) : a && (on(), G(a, 1, 1, () => { - a = null; - }), ln()); - const d = {}; - _ & /*label*/ - 2048 && (d.label = /*label*/ - h[11] || "Folium Map"), n.$set(d); - let E = i; - i = c(h), i === E ? f[i].p(h, _) : (on(), G(f[E], 1, 1, () => { - f[E] = null; - }), ln(), s = f[i], s ? s.p(h, _) : (s = f[i] = u[i](h), s.c()), D(s, 1), s.m(l.parentNode, l)); - }, - i(h) { - o || (D(a), D(n.$$.fragment, h), D(s), o = !0); - }, - o(h) { - G(a), G(n.$$.fragment, h), G(s), o = !1; - }, - d(h) { - h && (Me(t), Me(r), Me(l)), a && a.d(h), Be(n, h), f[i].d(h); + c[8] ? r ? (r.p(c, m), m & /*loading_status*/ + 256 && B(r, 1)) : (r = ft(c), r.c(), B(r, 1), r.m(e.parentNode, e)) : r && (tt(), Z(r, 1, 1, () => { + r = null; + }), et()); + const h = {}; + m & /*label*/ + 2048 && (h.label = /*label*/ + c[11] || "Folium Map"), t.$set(h); + let L = i; + i = u(c), i === L ? _[i].p(c, m) : (tt(), Z(_[L], 1, 1, () => { + _[L] = null; + }), et(), f = _[i], f ? f.p(c, m) : (f = _[i] = a[i](c), f.c()), B(f, 1), f.m(s.parentNode, s)); + }, + i(c) { + o || (B(r), B(t.$$.fragment, c), B(f), o = !0); + }, + o(c) { + Z(r), Z(t.$$.fragment, c), Z(f), o = !1; + }, + d(c) { + c && (ue(e), ue(l), ue(s)), r && r.d(c), fe(t, c), _[i].d(c); } }; } -function Vl(e) { - let t, n; - return t = new hr({ +function Cn(n) { + let e, t; + return e = new Pt({ props: { visible: ( /*visible*/ - e[3] + n[3] ), elem_id: ( /*elem_id*/ - e[1] + n[1] ), elem_classes: ( /*elem_classes*/ - e[2] + n[2] ), container: ( /*container*/ - e[5] + n[5] ), scale: ( /*scale*/ - e[6] + n[6] ), min_width: ( /*min_width*/ - e[7] + n[7] ), - $$slots: { default: [Gl] }, - $$scope: { ctx: e } + $$slots: { default: [vn] }, + $$scope: { ctx: n } } }), { c() { - He(t.$$.fragment); + ie(e.$$.fragment); }, - m(r, i) { - Se(t, r, i), n = !0; + m(l, i) { + se(e, l, i), t = !0; }, - p(r, [i]) { - const s = {}; + p(l, [i]) { + const f = {}; i & /*visible*/ - 8 && (s.visible = /*visible*/ - r[3]), i & /*elem_id*/ - 2 && (s.elem_id = /*elem_id*/ - r[1]), i & /*elem_classes*/ - 4 && (s.elem_classes = /*elem_classes*/ - r[2]), i & /*container*/ - 32 && (s.container = /*container*/ - r[5]), i & /*scale*/ - 64 && (s.scale = /*scale*/ - r[6]), i & /*min_width*/ - 128 && (s.min_width = /*min_width*/ - r[7]), i & /*$$scope, new_value, label, height, value, gradio, loading_status*/ - 36625 && (s.$$scope = { dirty: i, ctx: r }), t.$set(s); + 8 && (f.visible = /*visible*/ + l[3]), i & /*elem_id*/ + 2 && (f.elem_id = /*elem_id*/ + l[1]), i & /*elem_classes*/ + 4 && (f.elem_classes = /*elem_classes*/ + l[2]), i & /*container*/ + 32 && (f.container = /*container*/ + l[5]), i & /*scale*/ + 64 && (f.scale = /*scale*/ + l[6]), i & /*min_width*/ + 128 && (f.min_width = /*min_width*/ + l[7]), i & /*$$scope, new_value, label, height, value, gradio, loading_status*/ + 36625 && (f.$$scope = { dirty: i, ctx: l }), e.$set(f); }, - i(r) { - n || (D(t.$$.fragment, r), n = !0); + i(l) { + t || (B(e.$$.fragment, l), t = !0); }, - o(r) { - G(t.$$.fragment, r), n = !1; + o(l) { + Z(e.$$.fragment, l), t = !1; }, - d(r) { - Be(t, r); + d(l) { + fe(e, l); } }; } -function cn(e, t) { - return e ?? t(); +function st(n, e) { + return n ?? e(); } -function jl(e, t, n) { - let r, { elem_id: i = "" } = t, { elem_classes: s = [] } = t, { visible: l = !0 } = t, { value: o } = t, { container: a = !0 } = t, { scale: u = null } = t, { min_width: f = void 0 } = t, { loading_status: c } = t, { root: h } = t, { root_url: _ } = t, { height: d = 500 } = t, { gradio: E } = t, w; - async function N() { - E.dispatch("change"); +function qn(n, e, t) { + let l, { elem_id: i = "" } = e, { elem_classes: f = [] } = e, { visible: s = !0 } = e, { value: o } = e, { container: r = !0 } = e, { scale: a = null } = e, { min_width: _ = void 0 } = e, { loading_status: u } = e, { root: c } = e, { root_url: m } = e, { height: h = 500 } = e, { gradio: L } = e, q; + async function M() { + L.dispatch("change"); } - return e.$$set = (b) => { - "elem_id" in b && n(1, i = b.elem_id), "elem_classes" in b && n(2, s = b.elem_classes), "visible" in b && n(3, l = b.visible), "value" in b && n(4, o = b.value), "container" in b && n(5, a = b.container), "scale" in b && n(6, u = b.scale), "min_width" in b && n(7, f = b.min_width), "loading_status" in b && n(8, c = b.loading_status), "root" in b && n(12, h = b.root), "root_url" in b && n(13, _ = b.root_url), "height" in b && n(0, d = b.height), "gradio" in b && n(9, E = b.gradio); - }, e.$$.update = () => { - e.$$.dirty & /*label*/ - 2048 && n(11, r = cn(r, () => "Folium Map")), e.$$.dirty & /*height*/ - 1 && n(0, d = cn(d, () => 500)), e.$$.dirty & /*value, root, root_url*/ - 12304 && n(10, w = { ...zn(o, h, _) }), e.$$.dirty & /*new_value*/ - 1024 && N(); + return n.$$set = (g) => { + "elem_id" in g && t(1, i = g.elem_id), "elem_classes" in g && t(2, f = g.elem_classes), "visible" in g && t(3, s = g.visible), "value" in g && t(4, o = g.value), "container" in g && t(5, r = g.container), "scale" in g && t(6, a = g.scale), "min_width" in g && t(7, _ = g.min_width), "loading_status" in g && t(8, u = g.loading_status), "root" in g && t(12, c = g.root), "root_url" in g && t(13, m = g.root_url), "height" in g && t(0, h = g.height), "gradio" in g && t(9, L = g.gradio); + }, n.$$.update = () => { + n.$$.dirty & /*label*/ + 2048 && t(11, l = st(l, () => "Folium Map")), n.$$.dirty & /*height*/ + 1 && t(0, h = st(h, () => 500)), n.$$.dirty & /*value, root, root_url*/ + 12304 && t(10, q = { ...gt(o, c, m) }), n.$$.dirty & /*new_value*/ + 1024 && M(); }, [ - d, + h, i, + f, s, - l, o, + r, a, + _, u, - f, + L, + q, + l, c, - E, - w, - r, - h, - _ + m ]; } -class Xl extends Nl { - constructor(t) { - super(), Rl(this, t, jl, Vl, Ul, { +class Fn extends cn { + constructor(e) { + super(), hn(this, e, qn, Cn, wn, { elem_id: 1, elem_classes: 2, visible: 3, @@ -5484,5 +2375,5 @@ class Xl extends Nl { } } export { - Xl as default + Fn as default };