vendor: 10,883 bytes, lines 1-2
1import{B as ie}from"./Block-DdQws7Te.js";import"./MarkdownCode.svelte_svelte_type_style_lang-BB-itM20.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import{U as se}from"./UploadText-BwEsatWu.js";import le from"./Gallery-BqKIDUp9.js";import{S as ne}from"./index-bSCVAeem.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import{B as oe}from"./FileUpload-C6Y1s0ue.js";/* empty css */import"./prism-python-DJXBfrTF.js";import"./index-DUPwsM33.js";import"./svelte/svelte.js";import"./Upload-DXgDHKDd.js";import"./BlockLabel-DqHge3FF.js";import"./IconButton-B-aAVSzy.js";import"./Empty-CxRQfWXb.js";import"./ShareButton-CKIdzpwI.js";import"./Community-Dw1micSV.js";import"./utils-BsGrhMNe.js";import"./Clear-By3xiIwg.js";import"./Download-DVtk-Jv3.js";import"./FullscreenButton-DfvL5NTE.js";import"./Minimize-OAHZO2Ge.js";import"./Play-B0Q0U1Qz.js";import"./IconButtonWrapper-Cg16aIPK.js";/* empty css */import"./ModifyUpload-CkZBhzkZ.js";import"./Edit-BpRIf5rU.js";import"./Undo-DCjBnnSO.js";import"./DownloadLink-IzUam-rM.js";import"./context-TgWPFwN2.js";import"./file-url-DgijyRSD.js";/* empty css */import"./Image-BRVH1yXn.js";/* empty css */import"./Video-DiLYgEjl.js";import"./hls-CnVhpNcu.js";import"./File-BQ_9P3Ye.js";import"./Upload-BVkk_8ji.js";const{SvelteComponent:re,add_flush_callback:L,assign:ae,bind:N,binding_callbacks:P,check_outros:_e,create_component:k,destroy_component:j,detach:R,empty:ue,flush:f,get_spread_object:fe,get_spread_update:he,group_outros:ce,init:me,insert:T,mount_component:B,safe_not_equal:we,space:de,transition_in:g,transition_out:b}=window.__gradio__svelte__internal,{createEventDispatcher:ge}=window.__gradio__svelte__internal;function be(s){let e,l,i,n;function r(o){s[31](o)}function d(o){s[32](o)}let w={label:s[4],show_label:s[3],columns:s[13],rows:s[14],height:s[15],preview:s[16],object_fit:s[18],interactive:s[20],allow_preview:s[17],show_share_button:s[19],show_download_button:s[21],i18n:s[22].i18n,_fetch:s[30],show_fullscreen_button:s[23]};return s[1]!==void 0&&(w.selected_index=s[1]),s[0]!==void 0&&(w.value=s[0]),e=new le({props:w}),P.push(()=>N(e,"selected_index",r)),P.push(()=>N(e,"value",d)),e.$on("change",s[33]),e.$on("select",s[34]),e.$on("share",s[35]),e.$on("error",s[36]),e.$on("preview_open",s[37]),e.$on("preview_close",s[38]),{c(){k(e.$$.fragment)},m(o,u){B(e,o,u),n=!0},p(o,u){const _={};u[0]&16&&(_.label=o[4]),u[0]&8&&(_.show_label=o[3]),u[0]&8192&&(_.columns=o[13]),u[0]&16384&&(_.rows=o[14]),u[0]&32768&&(_.height=o[15]),u[0]&65536&&(_.preview=o[16]),u[0]&262144&&(_.object_fit=o[18]),u[0]&1048576&&(_.interactive=o[20]),u[0]&131072&&(_.allow_preview=o[17]),u[0]&524288&&(_.show_share_button=o[19]),u[0]&2097152&&(_.show_download_button=o[21]),u[0]&4194304&&(_.i18n=o[22].i18n),u[0]&4194304&&(_._fetch=o[30]),u[0]&8388608&&(_.show_fullscreen_button=o[23]),!l&&u[0]&2&&(l=!0,_.selected_index=o[1],L(()=>l=!1)),!i&&u[0]&1&&(i=!0,_.value=o[0],L(()=>i=!1)),e.$set(_)},i(o){n||(g(e.$$.fragment,o),n=!0)},o(o){b(e.$$.fragment,o),n=!1},d(o){j(e,o)}}}function ve(s){let e,l;return e=new oe({props:{value:null,root:s[5],label:s[4],max_file_size:s[22].max_file_size,file_count:"multiple",file_types:s[9],i18n:s[22].i18n,upload:s[26],stream_handler:s[27],$$slots:{default:[pe]},$$scope:{ctx:s}}}),e.$on("upload",s[28]),e.$on("error",s[29]),{c(){k(e.$$.fragment)},m(i,n){B(e,i,n),l=!0},p(i,n){const r={};n[0]&32&&(r.root=i[5]),n[0]&16&&(r.label=i[4]),n[0]&4194304&&(r.max_file_size=i[22].max_file_size),n[0]&512&&(r.file_types=i[9]),n[0]&4194304&&(r.i18n=i[22].i18n),n[0]&4194304&&(r.upload=i[26]),n[0]&4194304&&(r.stream_handler=i[27]),n[0]&4194304|n[1]&512&&(r.$$scope={dirty:n,ctx:i}),e.$set(r)},i(i){l||(g(e.$$.fragment,i),l=!0)},o(i){b(e.$$.fragment,i),l=!1},d(i){j(e,i)}}}function pe(s){let e,l;return e=new se({props:{i18n:s[22].i18n,type:"gallery"}}),{c(){k(e.$$.fragment)},m(i,n){B(e,i,n),l=!0},p(i,n){const r={};n[0]&4194304&&(r.i18n=i[22].i18n),e.$set(r)},i(i){l||(g(e.$$.fragment,i),l=!0)},o(i){b(e.$$.fragment,i),l=!1},d(i){j(e,i)}}}function ke(s){let e,l,i,n,r,d;const w=[{autoscroll:s[22].autoscroll},{i18n:s[22].i18n},s[2]];let o={};for(let a=0;a<w.length;a+=1)o=ae(o,w[a]);e=new ne({props:o}),e.$on("clear_status",s[25]);const u=[ve,be],_=[];function m(a,h){return a[20]&&a[24]?0:1}return i=m(s),n=_[i]=u[i](s),{c(){k(e.$$.fragment),l=de(),n.c(),r=ue()},m(a,h){B(e,a,h),T(a,l,h),_[i].m(a,h),T(a,r,h),d=!0},p(a,h){const z=h[0]&4194308?he(w,[h[0]&4194304&&{autoscroll:a[22].autoscroll},h[0]&4194304&&{i18n:a[22].i18n},h[0]&4&&fe(a[2])]):{};e.$set(z);let v=i;i=m(a),i===v?_[i].p(a,h):(ce(),b(_[v],1,1,()=>{_[v]=null}),_e(),n=_[i],n?n.p(a,h):(n=_[i]=u[i](a),n.c()),g(n,1),n.m(r.parentNode,r))},i(a){d||(g(e.$$.fragment,a),g(n),d=!0)},o(a){b(e.$$.fragment,a),b(n),d=!1},d(a){a&&(R(l),R(r)),j(e,a),_[i].d(a)}}}function je(s){let e,l;return e=new ie({props:{visible:s[8],variant:"solid",padding:!1,elem_id:s[6],elem_classes:s[7],container:s[10],scale:s[11],min_width:s[12],allow_overflow:!1,height:typeof s[15]=="number"?s[15]:void 0,$$slots:{default:[ke]},$$scope:{ctx:s}}}),{c(){k(e.$$.fragment)},m(i,n){B(e,i,n),l=!0},p(i,n){const r={};n[0]&256&&(r.visible=i[8]),n[0]&64&&(r.elem_id=i[6]),n[0]&128&&(r.elem_classes=i[7]),n[0]&1024&&(r.container=i[10]),n[0]&2048&&(r.scale=i[11]),n[0]&4096&&(r.min_width=i[12]),n[0]&32768&&(r.height=typeof i[15]=="number"?i[15]:void 0),n[0]&33546815|n[1]&512&&(r.$$scope={dirty:n,ctx:i}),e.$set(r)},i(i){l||(g(e.$$.fragment,i),l=!0)},o(i){b(e.$$.fragment,i),l=!1},d(i){j(e,i)}}}async function Be(s){return(await Promise.all(s.map(async l=>{if(l.path?.toLowerCase().endsWith(".svg")&&l.url){const n=await(await fetch(l.url)).text();return{...l,url:`data:image/svg+xml,${encodeURIComponent(n)}`}}return l}))).map(l=>l.mime_type?.includes("video")?{video:l,caption:null}:{image:l,caption:null})}function ze(s,e,l){let i,{loading_status:n}=e,{show_label:r}=e,{label:d}=e,{root:w}=e,{elem_id:o=""}=e,{elem_classes:u=[]}=e,{visible:_=!0}=e,{value:m=null}=e,{file_types:a=["image","video"]}=e,{container:h=!0}=e,{scale:z=null}=e,{min_width:v=void 0}=e,{columns:C=[2]}=e,{rows:U=void 0}=e,{height:S="auto"}=e,{preview:A}=e,{allow_preview:G=!0}=e,{selected_index:p=null}=e,{object_fit:I="cover"}=e,{show_share_button:q=!1}=e,{interactive:D}=e,{show_download_button:E=!1}=e,{gradio:c}=e,{show_fullscreen_button:F=!0}=e;const W=ge(),H=()=>c.dispatch("clear_status",n),J=(...t)=>c.client.upload(...t),K=(...t)=>c.client.stream(...t),M=async t=>{const te=Array.isArray(t.detail)?t.detail:[t.detail];l(0,m=await Be(te)),c.dispatch("upload",m),c.dispatch("change",m)},O=({detail:t})=>{l(2,n=n||{}),l(2,n.status="error",n),c.dispatch("error",t)},Q=(...t)=>c.client.fetch(...t);function V(t){p=t,l(1,p)}function X(t){m=t,l(0,m)}const Y=()=>c.dispatch("change",m),Z=t=>c.dispatch("select",t.detail),y=t=>c.dispatch("share",t.detail),x=t=>c.dispatch("error",t.detail),$=()=>c.dispatch("preview_open"),ee=()=>c.dispatch("preview_close");return s.$$set=t=>{"loading_status"in t&&l(2,n=t.loading_status),"show_label"in t&&l(3,r=t.show_label),"label"in t&&l(4,d=t.label),"root"in t&&l(5,w=t.root),"elem_id"in t&&l(6,o=t.elem_id),"elem_classes"in t&&l(7,u=t.elem_classes),"visible"in t&&l(8,_=t.visible),"value"in t&&l(0,m=t.value),"file_types"in t&&l(9,a=t.file_types),"container"in t&&l(10,h=t.container),"scale"in t&&l(11,z=t.scale),"min_width"in t&&l(12,v=t.min_width),"columns"in t&&l(13,C=t.columns),"rows"in t&&l(14,U=t.rows),"height"in t&&l(15,S=t.height),"preview"in t&&l(16,A=t.preview),"allow_preview"in t&&l(17,G=t.allow_preview),"selected_index"in t&&l(1,p=t.selected_index),"object_fit"in t&&l(18,I=t.object_fit),"show_share_button"in t&&l(19,q=t.show_share_button),"interactive"in t&&l(20,D=t.interactive),"show_download_button"in t&&l(21,E=t.show_download_button),"gradio"in t&&l(22,c=t.gradio),"show_fullscreen_button"in t&&l(23,F=t.show_fullscreen_button)},s.$$.update=()=>{s.$$.dirty[0]&1&&l(24,i=m===null?!0:m.length===0),s.$$.dirty[0]&2&&W("prop_change",{selected_index:p})},[m,p,n,r,d,w,o,u,_,a,h,z,v,C,U,S,A,G,I,q,D,E,c,F,i,H,J,K,M,O,Q,V,X,Y,Z,y,x,$,ee]}class ut extends re{constructor(e){super(),me(this,e,ze,je,we,{loading_status:2,show_label:3,label:4,root:5,elem_id:6,elem_classes:7,visible:8,value:0,file_types:9,container:10,scale:11,min_width:12,columns:13,rows:14,height:15,preview:16,allow_preview:17,selected_index:1,object_fit:18,show_share_button:19,interactive:20,show_download_button:21,gradio:22,show_fullscreen_button:23},null,[-1,-1])}get loading_status(){return this.$$.ctx[2]}set loading_status(e){this.$$set({loading_status:e}),f()}get show_label(){return this.$$.ctx[3]}set show_label(e){this.$$set({show_label:e}),f()}get label(){return this.$$.ctx[4]}set label(e){this.$$set({label:e}),f()}get root(){return this.$$.ctx[5]}set root(e){this.$$set({root:e}),f()}get elem_id(){return this.$$.ctx[6]}set elem_id(e){this.$$set({elem_id:e}),f()}get elem_classes(){return this.$$.ctx[7]}set elem_classes(e){this.$$set({elem_classes:e}),f()}get visible(){return this.$$.ctx[8]}set visible(e){this.$$set({visible:e}),f()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),f()}get file_types(){return this.$$.ctx[9]}set file_types(e){this.$$set({file_types:e}),f()}get container(){return this.$$.ctx[10]}set container(e){this.$$set({container:e}),f()}get scale(){return this.$$.ctx[11]}set scale(e){this.$$set({scale:e}),f()}get min_width(){return this.$$.ctx[12]}set min_width(e){this.$$set({min_width:e}),f()}get columns(){return this.$$.ctx[13]}set columns(e){this.$$set({columns:e}),f()}get rows(){return this.$$.ctx[14]}set rows(e){this.$$set({rows:e}),f()}get height(){return this.$$.ctx[15]}set height(e){this.$$set({height:e}),f()}get preview(){return this.$$.ctx[16]}set preview(e){this.$$set({preview:e}),f()}get allow_preview(){return this.$$.ctx[17]}set allow_preview(e){this.$$set({allow_preview:e}),f()}get selected_index(){return this.$$.ctx[1]}set selected_index(e){this.$$set({selected_index:e}),f()}get object_fit(){return this.$$.ctx[18]}set object_fit(e){this.$$set({object_fit:e}),f()}get show_share_button(){return this.$$.ctx[19]}set show_share_button(e){this.$$set({show_share_button:e}),f()}get interactive(){return this.$$.ctx[20]}set interactive(e){this.$$set({interactive:e}),f()}get show_download_button(){return this.$$.ctx[21]}set show_download_button(e){this.$$set({show_download_button:e}),f()}get gradio(){return this.$$.ctx[22]}set gradio(e){this.$$set({gradio:e}),f()}get show_fullscreen_button(){return this.$$.ctx[23]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),f()}}export{le as BaseGallery,ut as default}; 2//# sourceMappingURL=Index-Xgtpkgb_.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.