PageSourceSearch

https://javiermasedaamil-tfg.hf.space/assets/Index-B5RXSuL_.js

js javiermasedaamil-tfg.hf.space collected 2026-10-03 16:59:11 UTC 53,783 bytes, 4 lines download raw bytes

1import{B as Ln}from"./Block-rEXcgPfT.js";import"./MarkdownCode.svelte_svelte_type_style_lang-DGVaFc0z.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-DAP8_Zsr.js";import{d as de}from"./index-CnqicUFC.js";import{a as Rn}from"./utils-BsGrhMNe.js";import{U as Bn}from"./Upload-DlIG0o6o.js";/* empty css                                                   */import{M as Dn}from"./MarkdownCode-D_vZ1wBe.js";import"./index-C3YFQtYK.js";import{d as Nn}from"./dsv-DB8NKgIY.js";import{S as Hn}from"./index-BX_THMbX.js";import"./StreamingBar.svelte_svelte_type_style_lang-CxOfZBE-.js";import{default as Pi}from"./Example-BT2jlY4j.js";import"./prism-python-CPCQ_rdc.js";/* empty css                                             */import"./svelte/svelte.js";import"./IconButton-DtUbToT-.js";import"./Clear-By3xiIwg.js";const{HtmlTag:Tn,SvelteComponent:On,action_destroyer:Pn,attr:Ee,binding_callbacks:Fn,bubble:nl,check_outros:Un,create_component:Jn,destroy_component:Wn,detach:lt,element:Fl,empty:In,flush:he,group_outros:jn,init:Kn,insert:nt,listen:tt,mount_component:Vn,noop:ft,prevent_default:Zn,run_all:Ul,safe_not_equal:Gn,set_data:Qn,set_input_value:sl,space:Xn,text:Yn,toggle_class:ct,transition_in:Bt,transition_out:Dt}=window.__gradio__svelte__internal,{createEventDispatcher:xn}=window.__gradio__svelte__internal;function il(n){let e,t,l;return{c(){e=Fl("input"),Ee(e,"role","textbox"),Ee(e,"tabindex","-1"),Ee(e,"class","svelte-z9gpua"),ct(e,"header",n[5])},m(s,a){nt(s,e,a),n[19](e),sl(e,n[11]),t||(l=[tt(e,"input",n[20]),tt(e,"blur",n[13]),Pn(n[12].call(null,e)),tt(e,"keydown",n[14])],t=!0)},p(s,a){a&2048&&e.value!==s[11]&&sl(e,s[11]),a&32&&ct(e,"header",s[5])},d(s){s&&lt(e),n[19](null),t=!1,Ul(l)}}}function $n(n){let e=(n[9]?n[0]:n[3]||n[0])+"",t;return{c(){t=Yn(e)},m(l,s){nt(l,t,s)},p(l,s){s&521&&e!==(e=(l[9]?l[0]:l[3]||l[0])+"")&&Qn(t,e)},i:ft,o:ft,d(l){l&&lt(t)}}}function es(n){let e,t;return e=new Dn({props:{message:n[0].toLocaleString(),latex_delimiters:n[7],line_breaks:n[8],chatbot:!1,root:n[10]}}),{c(){Jn(e.$$.fragment)},m(l,s){Vn(e,l,s),t=!0},p(l,s){const a={};s&1&&(a.message=l[0].toLocaleString()),s&128&&(a.latex_delimiters=l[7]),s&256&&(a.line_breaks=l[8]),s&1024&&(a.root=l[10]),e.$set(a)},i(l){t||(Bt(e.$$.fragment,l),t=!0)},o(l){Dt(e.$$.fragment,l),t=!1},d(l){Wn(e,l)}}}function ts(n){let e,t;return{c(){e=new Tn(!1),t=In(),e.a=t},m(l,s){e.m(n[0],l,s),nt(l,t,s)},p(l,s){s&1&&e.p(l[0])},i:ft,o:ft,d(l){l&&(lt(t),e.d())}}}function ls(n){let e,t,l,s,a,f,i,o=n[2]&&il(n);const d=[ts,es,$n],_=[];function h(g,w){return g[6]==="html"?0:g[6]==="markdown"?1:2}return l=h(n),s=_[l]=d[l](n),{c(){o&&o.c(),e=Xn(),t=Fl("span"),s.c(),Ee(t,"tabindex","-1"),Ee(t,"role","button"),Ee(t,"style",n[4]),Ee(t,"class","svelte-z9gpua"),ct(t,"edit",n[2])},m(g,w){o&&o.m(g,w),nt(g,e,w),nt(g,t,w),_[l].m(t,null),a=!0,f||(i=[tt(t,"dblclick",n[17]),tt(t,"focus",Zn(n[18]))],f=!0)},p(g,[w]){g[2]?o?o.p(g,w):(o=il(g),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null);let C=l;l=h(g),l===C?_[l].p(g,w):(jn(),Dt(_[C],1,1,()=>{_[C]=null}),Un(),s=_[l],s?s.p(g,w):(s=_[l]=d[l](g),s.c()),Bt(s,1),s.m(t,null)),(!a||w&16)&&Ee(t,"style",g[4]),(!a||w&4)&&ct(t,"edit",g[2])},i(g){a||(Bt(s),a=!0)},o(g){Dt(s),a=!1},d(g){g&&(lt(e),lt(t)),o&&o.d(g),_[l].d(),f=!1,Ul(i)}}}function ns(n,e,t){let l,{edit:s}=e,{value:a=""}=e,{display_value:f=null}=e,{styling:i=""}=e,{header:o=!1}=e,{datatype:d="str"}=e,{latex_delimiters:_}=e,{clear_on_focus:h=!1}=e,{select_on_focus:g=!1}=e,{line_breaks:w=!0}=e,{editable:C=!0}=e,{root:v}=e;const k=xn();let{el:M}=e;function H(p){return h&&t(11,l=""),g&&p.select(),p.focus(),{}}function q({currentTarget:p}){t(0,a=p.value),k("blur")}function R(p){p.key==="Enter"&&(t(0,a=l),k("blur")),k("keydown",p)}function N(p){nl.call(this,n,p)}function b(p){nl.call(this,n,p)}function S(p){Fn[p?"unshift":"push"](()=>{M=p,t(1,M)})}function O(){l=this.value,t(11,l),t(0,a)}return n.$$set=p=>{"edit"in p&&t(2,s=p.edit),"value"in p&&t(0,a=p.value),"display_value"in p&&t(3,f=p.display_value),"styling"in p&&t(4,i=p.styling),"header"in p&&t(5,o=p.header),"datatype"in p&&t(6,d=p.datatype),"latex_delimiters"in p&&t(7,_=p.latex_delimiters),"clear_on_focus"in p&&t(15,h=p.clear_on_focus),"select_on_focus"in p&&t(16,g=p.select_on_focus),"line_breaks"in p&&t(8,w=p.line_breaks),"editable"in p&&t(9,C=p.editable),"root"in p&&t(10,v=p.root),"el"in p&&t(1,M=p.el)},n.$$.update=()=>{n.$$.dirty&1&&t(11,l=a)},[a,M,s,f,i,o,d,_,w,C,v,l,H,q,R,h,g,N,b,S,O]}class At extends On{constructor(e){super(),Kn(this,e,ns,ls,Gn,{edit:2,value:0,display_value:3,styling:4,header:5,datatype:6,latex_delimiters:7,clear_on_focus:15,select_on_focus:16,line_breaks:8,editable:9,root:10,el:1})}get edit(){return this.$$.ctx[2]}set edit(e){this.$$set({edit:e}),he()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),he()}get display_value(){return this.$$.ctx[3]}set display_value(e){this.$$set({display_value:e}),he()}get styling(){return this.$$.ctx[4]}set styling(e){this.$$set({styling:e}),he()}get header(){return this.$$.ctx[5]}set header(e){this.$$set({header:e}),he()}get datatype(){return this.$$.ctx[6]}set datatype(e){this.$$set({datatype:e}),he()}get latex_delimiters(){return this.$$.ctx[7]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),he()}get clear_on_focus(){return this.$$.ctx[15]}set clear_on_focus(e){this.$$set({clear_on_focus:e}),he()}get select_on_focus(){return this.$$.ctx[16]}set select_on_focus(e){this.$$set({select_on_focus:e}),he()}get line_breaks(){return this.$$.ctx[8]}set line_breaks(e){this.$$set({line_breaks:e}),he()}get editable(){return this.$$.ctx[9]}set editable(e){this.$$set({editable:e}),he()}get root(){return this.$$.ctx[10]}set root(e){this.$$set({root:e}),he()}get el(){return this.$$.ctx[1]}set el(e){this.$$set({el:e}),he()}}const{ResizeObserverSingleton:ss,SvelteComponent:is,add_iframe_resize_listener:ol,add_render_callback:rl,append:je,attr:at,binding_callbacks:al,check_outros:Jl,create_slot:Nt,detach:St,element:$e,empty:Wl,ensure_array_like:_l,flush:Fe,get_all_dirty_from_scope:Ht,get_slot_changes:Tt,group_outros:Il,init:os,insert:Ct,listen:rs,outro_and_destroy_block:as,resize_observer_content_box:_s,safe_not_equal:us,set_style:be,space
1:ul,text:fs,transition_in:Ue,transition_out:Ve,update_keyed_each:cs,update_slot_base:Ot}=window.__gradio__svelte__internal,{onMount:hs,tick:_t}=window.__gradio__svelte__internal,ds=n=>({}),fl=n=>({});function cl(n,e,t){const l=n.slice();return l[36]=e[t],l}const gs=n=>({item:n[0]&256,index:n[0]&256}),hl=n=>({item:n[36].data,index:n[36].index}),ms=n=>({}),dl=n=>({});function gl(n){let e=[],t=new Map,l,s,a=_l(n[8]);const f=i=>i[36].data[0].id;for(let i=0;i<a.length;i+=1){let o=cl(n,a,i),d=f(o);t.set(d,e[i]=ml(d,o))}return{c(){for(let i=0;i<e.length;i+=1)e[i].c();l=Wl()},m(i,o){for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(i,o);Ct(i,l,o),s=!0},p(i,o){o[0]&1048832&&(a=_l(i[8]),Il(),e=cs(e,o,f,1,i,a,t,l.parentNode,as,ml,l,cl),Jl())},i(i){if(!s){for(let o=0;o<a.length;o+=1)Ue(e[o]);s=!0}},o(i){for(let o=0;o<e.length;o+=1)Ve(e[o]);s=!1},d(i){i&&St(l);for(let o=0;o<e.length;o+=1)e[o].d(i)}}}function bs(n){let e;return{c(){e=fs(`Missing Table Row
2					`)},m(t,l){Ct(t,e,l)},d(t){t&&St(e)}}}function ml(n,e){let t,l;const s=e[21].tbody,a=Nt(s,e,e[20],hl),f=a||bs();return{key:n,first:null,c(){t=Wl(),f&&f.c(),this.first=t},m(i,o){Ct(i,t,o),f&&f.m(i,o),l=!0},p(i,o){e=i,a&&a.p&&(!l||o[0]&1048832)&&Ot(a,s,e,e[20],l?Tt(s,e[20],o,gs):Ht(e[20]),hl)},i(i){l||(Ue(f,i),l=!0)},o(i){Ve(f,i),l=!1},d(i){i&&St(t),f&&f.d(i)}}}function ws(n){let e,t,l,s,a,f,i,o,d,_,h,g,w;const C=n[21].thead,v=Nt(C,n,n[20],dl);let k=n[8].length&&n[8][0].data.length&&gl(n);const M=n[21].tfoot,H=Nt(M,n,n[20],fl);return{c(){e=$e("svelte-virtual-table-viewport"),t=$e("table"),l=$e("thead"),v&&v.c(),a=ul(),f=$e("tbody"),k&&k.c(),i=ul(),o=$e("tfoot"),H&&H.c(),at(l,"class","thead svelte-1xyl3gk"),rl(()=>n[22].call(l)),at(f,"class","tbody svelte-1xyl3gk"),at(o,"class","tfoot svelte-1xyl3gk"),rl(()=>n[24].call(o)),at(t,"class","table svelte-1xyl3gk"),be(t,"height",ks),be(t,"--bw-svt-p-top",n[6]+"px"),be(t,"--bw-svt-p-bottom",n[2]+"px"),be(t,"--bw-svt-head-height",n[4]+"px"),be(t,"--bw-svt-foot-height",n[5]+"px"),be(t,"--bw-svt-avg-row-height",n[0]+"px")},m(q,R){Ct(q,e,R),je(e,t),je(t,l),v&&v.m(l,null),s=ol(l,n[22].bind(l)),je(t,a),je(t,f),k&&k.m(f,null),n[23](f),je(t,i),je(t,o),H&&H.m(o,null),d=ol(o,n[24].bind(o)),n[25](t),_=_s.observe(t,n[26].bind(t)),h=!0,g||(w=rs(t,"scroll",n[9]),g=!0)},p(q,R){v&&v.p&&(!h||R[0]&1048576)&&Ot(v,C,q,q[20],h?Tt(C,q[20],R,ms):Ht(q[20]),dl),q[8].length&&q[8][0].data.length?k?(k.p(q,R),R[0]&256&&Ue(k,1)):(k=gl(q),k.c(),Ue(k,1),k.m(f,null)):k&&(Il(),Ve(k,1,1,()=>{k=null}),Jl()),H&&H.p&&(!h||R[0]&1048576)&&Ot(H,M,q,q[20],h?Tt(M,q[20],R,ds):Ht(q[20]),fl),(!h||R[0]&64)&&be(t,"--bw-svt-p-top",q[6]+"px"),(!h||R[0]&4)&&be(t,"--bw-svt-p-bottom",q[2]+"px"),(!h||R[0]&16)&&be(t,"--bw-svt-head-height",q[4]+"px"),(!h||R[0]&32)&&be(t,"--bw-svt-foot-height",q[5]+"px"),(!h||R[0]&1)&&be(t,"--bw-svt-avg-row-height",q[0]+"px")},i(q){h||(Ue(v,q),Ue(k),Ue(H,q),h=!0)},o(q){Ve(v,q),Ve(k),Ve(H,q),h=!1},d(q){q&&St(e),v&&v.d(q),s(),k&&k.d(),n[23](null),H&&H.d(q),d(),n[25](null),_(),g=!1,w()}}}let ks="100%";function ps(n,e){if(!n)return 0;const t=getComputedStyle(n);return parseInt(t.getPropertyValue(e))}function vs(n,e,t){let l,{$$slots:s={},$$scope:a}=e,{items:f=[]}=e,{max_height:i}=e,{actual_height:o}=e,{table_scrollbar_width:d}=e,{start:_=0}=e,{end:h=20}=e,{selected:g}=e,w=30,C=0,v,k=0,M=0,H=[],q,R,N=0,b,S=200,O=[],p;const B=typeof window<"u",E=B?window.requestAnimationFrame:L=>L();let K=0;async function ee(L){if(S===0)return;const{scrollTop:Z}=b;t(13,d=b.offsetWidth-b.clientWidth),K=N-(Z-k);let Y=_;for(;K<i&&Y<L.length;){let U=R[Y-_];U||(t(11,h=Y+1),await _t(),U=R[Y-_]);let ie=U?.getBoundingClientRect().height;ie||(ie=w);const me=H[Y]=ie;K+=me,Y+=1}t(11,h=Y);const ge=L.length-h,se=b.offsetHeight-b.clientHeight;se>0&&(K+=se);let _e=H.filter(U=>typeof U=="number");t(0,w=_e.reduce((U,ie)=>U+ie,0)/_e.length),t(2,C=ge*w),H.length=L.length,await _t(),i?K<i?t(12,o=K+2):t(12,o=i):t(12,o=K+1),await _t()}async function J(L){E(async()=>{if(typeof L!="number")return;const Z=typeof L!="number"?!1:pe(L);Z!==!0&&(Z==="back"&&await T(L,{behavior:"instant"}),Z==="forwards"&&await T(L,{behavior:"instant"},!0))})}function pe(L){const Z=R&&R[L-_];if(!Z&&L<_)return"back";if(!Z&&L>=h-1)return"forwards";const{top:Y}=b.getBoundingClientRect(),{top:ge,bottom:se}=Z.getBoundingClientRect();return ge-Y<37?"back":se-Y>S?"forwards":!0}async function qe(L){const Z=b.scrollTop;R=v.children;const Y=l.length<_,ge=ps(R[1],"border-top-width"),se=0;Y&&await T(l.length-1,{behavior:"auto"});let _e=0;for(let G=0;G<R.length;G+=1)H[_+G]=R[G].getBoundingClientRect().height;let U=0,ie=k+ge/2,me=[];for(;
2U<l.length;){const G=H[U]||w;if(me[U]=G,ie+G+se>Z){_e=U,t(6,N=ie-(k+ge/2));break}ie+=G,U+=1}for(_e=Math.max(0,_e);U<l.length;){const G=H[U]||w;if(ie+=G,U+=1,ie>Z+S)break}t(10,_=_e),t(11,h=U);const Oe=l.length-h;h===0&&t(11,h=10),t(0,w=(ie-k)/h);let ot=Oe*w;for(;U<l.length;)U+=1,H[U]=w;t(2,C=ot),isFinite(C)||t(2,C=2e5)}async function T(L,Z,Y=!1){await _t();const ge=w;let se=L*ge;Y&&(se=se-S+ge+k);const _e=b.offsetHeight-b.clientHeight;_e>0&&(se+=_e);const U={top:se,behavior:"smooth",...Z};b.scrollTo(U)}hs(()=>{R=v.children,t(18,q=!0),ee(f)});function W(){k=this.offsetHeight,t(4,k)}function y(L){al[L?"unshift":"push"](()=>{v=L,t(3,v)})}function c(){M=this.offsetHeight,t(5,M)}function m(L){al[L?"unshift":"push"](()=>{b=L,t(7,b)})}function oe(){p=ss.entries.get(this)?.contentRect,t(1,p)}return n.$$set=L=>{"items"in L&&t(14,f=L.items),"max_height"in L&&t(15,i=L.max_height),"actual_height"in L&&t(12,o=L.actual_height),"table_scrollbar_width"in L&&t(13,d=L.table_scrollbar_width),"start"in L&&t(10,_=L.start),"end"in L&&t(11,h=L.end),"selected"in L&&t(16,g=L.selected),"$$scope"in L&&t(20,a=L.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&2&&(S=p?.height||200),n.$$.dirty[0]&16384&&t(19,l=f),n.$$.dirty[0]&786432&&q&&E(()=>ee(l)),n.$$.dirty[0]&65536&&J(g),n.$$.dirty[0]&560129&&t(8,O=B?l.slice(_,h).map((L,Z)=>({index:Z+_,data:L})):l.slice(0,i/l.length*w+1).map((L,Z)=>({index:Z+_,data:L})))},[w,p,C,v,k,M,N,b,O,qe,_,h,o,d,f,i,g,T,q,l,a,s,W,y,c,m,oe]}class ys extends is{constructor(e){super(),os(this,e,vs,ws,us,{items:14,max_height:15,actual_height:12,table_scrollbar_width:13,start:10,end:11,selected:16,scroll_to_index:17},null,[-1,-1])}get items(){return this.$$.ctx[14]}set items(e){this.$$set({items:e}),Fe()}get max_height(){return this.$$.ctx[15]}set max_height(e){this.$$set({max_height:e}),Fe()}get actual_height(){return this.$$.ctx[12]}set actual_height(e){this.$$set({actual_height:e}),Fe()}get table_scrollbar_width(){return this.$$.ctx[13]}set table_scrollbar_width(e){this.$$set({table_scrollbar_width:e}),Fe()}get start(){return this.$$.ctx[10]}set start(e){this.$$set({start:e}),Fe()}get end(){return this.$$.ctx[11]}set end(e){this.$$set({end:e}),Fe()}get selected(){return this.$$.ctx[16]}set selected(e){this.$$set({selected:e}),Fe()}get scroll_to_index(){return this.$$.ctx[17]}}const{SvelteComponent:As,append:Ss,attr:Ke,detach:Cs,flush:zs,init:qs,insert:Es,noop:bl,safe_not_equal:Ms,svg_element:wl}=window.__gradio__svelte__internal;function Ls(n){let e,t;return{c(){e=wl("svg"),t=wl("path"),Ke(t,"d","M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"),Ke(t,"transform",n[0]),Ke(e,"viewBox","0 0 24 24"),Ke(e,"width","16"),Ke(e,"height","16")},m(l,s){Es(l,e,s),Ss(e,t)},p(l,[s]){s&1&&Ke(t,"transform",l[0])},i:bl,o:bl,d(l){l&&Cs(e)}}}function Rs(n,e,t){let{transform:l}=e;return n.$$set=s=>{"transform"in s&&t(0,l=s.transform)},[l]}class ht extends As{constructor(e){super(),qs(this,e,Rs,Ls,Ms,{transform:0})}get transform(){return this.$$.ctx[0]}set transform(e){this.$$set({transform:e}),zs()}}const{SvelteComponent:Bs,append:ze,attr:st,binding_callbacks:Ds,check_outros:kl,create_component:dt,destroy_component:gt,detach:Je,element:it,flush:ve,group_outros:pl,init:Ns,insert:We,listen:mt,mount_component:bt,run_all:jl,safe_not_equal:Hs,set_data:wt,space:Ie,text:kt,transition_in:ye,transition_out:Me}=window.__gradio__svelte__internal,{onMount:Ts}=window.__gradio__svelte__internal;function vl(n){let e,t,l,s=n[4]("dataframe.add_row_above")+"",a,f,i,o,d,_=n[4]("dataframe.add_row_below")+"",h,g,w,C;return t=new ht({props:{transform:"rotate(-90 12 12)"}}),o=new ht({props:{transform:"rotate(90 12 12)"}}),{c(){e=it("button"),dt(t.$$.fragment),l=Ie(),a=kt(s),f=Ie(),i=it("button"),dt(o.$$.fragment),d=Ie(),h=kt(_),st(e,"class","svelte-1ygaf0d"),st(i,"class","svelte-1ygaf0d")},m(v,k){We(v,e,k),bt(t,e,null),ze(e,l),ze(e,a),We(v,f,k),We(v,i,k),bt(o,i,null),ze(i,d),ze(i,h),g=!0,w||(C=[mt(e,"click",n[14]),mt(i,"click",n[15])],w=!0)},p(v,k){(!g||k&16)&&s!==(s=v[4]("dataframe.add_row_above")+"")&&wt(a,s),(!g||k&16)&&_!==(_=v[4]("dataframe.add_row_below")+"")&&wt(h,_)},i(v){g||(ye(t.$$.fragment,v),ye(o.$$.fragment,v),g=!0)},o(v){Me(t.$$.fragment,v),Me(o.$$.fragment,v),g=!1},d(v){v&&(Je(e),Je(f),Je(i)),gt(t),gt(o),w=!1,jl(C)}}}function yl(n){let e,t,l,s=n[4]("dataframe.add_column_left")+"",a,f,i,o,d,_=n[4]("dataframe.add_column_right")+"",h,g,w,C;return t=new ht({props:{transform:"rotate(180 12 12)"}}),o=new ht({props:{transform:"rotate(0 12 12)"}}),{c(){e=it("button"),dt(t.$$.fragment),l=Ie(),a=kt(s),f=Ie(),i=it("button"),dt(o.$$.fragment),d=Ie(),h=kt(_),st(e,"class","svelte-1ygaf0d"),st(i,"class","svelte-1ygaf0d")},m(v,k){We(v,e,k),bt(t,e,null),ze(e,l),ze(e,a),We(v,f,k),We(v,i,k),bt(o,i,null),ze(i,d),ze(i,h),g=!0,w||(C=[mt(e,"click",n[16]),mt(i,"click",n[17])],w=!0)},p(v,k){(!g||k&16)&&s!==(s=v[4]("dataframe.add_column_left")+"")&&wt(a,s),(!g||k&16)&&_!==(_=v[4]("dataframe.add_column_right")+"")&&wt(h,_)},i(v){g||(ye(t.$$.fragment,v),ye(o.$$.fragment,v),g=!0)},o(v){Me(t.$$.fragment,v),Me(o.$$.fragment,v),g=!1},d(v){v&&(Je(e),Je(f),Je(i)),gt(t),gt(o),w=!1,jl(C)}}}function Os(n){let e,t,l,s=!n[8]&&n[7]&&vl(n),a=n[6]&&yl(n);
2return{c(){e=it("div"),s&&s.c(),t=Ie(),a&&a.c(),st(e,"class","cell-menu svelte-1ygaf0d")},m(f,i){We(f,e,i),s&&s.m(e,null),ze(e,t),a&&a.m(e,null),n[18](e),l=!0},p(f,[i]){!f[8]&&f[7]?s?(s.p(f,i),i&384&&ye(s,1)):(s=vl(f),s.c(),ye(s,1),s.m(e,t)):s&&(pl(),Me(s,1,1,()=>{s=null}),kl()),f[6]?a?(a.p(f,i),i&64&&ye(a,1)):(a=yl(f),a.c(),ye(a,1),a.m(e,null)):a&&(pl(),Me(a,1,1,()=>{a=null}),kl())},i(f){l||(ye(s),ye(a),l=!0)},o(f){Me(s),Me(a),l=!1},d(f){f&&Je(e),s&&s.d(),a&&a.d(),n[18](null)}}}function Ps(n,e,t){let l,s,a,{x:f}=e,{y:i}=e,{on_add_row_above:o}=e,{on_add_row_below:d}=e,{on_add_column_left:_}=e,{on_add_column_right:h}=e,{row:g}=e,{col_count:w}=e,{row_count:C}=e,{i18n:v}=e,k;Ts(()=>{M()});function M(){if(!k)return;const S=window.innerWidth,O=window.innerHeight,p=k.getBoundingClientRect();let B=f-30,E=i-20;B+p.width>S&&(B=f-p.width+10),E+p.height>O&&(E=i-p.height+10),t(5,k.style.left=`${B}px`,k),t(5,k.style.top=`${E}px`,k)}const H=()=>o(),q=()=>d(),R=()=>_(),N=()=>h();function b(S){Ds[S?"unshift":"push"](()=>{k=S,t(5,k)})}return n.$$set=S=>{"x"in S&&t(9,f=S.x),"y"in S&&t(10,i=S.y),"on_add_row_above"in S&&t(0,o=S.on_add_row_above),"on_add_row_below"in S&&t(1,d=S.on_add_row_below),"on_add_column_left"in S&&t(2,_=S.on_add_column_left),"on_add_column_right"in S&&t(3,h=S.on_add_column_right),"row"in S&&t(11,g=S.row),"col_count"in S&&t(12,w=S.col_count),"row_count"in S&&t(13,C=S.row_count),"i18n"in S&&t(4,v=S.i18n)},n.$$.update=()=>{n.$$.dirty&2048&&t(8,l=g===-1),n.$$.dirty&8192&&t(7,s=C[1]==="dynamic"),n.$$.dirty&4096&&t(6,a=w[1]==="dynamic")},[o,d,_,h,v,k,a,s,l,f,i,g,w,C,H,q,R,N,b]}class Kl extends Bs{constructor(e){super(),Ns(this,e,Ps,Os,Hs,{x:9,y:10,on_add_row_above:0,on_add_row_below:1,on_add_column_left:2,on_add_column_right:3,row:11,col_count:12,row_count:13,i18n:4})}get x(){return this.$$.ctx[9]}set x(e){this.$$set({x:e}),ve()}get y(){return this.$$.ctx[10]}set y(e){this.$$set({y:e}),ve()}get on_add_row_above(){return this.$$.ctx[0]}set on_add_row_above(e){this.$$set({on_add_row_above:e}),ve()}get on_add_row_below(){return this.$$.ctx[1]}set on_add_row_below(e){this.$$set({on_add_row_below:e}),ve()}get on_add_column_left(){return this.$$.ctx[2]}set on_add_column_left(e){this.$$set({on_add_column_left:e}),ve()}get on_add_column_right(){return this.$$.ctx[3]}set on_add_column_right(e){this.$$set({on_add_column_right:e}),ve()}get row(){return this.$$.ctx[11]}set row(e){this.$$set({row:e}),ve()}get col_count(){return this.$$.ctx[12]}set col_count(e){this.$$set({col_count:e}),ve()}get row_count(){return this.$$.ctx[13]}set row_count(e){this.$$set({row_count:e}),ve()}get i18n(){return this.$$.ctx[4]}set i18n(e){this.$$set({i18n:e}),ve()}}const{ResizeObserverSingleton:Fs,SvelteComponent:Us,action_destroyer:Js,add_flush_callback:Re,append:P,attr:z,bind:Be,binding_callbacks:ke,check_outros:Ze,create_component:Ne,destroy_component:He,detach:le,element:j,empty:Vl,ensure_array_like:Le,flush:X,globals:Ws,group_outros:Ge,init:Is,insert:ne,listen:we,mount_component:Te,outro_and_destroy_block:pt,resize_observer_content_box:js,run_all:It,safe_not_equal:Ks,set_data:jt,set_style:De,space:ae,svg_element:vt,text:Kt,toggle_class:I,transition_in:$,transition_out:te,update_keyed_each:yt}=window.__gradio__svelte__internal,{window:Rt}=Ws,{createEventDispatcher:Vs,tick:ut,onMount:Al}=window.__gradio__svelte__internal;function Sl(n,e,t){const l=n.slice();return l[111]=e[t].value,l[112]=e[t].id,l[115]=e,l[116]=t,l}function Cl(n,e,t){const l=n.slice();return l[111]=e[t].value,l[112]=e[t].id,l[113]=e,l[114]=t,l}function zl(n,e,t){const l=n.slice();return l[111]=e[t].value,l[112]=e[t].id,l[117]=e,l[114]=t,l}function ql(n,e,t){const l=n.slice();return l[111]=e[t].value,l[112]=e[t].id,l[116]=t,l}function El(n){let e,t;return{c(){e=j("p"),t=Kt(n[1]),z(e,"class","svelte-1pch949")},m(l,s){ne(l,e,s),P(e,t)},p(l,s){s[0]&2&&jt(t,l[1])},d(l){l&&le(e)}}}function Ml(n){let e,t;return{c(){e=j("caption"),t=Kt(n[1]),z(e,"class","sr-only")},m(l,s){ne(l,e,s),P(e,t)},p(l,s){s[0]&2&&jt(t,l[1])},d(l){l&&le(e)}}}function Ll(n,e){let t,l,s,a,f,i,o,d,_,h,g;return s=new At({props:{value:e[111],latex_delimiters:e[5],line_breaks:e[11],header:!0,edit:!1,el:null,root:e[8]}}),{key:n,first:null,c(){t=j("th"),l=j("div"),Ne(s.$$.fragment),a=ae(),f=j("div"),i=vt("svg"),o=vt("path"),_=ae(),z(o,"d","M4.49999 0L8.3971 6.75H0.602875L4.49999 0Z"),z(i,"width","1em"),z(i,"height","1em"),z(i,"viewBox","0 0 9 7"),z(i,"fill","none"),z(i,"xmlns","http://www.w3.org/2000/svg"),z(i,"class","svelte-1pch949"),z(f,"class",d="sort-button "+e[19]+" svelte-1pch949"),I(f,"sorted",e[20]===e[116]
2),I(f,"des",e[20]===e[116]&&e[19]==="des"),z(l,"class","cell-wrap svelte-1pch949"),z(t,"aria-sort",h=e[39](e[111],e[20],e[19])),z(t,"class","svelte-1pch949"),I(t,"editing",e[28]===e[116]),De(t,"width",e[12].length?e[12][e[116]]:void 0),this.first=t},m(w,C){ne(w,t,C),P(t,l),Te(s,l,null),P(l,a),P(l,f),P(f,i),P(i,o),P(t,_),g=!0},p(w,C){e=w;const v={};C[0]&67108864&&(v.value=e[111]),C[0]&32&&(v.latex_delimiters=e[5]),C[0]&2048&&(v.line_breaks=e[11]),C[0]&256&&(v.root=e[8]),s.$set(v),(!g||C[0]&524288&&d!==(d="sort-button "+e[19]+" svelte-1pch949"))&&z(f,"class",d),(!g||C[0]&68681728)&&I(f,"sorted",e[20]===e[116]),(!g||C[0]&68681728)&&I(f,"des",e[20]===e[116]&&e[19]==="des"),(!g||C[0]&68681728&&h!==(h=e[39](e[111],e[20],e[19])))&&z(t,"aria-sort",h),(!g||C[0]&335544320)&&I(t,"editing",e[28]===e[116]),C[0]&67112960&&De(t,"width",e[12].length?e[12][e[116]]:void 0)},i(w){g||($(s.$$.fragment,w),g=!0)},o(w){te(s.$$.fragment,w),g=!1},d(w){w&&le(t),He(s)}}}function Rl(n,e){let t,l,s,a,f=e[114],i;s=new At({props:{value:e[111],latex_delimiters:e[5],line_breaks:e[11],datatype:Array.isArray(e[0])?e[0][e[114]]:e[0],edit:!1,el:null,root:e[8]}});const o=()=>e[61](t,f),d=()=>e[61](null,f);return{key:n,first:null,c(){t=j("td"),l=j("div"),Ne(s.$$.fragment),a=ae(),z(l,"class","cell-wrap svelte-1pch949"),z(t,"tabindex","-1"),z(t,"class","svelte-1pch949"),this.first=t},m(_,h){ne(_,t,h),P(t,l),Te(s,l,null),P(t,a),o(),i=!0},p(_,h){e=_;const g={};h[1]&128&&(g.value=e[111]),h[0]&32&&(g.latex_delimiters=e[5]),h[0]&2048&&(g.line_breaks=e[11]),h[0]&1|h[1]&128&&(g.datatype=Array.isArray(e[0])?e[0][e[114]]:e[0]),h[0]&256&&(g.root=e[8]),s.$set(g),f!==e[114]&&(d(),f=e[114],o())},i(_){i||($(s.$$.fragment,_),i=!0)},o(_){te(s.$$.fragment,_),i=!1},d(_){_&&le(t),He(s),d()}}}function Bl(n){let e,t;return{c(){e=j("caption"),t=Kt(n[1]),z(e,"class","sr-only")},m(l,s){ne(l,e,s),P(e,t)},p(l,s){s[0]&2&&jt(t,l[1])},d(l){l&&le(e)}}}function Zs(n){let e,t=n[1]&&n[1].length!==0&&Bl(n);return{c(){t&&t.c(),e=Vl()},m(l,s){t&&t.m(l,s),ne(l,e,s)},p(l,s){l[1]&&l[1].length!==0?t?t.p(l,s):(t=Bl(l),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(l){l&&le(e),t&&t.d(l)}}}function Dl(n){let e,t,l;function s(...a){return n[75](n[116],...a)}return{c(){e=j("button"),e.textContent="⋮",z(e,"class","cell-menu-button svelte-1pch949")},m(a,f){ne(a,e,f),t||(l=we(e,"click",s),t=!0)},p(a,f){n=a},d(a){a&&le(e),t=!1,l()}}}function Nl(n,e){let t,l,s,a,f,i,o,d,_,h,g,w,C,v,k,M,H;function q(B){e[71](B,e[116])}function R(B){e[72](B,e[112])}function N(){return e[73](e[116])}let b={latex_delimiters:e[5],line_breaks:e[11],edit:e[28]===e[116],select_on_focus:e[29],header:!0,root:e[8]};e[26][e[116]].value!==void 0&&(b.value=e[26][e[116]].value),e[25][e[112]].input!==void 0&&(b.el=e[25][e[112]].input),a=new At({props:b}),ke.push(()=>Be(a,"value",q)),ke.push(()=>Be(a,"el",R)),a.$on("keydown",e[45]),a.$on("dblclick",N);function S(...B){return e[74](e[116],...B)}let O=e[6]&&Dl(e);function p(){return e[76](e[116])}return{key:n,first:null,c(){t=j("th"),l=j("div"),s=j("div"),Ne(a.$$.fragment),o=ae(),d=j("div"),_=vt("svg"),h=vt("path"),w=ae(),O&&O.c(),C=ae(),z(h,"d","M4.49999 0L8.3971 6.75H0.602875L4.49999 0Z"),z(_,"width","1em"),z(_,"height","1em"),z(_,"viewBox","0 0 9 7"),z(_,"fill","none"),z(_,"xmlns","http://www.w3.org/2000/svg"),z(_,"class","svelte-1pch949"),z(d,"class",g="sort-button "+e[19]+" svelte-1pch949"),I(d,"sorted",e[20]===e[116]),I(d,"des",e[20]===e[116]&&e[19]==="des"),z(s,"class","header-content svelte-1pch949"),z(l,"class","cell-wrap svelte-1pch949"),z(t,"aria-sort",v=e[39](e[111],e[20],e[19])),De(t,"width","var(--cell-width-"+e[116]+")"),z(t,"class","svelte-1pch949"),I(t,"focus",e[28]===e[116]||e[21]===e[116]),this.first=t},m(B,E){ne(B,t,E),P(t,l),P(l,s),Te(a,s,null),P(s,o),P(s,d),P(d,_),P(_,h),P(l,w),O&&O.m(l,null),P(t,C),k=!0,M||(H=[we(d,"click",S),we(t,"click",p)],M=!0)},p(B,E){e=B;const K={};E[0]&32&&(K.latex_delimiters=e[5]),E[0]&2048&&(K.line_breaks=e[11]),E[0]&335544320&&(K.edit=e[28]===e[116]),E[0]&536870912&&(K.select_on_focus=e[29]),E[0]&256&&(K.root=e[8]),!f&&E[0]&67108864&&(f=!0,K.value=e[26][e[116]].value,Re(()=>f=!1)),!i&&E[0]&100663296&&(i=!0,K.el=e[25][e[112]].input,Re(()=>i=!1)),a.$set(K),(!k||E[0]&524288&&g!==(g="sort-button "+e[19]+" svelte-1pch949"))&&z(d,"class",g),(!k||E[0]&68681728)&&I(d,"sorted",e[20]===e[116]
2),(!k||E[0]&68681728)&&I(d,"des",e[20]===e[116]&&e[19]==="des"),e[6]?O?O.p(e,E):(O=Dl(e),O.c(),O.m(l,null)):O&&(O.d(1),O=null),(!k||E[0]&68681728&&v!==(v=e[39](e[111],e[20],e[19])))&&z(t,"aria-sort",v),(!k||E[0]&67108864)&&De(t,"width","var(--cell-width-"+e[116]+")"),(!k||E[0]&337641472)&&I(t,"focus",e[28]===e[116]||e[21]===e[116])},i(B){k||($(a.$$.fragment,B),k=!0)},o(B){te(a.$$.fragment,B),k=!1},d(B){B&&le(t),He(a),O&&O.d(),M=!1,It(H)}}}function Gs(n){let e,t=[],l=new Map,s,a=Le(n[26]);const f=i=>i[112];for(let i=0;i<a.length;i+=1){let o=Sl(n,a,i),d=f(o);l.set(d,t[i]=Nl(d,o))}return{c(){e=j("tr");for(let i=0;i<t.length;i+=1)t[i].c();z(e,"slot","thead"),z(e,"class","svelte-1pch949")},m(i,o){ne(i,e,o);for(let d=0;d<t.length;d+=1)t[d]&&t[d].m(e,null);s=!0},p(i,o){o[0]&909642080|o[1]&10514688&&(a=Le(i[26]),Ge(),t=yt(t,o,f,1,i,a,l,e,pt,Nl,null,Sl),Ze())},i(i){if(!s){for(let o=0;o<a.length;o+=1)$(t[o]);s=!0}},o(i){for(let o=0;o<t.length;o+=1)te(t[o]);s=!1},d(i){i&&le(e);for(let o=0;o<t.length;o+=1)t[o].d()}}}function Hl(n){let e,t,l;function s(...a){return n[67](n[109],n[114],...a)}return{c(){e=j("button"),e.textContent="⋮",z(e,"class","cell-menu-button svelte-1pch949")},m(a,f){ne(a,e,f),t||(l=we(e,"click",s),t=!0)},p(a,f){n=a},d(a){a&&le(e),t=!1,l()}}}function Tl(n,e){let t,l,s,a,f,i,o,d,_=`var(--cell-width-${e[114]})`,h,g,w;function C(N){e[64](N,e[109],e[114])}function v(N){e[65](N,e[112])}let k={display_value:e[15]?.[e[109]]?.[e[114]],latex_delimiters:e[5],line_breaks:e[11],editable:e[6],edit:de(e[24],[e[109],e[114]]),datatype:Array.isArray(e[0])?e[0][e[114]]:e[0],clear_on_focus:e[27],root:e[8]};e[18][e[109]][e[114]].value!==void 0&&(k.value=e[18][e[109]][e[114]].value),e[25][e[112]].input!==void 0&&(k.el=e[25][e[112]].input),s=new At({props:k}),ke.push(()=>Be(s,"value",C)),ke.push(()=>Be(s,"el",v)),s.$on("blur",e[66]);let M=e[6]&&Hl(e);function H(){return e[68](e[109],e[114])}function q(){return e[69](e[109],e[114])}function R(){return e[70](e[109],e[114])}return{key:n,first:null,c(){t=j("td"),l=j("div"),Ne(s.$$.fragment),i=ae(),M&&M.c(),o=ae(),z(l,"class","cell-wrap svelte-1pch949"),z(t,"tabindex","0"),z(t,"style",d=e[16]?.[e[109]]?.[e[114]]||""),z(t,"class","svelte-1pch949"),I(t,"focus",de(e[17],[e[109],e[114]])),I(t,"menu-active",e[35]&&e[35].row===e[109]&&e[35].col===e[114]),De(t,"width",_),this.first=t},m(N,b){ne(N,t,b),P(t,l),Te(s,l,null),P(l,i),M&&M.m(l,null),P(t,o),h=!0,g||(w=[we(t,"touchstart",H,{passive:!0}),we(t,"click",q),we(t,"dblclick",R)],g=!0)},p(N,b){e=N;const S={};b[0]&32768|b[3]&196608&&(S.display_value=e[15]?.[e[109]]?.[e[114]]),b[0]&32&&(S.latex_delimiters=e[5]),b[0]&2048&&(S.line_breaks=e[11]),b[0]&64&&(S.editable=e[6]),b[0]&16777216|b[3]&196608&&(S.edit=de(e[24],[e[109],e[114]])),b[0]&1|b[3]&131072&&(S.datatype=Array.isArray(e[0])?e[0][e[114]]:e[0]),b[0]&134217728&&(S.clear_on_focus=e[27]),b[0]&256&&(S.root=e[8]),!a&&b[0]&262144|b[3]&196608&&(a=!0,S.value=e[18][e[109]][e[114]].value,Re(()=>a=!1)),!f&&b[0]&33554432|b[3]&131072&&(f=!0,S.el=e[25][e[112]].input,Re(()=>f=!1)),s.$set(S),e[6]?M?M.p(e,b):(M=Hl(e),M.c(),M.m(l,null)):M&&(M.d(1),M=null),(!h||b[0]&65536|b[3]&196608&&d!==(d=e[16]?.[e[109]]?.[e[114]]||""))&&z(t,"style",d),(!h||b[0]&131072|b[3]&196608)&&I(t,"focus",de(e[17],[e[109],e[114]])),(!h||b[1]&16|b[3]&196608)&&I(t,"menu-active",e[35]&&e[35].row===e[109]&&e[35].col===e[114]);const O=b[0]&65536|b[3]&196608;(b[0]&65536|b[3]&196608&&_!==(_=`var(--cell-width-${e[114]})`)||O)&&De(t,"width",_)},i(N){h||($(s.$$.fragment,N),h=!0)},o(N){te(s.$$.fragment,N),h=!1},d(N){N&&le(t),He(s),M&&M.d(),g=!1,It(w)}}}function Qs(n){let e,t=[],l=new Map,s,a=Le(n[110]);const f=i=>i[112];for(let i=0;i<a.length;i+=1){let o=Cl(n,a,i),d=f(o);l.set(d,t[i]=Tl(d,o))}return{c(){e=j("tr");for(let i=0;i<t.length;i+=1)t[i].c();z(e,"slot","tbody"),z(e,"class","svelte-1pch949"),I(e,"row_odd",n[109]%2===0)},m(i,o){ne(i,e,o);for(let d=0;d<t.length;d+=1)t[d]&&t[d].m(e,null);s=!0},p(i,o){o[0]&185043297|o[1]&4459025|o[3]&196608&&(a=Le(i[110]),Ge(),t=yt(t,o,f,1,i,a,l,e,pt,Tl,null,Cl),Ze()),(!s||o[3]&65536)&&I(e,"row_odd",i[109]%2===0)},i(i){if(!s){for(let o=0;o<a.length;o+=1)$(t[o]);s=!0}},o(i){for(let o=0;o<t.length;o+=1)te(t[o]);s=!1},d(i){i&&le(e);for(let o=0;o<t.length;o+=1)t[o].d()}}}function Xs(n){let e,t,l,s,a;function f(_){n[77](_)}function i(_){n[78](_)}function o(_){n[79](_)}let d={max_height:n[10],selected:n[37],$$slots:{tbody:[Qs,({index:_,item:h})=>({109:_,110:h}),({index:_,item:h})=>[0,0,0,(_?65536:0)|(h?131072:0)]],thead:[Gs],default:[Zs]},$$scope:{ctx:n}};return n[18]!==void 0&&(d.items=n[18]),n[33]!==void 0&&(d.actual_height=n[33]),n[34]!==void 0&&(d.table_scrollbar_width=n[34]),e=new ys({props:d}),ke.push(()=>Be(e,"items",f)),ke.push(()=>Be(e,"actual_height",i)),ke.push(()=>Be(e,"table_scrollbar_width",o)),{c(){Ne(e.$$.fragment)},m(_,h){Te(e,_,h),a=!0},p(_,h){const g={};h[0]&1024&&(g.max_height=_[10]),h[1]&64&&(g.selected=_[37]),h[0]&1061128547|h[1]&17|h[3]&67305472&&(g.$$scope={dirty:h,ctx:_}),!t&&h[0]&262144&&(t=!0,g.items=_[18],Re(()=>t=!1)),!l&&h[1]&4&&(l=!0,g.actual_height=_[33],Re(()=>l=!1)),!s&&h[1]&8&&(s=!0,g.table_scrollbar_width=_[34],Re(()=>s=!1)),e.$set(g)},i(_){a||($(e.$$.fragment,_),a=!0)},o(_){te(e.$$.fragment,_),a=!1},d(_){He(e,_)}}}function Ol(n){let e,t;return e=new Kl({props:{i18n:n[9],x:n[35].x,y:n[35].y,row:n[35]?.row??-1,col_count:n[3],row_count:n[4],on_add_row_above:n[84],on_add_row_below:n[85],on_add_column_left:n[86],on_add_column_right:n[87]}}
2),{c(){Ne(e.$$.fragment)},m(l,s){Te(e,l,s),t=!0},p(l,s){const a={};s[0]&512&&(a.i18n=l[9]),s[1]&16&&(a.x=l[35].x),s[1]&16&&(a.y=l[35].y),s[1]&16&&(a.row=l[35]?.row??-1),s[0]&8&&(a.col_count=l[3]),s[0]&16&&(a.row_count=l[4]),s[1]&16&&(a.on_add_row_above=l[84]),s[1]&16&&(a.on_add_row_below=l[85]),s[1]&16&&(a.on_add_column_left=l[86]),s[1]&16&&(a.on_add_column_right=l[87]),e.$set(a)},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){te(e.$$.fragment,l),t=!1},d(l){He(e,l)}}}function Pl(n){let e,t;return e=new Kl({props:{i18n:n[9],x:n[36].x,y:n[36].y,row:-1,col_count:n[3],row_count:n[4],on_add_row_above:n[88],on_add_row_below:n[89],on_add_column_left:n[90],on_add_column_right:n[91]}}),{c(){Ne(e.$$.fragment)},m(l,s){Te(e,l,s),t=!0},p(l,s){const a={};s[0]&512&&(a.i18n=l[9]),s[1]&32&&(a.x=l[36].x),s[1]&32&&(a.y=l[36].y),s[0]&8&&(a.col_count=l[3]),s[0]&16&&(a.row_count=l[4]),s[1]&16&&(a.on_add_row_above=l[88]),s[1]&16&&(a.on_add_row_below=l[89]),s[1]&32&&(a.on_add_column_left=l[90]),s[1]&32&&(a.on_add_column_right=l[91]),e.$set(a)},i(l){t||($(e.$$.fragment,l),t=!0)},o(l){te(e.$$.fragment,l),t=!1},d(l){He(e,l)}}}function Ys(n){let e,t,l,s,a,f,i,o=[],d=new Map,_,h,g,w=[],C=new Map,v,k,M,H,q,R,N,b,S,O,p=n[1]&&n[1].length!==0&&n[2]&&El(n),B=n[1]&&n[1].length!==0&&Ml(n),E=Le(n[26]);const K=y=>y[112];for(let y=0;y<E.length;y+=1){let c=ql(n,E,y),m=K(c);d.set(m,o[y]=Ll(m,c))}let ee=Le(n[38]);const J=y=>y[112];for(let y=0;y<ee.length;y+=1){let c=zl(n,ee,y),m=J(c);C.set(m,w[y]=Rl(m,c))}function pe(y){n[80](y)}let qe={upload:n[13],stream_handler:n[14],flex:!1,center:!1,boundedheight:!1,disable_click:!0,root:n[8],$$slots:{default:[Xs]},$$scope:{ctx:n}};n[30]!==void 0&&(qe.dragging=n[30]),M=new Bn({props:qe}),ke.push(()=>Be(M,"dragging",pe)),M.$on("load",n[81]);let T=n[35]!==null&&Ol(n),W=n[36]!==null&&Pl(n);return{c(){e=j("div"),p&&p.c(),t=ae(),l=j("div"),s=j("table"),B&&B.c(),a=ae(),f=j("thead"),i=j("tr");for(let y=0;y<o.length;y+=1)o[y].c();_=ae(),h=j("tbody"),g=j("tr");for(let y=0;y<w.length;y+=1)w[y].c();k=ae(),Ne(M.$$.fragment),q=ae(),T&&T.c(),R=ae(),W&&W.c(),N=Vl(),z(i,"class","svelte-1pch949"),z(f,"class","svelte-1pch949"),z(g,"class","svelte-1pch949"),z(s,"class","svelte-1pch949"),I(s,"fixed-layout",n[12].length!=0),z(l,"class","table-wrap svelte-1pch949"),De(l,"height",n[33]+"px"),z(l,"role","grid"),z(l,"tabindex","0"),I(l,"dragging",n[30]),I(l,"no-wrap",!n[7]),z(e,"class","svelte-1pch949"),I(e,"label",n[1]&&n[1].length!==0)},m(y,c){ne(y,e,c),p&&p.m(e,null),P(e,t),P(e,l),P(l,s),B&&B.m(s,null),P(s,a),P(s,f),P(f,i);for(let m=0;m<o.length;m+=1)o[m]&&o[m].m(i,null);P(s,_),P(s,h),P(h,g);for(let m=0;m<w.length;m+=1)w[m]&&w[m].m(g,null);v=js.observe(s,n[62].bind(s)),n[63](s),P(l,k),Te(M,l,null),n[82](l),ne(y,q,c),T&&T.m(y,c),ne(y,R,c),W&&W.m(y,c),ne(y,N,c),b=!0,S||(O=[we(Rt,"click",n[46]),we(Rt,"touchstart",n[46]),we(Rt,"resize",n[60]),we(l,"keydown",n[83]),Js(Rn.call(null,e))],S=!0)},p(y,c){y[1]&&y[1].length!==0&&y[2]?p?p.p(y,c):(p=El(y),p.c(),p.m(e,t)):p&&(p.d(1),p=null),y[1]&&y[1].length!==0?B?B.p(y,c):(B=Ml(y),B.c(),B.m(s,a)):B&&(B.d(1),B=null),c[0]&337123616|c[1]&256&&(E=Le(y[26]),Ge(),o=yt(o,c,K,1,y,E,d,i,pt,Ll,null,ql),Ze()),c[0]&4196641|c[1]&128&&(ee=Le(y[38]),Ge(),w=yt(w,c,J,1,y,ee,C,g,pt,Rl,null,zl),Ze()),(!b||c[0]&4096)&&I(s,"fixed-layout",y[12].length!=0);const m={};c[0]&8192&&(m.upload=y[13]),c[0]&16384&&(m.stream_handler=y[14]),c[0]&256&&(m.root=y[8]),c[0]&1061129571|c[1]&93|c[3]&67108864&&(m.$$scope={dirty:c,ctx:y}),!H&&c[0]&1073741824&&(H=!0,m.dragging=y[30],Re(()=>H=!1)),M.$set(m),(!b||c[1]&4)&&De(l,"height",y[33]+"px"),(!b||c[0]&1073741824)&&I(l,"dragging",y[30]),(!b||c[0]&128)&&I(l,"no-wrap",!y[7]),(!b||c[0]&2)&&I(e,"label",y[1]&&y[1].length!==0),y[35]!==null?T?(T.p(y,c),c[1]&16&&$(T,1)):(T=Ol(y),T.c(),$(T,1),T.m(R.parentNode,R)):T&&(Ge(),te(T,1,1,()=>{T=null}),Ze()),y[36]!==null?W?(W.p(y,c),c[1]&32&&$(W,1)):(W=Pl(y),W.c(),$(W,1),W.m(N.parentNode,N)):W&&(Ge(),te(W,1,1,()=>{W=null}),Ze())},i(y){if(!b){for(let c=0;c<E.length;c+=1)$(o[c]);for(let c=0;c<ee.length;c+=1)$(w[c]);$(M.$$.fragment,y),$(T),$(W),b=!0}},o(y){for(let c=0;c<o.length;c+=1)te(o[c]);for(let c=0;c<w.length;c+=1)te(w[c]);te(M.$$.fragment,y),te(T),te(W),b=!1},d(y){y&&(le(e),le(q),le(R),le(N)),p&&p.d(),B&&B.d();for(let c=0;c<o.length;c+=1)o[c].d();for(let c=0;c<w.length;c+=1)w[c].d();v(),n[63](null),He(M),n[82](null),T&&T.d(y),W&&W.d(y),S=!1,It(O)}}}function et(){return Math.random().toString(36).substring(2,15)}function xs(n,e){return e.filter(t);function t(l){var s=-1;return n.split(`
3`).every(a);function a(f){if(!f)return!0;var i=f.split(l).length;return s<0&&(s=i),s===i&&i>1}}}function $s(n){const e=atob(n.split(",")[1]),t=n.split(",")[0].split(":")[1].split(";")[0],l=new ArrayBuffer(e.length),s=new Uint8Array(l);for(let a=0;a<e.length;a++)s[a]=e.charCodeAt(a);return new Blob([l],{type:t})}function ei(n){let e=n[0].slice();for(let t=0;t<n.length;t++)for(let l=0;l<n[t].length;l++)`${e[l].value}`.length<`${n[t][l].value}`.length&&(e[l]=n[t][l]);return e}function ti(n,e,t){let l,s,{datatype:a}=e,{label:f=null}=e,{show_label:i=!0}=e,{headers:o=[]}=e,{values:d=[]}=e,{col_count:_}=e,{row_count:h}=e,{latex_delimiters:g}=e,{editable:w=!0}=e,{wrap:C=!1}=e,{root:v}=e,{i18n:k}=e,{max_height:M=500}=e,{line_breaks:H=!0}=e,{column_widths:q=[]}=e,{upload:R}=e,{stream_handler:N}=e,b=!1,{display_value:S=null}=e,{styling:O=null}=e,p;const B=Vs();let E=!1;const K=(r,u)=>c?.[r]?.[u]?.value;let ee=null,J={};function pe(r){let u=r||[];if(_[1]==="fixed"&&u.length<_[0]){const A=Array(_[0]-u.length).fill("").map((D,F)=>`${F+u.length}`);u=u.concat(A)}return!u||u.length===0?Array(_[0]).fill(0).map((A,D)=>{const F=et();return t(25,J[F]={cell:null,input:null},J),{id:F,value:JSON.stringify(D+1)}}):u.map((A,D)=>{const F=et();return t(25,J[F]={cell:null,input:null},J),{id:F,value:A??""}})}function qe(r){const u=r.length;return Array(h[1]==="fixed"||u<h[0]?h[0]:u).fill(0).map((A,D)=>Array(_[1]==="fixed"?_[0]:u>0?r[0].length:o.length).fill(0).map((F,re)=>{const ce=et();return t(25,J[ce]=J[ce]||{input:null,cell:null},J),{value:r?.[D]?.[re]??"",id:ce}}))}let T=pe(o),W;function y(){t(26,T=pe(o)),t(58,W=o.slice()),oe()}let c=[[]],m;async function oe(){B("change",{data:c.map(r=>r.map(({value:u})=>u)),headers:T.map(r=>r.value),metadata:w?null:{display_value:S,styling:O}})}function L(r,u,A){if(!u)return"none";if(o[u]===r){if(A==="asc")return"ascending";if(A==="des")return"descending"}return"none"}function Z(r){return c.reduce((u,A,D)=>{const F=A.reduce((re,ce,Pe)=>r===ce.id?Pe:re,-1);return F===-1?u:[D,F]},[-1,-1])}async function Y(r,u){!w||de(E,[r,u])||t(24,E=[r,u])}function ge(r,u){const A={ArrowRight:[0,1],ArrowLeft:[0,-1],ArrowDown:[1,0],ArrowUp:[-1,0]}[r],D=u[0]+A[0],F=u[1]+A[1];if(D<0&&F<=0)t(21,Q=F),t(17,b=!1);else{const re=c[D]?.[F];t(17,b=re?[D,F]:b)}}let se=!1;async function _e(r){if(Q!==!1&&G===!1)switch(r.key){case"ArrowDown":t
3(17,b=[0,Q]),t(21,Q=!1);return;case"ArrowLeft":t(21,Q=Q>0?Q-1:Q);return;case"ArrowRight":t(21,Q=Q<T.length-1?Q+1:Q);return;case"Escape":r.preventDefault(),t(21,Q=!1);break;case"Enter":r.preventDefault();break}if(!b)return;const[u,A]=b;switch(r.key){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":if(E)break;r.preventDefault(),ge(r.key,[u,A]);break;case"Escape":if(!w)break;r.preventDefault(),t(24,E=!1);break;case"Enter":if(!w)break;if(r.preventDefault(),r.shiftKey)Zt(u),await ut(),t(17,b=[u+1,A]);else if(de(E,[u,A])){const ce=c[u][A].id,Pe=J[ce].input;Pe&&t(18,c[u][A].value=Pe.value,c),t(24,E=!1),await ut(),t(17,b=[u,A])}else t(24,E=[u,A]);break;case"Backspace":if(!w)break;E||(r.preventDefault(),t(18,c[u][A].value="",c));break;case"Delete":if(!w)break;E||(r.preventDefault(),t(18,c[u][A].value="",c));break;case"Tab":let D=r.shiftKey?-1:1,F=c[u][A+D],re=c?.[u+D]?.[D>0?0:T.length-1];(F||re)&&(r.preventDefault(),t(17,b=F?[u,A+D]:[u+D,D>0?0:T.length-1])),t(24,E=!1);break;default:if(!w)break;(!E||E&&de(E,[u,A]))&&r.key.length===1&&(t(27,se=!0),t(24,E=[u,A]))}}let U=null;async function ie(r,u){U&&U.row===r&&U.col===u?U=null:U={row:r,col:u},!de(E,[r,u])&&(t(28,G=!1),t(21,Q=!1),t(24,E=!1),de(b,[r,u])||(t(17,b=[r,u]),await ut(),ue.focus()))}let me,Oe;function ot(r){typeof Oe!="number"||Oe!==r?(t(19,me="asc"),t(20,Oe=r)):me==="asc"?t(19,me="des"):me==="des"&&t(19,me="asc")}let G,Vt=!1,Q=!1;async function zt(r,u=!1){!w||_[1]!=="dynamic"||G===r||(t(17,b=!1),t(21,Q=r),t(28,G=r),t(29,Vt=u))}function Zl(r){if(w)switch(r.detail.key){case"Escape":case"Enter":case"Tab":r.preventDefault(),t(17,b=!1),t(21,Q=G),t(28,G=!1),ue.focus();break}}async function Zt(r){if(ue.focus(),h[1]!=="dynamic")return;if(c.length===0){t(56,d=[Array(o.length).fill("")]);return}const u=Array(c[0].length).fill(0).map((A,D)=>{const F=et();return t(25,J[F]={cell:null,input:null},J),{id:F,value:""}});r!==void 0&&r>=0&&r<=c.length?c.splice(r,0,u):c.push(u),t(18,c),t(56,d),t(59,m),t(17,b=[r!==void 0?r:c.length-1,0])}async function Gl(r){if(ue.focus(),_[1]!=="dynamic")return;const u=r!==void 0?r:c[0].length;for(let A=0;A<c.length;A++){const D=et();t(25,J[D]={cell:null,input:null},J),c[A].splice(u,0,{id:D,value:""})}o.splice(u,0,`Header ${o.length+1}`),t(18,c),t(56,d),t(59,m),t(55,o),await ut(),requestAnimationFrame(()=>{zt(u,!0);const A=ue.querySelectorAll("tbody")[1].offsetWidth;ue.querySelectorAll("table")[1].scrollTo({left:A})})}function qt(r){(x&&!r.target.closest(".cell-menu")||fe&&!r.target.closest(".cell-menu"))&&(t(35,x=null),t(36,fe=null)),r.stopImmediatePropagation();const[u]=r.composedPath();ue.contains(u)||(t(24,E=!1),t(28,G=!1),t(21,Q=!1),Xl(),U=null,t(35,x=null),t(36,fe=null))}function Gt(r){const u=new FileReader;function A(D){if(!D?.target?.result||typeof D.target.result!="string")return;const[F]=xs(D.target.result,[",","	"]),[re,...ce]=Nn(F).parseRows(D.target.result);t(26,T=pe(_[1]==="fixed"?re.slice(0,_[0]):re)),t(56,d=ce),u.removeEventListener("loadend",A)}u.addEventListener("loadend",A),u.readAsText(r)}let Et=!1,Qe=[],ue,Mt;function Xe(){const r=Qe.map((u,A)=>u?.clientWidth||0);if(r.length!==0)for(let u=0;u<r.length;u++)ue.style.setProperty(`--cell-width-${u}`,`${r[u]-rt/r.length}px`)}let Lt=d.slice(0,M/d.length*37).length*37+37,rt=0;function Ql(r,u,A,D,F){let re=null;if(b&&b[0]in c&&b[1]in c[b[0]]&&(re=c[b[0]][b[1]].id),typeof D!="number"||!F)return;const ce=[...Array(r.length).keys()];if(F==="asc")ce.sort((Se,Ce)=>r[Se][D].value<r[Ce][D].value?-1:1);else if(F==="des")ce.sort((Se,Ce)=>r[Se][D].value>r[Ce][D].value?-1:1);else return;const Pe=[...r],tl=u?[...u]:null,ll=A?[...A]:null;if(ce.forEach((Se,Ce)=>{r[Ce]=Pe[Se],u&&tl&&(u[Ce]=tl[Se]),A&&ll&&(A[Ce]=ll[Se])}),t(18,c),t(56,d),t(59,m),re){const[Se,Ce]=Z(re);t(17,b=[Se,Ce])}}let Qt=!1;Al(()=>{const r=new IntersectionObserver((u,A)=>{u.forEach(D=>{D.isIntersecting&&!Qt&&(Xe(),t(18,c),t(56,d),t(59,m)),Qt=D.isIntersecting})});return r.observe(ue),()=>{r.disconnect()}});let x=null;function Xt(r,u,A){if(r.stopPropagation(),x&&x.row===u&&x.col===A)t(35,x=null);else{const D=r.target.closest("td");if(D){const F=D.getBoundingClientRect();t(35,x={row:u,col:A,x:F.right,y:F.bottom})}}}function Ye(r,u){const A=u==="above"?r:r+1;Zt(A),t(35,x=null),t(36,fe=null)}function xe(r,u){const A=u==="left"?r:r+1;Gl(A),t(35,x=null),t(36,fe=null)}function Yt(){t(35,x=null),t(36,fe=null),Xe()}Al(()=>(document.addEventListener("click",qt),window.addEventListener("resize",Yt),()=>{document.removeEventListener("click",qt),window.removeEventListener("resize",Yt)}));let Ae=null;function xt(r){Ae?.type==="header"&&Ae.col===r?Ae=null:Ae={type:"header",col:r}}function $t(r,u){Ae?.type==="cell"&&Ae.row===r&&Ae.col===u?Ae=null:Ae={type:"cell",row:r,col:u}}let fe=null;function el(r,u){if(r.stopPropagation(),fe&&fe.col===u)t(36,fe=null);else{const A=r.target.closest("th");if(A){const D=A.getBoundingClientRect();t(36,fe={col:u,x:D.right,y:D.bottom})}}}function Xl(){t(17,b=!1),t(57,ee=null)}const Yl=()=>Xe();function xl(r,u){ke[r?"unshift":"push"](()=>{Qe[u]=r,t(22,Qe)})}function $l(){p=Fs.entries.get(this)?.contentRect,t(23,p)}function en(r){ke[r?"unshift":"push"](()=>{Mt=r,t(32,Mt)})}function tn(r,u,A){n.$$.not_equal(c[u][A].value,r)&&(c[u][A].value=r,t(18,c),t(56,d),t(59,m))}function ln(r,u){n.$$.not_equal(J[u].input,r)&&(J[u].input=r,t(25,J))}const nn=()=>(t(27,se=!1),ue.focus()),sn=(r,u,A)=>Xt(A,r,u),on=(r,u)=>Y(r,u),rn=(r,u)=>{ie(r,u),$t(r,u)},an=(r,u)=>Y(r,u);function _n(r,u){n.$$.not_equal(T[u].value,r)&&(T[u].value=r,t(26,T))}function un(r,u){n.$$.not_equal(J[u].input,r)&&(J[u].input=r,t(25,J))}const fn=r=>zt(r),cn=(r,u)=>{u.stopPropagation(),ot(r)},hn=(r,u)=>el(u,r),dn=r=>{xt(r)};function gn(r){c=r,t(18,c),t(56,d),t(59,m)}function mn(r){Lt=r,t(33,Lt)}function bn(r){rt=r,t(34,rt)}function wn(r){Et=r,t(30,Et)}const kn=r=>Gt($s(r.detail.data));function pn(r){ke[r?"unshift":"push"](()=>{ue=r,t(31,ue)})}const vn=r=>_e(r),yn=()=>Ye(x?.row??-1,"above"),An=()=>Ye(x?.row??-1,"below"),Sn=()=>xe(x?.col??-1,"left"),Cn=()=>xe(x?.col??-1,"right"),zn=()=>Ye(x?.row??-1,"above"),qn=()=>Ye(x?.row??-1,"below"),En=()=>xe(fe?.col??-1,"left"),Mn=()=>xe(fe?.col??-1,"right");return n.$$set=r=>{"datatype"in r&&t(0,a=r.datatype),"label"in r&&t(1,f=r.label),"show_label"in r&&t(2,i=r.show_label),"headers"in r&&t(55,o=r.headers),"values"in r&&t(56,d=r.values),"col_count"in r&&t(3,_=r.col_count),"row_count"in r&&t(4,h=r.row_count),"latex_delimiters"in r&&t(5,g=r.latex_delimiters),"editable"in r&&t(6,w=r.editable),"wrap"in r&&t(7,C=r.wrap),"root"in r&&t(8,v=r.root),"i18n"in r&&t(9,k=r.i18n),"max_height"in r&&t(10,M=r.max_height),"line_breaks"in r&&t(11,H=r.line_breaks),"column_widths"in r&&t(12,q=r.column_widths),"upload"in r&&t(13,R=r.upload),"stream_handler"in r&&t(14,N=r.stream_handler),"display_value"in r&&t(15,S=r.display_value),"styling"in r&&t(16,O=r.styling)},n.$$.update=()=>
3{if(n.$$.dirty[1]&301989888&&(de(d,m)||(t(18,c=qe(d)),t(59,m=d))),n.$$.dirty[0]&393216|n.$$.dirty[1]&67108864&&b!==!1&&!de(b,ee)){const[r,u]=b;!isNaN(r)&&!isNaN(u)&&c[r]&&(B("select",{index:[r,u],value:K(r,u),row_value:c[r].map(A=>A.value)}),t(57,ee=b))}n.$$.dirty[1]&150994944&&(de(o,W)||y()),n.$$.dirty[0]&2359296&&(c||Q)&&oe(),n.$$.dirty[0]&262144&&t(38,l=ei(c)),n.$$.dirty[0]&4194304&&Qe[0]&&Xe(),n.$$.dirty[0]&1933312&&Ql(c,S,O,Oe,me),n.$$.dirty[0]&131072&&t(37,s=!!b&&b[0])},[a,f,i,_,h,g,w,C,v,k,M,H,q,R,N,S,O,b,c,me,Oe,Q,Qe,p,E,J,T,se,G,Vt,Et,ue,Mt,Lt,rt,x,fe,s,l,L,Y,_e,ie,ot,zt,Zl,qt,Gt,Xe,Xt,Ye,xe,xt,$t,el,o,d,ee,W,m,Yl,xl,$l,en,tn,ln,nn,sn,on,rn,an,_n,un,fn,cn,hn,dn,gn,mn,bn,wn,kn,pn,vn,yn,An,Sn,Cn,zn,qn,En,Mn]}class li extends Us{constructor(e){super(),Is(this,e,ti,Ys,Ks,{datatype:0,label:1,show_label:2,headers:55,values:56,col_count:3,row_count:4,latex_delimiters:5,editable:6,wrap:7,root:8,i18n:9,max_height:10,line_breaks:11,column_widths:12,upload:13,stream_handler:14,display_value:15,styling:16},null,[-1,-1,-1,-1])}get datatype(){return this.$$.ctx[0]}set datatype(e){this.$$set({datatype:e}),X()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),X()}get show_label(){return this.$$.ctx[2]}set show_label(e){this.$$set({show_label:e}),X()}get headers(){return this.$$.ctx[55]}set headers(e){this.$$set({headers:e}),X()}get values(){return this.$$.ctx[56]}set values(e){this.$$set({values:e}),X()}get col_count(){return this.$$.ctx[3]}set col_count(e){this.$$set({col_count:e}),X()}get row_count(){return this.$$.ctx[4]}set row_count(e){this.$$set({row_count:e}),X()}get latex_delimiters(){return this.$$.ctx[5]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),X()}get editable(){return this.$$.ctx[6]}set editable(e){this.$$set({editable:e}),X()}get wrap(){return this.$$.ctx[7]}set wrap(e){this.$$set({wrap:e}),X()}get root(){return this.$$.ctx[8]}set root(e){this.$$set({root:e}),X()}get i18n(){return this.$$.ctx[9]}set i18n(e){this.$$set({i18n:e}),X()}get max_height(){return this.$$.ctx[10]}set max_height(e){this.$$set({max_height:e}),X()}get line_breaks(){return this.$$.ctx[11]}set line_breaks(e){this.$$set({line_breaks:e}),X()}get column_widths(){return this.$$.ctx[12]}set column_widths(e){this.$$set({column_widths:e}),X()}get upload(){return this.$$.ctx[13]}set upload(e){this.$$set({upload:e}),X()}get stream_handler(){return this.$$.ctx[14]}set stream_handler(e){this.$$set({stream_handler:e}),X()}get display_value(){return this.$$.ctx[15]}set display_value(e){this.$$set({display_value:e}),X()}get styling(){return this.$$.ctx[16]}set styling(e){this.$$set({styling:e}),X()}}const ni=li,{SvelteComponent:si,assign:ii,create_component:Pt,destroy_component:Ft,detach:oi,flush:V,get_spread_object:ri,get_spread_update:ai,init:_i,insert:ui,mount_component:Ut,safe_not_equal:fi,space:ci,transition_in:Jt,transition_out:Wt}=window.__gradio__svelte__internal,{afterUpdate:hi,tick:di}=window.__gradio__svelte__internal;function gi(n){let e,t,l,s;const a=[{autoscroll:n[14].autoscroll},{i18n:n[14].i18n},n[17]];let f={};for(let i=0;i<a.length;i+=1)f=ii(f,a[i]);return e=new Hn({props:f}),e.$on("clear_status",n[28]),l=new ni({props:{root:n[11],label:n[5],show_label:n[6],row_count:n[4],col_count:n[3],values:n[22],display_value:n[20],styling:n[21],headers:n[19],wrap:n[7],datatype:n[8],latex_delimiters:n[15],editable:n[18],max_height:n[16],i18n:n[14].i18n,line_breaks:n[12],column_widths:n[13],upload:n[29],stream_handler:n[30]}}),l.$on("change",n[31]),l.$on("select",n[32]),{c(){Pt(e.$$.fragment),t=ci(),Pt(l.$$.fragment)},m(i,o){Ut(e,i,o),ui(i,t,o),Ut(l,i,o),s=!0},p(i,o){const d=o[0]&147456?ai(a,[o[0]&16384&&{autoscroll:i[14].autoscroll},o[0]&16384&&{i18n:i[14].i18n},o[0]&131072&&ri(i[17])]):{};e.$set(d);const _={};o[0]&2048&&(_.root=i[11]),o[0]&32&&(_.label=i[5]),o[0]&64&&(_.show_label=i[6]),o[0]&16&&(_.row_count=i[4]),o[0]&8&&(_.col_count=i[3]),o[0]&4194304&&(_.values=i[22]),o[0]&1048576&&(_.display_value=i[20]),o[0]&2097152&&(_.styling=i[21]),o[0]&524288&&(_.headers=i[19]),o[0]&128&&(_.wrap=i[7]),o[0]&256&&(_.datatype=i[8]),o[0]&32768&&(_.latex_delimiters=i[15]),o[0]&262144&&(_.editable=i[18]),o[0]&65536&&(_.max_height=i[16]),o[0]&16384&&(_.i18n=i[14].i18n),o[0]&4096&&(_.line_breaks=i[12]),o[0]&8192&&(_.column_widths=i[13]),o[0]&16384&&(_.upload=i[29]),o[0]&16384&&(_.stream_handler=i[30]),l.$set(_)},i(i){s||(Jt(e.$$.fragment,i),Jt(l.$$.fragment,i),s=!0)},o(i){Wt(e.$$.fragment,i),Wt(l.$$.fragment,i),s=!1},d(i){i&&oi(t),Ft(e,i),Ft(l,i)}}}function mi(n){let e,t;return e=new Ln({props:{visible:n[2],padding:!1,elem_id:n[0],elem_classes:n[1],container:!1,scale:n[9],min_width:n[10],allow_overflow:!1,$$slots:{default:[gi]},$$scope:{ctx:n}}}),{c(){Pt(e.$$.fragment)},m(l,s){Ut(e,l,s),t=!0},p(l,s){const a={};
3s[0]&4&&(a.visible=l[2]),s[0]&1&&(a.elem_id=l[0]),s[0]&2&&(a.elem_classes=l[1]),s[0]&512&&(a.scale=l[9]),s[0]&1024&&(a.min_width=l[10]),s[0]&8387064|s[1]&8&&(a.$$scope={dirty:s,ctx:l}),e.$set(a)},i(l){t||(Jt(e.$$.fragment,l),t=!0)},o(l){Wt(e.$$.fragment,l),t=!1},d(l){Ft(e,l)}}}function bi(n,e,t){let{headers:l=[]}=e,{elem_id:s=""}=e,{elem_classes:a=[]}=e,{visible:f=!0}=e,{value:i={data:[["","",""]],headers:["1","2","3"],metadata:null}}=e,o="",{value_is_output:d=!1}=e,{col_count:_}=e,{row_count:h}=e,{label:g=null}=e,{show_label:w=!0}=e,{wrap:C}=e,{datatype:v}=e,{scale:k=null}=e,{min_width:M=void 0}=e,{root:H}=e,{line_breaks:q=!0}=e,{column_widths:R=[]}=e,{gradio:N}=e,{latex_delimiters:b}=e,{max_height:S=void 0}=e,{loading_status:O}=e,{interactive:p}=e,B,E,K,ee;async function J(m){let oe=m||i;t(19,B=[...oe.headers||l]),t(22,ee=oe.data?[...oe.data]:[]),t(20,E=oe?.metadata?.display_value?[...oe?.metadata?.display_value]:null),t(21,K=!p&&oe?.metadata?.styling?[...oe?.metadata?.styling]:null),await di(),N.dispatch("change"),d||N.dispatch("input")}J(),hi(()=>{t(25,d=!1)}),(Array.isArray(i)&&i?.[0]?.length===0||i.data?.[0]?.length===0)&&(i={data:[Array(_?.[0]||3).fill("")],headers:Array(_?.[0]||3).fill("").map((m,oe)=>`${oe+1}`),metadata:null});async function pe(m){JSON.stringify(m)!==o&&(t(24,i={...m}),t(27,o=JSON.stringify(i)),J(m))}const qe=()=>N.dispatch("clear_status",O),T=(...m)=>N.client.upload(...m),W=(...m)=>N.client.stream(...m),y=m=>pe(m.detail),c=m=>N.dispatch("select",m.detail);return n.$$set=m=>{"headers"in m&&t(26,l=m.headers),"elem_id"in m&&t(0,s=m.elem_id),"elem_classes"in m&&t(1,a=m.elem_classes),"visible"in m&&t(2,f=m.visible),"value"in m&&t(24,i=m.value),"value_is_output"in m&&t(25,d=m.value_is_output),"col_count"in m&&t(3,_=m.col_count),"row_count"in m&&t(4,h=m.row_count),"label"in m&&t(5,g=m.label),"show_label"in m&&t(6,w=m.show_label),"wrap"in m&&t(7,C=m.wrap),"datatype"in m&&t(8,v=m.datatype),"scale"in m&&t(9,k=m.scale),"min_width"in m&&t(10,M=m.min_width),"root"in m&&t(11,H=m.root),"line_breaks"in m&&t(12,q=m.line_breaks),"column_widths"in m&&t(13,R=m.column_widths),"gradio"in m&&t(14,N=m.gradio),"latex_delimiters"in m&&t(15,b=m.latex_delimiters),"max_height"in m&&t(16,S=m.max_height),"loading_status"in m&&t(17,O=m.loading_status),"interactive"in m&&t(18,p=m.interactive)},n.$$.update=()=>{n.$$.dirty[0]&150994944&&o&&JSON.stringify(i)!==o&&(t(27,o=JSON.stringify(i)),J())},[s,a,f,_,h,g,w,C,v,k,M,H,q,R,N,b,S,O,p,B,E,K,ee,pe,i,d,l,o,qe,T,W,y,c]}class Hi extends si{constructor(e){super(),_i(this,e,bi,mi,fi,{headers:26,elem_id:0,elem_classes:1,visible:2,value:24,value_is_output:25,col_count:3,row_count:4,label:5,show_label:6,wrap:7,datatype:8,scale:9,min_width:10,root:11,line_breaks:12,column_widths:13,gradio:14,latex_delimiters:15,max_height:16,loading_status:17,interactive:18},null,[-1,-1])}get headers(){return this.$$.ctx[26]}set headers(e){this.$$set({headers:e}),V()}get elem_id(){return this.$$.ctx[0]}set elem_id(e){this.$$set({elem_id:e}),V()}get elem_classes(){return this.$$.ctx[1]}set elem_classes(e){this.$$set({elem_classes:e}),V()}get visible(){return this.$$.ctx[2]}set visible(e){this.$$set({visible:e}),V()}get value(){return this.$$.ctx[24]}set value(e){this.$$set({value:e}),V()}get value_is_output(){return this.$$.ctx[25]}set value_is_output(e){this.$$set({value_is_output:e}),V()}get col_count(){return this.$$.ctx[3]}set col_count(e){this.$$set({col_count:e}),V()}get row_count(){return this.$$.ctx[4]}set row_count(e){this.$$set({row_count:e}),V()}get label(){return this.$$.ctx[5]}set label(e){this.$$set({label:e}),V()}get show_label(){return this.$$.ctx[6]}set show_label(e){this.$$set({show_label:e}),V()}get wrap(){return this.$$.ctx[7]}set wrap(e){this.$$set({wrap:e}),V()}get datatype(){return this.$$.ctx[8]}set datatype(e){this.$$set({datatype:e}),V()}get scale(){return this.$$.ctx[9]}set scale(e){this.$$set({scale:e}),V()}get min_width(){return this.$$.ctx[10]}set min_width(e){this.$$set({min_width:e}),V()}get root(){return this.$$.ctx[11]}set root(e){this.$$set({root:e}),V()}get line_breaks(){return this.$$.ctx[12]}set line_breaks(e){this.$$set({line_breaks:e}),V()}get column_widths(){return this.$$.ctx[13]}set column_widths(e){this.$$set({column_widths:e}),V()}get gradio(){return this.$$.ctx[14]}set gradio(e){this.$$set({gradio:e}),V()}get latex_delimiters(){return this.$$.ctx[15]}set latex_delimiters(e){this.$$set({latex_delimiters:e}),V()}get max_height(){return this.$$.ctx[16]}set max_height(e){this.$$set({max_height:e}),V()}get loading_status(){return this.$$.ctx[17]}set loading_status(e){this.$$set({loading_status:e}),V()}get interactive(){return this.$$.ctx[18]}set interactive(e){this.$$set({interactive:e}),V()}}export{ni as BaseDataFrame,Pi as BaseExample,Hi as default};
4//# sourceMappingURL=Index-B5RXSuL_.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.