vendor: 23,540 bytes, line 1
1import"./IconButtonWrapper.svelte_svelte_type_style_lang-DAP8_Zsr.js";import{B as rt}from"./BlockTitle-DouLntOZ.js";import"./MarkdownCode.svelte_svelte_type_style_lang-A3JQJUff.js";import{C as ft}from"./Clear-By3xiIwg.js";import{F as _t}from"./File-BQ_9P3Ye.js";import{M as ct}from"./Music-CDm0RGMk.js";import{S as dt}from"./Send-DyoOovnk.js";import{S as gt}from"./Square-oAGqOwsh.js";import{V as mt}from"./Video-fsmLZWjA.js";import{U as ht}from"./Upload-FQqpHWU_.js";/* empty css */import{I as bt}from"./Image-BRVH1yXn.js";import"./index-9GPo9fAK.js";/* empty css */import{B as pt}from"./Block-rEXcgPfT.js";import{S as kt}from"./index-DFGa5OkC.js";import"./StreamingBar.svelte_svelte_type_style_lang-CxOfZBE-.js";import{default as Wl}from"./Example-BVe2JN0z.js";import"./Info-LfshKCfj.js";import"./MarkdownCode-CCTS1wM7.js";import"./prism-python-DvZkGt9M.js";/* empty css */import"./file-url-DgijyRSD.js";import"./context-TgWPFwN2.js";import"./svelte/svelte.js";import"./IconButton-DtUbToT-.js";import"./Video-DiLYgEjl.js";import"./hls-CnVhpNcu.js";const{SvelteComponent:wt,append:de,attr:R,detach:vt,init:zt,insert:Ct,noop:ze,safe_not_equal:St,svg_element:re}=window.__gradio__svelte__internal;function Tt(l){let e,t,i,u,o;return{c(){e=re("svg"),t=re("g"),i=re("g"),u=re("g"),o=re("path"),R(t,"id","SVGRepo_bgCarrier"),R(t,"stroke-width","0"),R(i,"id","SVGRepo_tracerCarrier"),R(i,"stroke-linecap","round"),R(i,"stroke-linejoin","round"),R(o,"d","M1752.768 221.109C1532.646.986 1174.283.986 954.161 221.109l-838.588 838.588c-154.052 154.165-154.052 404.894 0 558.946 149.534 149.421 409.976 149.308 559.059 0l758.738-758.626c87.982-88.094 87.982-231.417 0-319.51-88.32-88.208-231.642-87.982-319.51 0l-638.796 638.908 79.85 79.849 638.795-638.908c43.934-43.821 115.539-43.934 159.812 0 43.934 44.047 43.934 115.877 0 159.812l-758.739 758.625c-110.23 110.118-289.355 110.005-399.36 0-110.118-110.117-110.005-289.242 0-399.247l838.588-838.588c175.963-175.962 462.382-176.188 638.909 0 176.075 176.188 176.075 462.833 0 638.908l-798.607 798.72 79.849 79.85 798.607-798.72c220.01-220.123 220.01-578.485 0-798.607"),R(o,"fill-rule","evenodd"),R(u,"id","SVGRepo_iconCarrier"),R(e,"fill","currentColor"),R(e,"width","100%"),R(e,"height","100%"),R(e,"viewBox","0 0 1920 1920"),R(e,"xmlns","http://www.w3.org/2000/svg")},m(c,f){Ct(c,e,f),de(e,t),de(e,i),de(e,u),de(u,o)},p:ze,i:ze,o:ze,d(c){c&&vt(e)}}}class Bt extends wt{constructor(e){super(),zt(this,e,null,Tt,St,{})}}const{tick:Ht}=window.__gradio__svelte__internal;async function De(l,e,t){if(await Ht(),e===t)return;const i=window.getComputedStyle(l),u=parseFloat(i.paddingTop),o=parseFloat(i.paddingBottom),c=parseFloat(i.lineHeight);let f=t===void 0?!1:u+o+c*t,s=u+o+e*c;l.style.height="1px";let d;f&&l.scrollHeight>f?d=f:l.scrollHeight<s?d=s:d=l.scrollHeight,l.style.height=`${d}px`}function Dt(l,e){if(e.lines===e.max_lines)return;l.style.overflowY="scroll";function t(i){De(i.target,e.lines,e.max_lines)}if(l.addEventListener("input",t),!!e.text.trim())return De(l,e.lines,e.max_lines),{destroy:()=>l.removeEventListener("input",t)}}const{SvelteComponent:Et,action_destroyer:Mt,add_flush_callback:Ce,append:j,attr:B,bind:Se,binding_callbacks:ne,bubble:ge,check_outros:y,create_component:N,destroy_component:X,destroy_each:qt,detach:K,element:G,ensure_array_like:Ve,flush:M,group_outros:x,init:Ft,insert:P,is_function:Ut,listen:F,mount_component:J,noop:Q,prevent_default:Vt,run_all:At,safe_not_equal:Rt,set_data:Ee,set_input_value:Ae,set_style:Re,space:Z,text:Me,toggle_class:L,transition_in:T,transition_out:D}=window.__gradio__svelte__internal,{beforeUpdate:jt,afterUpdate:Lt,createEventDispatcher:Gt,tick:je}=window.__gradio__svelte__internal;function Le(l,e,t){const i=l.slice();return i[59]=e[t],i[61]=t,i}function It(l){let e;return{c(){e=Me(l[5])},m(t,i){P(t,e,i)},p(t,i){i[0]&32&&Ee(e,t[5])},d(t){t&&K(e)}}}function Ge(l){let e,t,i,u=Ve(l[0].files),o=[];for(let s=0;s<u.length;s+=1)o[s]=Ie(Le(l,u,s));const c=s=>D(o[s],1,1,()=>{o[s]=null});let f=l[24]&&Ke();return{c(){e=G("div");for(let s=0;s<o.length;s+=1)o[s].c();t=Z(),f&&f.c(),B(e,"class","thumbnails scroll-hide svelte-cgv3eu"),B(e,"aria-label","Uploaded files"),B(e,"data-testid","container_el"),Re(e,"display",l[0].files.length>0||l[24]?"flex":"none")},m(s,d){P(s,e,d);for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(e,null);j(e,t),f&&f.m(e,null),i=!0},p(s,d){if(d[0]&1073741841){u=Ve(s[0].files);let a;for(a=0;a<u.length;a+=1){const k=Le(s,u,a);o[a]?(o[a].p(k,d),T(o[a],1)):(o[a]=Ie(k),o[a].c(),T(o[a],1),o[a].m(e,t))}for(x(),a=u.length;a<o.length;a+=1)c(a);y()}s[24]?f||(f=Ke(),f.c(),f.m(e,null)):f&&(f.d(1),f=null),(!i||d[0]&16777217)&&Re(e,"display",s[0].files.length>0||s[24]?"flex":"none")},i(s){if(!i){for(let d=0;d<u.length;d+=1)T(o[d]);i=!0}},o(s){o=o.filter(Boolean);for(let d=0;d<o.length;d+=1)D(o[d]);i=!1},d(s){s&&K(e),qt(o,s),f&&f.d()}}}function Kt(l){let e,t;return e=new _t({}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p:Q,i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Pt(l){let e,t;return e=new mt({}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p:Q,i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Wt(l){let e,t;return e=new ct({}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p:Q,i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Yt(l){let e,t;return e=new bt({props:{src:l[59].url,title:null,alt:"",loading:"lazy",class:"thumbnail-image"}}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p(i,u){const o={};u[0]&1&&(o.src=i[59].url),e.$set(o)},i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Ie(l){let e,t,i,u,o,c,f,s,d,a,k,r,b;u=new ft({});function g(...h){return l[44](l[61],...h)}const p=[Yt,Wt,Pt,Kt],C=[];function w(h,v){return v[0]&1&&(c=null),v[0]&1&&(f=null),v[0]&1&&(s=null),c==null&&(c=!!(h[59].mime_type&&h[59].mime_type.includes("image"))),c?0:(f==null&&(f=!!(h[59].mime_type&&h[59].mime_type.includes("audio"))),f?1:(s==null&&(s=!!(h[59].mime_type&&h[59].mime_type.includes("video"))),s?2:3))}return d=w(l,[-1,-1,-1]),a=C[d]=p[d](l),{c(){e=G("span"),t=G("button"),i=G("button"),N(u.$$.fragment),o=Z(),a.c(),B(i,"class","delete-button svelte-cgv3eu"),L(i,"disabled",l[4]),B(t,"class","thumbnail-item thumbnail-small svelte-cgv3eu"),B(e,"role","listitem"),B(e,"aria-label","File thumbnail")},m(h,v){P(h,e,v),j(e,t),j(t,i),J(u,i,null),j(t,o),C[d].m(t,null),k=!0,r||(b=F(i,"click",g),r=!0)},p(h,v){l=h,(!k||v[0]&16)&&L(i,"disabled",l[4]);let S=d;d=w(l,v),d===S?C[d].p(l,v):(x(),D(C[S],1,1,()=>{C[S]=null}),y(),a=C[d],a?a.p(l,v):(a=C[d]=p[d](l),a.c()),T(a,1),a.m(t,null))},i(h){k||(T(u.$$.fragment,h),T(a),k=!0)},o(h){D(u.$$.fragment,h),D(a),k=!1},d(h){h&&K(e),X(u),C[d].d(),r=!1,b()}}}function Ke(l){let e;return{c(){e=G("div"),B(e,"class","loader svelte-cgv3eu"),B(e,"role","status"),B(e,"aria-label","Uploading")},m(t,i){P(t,e,i)},d(t){t&&K(e)}}}function Pe(l){let e,t,i,u,o,c,f,s,d,a;function k(p){l[46](p)}function r(p){l[47](p)}function b(p){l[48](p)}let g={file_count:l[20],filetype:l[16],root:l[15],max_file_size:l[17],show_progress:!1,disable_click:!0,hidden:!0,upload:l[18],stream_handler:l[19]};return l[1]!==void 0&&(g.dragging=l[1]),l[24]!==void 0&&(g.uploading=l[24]),l[23]!==void 0&&(g.hidden_upload=l[23]),e=new ht({props:g}),l[45](e),ne.push(()=>Se(e,"dragging",k)),ne.push(()=>Se(e,"uploading",r)),ne.push(()=>Se(e,"hidden_upload",b)),e.$on("load",l[29]),e.$on("error",l[49]),f=new Bt({}),{c(){N(e.$$.fragment),o=Z(),c=G("button"),N(f.$$.fragment),B(c,"data-testid","upload-button"),B(c,"class","upload-button svelte-cgv3eu")},m(p,C){J(e,p,C),P(p,o,C),P(p,c,C),J(f,c,null),s=!0,d||(a=F(c,"click",l[31]),d=!0)},p(p,C){const w={};C[0]&1048576&&(w.file_count=p[20]),C[0]&65536&&(w.filetype=p[16]),C[0]&32768&&(w.root=p[15]),C[0]&131072&&(w.max_file_size=p[17]),C[0]&262144&&(w.upload=p[18]),C[0]&524288&&(w.stream_handler=p[19]),!t&&C[0]&2&&(t=!0,w.dragging=p[1],Ce(()=>t=!1)),!i&&C[0]&16777216&&(i=!0,w.uploading=p[24],Ce(()=>i=!1)),!u&&C[0]&8388608&&(u=!0,w.hidden_upload=p[23],Ce(()=>u=!1)),e.$set(w)},i(p){s||(T(e.$$.fragment,p),T(f.$$.fragment,p),s=!0)},o(p){D(e.$$.fragment,p),D(f.$$.fragment,p),s=!1},d(p){p&&(K(o),K(c)),l[45](null),X(e,p),X(f),d=!1,a()}}}function We(l){let e,t,i,u,o,c;const f=[Xt,Nt],s=[];function d(a,k){return a[10]===!0?0:1}return t=d(l),i=s[t]=f[t](l),{c(){e=G("button"),i.c(),B(e,"class","submit-button svelte-cgv3eu"),L(e,"padded-button",l[10]!==!0)},m(a,k){P(a,e,k),s[t].m(e,null),u=!0,o||(c=F(e,"click",l[33]),o=!0)},p(a,k){let r=t;t=d(a),t===r?s[t].p(a,k):(x(),D(s[r],1,1,()=>{s[r]=null}),y(),i=s[t],i?i.p(a,k):(i=s[t]=f[t](a),i.c()),T(i,1),i.m(e,null)),(!u||k[0]&1024)&&L(e,"padded-button",a[10]!==!0)},i(a){u||(T(i),u=!0)},o(a){D(i),u=!1},d(a){a&&K(e),s[t].d(),o=!1,c()}}}function Nt(l){let e;return{c(){e=Me(l[10])},m(t,i){P(t,e,i)},p(t,i){i[0]&1024&&Ee(e,t[10])},i:Q,o:Q,d(t){t&&K(e)}}}function Xt(l){let e,t;return e=new dt({}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p:Q,i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Ye(l){let e,t,i,u,o,c;const f=[Ot,Jt],s=[];function d(a,k){return a[11]===!0?0:1}return t=d(l),i=s[t]=f[t](l),{c(){e=G("button"),i.c(),B(e,"class","stop-button svelte-cgv3eu"),L(e,"padded-button",l[11]!==!0)},m(a,k){P(a,e,k),s[t].m(e,null),u=!0,o||(c=F(e,"click",l[32]),o=!0)},p(a,k){let r=t;t=d(a),t===r?s[t].p(a,k):(x(),D(s[r],1,1,()=>{s[r]=null}),y(),i=s[t],i?i.p(a,k):(i=s[t]=f[t](a),i.c()),T(i,1),i.m(e,null)),(!u||k[0]&2048)&&L(e,"padded-button",a[11]!==!0)},i(a){u||(T(i),u=!0)},o(a){D(i),u=!1},d(a){a&&K(e),s[t].d(),o=!1,c()}}}function Jt(l){let e;return{c(){e=Me(l[11])},m(t,i){P(t,e,i)},p(t,i){i[0]&2048&&Ee(e,t[11])},i:Q,o:Q,d(t){t&&K(e)}}}function Ot(l){let e,t;return e=new gt({props:{fill:"none",stroke_width:2.5}}),{c(){N(e.$$.fragment)},m(i,u){J(e,i,u),t=!0},p:Q,i(i){t||(T(e.$$.fragment,i),t=!0)},o(i){D(e.$$.fragment,i),t=!1},d(i){X(e,i)}}}function Qt(l){let e,t,i,u,o,c,f,s,d,a,k,r,b,g,p,C;i=new rt({props:{root:l[15],show_label:l[7],info:l[6],$$slots:{default:[It]},$$scope:{ctx:l}}});let w=(l[0].files.length>0||l[24])&&Ge(l),h=!l[4]&&!(l[20]==="single"&&l[0].files.length>0)&&Pe(l),v=l[10]&&We(l),S=l[11]&&Ye(l);return{c(){e=G("div"),t=G("label"),N(i.$$.fragment),u=Z(),w&&w.c(),o=Z(),c=G("div"),h&&h.c(),f=Z(),s=G("textarea"),r=Z(),v&&v.c(),b=Z(),S&&S.c(),B(s,"data-testid","textbox"),B(s,"class","scroll-hide svelte-cgv3eu"),B(s,"dir",d=l[12]?"rtl":"ltr"),B(s,"placeholder",l[3]),B(s,"rows",l[2]),s.disabled=l[4],s.autofocus=l[13],B(s,"style",a=l[14]?"text-align: "+l[14]:""),L(s,"no-label",!l[7]),B(c,"class","input-container svelte-cgv3eu"),L(t,"container",l[8]),B(e,"class","full-container svelte-cgv3eu"),B(e,"role","group"),B(e,"aria-label","Multimedia input field"),L(e,"dragging",l[1])},m(m,z){P(m,e,z),j(e,t),J(i,t,null),j(t,u),w&&w.m(t,null),j(t,o),j(t,c),h&&h.m(c,null),j(c,f),j(c,s),Ae(s,l[0].text),l[51](s),j(c,r),v&&v.m(c,null),j(c,b),S&&S.m(c,null),l[52](e),g=!0,l[13]&&s.focus(),p||(C=[Mt(k=Dt.call(null,s,{text:l[0].text,lines:l[2],max_lines:l[9]})),F(s,"input",l[50]),F(s,"keypress",l[27]),F(s,"blur",l[42]),F(s,"select",l[26]),F(s,"focus",l[43]),F(s,"scroll",l[28]),F(s,"paste",l[34]),F(e,"dragenter",l[35]),F(e,"dragleave",l[36]),F(e,"dragover",Vt(l[41])),F(e,"drop",l[37])],p=!0)},p(m,z){const I={};z[0]&32768&&(I.root=m[15]),z[0]&128&&(I.show_label=m[7]),z[0]&64&&(I.info=m[6]),z[0]&32|z[2]&1&&(I.$$scope={dirty:z,ctx:m}),i.$set(I),m[0].files.length>0||m[24]?w?(w.p(m,z),z[0]&16777217&&T(w,1)):(w=Ge(m),w.c(),T(w,1),w.m(t,o)):w&&(x(),D(w,1,1,()=>{w=null}),y()),!m[4]&&!(m[20]==="single"&&m[0].files.length>0)?h?(h.p(m,z),z[0]&1048593&&T(h,1)):(h=Pe(m),h.c(),T(h,1),h.m(c,f)):h&&(x(),D(h,1,1,()=>{h=null}),y()),(!g||z[0]&4096&&d!==(d=m[12]?"rtl":"ltr"))&&B(s,"dir",d),(!g||z[0]&8)&&B(s,"placeholder",m[3]),(!g||z[0]&4)&&B(s,"rows",m[2]),(!g||z[0]&16)&&(s.disabled=m[4]),(!g||z[0]&8192)&&(s.autofocus=m[13]),(!g||z[0]&16384&&a!==(a=m[14]?"text-align: "+m[14]:""))&&B(s,"style",a),k&&Ut(k.update)&&z[0]&517&&k.update.call(null,{text:m[0].text,lines:m[2],max_lines:m[9]}),z[0]&1&&Ae(s,m[0].text),(!g||z[0]&128)&&L(s,"no-label",!m[7]),m[10]?v?(v.p(m,z),z[0]&1024&&T(v,1)):(v=We(m),v.c(),T(v,1),v.m(c,b)):v&&(x(),D(v,1,1,()=>{v=null}),y()),m[11]?S?(S.p(m,z),z[0]&2048&&T(S,1)):(S=Ye(m),S.c(),T(S,1),S.m(c,null)):S&&(x(),D(S,1,1,()=>{S=null}),y()),(!g||z[0]&256)&&L(t,"container",m[8]),(!g||z[0]&2)&&L(e,"dragging",m[1])},i(m){g||(T(i.$$.fragment,m),T(w),T(h),T(v),T(S),g=!0)},o(m){D(i.$$.fragment,m),D(w),D(h),D(v),D(S),g=!1},d(m){m&&K(e),X(i),w&&w.d(),h&&h.d(),l[51](null),v&&v.d(),S&&S.d(),l[52](null),p=!1,At(C)}}}function Zt(l,e,t){let{value:i={text:"",files:[]}}=e,{value_is_output:u=!1}=e,{lines:o=1}=e,{placeholder:c="Type here..."}=e,{disabled:f=!1}=e,{label:s}=e,{info:d=void 0}=e,{show_label:a=!0}=e,{container:k=!0}=e,{max_lines:r}=e,{submit_btn:b=null}=e,{stop_btn:g=null}=e,{rtl:p=!1}=e,{autofocus:C=!1}=e,{text_align:w=void 0}=e,{autoscroll:h=!0}=e,{root:v}=e,{file_types:S=null}=e,{max_file_size:m=null}=e,{upload:z}=e,{stream_handler:I}=e,{file_count:se="multiple"}=e,O,W,q,$,ee=0,oe=!1,{dragging:Y=!1}=e,ue=!1,ae=i.text,te;const U=Gt();jt(()=>{$=q&&q.offsetHeight+q.scrollTop>q.scrollHeight-100});const me=()=>{$&&h&&!oe&&q.scrollTo(0,q.scrollHeight)};async function _e(){U("change",i),u||U("input")}Lt(()=>{C&&q!==null&&q.focus(),$&&h&&me(),t(38,u=!1)});function he(n){const E=n.target,V=E.value,A=[E.selectionStart,E.selectionEnd];U("select",{value:V.substring(...A),index:A})}async function be(n){await je(),(n.key==="Enter"&&n.shiftKey&&o>1||n.key==="Enter"&&!n.shiftKey&&o===1&&r>=1)&&(n.preventDefault(),U("submit"))}function pe(n){const E=n.target,V=E.scrollTop;V<ee&&(oe=!0),ee=V;const A=E.scrollHeight-E.clientHeight;V>=A&&(oe=!1)}async function ke({detail:n}){if(_e(),Array.isArray(n)){for(let E of n)i.files.push(E);t(0,i)}else i.files.push(n),t(0,i);await je(),U("change",i),U("upload",n)}function ce(n,E){_e(),n.stopPropagation(),i.files.splice(E,1),t(0,i)}function we(){W&&(t(23,W.value="",W),W.click())}function _(){U("stop")}function Xe(){U("submit")}function Je(n){if(!n.clipboardData)return;const E=n.clipboardData.items;for(let V in E){const A=E[V];if(A.kind==="file"&&A.type.includes("image")){const le=A.getAsFile();le&&O.load_files([le])}}}function Oe(n){n.preventDefault(),t(1,Y=!0)}function Qe(n){n.preventDefault();const E=te.getBoundingClientRect(),{clientX:V,clientY:A}=n;(V<=E.left||V>=E.right||A<=E.top||A>=E.bottom)&&t(1,Y=!1)}function Ze(n){if(n.preventDefault(),t(1,Y=!1),n.dataTransfer&&n.dataTransfer.files){const E=Array.from(n.dataTransfer.files);if(S){const V=E.filter(le=>S.some(ve=>ve.startsWith(".")?le.name.toLowerCase().endsWith(ve.toLowerCase()):le.type.match(new RegExp(ve.replace("*",".*"))))),A=E.length-V.length;A>0&&U("error",`${A} file(s) were rejected. Accepted formats: ${S.join(", ")}`),V.length>0&&O.load_files(V)}else O.load_files(E)}}function ye(n){ge.call(this,l,n)}function xe(n){ge.call(this,l,n)}function $e(n){ge.call(this,l,n)}const et=(n,E)=>ce(E,n);function tt(n){ne[n?"unshift":"push"](()=>{O=n,t(22,O)})}function lt(n){Y=n,t(1,Y)}function it(n){ue=n,t(24,ue)}function nt(n){W=n,t(23,W)}function st(n){ge.call(this,l,n)}function ot(){i.text=this.value,t(0,i)}function ut(n){ne[n?"unshift":"push"](()=>{q=n,t(21,q)})}function at(n){ne[n?"unshift":"push"](()=>{te=n,t(25,te)})}return l.$$set=n=>{"value"in n&&t(0,i=n.value),"value_is_output"in n&&t(38,u=n.value_is_output),"lines"in n&&t(2,o=n.lines),"placeholder"in n&&t(3,c=n.placeholder),"disabled"in n&&t(4,f=n.disabled),"label"in n&&t(5,s=n.label),"info"in n&&t(6,d=n.info),"show_label"in n&&t(7,a=n.show_label),"container"in n&&t(8,k=n.container),"max_lines"in n&&t(9,r=n.max_lines),"submit_btn"in n&&t(10,b=n.submit_btn),"stop_btn"in n&&t(11,g=n.stop_btn),"rtl"in n&&t(12,p=n.rtl),"autofocus"in n&&t(13,C=n.autofocus),"text_align"in n&&t(14,w=n.text_align),"autoscroll"in n&&t(39,h=n.autoscroll),"root"in n&&t(15,v=n.root),"file_types"in n&&t(16,S=n.file_types),"max_file_size"in n&&t(17,m=n.max_file_size),"upload"in n&&t(18,z=n.upload),"stream_handler"in n&&t(19,I=n.stream_handler),"file_count"in n&&t(20,se=n.file_count),"dragging"in n&&t(1,Y=n.dragging)},l.$$.update=()=>{l.$$.dirty[0]&2&&U("drag",Y),l.$$.dirty[0]&1&&i===null&&t(0,i={text:"",files:[]}),l.$$.dirty[0]&1|l.$$.dirty[1]&512&&ae!==i.text&&(U("change",i),t(40,ae=i.text)),l.$$.dirty[0]&2097669&&q&&o!==r&&De(q,o,r)},[i,Y,o,c,f,s,d,a,k,r,b,g,p,C,w,v,S,m,z,I,se,q,O,W,ue,te,he,be,pe,ke,ce,we,_,Xe,Je,Oe,Qe,Ze,u,h,ae,ye,xe,$e,et,tt,lt,it,nt,st,ot,ut,at]}class yt extends Et{constructor(e){super(),Ft(this,e,Zt,Qt,Rt,{value:0,value_is_output:38,lines:2,placeholder:3,disabled:4,label:5,info:6,show_label:7,container:8,max_lines:9,submit_btn:10,stop_btn:11,rtl:12,autofocus:13,text_align:14,autoscroll:39,root:15,file_types:16,max_file_size:17,upload:18,stream_handler:19,file_count:20,dragging:1},null,[-1,-1,-1])}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),M()}get value_is_output(){return this.$$.ctx[38]}set value_is_output(e){this.$$set({value_is_output:e}),M()}get lines(){return this.$$.ctx[2]}set lines(e){this.$$set({lines:e}),M()}get placeholder(){return this.$$.ctx[3]}set placeholder(e){this.$$set({placeholder:e}),M()}get disabled(){return this.$$.ctx[4]}set disabled(e){this.$$set({disabled:e}),M()}get label(){return this.$$.ctx[5]}set label(e){this.$$set({label:e}),M()}get info(){return this.$$.ctx[6]}set info(e){this.$$set({info:e}),M()}get show_label(){return this.$$.ctx[7]}set show_label(e){this.$$set({show_label:e}),M()}get container(){return this.$$.ctx[8]}set container(e){this.$$set({container:e}),M()}get max_lines(){return this.$$.ctx[9]}set max_lines(e){this.$$set({max_lines:e}),M()}get submit_btn(){return this.$$.ctx[10]}set submit_btn(e){this.$$set({submit_btn:e}),M()}get stop_btn(){return this.$$.ctx[11]}set stop_btn(e){this.$$set({stop_btn:e}),M()}get rtl(){return this.$$.ctx[12]}set rtl(e){this.$$set({rtl:e}),M()}get autofocus(){return this.$$.ctx[13]}set autofocus(e){this.$$set({autofocus:e}),M()}get text_align(){return this.$$.ctx[14]}set text_align(e){this.$$set({text_align:e}),M()}get autoscroll(){return this.$$.ctx[39]}set autoscroll(e){this.$$set({autoscroll:e}),M()}get root(){return this.$$.ctx[15]}set root(e){this.$$set({root:e}),M()}get file_types(){return this.$$.ctx[16]}set file_types(e){this.$$set({file_types:e}),M()}get max_file_size(){return this.$$.ctx[17]}set max_file_size(e){this.$$set({max_file_size:e}),M()}get upload(){return this.$$.ctx[18]}set upload(e){this.$$set({upload:e}),M()}get stream_handler(){return this.$$.ctx[19]}set stream_handler(e){this.$$set({stream_handler:e}),M()}get file_count(){return this.$$.ctx[20]}set file_count(e){this.$$set({file_count:e}),M()}get dragging(){return this.$$.ctx[1]}set dragging(e){this.$$set({dragging:e}),M()}}const xt=yt,{SvelteComponent:$t,add_flush_callback:Te,assign:el,bind:Be,binding_callbacks:He,check_outros:tl,create_component:qe,destroy_component:Fe,detach:ll,flush:H,get_spread_object:il,get_spread_update:nl,group_outros:sl,init:ol,insert:ul,mount_component:Ue,safe_not_equal:al,space:rl,transition_in:ie,transition_out:fe}=window.__gradio__svelte__internal;function Ne(l){let e,t;const i=[{autoscroll:l[2].autoscroll},{i18n:l[2].i18n},l[18]];let u={};for(let o=0;o<i.length;o+=1)u=el(u,i[o]);return e=new kt({props:u}),e.$on("clear_status",l[27]),{c(){qe(e.$$.fragment)},m(o,c){Ue(e,o,c),t=!0},p(o,c){const f=c[0]&262148?nl(i,[c[0]&4&&{autoscroll:o[2].autoscroll},c[0]&4&&{i18n:o[2].i18n},c[0]&262144&&il(o[18])]):{};e.$set(f)},i(o){t||(ie(e.$$.fragment,o),t=!0)},o(o){fe(e.$$.fragment,o),t=!1},d(o){Fe(e,o)}}}function fl(l){let e,t,i,u,o,c,f=l[18]&&Ne(l);function s(r){l[30](r)}function d(r){l[31](r)}function a(r){l[32](r)}let k={file_types:l[6],root:l[24],label:l[9],info:l[10],show_label:l[11],lines:l[7],rtl:l[19],text_align:l[20],max_lines:l[12]?l[12]:l[7]+1,placeholder:l[8],submit_btn:l[16],stop_btn:l[17],autofocus:l[21],container:l[13],autoscroll:l[22],file_count:l[25],max_file_size:l[2].max_file_size,disabled:!l[23],upload:l[28],stream_handler:l[29]};return l[0]!==void 0&&(k.value=l[0]),l[1]!==void 0&&(k.value_is_output=l[1]),l[26]!==void 0&&(k.dragging=l[26]),t=new xt({props:k}),He.push(()=>Be(t,"value",s)),He.push(()=>Be(t,"value_is_output",d)),He.push(()=>Be(t,"dragging",a)),t.$on("change",l[33]),t.$on("input",l[34]),t.$on("submit",l[35]),t.$on("stop",l[36]),t.$on("blur",l[37]),t.$on("select",l[38]),t.$on("focus",l[39]),t.$on("error",l[40]),{c(){f&&f.c(),e=rl(),qe(t.$$.fragment)},m(r,b){f&&f.m(r,b),ul(r,e,b),Ue(t,r,b),c=!0},p(r,b){r[18]?f?(f.p(r,b),b[0]&262144&&ie(f,1)):(f=Ne(r),f.c(),ie(f,1),f.m(e.parentNode,e)):f&&(sl(),fe(f,1,1,()=>{f=null}),tl());const g={};b[0]&64&&(g.file_types=r[6]),b[0]&16777216&&(g.root=r[24]),b[0]&512&&(g.label=r[9]),b[0]&1024&&(g.info=r[10]),b[0]&2048&&(g.show_label=r[11]),b[0]&128&&(g.lines=r[7]),b[0]&524288&&(g.rtl=r[19]),b[0]&1048576&&(g.text_align=r[20]),b[0]&4224&&(g.max_lines=r[12]?r[12]:r[7]+1),b[0]&256&&(g.placeholder=r[8]),b[0]&65536&&(g.submit_btn=r[16]),b[0]&131072&&(g.stop_btn=r[17]),b[0]&2097152&&(g.autofocus=r[21]),b[0]&8192&&(g.container=r[13]),b[0]&4194304&&(g.autoscroll=r[22]),b[0]&33554432&&(g.file_count=r[25]),b[0]&4&&(g.max_file_size=r[2].max_file_size),b[0]&8388608&&(g.disabled=!r[23]),b[0]&4&&(g.upload=r[28]),b[0]&4&&(g.stream_handler=r[29]),!i&&b[0]&1&&(i=!0,g.value=r[0],Te(()=>i=!1)),!u&&b[0]&2&&(u=!0,g.value_is_output=r[1],Te(()=>u=!1)),!o&&b[0]&67108864&&(o=!0,g.dragging=r[26],Te(()=>o=!1)),t.$set(g)},i(r){c||(ie(f),ie(t.$$.fragment,r),c=!0)},o(r){fe(f),fe(t.$$.fragment,r),c=!1},d(r){r&&ll(e),f&&f.d(r),Fe(t,r)}}}function _l(l){let e,t;return e=new pt({props:{visible:l[5],elem_id:l[3],elem_classes:[...l[4],"multimodal-textbox"],scale:l[14],min_width:l[15],allow_overflow:!1,padding:!1,border_mode:l[26]?"focus":"base",$$slots:{default:[fl]},$$scope:{ctx:l}}}),{c(){qe(e.$$.fragment)},m(i,u){Ue(e,i,u),t=!0},p(i,u){const o={};u[0]&32&&(o.visible=i[5]),u[0]&8&&(o.elem_id=i[3]),u[0]&16&&(o.elem_classes=[...i[4],"multimodal-textbox"]),u[0]&16384&&(o.scale=i[14]),u[0]&32768&&(o.min_width=i[15]),u[0]&67108864&&(o.border_mode=i[26]?"focus":"base"),u[0]&134168519|u[1]&1024&&(o.$$scope={dirty:u,ctx:i}),e.$set(o)},i(i){t||(ie(e.$$.fragment,i),t=!0)},o(i){fe(e.$$.fragment,i),t=!1},d(i){Fe(e,i)}}}function cl(l,e,t){let{gradio:i}=e,{elem_id:u=""}=e,{elem_classes:o=[]}=e,{visible:c=!0}=e,{value:f={text:"",files:[]}}=e,{file_types:s=null}=e,{lines:d}=e,{placeholder:a=""}=e,{label:k="MultimodalTextbox"}=e,{info:r=void 0}=e,{show_label:b}=e,{max_lines:g}=e,{container:p=!0}=e,{scale:C=null}=e,{min_width:w=void 0}=e,{submit_btn:h=null}=e,{stop_btn:v=null}=e,{loading_status:S=void 0}=e,{value_is_output:m=!1}=e,{rtl:z=!1}=e,{text_align:I=void 0}=e,{autofocus:se=!1}=e,{autoscroll:O=!0}=e,{interactive:W}=e,{root:q}=e,{file_count:$}=e,ee;const oe=()=>i.dispatch("clear_status",S),Y=(..._)=>i.client.upload(..._),ue=(..._)=>i.client.stream(..._);function ae(_){f=_,t(0,f)}function te(_){m=_,t(1,m)}function U(_){ee=_,t(26,ee)}const me=()=>i.dispatch("change",f),_e=()=>i.dispatch("input"),he=()=>i.dispatch("submit"),be=()=>i.dispatch("stop"),pe=()=>i.dispatch("blur"),ke=_=>i.dispatch("select",_.detail),ce=()=>i.dispatch("focus"),we=({detail:_})=>{i.dispatch("error",_)};return l.$$set=_=>
vendor: 3,702 bytes, lines 1-2
1{"gradio"in _&&t(2,i=_.gradio),"elem_id"in _&&t(3,u=_.elem_id),"elem_classes"in _&&t(4,o=_.elem_classes),"visible"in _&&t(5,c=_.visible),"value"in _&&t(0,f=_.value),"file_types"in _&&t(6,s=_.file_types),"lines"in _&&t(7,d=_.lines),"placeholder"in _&&t(8,a=_.placeholder),"label"in _&&t(9,k=_.label),"info"in _&&t(10,r=_.info),"show_label"in _&&t(11,b=_.show_label),"max_lines"in _&&t(12,g=_.max_lines),"container"in _&&t(13,p=_.container),"scale"in _&&t(14,C=_.scale),"min_width"in _&&t(15,w=_.min_width),"submit_btn"in _&&t(16,h=_.submit_btn),"stop_btn"in _&&t(17,v=_.stop_btn),"loading_status"in _&&t(18,S=_.loading_status),"value_is_output"in _&&t(1,m=_.value_is_output),"rtl"in _&&t(19,z=_.rtl),"text_align"in _&&t(20,I=_.text_align),"autofocus"in _&&t(21,se=_.autofocus),"autoscroll"in _&&t(22,O=_.autoscroll),"interactive"in _&&t(23,W=_.interactive),"root"in _&&t(24,q=_.root),"file_count"in _&&t(25,$=_.file_count)},[f,m,i,u,o,c,s,d,a,k,r,b,g,p,C,w,h,v,S,z,I,se,O,W,q,$,ee,oe,Y,ue,ae,te,U,me,_e,he,be,pe,ke,ce,we]}class Il extends $t{constructor(e){super(),ol(this,e,cl,_l,al,{gradio:2,elem_id:3,elem_classes:4,visible:5,value:0,file_types:6,lines:7,placeholder:8,label:9,info:10,show_label:11,max_lines:12,container:13,scale:14,min_width:15,submit_btn:16,stop_btn:17,loading_status:18,value_is_output:1,rtl:19,text_align:20,autofocus:21,autoscroll:22,interactive:23,root:24,file_count:25},null,[-1,-1])}get gradio(){return this.$$.ctx[2]}set gradio(e){this.$$set({gradio:e}),H()}get elem_id(){return this.$$.ctx[3]}set elem_id(e){this.$$set({elem_id:e}),H()}get elem_classes(){return this.$$.ctx[4]}set elem_classes(e){this.$$set({elem_classes:e}),H()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),H()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),H()}get file_types(){return this.$$.ctx[6]}set file_types(e){this.$$set({file_types:e}),H()}get lines(){return this.$$.ctx[7]}set lines(e){this.$$set({lines:e}),H()}get placeholder(){return this.$$.ctx[8]}set placeholder(e){this.$$set({placeholder:e}),H()}get label(){return this.$$.ctx[9]}set label(e){this.$$set({label:e}),H()}get info(){return this.$$.ctx[10]}set info(e){this.$$set({info:e}),H()}get show_label(){return this.$$.ctx[11]}set show_label(e){this.$$set({show_label:e}),H()}get max_lines(){return this.$$.ctx[12]}set max_lines(e){this.$$set({max_lines:e}),H()}get container(){return this.$$.ctx[13]}set container(e){this.$$set({container:e}),H()}get scale(){return this.$$.ctx[14]}set scale(e){this.$$set({scale:e}),H()}get min_width(){return this.$$.ctx[15]}set min_width(e){this.$$set({min_width:e}),H()}get submit_btn(){return this.$$.ctx[16]}set submit_btn(e){this.$$set({submit_btn:e}),H()}get stop_btn(){return this.$$.ctx[17]}set stop_btn(e){this.$$set({stop_btn:e}),H()}get loading_status(){return this.$$.ctx[18]}set loading_status(e){this.$$set({loading_status:e}),H()}get value_is_output(){return this.$$.ctx[1]}set value_is_output(e){this.$$set({value_is_output:e}),H()}get rtl(){return this.$$.ctx[19]}set rtl(e){this.$$set({rtl:e}),H()}get text_align(){return this.$$.ctx[20]}set text_align(e){this.$$set({text_align:e}),H()}get autofocus(){return this.$$.ctx[21]}set autofocus(e){this.$$set({autofocus:e}),H()}get autoscroll(){return this.$$.ctx[22]}set autoscroll(e){this.$$set({autoscroll:e}),H()}get interactive(){return this.$$.ctx[23]}set interactive(e){this.$$set({interactive:e}),H()}get root(){return this.$$.ctx[24]}set root(e){this.$$set({root:e}),H()}get file_count(){return this.$$.ctx[25]}set file_count(e){this.$$set({file_count:e}),H()}}export{Wl as BaseExample,xt as BaseMultimodalTextbox,Il as default}; 2//# sourceMappingURL=Index-76ECydUZ.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.