mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-18 22:07:50 +01:00
3 lines
8.6 KiB
JavaScript
3 lines
8.6 KiB
JavaScript
import{B as W,F as X}from"./FileUpload-DcSLb2dy.js";import{a as Qe}from"./FileUpload-DcSLb2dy.js";import{B as Y}from"./Block-DZqtZLFP.js";import"./MarkdownCode.svelte_svelte_type_style_lang-3tofWDHK.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import{U as Z}from"./UploadText-BwEsatWu.js";import{S as y}from"./index-B1gfMDT9.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import{default as Ve}from"./Example-DrmWnoSo.js";import"./BlockLabel-DqHge3FF.js";import"./Empty-CxRQfWXb.js";import"./File-BQ_9P3Ye.js";import"./Upload-DeO6qHmq.js";import"./index-C7PS0jJm.js";import"./svelte/svelte.js";/* empty css */import"./IconButton-B-aAVSzy.js";import"./Clear-By3xiIwg.js";import"./Upload-DXgDHKDd.js";import"./IconButtonWrapper-Cg16aIPK.js";/* empty css */import"./DownloadLink-IzUam-rM.js";import"./context-TgWPFwN2.js";import"./file-url-DgijyRSD.js";import"./prism-python-qapVsvY8.js";/* empty css */const{SvelteComponent:$,add_flush_callback:x,assign:ee,bind:te,binding_callbacks:le,check_outros:ie,create_component:p,destroy_component:v,detach:C,empty:se,flush:c,get_spread_object:ne,get_spread_update:ae,group_outros:oe,init:re,insert:E,mount_component:B,safe_not_equal:_e,space:ue,transition_in:g,transition_out:d}=window.__gradio__svelte__internal;function fe(l){let e,s,t;function n(a){l[27](a)}let o={upload:l[25],stream_handler:l[26],label:l[7],show_label:l[8],value:l[0],file_count:l[15],file_types:l[16],selectable:l[10],root:l[6],height:l[9],allow_reordering:l[17],max_file_size:l[14].max_file_size,i18n:l[14].i18n,$$slots:{default:[he]},$$scope:{ctx:l}};return l[18]!==void 0&&(o.uploading=l[18]),e=new W({props:o}),le.push(()=>te(e,"uploading",n)),e.$on("change",l[28]),e.$on("drag",l[29]),e.$on("clear",l[30]),e.$on("select",l[31]),e.$on("upload",l[32]),e.$on("error",l[33]),e.$on("delete",l[34]),{c(){p(e.$$.fragment)},m(a,_){B(e,a,_),t=!0},p(a,_){const u={};_[0]&16384&&(u.upload=a[25]),_[0]&16384&&(u.stream_handler=a[26]),_[0]&128&&(u.label=a[7]),_[0]&256&&(u.show_label=a[8]),_[0]&1&&(u.value=a[0]),_[0]&32768&&(u.file_count=a[15]),_[0]&65536&&(u.file_types=a[16]),_[0]&1024&&(u.selectable=a[10]),_[0]&64&&(u.root=a[6]),_[0]&512&&(u.height=a[9]),_[0]&131072&&(u.allow_reordering=a[17]),_[0]&16384&&(u.max_file_size=a[14].max_file_size),_[0]&16384&&(u.i18n=a[14].i18n),_[0]&16384|_[1]&16&&(u.$$scope={dirty:_,ctx:a}),!s&&_[0]&262144&&(s=!0,u.uploading=a[18],x(()=>s=!1)),e.$set(u)},i(a){t||(g(e.$$.fragment,a),t=!0)},o(a){d(e.$$.fragment,a),t=!1},d(a){v(e,a)}}}function ce(l){let e,s;return e=new X({props:{selectable:l[10],value:l[0],label:l[7],show_label:l[8],height:l[9],i18n:l[14].i18n}}),e.$on("select",l[23]),e.$on("download",l[24]),{c(){p(e.$$.fragment)},m(t,n){B(e,t,n),s=!0},p(t,n){const o={};n[0]&1024&&(o.selectable=t[10]),n[0]&1&&(o.value=t[0]),n[0]&128&&(o.label=t[7]),n[0]&256&&(o.show_label=t[8]),n[0]&512&&(o.height=t[9]),n[0]&16384&&(o.i18n=t[14].i18n),e.$set(o)},i(t){s||(g(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function he(l){let e,s;return e=new Z({props:{i18n:l[14].i18n,type:"file"}}),{c(){p(e.$$.fragment)},m(t,n){B(e,t,n),s=!0},p(t,n){const o={};n[0]&16384&&(o.i18n=t[14].i18n),e.$set(o)},i(t){s||(g(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function me(l){let e,s,t,n,o,a;const _=[{autoscroll:l[14].autoscroll},{i18n:l[14].i18n},l[1],{status:l[1]?.status||"complete"}];let u={};for(let r=0;r<_.length;r+=1)u=ee(u,_[r]);e=new y({props:u}),e.$on("clear_status",l[22]);const w=[ce,fe],m=[];function k(r,f){return r[5]?1:0}return t=k(l),n=m[t]=w[t](l),{c(){p(e.$$.fragment),s=ue(),n.c(),o=se()},m(r,f){B(e,r,f),E(r,s,f),m[t].m(r,f),E(r,o,f),a=!0},p(r,f){const F=f[0]&16386?ae(_,[f[0]&16384&&{autoscroll:r[14].autoscroll},f[0]&16384&&{i18n:r[14].i18n},f[0]&2&&ne(r[1]),f[0]&2&&{status:r[1]?.status||"complete"}]):{};e.$set(F);let b=t;t=k(r),t===b?m[t].p(r,f):(oe(),d(m[b],1,1,()=>{m[b]=null}),ie(),n=m[t],n?n.p(r,f):(n=m[t]=w[t](r),n.c()),g(n,1),n.m(o.parentNode,o))},i(r){a||(g(e.$$.fragment,r),g(n),a=!0)},o(r){d(e.$$.fragment,r),d(n),a=!1},d(r){r&&(C(s),C(o)),v(e,r),m[t].d(r)}}}function ge(l){let e,s;return e=new Y({props:{visible:l[4],variant:l[0]?"solid":"dashed",border_mode:l[19]?"focus":"base",padding:!1,elem_id:l[2],elem_classes:l[3],container:l[11],scale:l[12],min_width:l[13],allow_overflow:!1,$$slots:{default:[me]},$$scope:{ctx:l}}}),{c(){p(e.$$.fragment)},m(t,n){B(e,t,n),s=!0},p(t,n){const o={};n[0]&16&&(o.visible=t[4]),n[0]&1&&(o.variant=t[0]?"solid":"dashed"),n[0]&524288&&(o.border_mode=t[19]?"focus":"base"),n[0]&4&&(o.elem_id=t[2]),n[0]&8&&(o.elem_classes=t[3]),n[0]&2048&&(o.container=t[11]),n[0]&4096&&(o.scale=t[12]),n[0]&8192&&(o.min_width=t[13]),n[0]&1034211|n[1]&16&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){s||(g(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){v(e,t)}}}function de(l,e,s){let{elem_id:t=""}=e,{elem_classes:n=[]}=e,{visible:o=!0}=e,{value:a}=e,{interactive:_}=e,{root:u}=e,{label:w}=e,{show_label:m}=e,{height:k=void 0}=e,{_selectable:r=!1}=e,{loading_status:f}=e,{container:F=!0}=e,{scale:b=null}=e,{min_width:U=void 0}=e,{gradio:h}=e,{file_count:J}=e,{file_types:O=["file"]}=e,{input_ready:z}=e,{allow_reordering:j=!1}=e,S=!1,N=a,q=!1;const I=()=>h.dispatch("clear_status",f),P=({detail:i})=>h.dispatch("select",i),T=({detail:i})=>h.dispatch("download",i),A=(...i)=>h.client.upload(...i),D=(...i)=>h.client.stream(...i);function G(i){S=i,s(18,S)}const H=({detail:i})=>{s(0,a=i)},K=({detail:i})=>s(19,q=i),L=()=>h.dispatch("clear"),M=({detail:i})=>h.dispatch("select",i),Q=()=>h.dispatch("upload"),R=({detail:i})=>{s(1,f=f||{}),s(1,f.status="error",f),h.dispatch("error",i)},V=({detail:i})=>{h.dispatch("delete",i)};return l.$$set=i=>{"elem_id"in i&&s(2,t=i.elem_id),"elem_classes"in i&&s(3,n=i.elem_classes),"visible"in i&&s(4,o=i.visible),"value"in i&&s(0,a=i.value),"interactive"in i&&s(5,_=i.interactive),"root"in i&&s(6,u=i.root),"label"in i&&s(7,w=i.label),"show_label"in i&&s(8,m=i.show_label),"height"in i&&s(9,k=i.height),"_selectable"in i&&s(10,r=i._selectable),"loading_status"in i&&s(1,f=i.loading_status),"container"in i&&s(11,F=i.container),"scale"in i&&s(12,b=i.scale),"min_width"in i&&s(13,U=i.min_width),"gradio"in i&&s(14,h=i.gradio),"file_count"in i&&s(15,J=i.file_count),"file_types"in i&&s(16,O=i.file_types),"input_ready"in i&&s(20,z=i.input_ready),"allow_reordering"in i&&s(17,j=i.allow_reordering)},l.$$.update=()=>{l.$$.dirty[0]&262144&&s(20,z=!S),l.$$.dirty[0]&2113537&&JSON.stringify(N)!==JSON.stringify(a)&&(h.dispatch("change"),s(21,N=a))},[a,f,t,n,o,_,u,w,m,k,r,F,b,U,h,J,O,j,S,q,z,N,I,P,T,A,D,G,H,K,L,M,Q,R,V]}class Ke extends ${constructor(e){super(),re(this,e,de,ge,_e,{elem_id:2,elem_classes:3,visible:4,value:0,interactive:5,root:6,label:7,show_label:8,height:9,_selectable:10,loading_status:1,container:11,scale:12,min_width:13,gradio:14,file_count:15,file_types:16,input_ready:20,allow_reordering:17},null,[-1,-1])}get elem_id(){return this.$$.ctx[2]}set elem_id(e){this.$$set({elem_id:e}),c()}get elem_classes(){return this.$$.ctx[3]}set elem_classes(e){this.$$set({elem_classes:e}),c()}get visible(){return this.$$.ctx[4]}set visible(e){this.$$set({visible:e}),c()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),c()}get interactive(){return this.$$.ctx[5]}set interactive(e){this.$$set({interactive:e}),c()}get root(){return this.$$.ctx[6]}set root(e){this.$$set({root:e}),c()}get label(){return this.$$.ctx[7]}set label(e){this.$$set({label:e}),c()}get show_label(){return this.$$.ctx[8]}set show_label(e){this.$$set({show_label:e}),c()}get height(){return this.$$.ctx[9]}set height(e){this.$$set({height:e}),c()}get _selectable(){return this.$$.ctx[10]}set _selectable(e){this.$$set({_selectable:e}),c()}get loading_status(){return this.$$.ctx[1]}set loading_status(e){this.$$set({loading_status:e}),c()}get container(){return this.$$.ctx[11]}set container(e){this.$$set({container:e}),c()}get scale(){return this.$$.ctx[12]}set scale(e){this.$$set({scale:e}),c()}get min_width(){return this.$$.ctx[13]}set min_width(e){this.$$set({min_width:e}),c()}get gradio(){return this.$$.ctx[14]}set gradio(e){this.$$set({gradio:e}),c()}get file_count(){return this.$$.ctx[15]}set file_count(e){this.$$set({file_count:e}),c()}get file_types(){return this.$$.ctx[16]}set file_types(e){this.$$set({file_types:e}),c()}get input_ready(){return this.$$.ctx[20]}set input_ready(e){this.$$set({input_ready:e}),c()}get allow_reordering(){return this.$$.ctx[17]}set allow_reordering(e){this.$$set({allow_reordering:e}),c()}}export{Ve as BaseExample,X as BaseFile,W as BaseFileUpload,Qe as FilePreview,Ke as default};
|
|
//# sourceMappingURL=Index-BvhhxePj.js.map
|