mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-18 19:47:50 +01:00
3 lines
7.3 KiB
JavaScript
3 lines
7.3 KiB
JavaScript
import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import{u as J}from"./utils-BsGrhMNe.js";import"./MarkdownCode.svelte_svelte_type_style_lang-3tofWDHK.js";import{B as K}from"./BlockLabel-DqHge3FF.js";import{I as O}from"./IconButton-B-aAVSzy.js";import{E as Q}from"./Empty-CxRQfWXb.js";import{S as R}from"./ShareButton-CKIdzpwI.js";import{D as U}from"./Download-DVtk-Jv3.js";import{I as M,F as V}from"./FullscreenButton-CqFNG1Hv.js";import{I as X}from"./IconButtonWrapper-Cg16aIPK.js";import{g as Y}from"./utils-Gtzs_Zla.js";import{I as Z}from"./Image-CsmDAdIf.js";import{D as x}from"./DownloadLink-IzUam-rM.js";/* empty css */import"./prism-python-qapVsvY8.js";import"./index-C7PS0jJm.js";import"./svelte/svelte.js";import"./Community-Dw1micSV.js";import"./Minimize-OAHZO2Ge.js";import"./file-url-DgijyRSD.js";import"./context-TgWPFwN2.js";/* empty css */const{SvelteComponent:ee,append:E,attr:F,binding_callbacks:te,bubble:S,check_outros:I,create_component:h,destroy_component:g,detach:k,element:z,empty:P,flush:d,group_outros:B,init:ne,insert:v,listen:oe,mount_component:w,safe_not_equal:le,space:D,toggle_class:L,transition_in:m,transition_out:b}=window.__gradio__svelte__internal,{createEventDispatcher:re,onMount:He}=window.__gradio__svelte__internal;function se(r){let e,n,t,o,l,a,_,i,f;return n=new X({props:{display_top_corner:r[8],$$slots:{default:[ue]},$$scope:{ctx:r}}}),a=new Z({props:{src:r[0].url,alt:"",loading:"lazy"}}),a.$on("load",r[14]),{c(){e=z("div"),h(n.$$.fragment),t=D(),o=z("button"),l=z("div"),h(a.$$.fragment),F(l,"class","image-frame svelte-dpdy90"),L(l,"selectable",r[4]),F(o,"class","svelte-dpdy90"),F(e,"class","image-container svelte-dpdy90")},m(s,c){v(s,e,c),w(n,e,null),E(e,t),E(e,o),E(o,l),w(a,l,null),r[15](e),_=!0,i||(f=oe(o,"click",r[10]),i=!0)},p(s,c){const p={};c&256&&(p.display_top_corner=s[8]),c&131817&&(p.$$scope={dirty:c,ctx:s}),n.$set(p);const $={};c&1&&($.src=s[0].url),a.$set($),(!_||c&16)&&L(l,"selectable",s[4])},i(s){_||(m(n.$$.fragment,s),m(a.$$.fragment,s),_=!0)},o(s){b(n.$$.fragment,s),b(a.$$.fragment,s),_=!1},d(s){s&&k(e),g(n),g(a),r[15](null),i=!1,f()}}}function ie(r){let e,n;return e=new Q({props:{unpadded_box:!0,size:"large",$$slots:{default:[_e]},$$scope:{ctx:r}}}),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},p(t,o){const l={};o&131072&&(l.$$scope={dirty:o,ctx:t}),e.$set(l)},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function q(r){let e,n;return e=new V({props:{container:r[9]}}),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},p(t,o){const l={};o&512&&(l.container=t[9]),e.$set(l)},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function C(r){let e,n;return e=new x({props:{href:r[0].url,download:r[0].orig_name||"image",$$slots:{default:[ae]},$$scope:{ctx:r}}}),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},p(t,o){const l={};o&1&&(l.href=t[0].url),o&1&&(l.download=t[0].orig_name||"image"),o&131136&&(l.$$scope={dirty:o,ctx:t}),e.$set(l)},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function ae(r){let e,n;return e=new O({props:{Icon:U,label:r[6]("common.download")}}),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},p(t,o){const l={};o&64&&(l.label=t[6]("common.download")),e.$set(l)},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function H(r){let e,n;return e=new R({props:{i18n:r[6],formatter:r[11],value:r[0]}}),e.$on("share",r[12]),e.$on("error",r[13]),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},p(t,o){const l={};o&64&&(l.i18n=t[6]),o&1&&(l.value=t[0]),e.$set(l)},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function ue(r){let e,n,t,o,l=r[7]&&q(r),a=r[3]&&C(r),_=r[5]&&H(r);return{c(){l&&l.c(),e=D(),a&&a.c(),n=D(),_&&_.c(),t=P()},m(i,f){l&&l.m(i,f),v(i,e,f),a&&a.m(i,f),v(i,n,f),_&&_.m(i,f),v(i,t,f),o=!0},p(i,f){i[7]?l?(l.p(i,f),f&128&&m(l,1)):(l=q(i),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(B(),b(l,1,1,()=>{l=null}),I()),i[3]?a?(a.p(i,f),f&8&&m(a,1)):(a=C(i),a.c(),m(a,1),a.m(n.parentNode,n)):a&&(B(),b(a,1,1,()=>{a=null}),I()),i[5]?_?(_.p(i,f),f&32&&m(_,1)):(_=H(i),_.c(),m(_,1),_.m(t.parentNode,t)):_&&(B(),b(_,1,1,()=>{_=null}),I())},i(i){o||(m(l),m(a),m(_),o=!0)},o(i){b(l),b(a),b(_),o=!1},d(i){i&&(k(e),k(n),k(t)),l&&l.d(i),a&&a.d(i),_&&_.d(i)}}}function _e(r){let e,n;return e=new M({}),{c(){h(e.$$.fragment)},m(t,o){w(e,t,o),n=!0},i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){b(e.$$.fragment,t),n=!1},d(t){g(e,t)}}}function fe(r){let e,n,t,o,l,a;e=new K({props:{show_label:r[2],Icon:M,label:r[2]?r[1]||r[6]("image.image"):""}});const _=[ie,se],i=[];function f(s,c){return s[0]===null||!s[0].url?0:1}return t=f(r),o=i[t]=_[t](r),{c(){h(e.$$.fragment),n=D(),o.c(),l=P()},m(s,c){w(e,s,c),v(s,n,c),i[t].m(s,c),v(s,l,c),a=!0},p(s,[c]){const p={};c&4&&(p.show_label=s[2]),c&70&&(p.label=s[2]?s[1]||s[6]("image.image"):""),e.$set(p);let $=t;t=f(s),t===$?i[t].p(s,c):(B(),b(i[$],1,1,()=>{i[$]=null}),I(),o=i[t],o?o.p(s,c):(o=i[t]=_[t](s),o.c()),m(o,1),o.m(l.parentNode,l))},i(s){a||(m(e.$$.fragment,s),m(o),a=!0)},o(s){b(e.$$.fragment,s),b(o),a=!1},d(s){s&&(k(n),k(l)),g(e,s),i[t].d(s)}}}function ce(r,e,n){let{value:t}=e,{label:o=void 0}=e,{show_label:l}=e,{show_download_button:a=!0}=e,{selectable:_=!1}=e,{show_share_button:i=!1}=e,{i18n:f}=e,{show_fullscreen_button:s=!0}=e,{display_icon_button_wrapper_top_corner:c=!1}=e;const p=re(),$=u=>{let N=Y(u);N&&p("select",{index:N,value:null})};let y;const T=async u=>u?`<img src="${await J(u)}" />`:"";function W(u){S.call(this,r,u)}function j(u){S.call(this,r,u)}function A(u){S.call(this,r,u)}function G(u){te[u?"unshift":"push"](()=>{y=u,n(9,y)})}return r.$$set=u=>{"value"in u&&n(0,t=u.value),"label"in u&&n(1,o=u.label),"show_label"in u&&n(2,l=u.show_label),"show_download_button"in u&&n(3,a=u.show_download_button),"selectable"in u&&n(4,_=u.selectable),"show_share_button"in u&&n(5,i=u.show_share_button),"i18n"in u&&n(6,f=u.i18n),"show_fullscreen_button"in u&&n(7,s=u.show_fullscreen_button),"display_icon_button_wrapper_top_corner"in u&&n(8,c=u.display_icon_button_wrapper_top_corner)},[t,o,l,a,_,i,f,s,c,y,$,T,W,j,A,G]}class Me extends ee{constructor(e){super(),ne(this,e,ce,fe,le,{value:0,label:1,show_label:2,show_download_button:3,selectable:4,show_share_button:5,i18n:6,show_fullscreen_button:7,display_icon_button_wrapper_top_corner:8})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),d()}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),d()}get show_label(){return this.$$.ctx[2]}set show_label(e){this.$$set({show_label:e}),d()}get show_download_button(){return this.$$.ctx[3]}set show_download_button(e){this.$$set({show_download_button:e}),d()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$$set({selectable:e}),d()}get show_share_button(){return this.$$.ctx[5]}set show_share_button(e){this.$$set({show_share_button:e}),d()}get i18n(){return this.$$.ctx[6]}set i18n(e){this.$$set({i18n:e}),d()}get show_fullscreen_button(){return this.$$.ctx[7]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),d()}get display_icon_button_wrapper_top_corner(){return this.$$.ctx[8]}set display_icon_button_wrapper_top_corner(e){this.$$set({display_icon_button_wrapper_top_corner:e}),d()}}export{Me as default};
|
|
//# sourceMappingURL=ImagePreview-DuKw1rWw.js.map
|