import{S as Z,i as A,s as D,w as R,b as d,f as v,g as b,x as H,n as h,B as z,e as g,a as j,t as N,Y as S,h as E,C as K,d as C,P as O,c as L,m as M,j as k,k as p,o as B,F as Q,R as W,T as X,U as x,V as $,D as T,E as Y}from"./index.396f4a72.js";import{B as ee}from"./BlockLabel.37da86a3.js";function le(a){let e,n;return{c(){e=R("svg"),n=R("path"),d(n,"fill","currentColor"),d(n,"d","M4 2H2v26a2 2 0 0 0 2 2h26v-2H4v-3h22v-8H4v-4h14V5H4Zm20 17v4H4v-4ZM16 7v4H4V7Z"),d(e,"xmlns","http://www.w3.org/2000/svg"),d(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),d(e,"aria-hidden","true"),d(e,"role","img"),d(e,"class","iconify iconify--carbon"),d(e,"width","100%"),d(e,"height","100%"),d(e,"preserveAspectRatio","xMidYMid meet"),d(e,"viewBox","0 0 32 32")},m(l,t){v(l,e,t),b(e,n)},p:H,i:H,o:H,d(l){l&&h(e)}}}class G extends Z{constructor(e){super(),A(this,e,null,le,D,{})}}function q(a,e,n){const l=a.slice();return l[3]=e[n],l}function F(a){let e,n=a[0].confidences,l=[];for(let t=0;t{"value"in i&&n(0,l=i.value),"show_label"in i&&n(1,t=i.show_label),"color"in i&&n(2,o=i.color)},[l,t,o]}class oe extends Z{constructor(e){super(),A(this,e,ne,te,D,{value:0,show_label:1,color:2})}}function U(a){let e,n;return e=new ee({props:{Icon:G,label:a[4],disable:typeof a[5].container=="boolean"&&!a[5].container}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,t){const o={};t&16&&(o.label=l[4]),t&32&&(o.disable=typeof l[5].container=="boolean"&&!l[5].container),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function ie(a){let e,n,l,t;return l=new G({}),{c(){e=g("div"),n=g("div"),L(l.$$.fragment),d(n,"class","h-5 dark:text-white opacity-50"),d(e,"class","h-full min-h-[6rem] flex justify-center items-center")},m(o,i){v(o,e,i),b(e,n),M(l,n,null),t=!0},p:H,i(o){t||(k(l.$$.fragment,o),t=!0)},o(o){p(l.$$.fragment,o),t=!1},d(o){o&&h(e),B(l)}}}function ae(a){let e,n;return e=new oe({props:{value:a[3],show_label:a[7],color:a[2]}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,t){const o={};t&8&&(o.value=l[3]),t&128&&(o.show_label=l[7]),t&4&&(o.color=l[2]),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function se(a){let e,n,l,t,o,i,s;const c=[a[6]];let w={};for(let r=0;r{u=null}),Y());let V=t;t=y(r),t===V?f[t].p(r,m):(T(),p(f[V],1,1,()=>{f[V]=null}),Y(),o=f[t],o?o.p(r,m):(o=f[t]=_[t](r),o.c()),k(o,1),o.m(i.parentNode,i))},i(r){s||(k(e.$$.fragment,r),k(u),k(o),s=!0)},o(r){p(e.$$.fragment,r),p(u),p(o),s=!1},d(r){B(e,r),r&&h(n),u&&u.d(r),r&&h(l),f[t].d(r),r&&h(i)}}}function fe(a){let e,n;return e=new O({props:{test_id:"label",visible:a[1],elem_id:a[0],disable:typeof a[5].container=="boolean"&&!a[5].container,$$slots:{default:[se]},$$scope:{ctx:a}}}),{c(){L(e.$$.fragment)},m(l,t){M(e,l,t),n=!0},p(l,[t]){const o={};t&2&&(o.visible=l[1]),t&1&&(o.elem_id=l[0]),t&32&&(o.disable=typeof l[5].container=="boolean"&&!l[5].container),t&764&&(o.$$scope={dirty:t,ctx:l}),e.$set(o)},i(l){n||(k(e.$$.fragment,l),n=!0)},o(l){p(e.$$.fragment,l),n=!1},d(l){B(e,l)}}}function re(a,e,n){let{elem_id:l=""}=e,{visible:t=!0}=e,{color:o=void 0}=e,{value:i}=e,{label:s="Label"}=e,{style:c={}}=e,{loading_status:w}=e,{show_label:u}=e;const _=Q();return a.$$set=f=>{"elem_id"in f&&n(0,l=f.elem_id),"visible"in f&&n(1,t=f.visible),"color"in f&&n(2,o=f.color),"value"in f&&n(3,i=f.value),"label"in f&&n(4,s=f.label),"style"in f&&n(5,c=f.style),"loading_status"in f&&n(6,w=f.loading_status),"show_label"in f&&n(7,u=f.show_label)},a.$$.update=()=>{a.$$.dirty&8&&_("change")},[l,t,o,i,s,c,w,u]}class ce extends Z{constructor(e){super(),A(this,e,re,fe,D,{elem_id:0,visible:1,color:2,value:3,label:4,style:5,loading_status:6,show_label:7})}}var _e=ce;const be=["static"],me=a=>({type:"{ label: string; confidences?: Array<{ label: string; confidence: number }>",description:"output label and optional set of confidences per label"});export{_e as Component,me as document,be as modes}; //# sourceMappingURL=index.5cfaf6ac.js.map