mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-18 10:57:50 +01:00
3 lines
11 KiB
JavaScript
3 lines
11 KiB
JavaScript
import{c as pt,f as tt}from"./index-CvpmwOJi.js";import{j as vt}from"./index-C7PS0jJm.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-BOpxTcdu.js";import{p as et}from"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";const{SvelteComponent:$t,append:wt,attr:g,detach:bt,init:kt,insert:yt,noop:G,safe_not_equal:qt,svg_element:nt}=window.__gradio__svelte__internal;function Ct(i){let t,e;return{c(){t=nt("svg"),e=nt("path"),g(e,"stroke-linecap","round"),g(e,"stroke-linejoin","round"),g(e,"d","M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"),g(t,"fill","none"),g(t,"stroke","currentColor"),g(t,"viewBox","0 0 24 24"),g(t,"width","100%"),g(t,"height","100%"),g(t,"xmlns","http://www.w3.org/2000/svg"),g(t,"aria-hidden","true"),g(t,"stroke-width","2"),g(t,"stroke-linecap","round"),g(t,"stroke-linejoin","round")},m(n,s){yt(n,t,s),wt(t,e)},p:G,i:G,o:G,d(n){n&&bt(t)}}}class St extends $t{constructor(t){super(),kt(this,t,null,Ct,qt,{})}}const{SvelteComponent:Mt,append:jt,attr:p,detach:zt,init:Tt,insert:Ht,noop:J,safe_not_equal:Lt,svg_element:it}=window.__gradio__svelte__internal;function Bt(i){let t,e;return{c(){t=it("svg"),e=it("path"),p(e,"stroke-linecap","round"),p(e,"stroke-linejoin","round"),p(e,"d","M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"),p(t,"fill","none"),p(t,"stroke","currentColor"),p(t,"viewBox","0 0 24 24"),p(t,"width","100%"),p(t,"height","100%"),p(t,"xmlns","http://www.w3.org/2000/svg"),p(t,"aria-hidden","true"),p(t,"stroke-width","2"),p(t,"stroke-linecap","round"),p(t,"stroke-linejoin","round")},m(n,s){Ht(n,t,s),jt(t,e)},p:J,i:J,o:J,d(n){n&&zt(t)}}}class At extends Mt{constructor(t){super(),Tt(this,t,null,Bt,Lt,{})}}const{SvelteComponent:xt,append:Ft,attr:v,detach:It,init:Et,insert:Ot,noop:K,safe_not_equal:Rt,svg_element:st}=window.__gradio__svelte__internal;function Dt(i){let t,e;return{c(){t=st("svg"),e=st("path"),v(e,"stroke-linecap","round"),v(e,"stroke-linejoin","round"),v(e,"d","M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),v(t,"fill","none"),v(t,"stroke","currentColor"),v(t,"viewBox","0 0 24 24"),v(t,"width","100%"),v(t,"height","100%"),v(t,"xmlns","http://www.w3.org/2000/svg"),v(t,"aria-hidden","true"),v(t,"stroke-width","2"),v(t,"stroke-linecap","round"),v(t,"stroke-linejoin","round")},m(n,s){Ot(n,t,s),Ft(t,e)},p:K,i:K,o:K,d(n){n&&It(t)}}}class Ut extends xt{constructor(t){super(),Et(this,t,null,Dt,Rt,{})}}const{SvelteComponent:Vt,append:Wt,attr:$,detach:Gt,init:Jt,insert:Kt,noop:N,safe_not_equal:Nt,svg_element:ot}=window.__gradio__svelte__internal;function Pt(i){let t,e;return{c(){t=ot("svg"),e=ot("path"),$(e,"stroke-linecap","round"),$(e,"stroke-linejoin","round"),$(e,"d","M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"),$(t,"fill","none"),$(t,"stroke","currentColor"),$(t,"stroke-width","2"),$(t,"viewBox","0 0 24 24"),$(t,"width","100%"),$(t,"height","100%"),$(t,"xmlns","http://www.w3.org/2000/svg"),$(t,"aria-hidden","true"),$(t,"stroke-linecap","round"),$(t,"stroke-linejoin","round")},m(n,s){Kt(n,t,s),Wt(t,e)},p:N,i:N,o:N,d(n){n&&Gt(t)}}}class Qt extends Vt{constructor(t){super(),Jt(this,t,null,Pt,Nt,{})}}function Xt(i,{from:t,to:e},n={}){const s=getComputedStyle(i),c=s.transform==="none"?"":s.transform,[f,a]=s.transformOrigin.split(" ").map(parseFloat),o=t.left+t.width*f/e.width-(e.left+f),r=t.top+t.height*a/e.height-(e.top+a),{delay:d=0,duration:q=w=>Math.sqrt(w)*120,easing:y=pt}=n;return{delay:d,duration:vt(q)?q(Math.sqrt(o*o+r*r)):q,easing:y,css:(w,k)=>{const j=k*o,l=k*r,S=w+k*t.width/e.width,z=w+k*t.height/e.height;return`transform: ${c} translate(${j}px, ${l}px) scale(${S}, ${z});`}}}const{SvelteComponent:Yt,add_render_callback:Zt,append:b,attr:_,bubble:rt,check_outros:te,create_component:R,create_in_transition:ee,create_out_transition:ne,destroy_component:D,detach:ie,element:C,flush:H,group_outros:se,init:oe,insert:re,listen:P,mount_component:U,run_all:ae,safe_not_equal:le,set_data:ue,space:O,stop_propagation:at,text:ce,toggle_class:lt,transition_in:L,transition_out:B}=window.__gradio__svelte__internal,{createEventDispatcher:_e,onMount:de}=window.__gradio__svelte__internal;function fe(i){let t,e;return t=new St({}),{c(){R(t.$$.fragment)},m(n,s){U(t,n,s),e=!0},i(n){e||(L(t.$$.fragment,n),e=!0)},o(n){B(t.$$.fragment,n),e=!1},d(n){D(t,n)}}}function he(i){let t,e;return t=new Ut({}),{c(){R(t.$$.fragment)},m(n,s){U(t,n,s),e=!0},i(n){e||(L(t.$$.fragment,n),e=!0)},o(n){B(t.$$.fragment,n),e=!1},d(n){D(t,n)}}}function me(i){let t,e;return t=new At({}),{c(){R(t.$$.fragment)},m(n,s){U(t,n,s),e=!0},i(n){e||(L(t.$$.fragment,n),e=!0)},o(n){B(t.$$.fragment,n),e=!1},d(n){D(t,n)}}}function ge(i){let t,e;return t=new Qt({}),{c(){R(t.$$.fragment)},m(n,s){U(t,n,s),e=!0},i(n){e||(L(t.$$.fragment,n),e=!0)},o(n){B(t.$$.fragment,n),e=!1},d(n){D(t,n)}}}function pe(i){let t,e,n,s,c,f,a,o,r,d,q,y,w,k,j,l,S,z,Q,T,x,F,I,E,A,h,V,X;const Y=[ge,me,he,fe],M=[];function Z(u,m){return u[2]==="warning"?0:u[2]==="info"?1:u[2]==="success"?2:u[2]==="error"?3:-1}return~(n=Z(i))&&(s=M[n]=Y[n](i)),{c(){t=C("div"),e=C("div"),s&&s.c(),f=O(),a=C("div"),o=C("div"),r=ce(i[1]),q=O(),y=C("div"),j=O(),l=C("button"),S=C("span"),S.textContent="×",Q=O(),T=C("div"),_(e,"class",c="toast-icon "+i[2]+" svelte-15qa81b"),_(o,"class",d="toast-title "+i[2]+" svelte-15qa81b"),_(y,"class",w="toast-text "+i[2]+" svelte-15qa81b"),_(a,"class",k="toast-details "+i[2]+" svelte-15qa81b"),_(S,"aria-hidden","true"),_(l,"class",z="toast-close "+i[2]+" svelte-15qa81b"),_(l,"type","button"),_(l,"aria-label","Close"),_(l,"data-testid","toast-close"),_(T,"class",x="timer "+i[2]+" svelte-15qa81b"),_(T,"style",F=`animation-duration: ${i[3]};`),_(t,"class",I="toast-body "+i[2]+" svelte-15qa81b"),_(t,"role","alert"),_(t,"data-testid","toast-body"),lt(t,"hidden",!i[4])},m(u,m){re(u,t,m),b(t,e),~n&&M[n].m(e,null),b(t,f),b(t,a),b(a,o),b(o,r),b(a,q),b(a,y),y.innerHTML=i[0],b(t,j),b(t,l),b(l,S),b(t,Q),b(t,T),h=!0,V||(X=[P(l,"click",i[5]),P(t,"click",at(i[9])),P(t,"keydown",at(i[10]))],V=!0)},p(u,[m]){let W=n;n=Z(u),n!==W&&(s&&(se(),B(M[W],1,1,()=>{M[W]=null}),te()),~n?(s=M[n],s||(s=M[n]=Y[n](u),s.c()),L(s,1),s.m(e,null)):s=null),(!h||m&4&&c!==(c="toast-icon "+u[2]+" svelte-15qa81b"))&&_(e,"class",c),(!h||m&2)&&ue(r,u[1]),(!h||m&4&&d!==(d="toast-title "+u[2]+" svelte-15qa81b"))&&_(o,"class",d),(!h||m&1)&&(y.innerHTML=u[0]),(!h||m&4&&w!==(w="toast-text "+u[2]+" svelte-15qa81b"))&&_(y,"class",w),(!h||m&4&&k!==(k="toast-details "+u[2]+" svelte-15qa81b"))&&_(a,"class",k),(!h||m&4&&z!==(z="toast-close "+u[2]+" svelte-15qa81b"))&&_(l,"class",z),(!h||m&4&&x!==(x="timer "+u[2]+" svelte-15qa81b"))&&_(T,"class",x),(!h||m&8&&F!==(F=`animation-duration: ${u[3]};`))&&_(T,"style",F),(!h||m&4&&I!==(I="toast-body "+u[2]+" svelte-15qa81b"))&&_(t,"class",I),(!h||m&20)&<(t,"hidden",!u[4])},i(u){h||(L(s),u&&Zt(()=>{h&&(A&&A.end(1),E=ee(t,tt,{duration:200,delay:100}),E.start())}),h=!0)},o(u){B(s),E&&E.invalidate(),u&&(A=ne(t,tt,{duration:200})),h=!1},d(u){u&&ie(t),~n&&M[n].d(),u&&A&&A.end(),V=!1,ae(X)}}}function ve(i,t,e){let n,s,{title:c=""}=t,{message:f=""}=t,{type:a}=t,{id:o}=t,{duration:r=10}=t,{visible:d=!0}=t;const q=l=>{try{return!!l&&new URL(l,location.href).origin!==location.origin}catch{return!1}};et.addHook("afterSanitizeAttributes",function(l){"target"in l&&q(l.getAttribute("href"))&&(l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer"))});const y=_e();function w(){y("close",o)}de(()=>{r!==null&&setTimeout(()=>{w()},r*1e3)});function k(l){rt.call(this,i,l)}function j(l){rt.call(this,i,l)}return i.$$set=l=>{"title"in l&&e(1,c=l.title),"message"in l&&e(0,f=l.message),"type"in l&&e(2,a=l.type),"id"in l&&e(7,o=l.id),"duration"in l&&e(6,r=l.duration),"visible"in l&&e(8,d=l.visible)},i.$$.update=()=>{i.$$.dirty&1&&e(0,f=et.sanitize(f)),i.$$.dirty&256&&e(4,n=d),i.$$.dirty&64&&e(6,r=r||null),i.$$.dirty&64&&e(3,s=`${r||0}s`)},[f,c,a,s,n,w,r,o,d,k,j]}class $e extends Yt{constructor(t){super(),oe(this,t,ve,pe,le,{title:1,message:0,type:2,id:7,duration:6,visible:8})}get title(){return this.$$.ctx[1]}set title(t){this.$$set({title:t}),H()}get message(){return this.$$.ctx[0]}set message(t){this.$$set({message:t}),H()}get type(){return this.$$.ctx[2]}set type(t){this.$$set({type:t}),H()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),H()}get duration(){return this.$$.ctx[6]}set duration(t){this.$$set({duration:t}),H()}get visible(){return this.$$.ctx[8]}set visible(t){this.$$set({visible:t}),H()}}const{SvelteComponent:we,append:be,attr:ke,bubble:ye,check_outros:qe,create_animation:Ce,create_component:Se,destroy_component:Me,detach:dt,element:ft,ensure_array_like:ut,fix_and_outro_and_destroy_block:je,fix_position:ze,flush:Te,group_outros:He,init:Le,insert:ht,mount_component:Be,noop:Ae,safe_not_equal:xe,set_style:Fe,space:Ie,transition_in:mt,transition_out:gt,update_keyed_each:Ee}=window.__gradio__svelte__internal;function ct(i,t,e){const n=i.slice();return n[2]=t[e].type,n[3]=t[e].title,n[4]=t[e].message,n[5]=t[e].id,n[6]=t[e].duration,n[7]=t[e].visible,n}function _t(i,t){let e,n,s,c,f=Ae,a;return n=new $e({props:{type:t[2],title:t[3],message:t[4],duration:t[6],visible:t[7],id:t[5]}}),n.$on("close",t[1]),{key:i,first:null,c(){e=ft("div"),Se(n.$$.fragment),s=Ie(),Fe(e,"width","100%"),this.first=e},m(o,r){ht(o,e,r),Be(n,e,null),be(e,s),a=!0},p(o,r){t=o;const d={};r&1&&(d.type=t[2]),r&1&&(d.title=t[3]),r&1&&(d.message=t[4]),r&1&&(d.duration=t[6]),r&1&&(d.visible=t[7]),r&1&&(d.id=t[5]),n.$set(d)},r(){c=e.getBoundingClientRect()},f(){ze(e),f()},a(){f(),f=Ce(e,c,Xt,{duration:300})},i(o){a||(mt(n.$$.fragment,o),a=!0)},o(o){gt(n.$$.fragment,o),a=!1},d(o){o&&dt(e),Me(n)}}}function Oe(i){let t,e=[],n=new Map,s,c=ut(i[0]);const f=a=>a[5];for(let a=0;a<c.length;a+=1){let o=ct(i,c,a),r=f(o);n.set(r,e[a]=_t(r,o))}return{c(){t=ft("div");for(let a=0;a<e.length;a+=1)e[a].c();ke(t,"class","toast-wrap svelte-pu0yf1")},m(a,o){ht(a,t,o);for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(t,null);s=!0},p(a,[o]){if(o&1){c=ut(a[0]),He();for(let r=0;r<e.length;r+=1)e[r].r();e=Ee(e,o,f,1,a,c,n,t,je,_t,null,ct);for(let r=0;r<e.length;r+=1)e[r].a();qe()}},i(a){if(!s){for(let o=0;o<c.length;o+=1)mt(e[o]);s=!0}},o(a){for(let o=0;o<e.length;o+=1)gt(e[o]);s=!1},d(a){a&&dt(t);for(let o=0;o<e.length;o+=1)e[o].d()}}}function Re(i){i.length>0&&"parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0)}function De(i,t,e){let{messages:n=[]}=t;function s(c){ye.call(this,i,c)}return i.$$set=c=>{"messages"in c&&e(0,n=c.messages)},i.$$.update=()=>{i.$$.dirty&1&&Re(n)},[n,s]}class Je extends we{constructor(t){super(),Le(this,t,De,Oe,xe,{messages:0})}get messages(){return this.$$.ctx[0]}set messages(t){this.$$set({messages:t}),Te()}}export{Je as T};
|
||
//# sourceMappingURL=Toast-DdWZrg4w.js.map
|