1const __vite__fileDeps=["./Index-Bb09QJrB.js","./Button-CSe1rCl7.js","./Index-C_XES7MU.js","./index-CmhFtYKU.js","./index-DeRUbA-x.css","./_commonjsHelpers-BosuxZz1.js","./Index-DQmn0l2I.css","./Button-CTZL5Nos.css","./Index-BQgACJ6i.js","./Index-CptIZeFZ.css","./Index-C5NYahSl.css","./Index-CCzXjsFp.js","./BlockLabel-B4vIIOBx.js","./Empty-kwE6l5yz.js","./Image-Bsh8Umrh.js","./file-url-BwxMUVic.js","./Index-Cr62iXTg.css","./Example-uQ8MuYg6.js","./Example-D7K5RtQ2.css","./index-8Tv0pFGK.js","./ShareButton-D0Y7b8-I.js","./DownloadLink-a6tDpFhv.js","./Music-CDm0RGMk.js","./Trim-UKwaW4UI.js","./Undo-CpmTQw3B.js","./ModifyUpload.svelte_svelte_type_style_lang-DFwl17Pq.js","./ModifyUpload-RL_SHQmd.css","./ModifyUpload-ErnQGHFf.js","./SelectSource-SM74bpSU.js","./Upload-Cp8Go_XF.js","./UploadText-DhD3FmBe.js","./index-9HmesOWo.css","./Index-8eTw_Sgr.js","./Index-BzR4luAq.js","./Index-h4DOHpBZ.js","./index-CnqicUFC.js","./Image-DZfuSY7J.js","./Image-B8dFOee4.css","./Video-BWZnV5SQ.js","./Video-DJw86Ppo.css","./Index.svelte_svelte_type_style_lang-D7jB1MnY.js","./Example.
1svelte_svelte_type_style_lang-Bcc7Gw68.js","./prism-python-_O7S0ge-.js","./Example-D1E_4wSv.css","./Index-B2S_zKCm.css","./Check-Ck0iADAu.js","./Copy-ZPOKSMtK.js","./Index-CIxSeH4y.css","./Example-CZ-iEz1g.js","./Index-REvFgcP5.js","./Info-tSVLgAnm.js","./Index-BTCbxfal.css","./Example-CRm1Pmw_.js","./Index-ifRua2Qz.js","./BlockTitle-B7N3cbIr.js","./Index-D8o7u_T6.css","./Example-Wp-_4AVX.js","./Example-oomIF0ca.css","./Index-BZXlgoQn.js","./Index-BrtrebwU.css","./Example-BaLyJYAe.js","./Example-Bw8Q_3wB.css","./Index-BVCwhbGi.js","./Index-B6tpubC5.css","./Example-CMXuI9oj.js","./Example-CX34aPix.css","./Index-jjDf9XWn.js","./dsv-DB8NKgIY.js","./Index-CR9lHGQe.css","./Index-DSRrUSW7.js","./Index-D3f6Hf9S.css","./Index-DfjvSBdK.js","./Index-tcNSQSor.css","./Example-CUwox43B.js","./Index-AAPqF2Dk.js","./DropdownArrow-B1sBeeDG.js","./Index-BAQumg2K.css","./Example-DrmWnoSo.js","./Example-DpWs9cEC.css","./Index-BpG7x5p-.js","./FileUpload-B5qH4dU9.js","./File-BQ_9P3Ye.js","./FileUpload-2TE7T7kD.css","./Example-CIFMxn5c.js","./Example-DfhEULNF.css","./Index-CQiMRxXB.js","./Index-YPTlsVjp.css","./Index-DDCF2BFd.js","./Index-B0JJ6p9c.css","./Index-Cg7tFvM7.js","./Index-CnEIM1a1.css","./Index-CS2xVf8J.js","./Index-C-7D3Y3j.css","./Index-C7l6xT25.js","./color-fk1k5dj0.js","./Index-Dwy3Ni24.css","./Example-C2a4WxRl.js","./Example-CSw4pLi5.css","./Index-C7RTbroj.js","./Index-BGmqBTg_.css","./Example-BNhy9Nko.js","./Example-DikqVAPo.css","./Index-DHRe32sv.js","./ImageUploader-BJq-_U1W.js","./ImageUploader-B7bPUstM.css","./Example-DovLUjA2.js","./Example-6rv12T44.css","./Index-vyEXH25o.js","./url-BybKzMWq.js","./__vite-browser-external-DFe-p4yY.js","./Index-DAGKYUjg.css","./Index-Cs9aavKb.js","./Index-729KAuZc.css","./Index-uvE60a-g.js","./Index-BM4_tjMk.css","./Example-DyGpBxhn.js","./Index-CrUUPQTe.js","./Example-BQyGztrG.js","./Index-DFRQv7O6.js","./Index-Pyhmzacd.css","./Example-C-V2TL_j.js","./Example-sa1k2iUl.css","./Index-Di49lUxK.js","./Video-fsmLZWjA.js","./Index-BYnBLYUv.css","./Example-CqL1e7EB.js","./Index-DvoNHnsL.js","./Index-BUublr_b.css","./Example-C9__vDgN.js","./Index-CJNxQKtx.js","./Index-C7_YTRk1.css","./Index-T3NbKzMg.js","./Index-D-1bCrLQ.css","./Example-BoMLuz1A.js","./Index-m-O5JWMO.js","./Index-BSqct-uf.css","./Index-1_0fVzj5.js","./Index-C43SQM_O.css","./Example-BrizabXh.js","./Index-D1b6UIfy.js","./Index-CJeiS5ET.css","./index-4775hVua.js","./Index-BSqMaEqV.js","./Tabs-C5LE0aIt.js","./Tabs-DX5TEub2.css","./Index-thdqX2vf.css","./Index-CEy_Cj6Y.js","./Example-C7XUkkid.js","./Example-Cj3ii62O.css","./Index-9XNZQpVV.js","./Textbox-BIgDpu0v.js","./Textbox-D8IAzrZj.css","./Index-DD5Sgt6x.js","./Index-DYDmCduo.css","./Example-DiYvEkKz.js","./Example-B5CSTz0f.css","./index-BdCgfgnQ.js","./index-CgvweMVN.css","./Example-DxdiEFS_.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); 2import{a as lr,L as si,b as ir,$ as ai,w as an,d as rr}from"./Index-C_XES7MU.js";import{_ as I}from"./index-CmhFtYKU.js";import{c as sr,f as bo,a as Kn,B as Xn}from"./Button-CSe1rCl7.js";const{SvelteComponent:ar,append:_r,attr:Ce,detach:cr,init:ur,insert:fr,noop:En,safe_not_equal:pr,svg_element:wo}=window.__gradio__svelte__internal;function dr(o){let e,t;return{c(){e=wo("svg"),t=wo("path"),Ce(t,"stroke-linecap","round"),Ce(t,"stroke-linejoin","round"),Ce(t,"d","M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"),Ce(e,"fill","none"),Ce(e,"stroke","currentColor"),Ce(e,"viewBox","0 0 24 24"),Ce(e,"width","100%"),Ce(e,"height","100%"),Ce(e,"xmlns","http://www.w3.org/2000/svg"),Ce(e,"aria-hidden","true"),Ce(e,"stroke-width","2"),Ce(e,"stroke-linecap","round"),Ce(e,"stroke-linejoin","round")},m(n,l){fr(n,e,l),_r(e,t)},p:En,i:En,o:En,d(n){n&&cr(e)}}}let mr=class extends ar{constructor(e){super(),ur(this,e,null,dr,pr,{})}};const{SvelteComponent:hr,append:gr,attr:Ae,detach:vr,init:$r,insert:br,noop:Cn,safe_not_equal:wr,svg_element:ko}=window.__gradio__svelte__internal;function kr(o){let e,t;return{c(){e=ko("svg"),t=ko("path"),Ae(t,"stroke-linecap","round"),Ae(t,"stroke-linejoin","round"),Ae(t,"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"),Ae(e,"fill","none"),Ae(e,"stroke","currentColor"),Ae(e,"viewBox","0 0 24 24"),Ae(e,"width","100%"),Ae(e,"height","100%"),Ae(e,"xmlns","http://www.w3.org/2000/svg"),Ae(e,"aria-hidden","true"),Ae(e,"stroke-width","2"),Ae(e,"stroke-linecap","round"),Ae(e,"stroke-linejoin","round")},m(n,l){br(n,e,l),gr(e,t)},p:Cn,i:Cn,o:Cn,d(n){n&&vr(e)}}}class yr extends hr{constructor(e){super(),$r(this,e,null,kr,wr,{})}}const{SvelteComponent:Er,append:Cr,attr:Le,detach:Ar,init:Lr,insert:qr,noop:An,safe_not_equal:Pr,svg_element:yo}=window.__gradio__svelte__internal;function Or(o){let e,t;return{c(){e=yo("svg"),t=yo("path"),Le(t,"stroke-linecap","round"),Le(t,"stroke-linejoin","round"),Le(t,"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"),Le(e,"fill","none"),Le(e,"stroke","currentColor"),Le(e,"stroke-width","2"),Le(e,"viewBox","0 0 24 24"),Le(e,"width","100%"),Le(e,"height","100%"),Le(e,"xmlns","http://www.w3.org/2000/svg"),Le(e,"aria-hidden","true"),Le(e,"stroke-linecap","round"),Le(e,"stroke-linejoin","round")},m(n,l){qr(n,e,l),Cr(e,t)},p:An,i:An,o:An,d(n){n&&Ar(e)}}}
2class Tr extends Er{constructor(e){super(),Lr(this,e,null,Or,Pr,{})}}class Ln extends Error{constructor(e){super(e),this.name="ShareError"}}async function Su(o,e){if(window.__gradio_space__==null)throw new Ln("Must be on Spaces to share.");let t,n,l;if(e==="url"){const a=await fetch(o);t=await a.blob(),n=a.headers.get("content-type")||"",l=a.headers.get("content-disposition")||""}else t=Ir(o),n=o.split(";")[0].split(":")[1],l="file"+n.split("/")[1];const i=new File([t],l,{type:n}),s=await fetch("https://huggingface.co/uploads",{method:"POST",body:i,headers:{"Content-Type":i.type,"X-Requested-With":"XMLHttpRequest"}});if(!s.ok){if(s.headers.get("content-type")?.includes("application/json")){const a=await s.json();throw new Ln(`Upload failed: ${a.error}`)}throw new Ln("Upload failed.")}return await s.text()}function Ir(o){for(var e=o.split(","),t=e[0].match(/:(.*?);/)[1],n=atob(e[1]),l=n.length,i=new Uint8Array(l);l--;)i[l]=n.charCodeAt(l);return new Blob([i],{type:t})}function Vu(o){o.addEventListener("click",e);async function e(t){const n=t.composedPath(),[l]=n.filter(i=>i?.tagName==="BUTTON"&&i.classList.contains("copy_code_button"));if(l){let i=function(r){r.style.opacity="1",setTimeout(()=>{r.style.opacity="0"},2e3)};t.stopImmediatePropagation();const s=l.parentElement.innerText.trim(),_=Array.from(l.children)[1];await jr(s)&&i(_)}}return{destroy(){o.removeEventListener("click",e)}}}async function jr(o){let e=!1;if("clipboard"in navigator)await navigator.clipboard.writeText(o),e=!0;else{const t=document.createElement("textarea");t.value=o,t.style.position="absolute",t.style.left="-999999px",document.body.prepend(t),t.select();try{document.execCommand("copy"),e=!0}catch(n){console.error(n),e=!1}finally{t.remove()}}return e}const Mu=o=>{const e=Math.floor(o/3600),t=Math.floor(o%3600/60),n=Math.round(o)%60,l=`${t<10?"0":""}${t}`,i=`${n<10?"0":""}${n}`;return e>0?`${e}:${l}:${i}`:`${t}:${i}`};class Eo{#e;#t;constructor(e,t,n,l,i,s,_,a=c=>c,r){this.#e=e,this.theme=n,this.version=l,this.#t=t,this.max_file_size=_,this.i18n=a,this.root=i,this.autoscroll=s,this.client=r}dispatch(e,t){const n=new CustomEvent("gradio",{bubbles:!0,detail:{data:t,id:this.#e,event:e}});this.#t.dispatchEvent(n)}}function Dr(o,{from:e,to:t},n={}){const l=getComputedStyle(o),i=l.transform==="none"?"":l.transform,[s,_]=l.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*s/t.width-(t.left+s),r=e.top+e.height*_/t.height-(t.top+_),{delay:c=0,duration:f=d=>Math.sqrt(d)*120,easing:u=sr}=n;return{delay:c,duration:lr(f)?f(Math.sqrt(a*a+r*r)):f,easing:u,css:(d,$)=>{const g=$*a,m=$*r,p=d+$*e.width/t.width,v=d+$*e.height/t.height;return`transform: ${i} translate(${g}px, ${m}px) scale(${p}, ${v});`}}}const{SvelteComponent:Rr,add_render_callback:Sr,append:qe,attr:oe,bubble:Co,check_outros:Vr,create_component:xn,create_in_transition:Mr,create_out_transition:zr,destroy_component:eo,detach:Nr,element:et,flush:qn,group_outros:Ur,init:Br,insert:Fr,listen:Pn,mount_component:to,run_all:Hr,safe_not_equal:Gr,set_data:Ao,space:Kt,stop_propagation:Lo,text:qo,transition_in:Nt,transition_out:Ut}=window.__gradio__svelte__internal,{createEventDispatcher:Zr,onMount:Wr}=window.__gradio__svelte__internal;function Qr(o){let e,t;return e=new mr({}),{c(){xn(e.$$.fragment)},m(n,l){to(e,n,l),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){eo(e,n)}}}function Jr(o){let e,t;return e=new yr({}),{c(){xn(e.$$.fragment)},m(n,l){to(e,n,l),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){eo(e,n)}}}function Yr(o){let e,t;return e=new Tr({}),{c(){xn(e.$$.fragment)},m(n,l){to(e,n,l),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){eo(e,n)}}}function Kr(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g,m,p,v,k,C,b,y,h,q,w,A,L,j;const G=[Yr,Jr,Qr],S=[];function P(O,Q){return O[1]==="warning"?0:O[1]==="info"?1:O[1]==="error"?2:-1}return~(n=P(o))&&(l=S[n]=G[n](o)),{c(){e=et("div"),t=et("div"),l&&l.c(),s=Kt(),_=et("div"),a=et("div"),r=qo(o[1]),f=Kt(),u=et("div"),d=qo(o[0]),m=Kt(),p=et("button"),v=et("span"),v.textContent="Ã",C=Kt(),b=et("div"),oe(t,"class",i="toast-icon "+o[1]+" svelte-z3l7qj"),oe(a,"class",c="toast-title "+o[1]+" svelte-z3l7qj"),oe(u,"class",$="toast-text "+o[1]+" svelte-z3l7qj"),oe(_,"class",g="toast-details "+o[1]+" svelte-z3l7qj"),oe(v,"aria-hidden","true"),oe(p,"class",k="toast-close "+o[1]+" svelte-z3l7qj"),oe(p,"type","button"),oe(p,"aria-label","Close"),oe(p,"data-testid","toast-close"),oe(b,"class",y="timer "+o[1]+" svelte-z3l7qj"),oe(e,"class",h="toast-body "+o[1]+" svelte-z3l7qj"),oe(e,"role","alert"),oe(e,"data-testid","toast-body")},m(O,Q){Fr(O,e,Q),qe(e,t),~n&&S[n].m(t,null),qe(e,s),qe(e,_),qe(_,a),qe(a,r),qe(_,f),qe(_,u),qe(u,d),qe(e,m),qe(e,p),qe(p,v),qe(e,C),qe(e,b),A=!0,L||(j=[Pn(p,"click",o[2]),Pn(e,"click",Lo(o[4])),Pn(e,"keydown",Lo(o[5]))],L=!0)},p(O,[Q]){let T=n;n=P(O),n!==T&&(l&&(Ur(),Ut(S[T],1,1,()=>{S[T]=null}),Vr()),~n?(l=S[n],l||(l=S[n]=G[n](O),l.c()),Nt(l,1),l.m(t,null)):l=null),(!A||Q&2&&i!==(i="toast-icon "+O[1]+" svelte-z3l7qj"))&&oe(t,"class",i),(!A||Q&2)&&Ao(r,O[1]),(!A||Q&2&&c!==(c="toast-title "+O[1]+" svelte-z3l7qj"))&&oe(a,"class",c),(!A||Q&1)&&Ao(d,O[0]),(!A||Q&2&&$!==($="toast-text "+O[1]+" svelte-z3l7qj"))&&oe(u,"class",$),(!A||Q&2&&g!==(g="toast-details "+O[1]+" svelte-z3l7qj"))&&oe(_,"class",g),(!A||Q&2&&k!==(k="toast-close "+O[1]+" svelte-z3l7qj"))&&oe(p,"class",k),(!A||Q&2&&y!==(y="timer "+O[1]+" svelte-z3l7qj"))&&oe(b,"class",y),(!A||Q&2&&h!==(h="toast-body "+O[1]+" svelte-z3l7qj"))&&oe(e,"class",h)},i(O){A||(Nt(l),O&&Sr(()=>{A&&(w&&w.end(1),q=Mr(e,bo,{duration:200,delay:100}),q.start())}),A=!0)}
2,o(O){Ut(l),q&&q.invalidate(),O&&(w=zr(e,bo,{duration:200})),A=!1},d(O){O&&Nr(e),~n&&S[n].d(),O&&w&&w.end(),L=!1,Hr(j)}}}function Xr(o,e,t){let{message:n=""}=e,{type:l}=e,{id:i}=e;const s=Zr();function _(){s("close",i)}Wr(()=>{setTimeout(()=>{_()},1e4)});function a(c){Co.call(this,o,c)}function r(c){Co.call(this,o,c)}return o.$$set=c=>{"message"in c&&t(0,n=c.message),"type"in c&&t(1,l=c.type),"id"in c&&t(3,i=c.id)},[n,l,_,i,a,r]}class xr extends Rr{constructor(e){super(),Br(this,e,Xr,Kr,Gr,{message:0,type:1,id:3})}get message(){return this.$$.ctx[0]}set message(e){this.$$set({message:e}),qn()}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),qn()}get id(){return this.$$.ctx[3]}set id(e){this.$$set({id:e}),qn()}}const{SvelteComponent:es,append:ts,attr:ns,bubble:os,check_outros:ls,create_animation:is,create_component:rs,destroy_component:ss,detach:_i,element:ci,ensure_array_like:Po,fix_and_outro_and_destroy_block:as,fix_position:_s,flush:cs,group_outros:us,init:fs,insert:ui,mount_component:ps,noop:ds,safe_not_equal:ms,set_style:hs,space:gs,transition_in:fi,transition_out:pi,update_keyed_each:vs}=window.__gradio__svelte__internal;function Oo(o,e,t){const n=o.slice();return n[2]=e[t].type,n[3]=e[t].message,n[4]=e[t].id,n}function To(o,e){let t,n,l,i,s=ds,_;return n=new xr({props:{type:e[2],message:e[3],id:e[4]}}),n.$on("close",e[1]),{key:o,first:null,c(){t=ci("div"),rs(n.$$.fragment),l=gs(),hs(t,"width","100%"),this.first=t},m(a,r){ui(a,t,r),ps(n,t,null),ts(t,l),_=!0},p(a,r){e=a;const c={};r&1&&(c.type=e[2]),r&1&&(c.message=e[3]),r&1&&(c.id=e[4]),n.$set(c)},r(){i=t.getBoundingClientRect()},f(){_s(t),s()},a(){s(),s=is(t,i,Dr,{duration:300})},i(a){_||(fi(n.$$.fragment,a),_=!0)},o(a){pi(n.$$.fragment,a),_=!1},d(a){a&&_i(t),ss(n)}}}function $s(o){let e,t=[],n=new Map,l,i=Po(o[0]);const s=_=>_[4];for(let _=0;_<i.length;_+=1){let a=Oo(o,i,_),r=s(a);n.set(r,t[_]=To(r,a))}return{c(){e=ci("div");for(let _=0;_<t.length;_+=1)t[_].c();ns(e,"class","toast-wrap svelte-pu0yf1")},m(_,a){ui(_,e,a);for(let r=0;r<t.length;r+=1)t[r]&&t[r].m(e,null);l=!0},p(_,[a]){if(a&1){i=Po(_[0]),us();for(let r=0;r<t.length;r+=1)t[r].r();t=vs(t,a,s,1,_,i,n,e,as,To,null,Oo);for(let r=0;r<t.length;r+=1)t[r].a();ls()}},i(_){if(!l){for(let a=0;a<i.length;a+=1)fi(t[a]);l=!0}},o(_){for(let a=0;a<t.length;a+=1)pi(t[a]);l=!1},d(_){_&&_i(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function bs(o){o.length>0&&"parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0)}function ws(o,e,t){let{messages:n=[]}=e;function l(i){os.call(this,o,i)}return o.$$set=i=>{"messages"in i&&t(0,n=i.messages)},o.$$.update=()=>{o.$$.dirty&1&&bs(n)},[n,l]}class ks extends es{constructor(e){super(),fs(this,e,ws,$s,ms,{messages:0})}get messages(){return this.$$.ctx[0]}set messages(e){this.$$set({messages:e}),cs()}}const{SvelteComponent:ys,append:On,attr:Qe,detach:Es,init:Cs,insert:As,noop:Tn,safe_not_equal:Ls,set_style:Rt,svg_element:Xt}=window.__gradio__svelte__internal;function qs(o){let e,t,n,l;return{c(){e=Xt("svg"),t=Xt("g"),n=Xt("path"),l=Xt("path"),Qe(n,"d","M3.789,0.09C3.903,-0.024 4.088,-0.024 4.202,0.09L4.817,0.705C4.931,0.819 4.931,1.004 4.817,1.118L1.118,4.817C1.004,4.931 0.819,4.931 0.705,4.817L0.09,4.202C-0.024,4.088 -0.024,3.903 0.09,3.789L3.789,0.09Z"),Qe(l,"d","M4.825,3.797C4.934,3.907 4.934,4.084 4.825,4.193L4.193,4.825C4.084,4.934 3.907,4.934 3.797,4.825L0.082,1.11C-0.027,1.001 -0.027,0.823 0.082,0.714L0.714,0.082C0.823,-0.027 1.001,-0.027 1.11,0.082L4.825,3.797Z"),Qe(e,"width","100%"),Qe(e,"height","100%"),Qe(e,"viewBox","0 0 5 5"),Qe(e,"version","1.1"),Qe(e,"xmlns","http://www.w3.org/2000/svg"),Qe(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),Qe(e,"xml:space","preserve"),Rt(e,"fill","currentColor"),Rt(e,"fill-rule","evenodd"),Rt(e,"clip-rule","evenodd"),Rt(e,"stroke-linejoin","round"),Rt(e,"stroke-miterlimit","2")},m(i,s){As(i,e,s),On(e,t),On(t,n),On(t,l)},p:Tn,i:Tn,o:Tn,d(i){i&&Es(e)}}}class di extends ys{constructor(e){super(),Cs(this,e,null,qs,Ls,{})}}const{SvelteComponent:Ps,append:tt,attr:xt,create_component:Os,destroy_component:Ts,detach:In,element:kt,flush:Is,init:js,insert:jn,listen:Ds,mount_component:Rs,safe_not_equal:Ss,set_data:Vs,space:Dn,text:Io,transition_in:Ms,transition_out:zs}=window.__gradio__svelte__internal,{createEventDispatcher:Ns}=window.__gradio__svelte__internal;function Us(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g;
2return u=new di({}),{c(){e=kt("div"),t=kt("h1"),t.textContent="API Docs",n=Dn(),l=kt("p"),i=Io(`No API Routes found for 3 `),s=kt("code"),_=Io(o[0]),a=Dn(),r=kt("p"),r.innerHTML=`To expose an API endpoint of your app in this page, set the <code>api_name</code> 4 parameter of the event listener. 5 <br/> 6 For more information, visit the 7 <a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a> 8 . To hide the API documentation button and this page, set 9 <code>show_api=False</code> 10 in the 11 <code>Blocks.launch()</code> 12 method.`,c=Dn(),f=kt("button"),Os(u.$$.fragment),xt(s,"class","svelte-e1ha0f"),xt(l,"class","attention svelte-e1ha0f"),xt(e,"class","wrap prose svelte-e1ha0f"),xt(f,"class","svelte-e1ha0f")},m(m,p){jn(m,e,p),tt(e,t),tt(e,n),tt(e,l),tt(l,i),tt(l,s),tt(s,_),tt(e,a),tt(e,r),jn(m,c,p),jn(m,f,p),Rs(u,f,null),d=!0,$||(g=Ds(f,"click",o[2]),$=!0)},p(m,[p]){(!d||p&1)&&Vs(_,m[0])},i(m){d||(Ms(u.$$.fragment,m),d=!0)},o(m){zs(u.$$.fragment,m),d=!1},d(m){m&&(In(e),In(c),In(f)),Ts(u),$=!1,g()}}}function Bs(o,e,t){const n=Ns();let{root:l}=e;const i=()=>n("close");return o.$$set=s=>{"root"in s&&t(0,l=s.root)},[l,n,i]}class Fs extends Ps{constructor(e){super(),js(this,e,Bs,Us,Ss,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Is()}}const mi="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9425%202.94265C27.4632%202.42195%2027.4632%201.57773%2026.9425%201.05703C26.4218%200.536329%2025.5776%200.536329%2025.0569%201.05703L22.5713%203.54256C21.1213%202.59333%2019.5367%202.43378%2018.1753%202.64006C16.5495%202.88638%2015.1127%203.66838%2014.3905%204.39053L12.3905%206.39053C12.1405%206.64058%2012%206.97972%2012%207.33334C12%207.68697%2012.1405%208.0261%2012.3905%208.27615L19.7239%2015.6095C20.2446%2016.1302%2021.0888%2016.1302%2021.6095%2015.6095L23.6095%2013.6095C24.3316%2012.8873%2025.1136%2011.4505%2025.36%209.82475C25.5663%208.46312%2025.4066%206.87827%2024.4571%205.42807L26.9425%202.94265Z'%20fill='%233c4555'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.276%2012.9426C12.7967%2012.4219%2012.7967%2011.5777%2012.276%2011.057C11.7553%2010.5363%2010.9111%2010.5363%2010.3904%2011.057L8.66651%2012.7809L8.27615%2012.3905C8.0261%2012.1405%207.68697%2012%207.33334%2012C6.97972%2012%206.64058%2012.1405%206.39053%2012.3905L4.39053%2014.3905C3.66838%2015.1127%202.88638%2016.5495%202.64006%2018.1753C2.43377%2019.5367%202.59333%2021.1214%203.54262%2022.5714L1.05703%2025.057C0.536329%2025.5777%200.536329%2026.4219%201.05703%2026.9426C1.57773%2027.4633%202.42195%2027.4633%202.94265%2026.9426L5.42817%2024.4571C6.87835%2025.4066%208.46315%2025.5663%209.82475%2025.36C11.4505%2025.1136%2012.8873%2024.3316%2013.6095%2023.6095L15.6095%2021.6095C16.1302%2021.0888%2016.1302%2020.2446%2015.6095%2019.7239L15.2188%2019.3332L16.9426%2017.6093C17.4633%2017.0886%2017.4633%2016.2444%2016.9426%2015.7237C16.4219%2015.203%2015.5777%2015.203%2015.057%2015.7237L13.3332%2017.4475L10.5521%2014.6665L12.276%2012.9426Z'%20fill='%23FF7C00'/%3e%3c/svg%3e",{SvelteComponent:Hs,append:Pe,attr:nt,create_component:jo,destroy_component:Do,detach:Mt,element:ot,flush:Ro,init:Gs,insert:zt,listen:Zs,mount_component:So,safe_not_equal:Ws,set_data:Vo,space:en,src_url_equal:Qs,text:Lt,transition_in:Mo,transition_out:zo}=window.__gradio__svelte__internal,{createEventDispatcher:Js}=window.__gradio__svelte__internal;function No(o){let e;return{c(){e=Lt("s")},m(t,n){zt(t,e,n)},d(t){t&&Mt(e)}}}function Ys(o){let e;return{c(){e=Lt("ðª API Recorder")},m(t,n){zt(t,e,n)},d(t){t&&Mt(e)}}}function Ks(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g,m,p,v,k,C,b,y,h=o[1]>1&&No();return m=new Kn({props:{size:"sm",variant:"primary",$$slots:{default:[Ys]},$$scope:{ctx:o}}}),m.$on("click",o[3]),k=new di({}),{c(){e=ot("h2"),t=ot("img"),l=en(),i=ot("div"),s=Lt(`API documentation 13 `),_=ot("div"),a=Lt(o[0]),r=en(),c=ot("span"),f=ot("span"),u=Lt(o[1]),d=Lt(" API endpoint"),h&&h.c(),$=ot("br"),g=en(),jo(m.$$.fragment),p=e
vendor: 4,965 bytes, lines 13-15
13n(),v=ot("button"),jo(k.$$.fragment),Qs(t.src,n=mi)||nt(t,"src",n),nt(t,"alt",""),nt(t,"class","svelte-3n2nxs"),nt(_,"class","url svelte-3n2nxs"),nt(f,"class","url svelte-3n2nxs"),nt(c,"class","counts svelte-3n2nxs"),nt(e,"class","svelte-3n2nxs"),nt(v,"class","svelte-3n2nxs")},m(q,w){zt(q,e,w),Pe(e,t),Pe(e,l),Pe(e,i),Pe(i,s),Pe(i,_),Pe(_,a),Pe(e,r),Pe(e,c),Pe(c,f),Pe(f,u),Pe(c,d),h&&h.m(c,null),Pe(c,$),Pe(c,g),So(m,c,null),zt(q,p,w),zt(q,v,w),So(k,v,null),C=!0,b||(y=Zs(v,"click",o[4]),b=!0)},p(q,[w]){(!C||w&1)&&Vo(a,q[0]),(!C||w&2)&&Vo(u,q[1]),q[1]>1?h||(h=No(),h.c(),h.m(c,$)):h&&(h.d(1),h=null);const A={};w&32&&(A.$$scope={dirty:w,ctx:q}),m.$set(A)},i(q){C||(Mo(m.$$.fragment,q),Mo(k.$$.fragment,q),C=!0)},o(q){zo(m.$$.fragment,q),zo(k.$$.fragment,q),C=!1},d(q){q&&(Mt(e),Mt(p),Mt(v)),h&&h.d(),Do(m),Do(k),b=!1,y()}}}function Xs(o,e,t){let{root:n}=e,{api_count:l}=e;const i=Js(),s=()=>i("close",{api_recorder_visible:!0}),_=()=>i("close");return o.$$set=a=>{"root"in a&&t(0,n=a.root),"api_count"in a&&t(1,l=a.api_count)},[n,l,i,s,_]}class xs extends Hs{constructor(e){super(),Gs(this,e,Xs,Ks,Ws,{root:0,api_count:1})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Ro()}get api_count(){return this.$$.ctx[1]}set api_count(e){this.$$set({api_count:e}),Ro()}}function Ye(o,e,t=null){return e===void 0?t==="py"?"None":null:o===null&&t==="py"?"None":e==="string"||e==="str"?t===null?o:'"'+o+'"':e==="number"?t===null?parseFloat(o):o:e==="boolean"||e=="bool"?t==="py"?(o=String(o),o==="true"?"True":"False"):t==="js"?o:o==="true":e==="List[str]"?(o=JSON.stringify(o),o):e.startsWith("Literal['")?'"'+o+'"':t===null?o===""?null:JSON.parse(o):typeof o=="string"?o===""?t==="py"?"None":"null":o:(t==="py"&&(o=Mn(o)),ea(o))}function hi(o){if(typeof o=="object"&&o!==null&&o.hasOwnProperty("url")&&o.hasOwnProperty("meta")&&typeof o.meta=="object"&&o.meta!==null&&o.meta._type==="gradio.FileData")return!0;if(typeof o=="object"&&o!==null){for(let e in o)if(typeof o[e]=="object"&&hi(o[e]))return!0}return!1}function Mn(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&"url"in o&&o.url&&"meta"in o&&o.meta?._type==="gradio.FileData"?`file('${o.url}')`:(Array.isArray(o)?o.forEach((e,t)=>{typeof e=="object"&&e!==null&&(o[t]=Mn(e))}):typeof o=="object"&&o!==null&&Object.keys(o).forEach(e=>{o[e]=Mn(o[e])}),o)}function ea(o){let e=JSON.stringify(o,(l,i)=>i===null?"UNQUOTEDNone":typeof i=="string"&&i.startsWith("file(")&&i.endsWith(")")?`UNQUOTED${i}`:i);const t=/"UNQUOTEDfile\(([^)]*)\)"/g;e=e.replace(t,(l,i)=>`file(${i})`);const n=/"UNQUOTEDNone"/g;return e.replace(n,"None")}const{SvelteComponent:ta,append:le,attr:rt,check_outros:na,create_component:oa,destroy_component:la,destroy_each:ia,detach:he,element:Ie,empty:gi,ensure_array_like:Uo,flush:tn,group_outros:ra,init:sa,insert:ge,mount_component:aa,noop:_a,safe_not_equal:ca,set_data:dt,set_style:ct,space:ut,text:ke,toggle_class:Bo,transition_in:_n,transition_out:zn}=window.__gradio__svelte__internal;function Fo(o,e,t){const n=o.slice();return n[4]=e[t].label,n[5]=e[t].python_type,n[6]=e[t].component,n[7]=e[t].parameter_name,n[8]=e[t].parameter_has_default,n[9]=e[t].parameter_default,n[11]=t,n}function Ho(o){let e;return{c(){e=ke("s")},m(t,n){ge(t,e,n)},d(t){t&&he(e)}}}function ua(o){let e=o[2][o[11]].type+"",t;return{c(){t=ke(e)},m(n,l){ge(n,t,l)},p(n,l){l&4&&e!==(e=n[2][n[11]].type+"")&&dt(t,e)},d(n){n&&he(t)}}}function fa(o){let e=o[5].type+"",t,n,l=o[8]&&o[9]===null&&Go();return{c(){t=ke(e),l&&l.c(),n=gi()},m(i,s){ge(i,t,s),l&&l.m(i,s),ge(i,n,s)},p(i,s){s&2&&e!==(e=i[5].type+"")&&dt(t,e),i[8]&&i[9]===null?l||(l=Go(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},d(i){i&&(he(t),he(n)),l&&l.d(i)}}}function Go(o){let e;return{c(){e=ke(`Â | 14 None`)},m(t,n){ge(t,e,n)},d(t){t&&he(e)}}}function pa(o){let e,t,n=Ye(o[9],o[5].type,"py")+"",l;return{c(){e=Ie("span"),e.textContent="Default: ",t=Ie("span"),l=ke(n),rt(t,"class","code svelte-1yt946s"),ct(t,"font-size","var(--text-sm)")},m(i,s){ge(i,e,s),ge(i,t,s),le(t,l)},p(i,s){s&2&&n!==(n=Ye(i[9],i[5].type,"py")+"")&&dt(l,n)},d(i){i&&(he(e),he(t))}}}function da(o){let e;return{c(){e=Ie("span"),e.textContent="Required",ct(e,"font-weight","bold")},m(t,n){ge(t,e,n)},p:_a,d(t){t&&he(e)}}}function Zo(o){let e,t,n,l,i,s=(o[7]?o[7]:"["+o[11]+"]")+"",_,a,r,c,f,u,d,$=o[4]+"",g,m,p=o[6]+"",v,k,C;function b(L,j){return L[3]==="python"?fa:ua}let y=b(o),h=y(o);function q(L,j){return!L[8]||L[3]=="javascript"?da:pa}let w=q(o),A=w(o);return{c(){e=Ie("hr"),t=ut(),n=Ie("div"),l=Ie("p"),i=Ie("span"),_=ke(s),a=ut(),r=Ie("span"),h.c(),c=ut(),A.c(),f=ut(),u=Ie("p"),d=ke('The input value that is provided in the "'),g=ke($),m=ke('" '),v=ke(p),k=ke(` 15 component.`),C=ut(),rt(e,"class","hr svelte-1yt946s"),rt(i,"class","code svelte-1yt946s"),ct(i,"margin-right","10px"),rt(r,"class","code highlight svelte-1yt946s"),ct(r,"margin-right","10px"),ct(l,"white-space","nowrap"),ct(l,"overflow-x","auto"),rt(u,"class","desc
15svelte-1yt946s"),ct(n,"margin","10px")},m(L,j){ge(L,e,j),ge(L,t,j),ge(L,n,j),le(n,l),le(l,i),le(i,_),le(l,a),le(l,r),h.m(r,null),le(l,c),A.m(l,null),le(n,f),le(n,u),le(u,d),le(u,g),le(u,m),le(u,v),le(u,k),le(n,C)},p(L,j){j&2&&s!==(s=(L[7]?L[7]:"["+L[11]+"]")+"")&&dt(_,s),y===(y=b(L))&&h?h.p(L,j):(h.d(1),h=y(L),h&&(h.c(),h.m(r,null))),w===(w=q(L))&&A?A.p(L,j):(A.d(1),A=w(L),A&&(A.c(),A.m(l,null))),j&2&&$!==($=L[4]+"")&&dt(g,$),j&2&&p!==(p=L[6]+"")&&dt(v,p)},d(L){L&&(he(e),he(t),he(n)),h.d(),A.d()}}}function Wo(o){let e,t,n;return t=new si({props:{margin:!1}}),{c(){e=Ie("div"),oa(t.$$.fragment),rt(e,"class","load-wrap")},m(l,i){ge(l,e,i),aa(t,e,null),n=!0},i(l){n||(_n(t.$$.fragment,l),n=!0)},o(l){zn(t.$$.fragment,l),n=!1},d(l){l&&he(e),la(t)}}}function ma(o){let e,t,n,l=o[1].length+"",i,s,_,a,r,c,f,u,d=o[1].length!=1&&Ho(),$=Uo(o[1]),g=[];for(let p=0;p<$.length;p+=1)g[p]=Zo(Fo(o,$,p));let m=o[0]&&Wo();return{c(){e=Ie("h4"),t=Ie("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=ke(` 16 Accepts `),i=ke(l),s=ke(" parameter"),d&&d.c(),_=ke(":"),a=ut(),r=Ie("div");for(let p=0;p<g.length;p+=1)g[p].c();c=ut(),m&&m.c(),f=gi(),rt(t,"class","toggle-icon svelte-1yt946s"),rt(e,"class","svelte-1yt946s"),Bo(r,"hide",o[0])},m(p,v){ge(p,e,v),le(e,t),le(e,n),le(e,i),le(e,s),d&&d.m(e,null),le(e,_),ge(p,a,v),ge(p,r,v);for(let k=0;k<g.length;k+=1)g[k]&&g[k].m(r,null);ge(p,c,v),m&&m.m(p,v),ge(p,f,v),u=!0},p(p,[v]){if((!u||v&2)&&l!==(l=p[1].length+"")&&dt(i,l),p[1].length!=1?d||(d=Ho(),d.c(),d.m(e,_)):d&&(d.d(1),d=null),v&14){$=Uo(p[1]);let k;for(k=0;k<$.length;k+=1){const C=Fo(p,$,k);g[k]?g[k].p(C,v):(g[k]=Zo(C),g[k].c(),g[k].m(r,null))}for(;k<g.length;k+=1)g[k].d(1);g.length=$.length}(!u||v&1)&&Bo(r,"hide",p[0]),p[0]?m?v&1&&_n(m,1):(m=Wo(),m.c(),_n(m,1),m.m(f.parentNode,f)):m&&(ra(),zn(m,1,1,()=>{m=null}),na())},i(p){u||(_n(m),u=!0)},o(p){zn(m),u=!1},d(p){p&&(he(e),he(a),he(r),he(c),he(f)),d&&d.d(),ia(g,p),m&&m.d(p)}}}function ha(o,e,t){let{is_running:n}=e,{endpoint_returns:l}=e,{js_returns:i}=e,{current_language:s}=e;return o.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,l=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,s=_.current_language)},[n,l,i,s]}class ga extends ta{constructor(e){super(),sa(this,e,ha,ma,ca,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),tn()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),tn()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),tn()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),tn()}}const{SvelteComponent:va,create_component:$a,destroy_component:ba,detach:wa,flush:ka,init:ya,insert:Ea,mount_component:Ca,safe_not_equal:Aa,set_data:La,text:qa,transition_in:Pa,transition_out:Oa}=window.__gradio__svelte__internal;function Ta(o){let e;return{c(){e=qa(o[0])},m(t,n){Ea(t,e,n)},p(t,n){n&1&&La(e,t[0])},d(t){t&&wa(e)}}}function Ia(o){let e,t;return e=new Kn({props:{size:"sm",$$slots:{default:[Ta]},$$scope:{ctx:o}}}),e.$on("click",o[1]),{c(){$a(e.$$.fragment)},m(n,l){Ca(e,n,l),t=!0},p(n,[l]){const i={};l&9&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(Pa(e.$$.fragment,n),t=!0)},o(n){Oa(e.$$.fragment,n),t=!1},d(n){ba(e,n)}}}function ja(o,e,t){let{code:n}
vendor: 4,566 bytes, lines 16-18
16=e,l="copy";function i(){navigator.clipboard.writeText(n),t(0,l="copied!"),setTimeout(()=>{t(0,l="copy")},1500)}return o.$$set=s=>{"code"in s&&t(2,n=s.code)},[l,i,n]}class Zt extends va{constructor(e){super(),ya(this,e,ja,Ia,Aa,{code:2})}get code(){return this.$$.ctx[2]}set code(e){this.$$set({code:e}),ka()}}const{SvelteComponent:Da,append:vi,attr:Bt,check_outros:Ra,create_component:no,destroy_component:oo,detach:mt,element:ht,flush:Sa,group_outros:Va,init:Ma,insert:gt,mount_component:lo,noop:$i,safe_not_equal:za,space:bi,transition_in:Ft,transition_out:Ht}=window.__gradio__svelte__internal;function Na(o){let e,t,n,l,i,s;return t=new Zt({props:{code:Jo}}),{c(){e=ht("div"),no(t.$$.fragment),n=bi(),l=ht("div"),i=ht("pre"),i.textContent=`$ ${Jo}`,Bt(e,"class","copy svelte-hq8ezf"),Bt(i,"class","svelte-hq8ezf")},m(_,a){gt(_,e,a),lo(t,e,null),gt(_,n,a),gt(_,l,a),vi(l,i),s=!0},p:$i,i(_){s||(Ft(t.$$.fragment,_),s=!0)},o(_){Ht(t.$$.fragment,_),s=!1},d(_){_&&(mt(e),mt(n),mt(l)),oo(t)}}}function Ua(o){let e,t,n,l,i,s;return t=new Zt({props:{code:Qo}}),{c(){e=ht("div"),no(t.$$.fragment),n=bi(),l=ht("div"),i=ht("pre"),i.textContent=`$ ${Qo}`,Bt(e,"class","copy svelte-hq8ezf"),Bt(i,"class","svelte-hq8ezf")},m(_,a){gt(_,e,a),lo(t,e,null),gt(_,n,a),gt(_,l,a),vi(l,i),s=!0},p:$i,i(_){s||(Ft(t.$$.fragment,_),s=!0)},o(_){Ht(t.$$.fragment,_),s=!1},d(_){_&&(mt(e),mt(n),mt(l)),oo(t)}}}function Ba(o){let e,t,n,l;const i=[Ua,Na],s=[];function _(a,r){return a[0]==="python"?0:a[0]==="javascript"?1:-1}return~(t=_(o))&&(n=s[t]=i[t](o)),{c(){e=ht("code"),n&&n.c(),Bt(e,"class","svelte-hq8ezf")},m(a,r){gt(a,e,r),~t&&s[t].m(e,null),l=!0},p(a,r){let c=t;t=_(a),t===c?~t&&s[t].p(a,r):(n&&(Va(),Ht(s[c],1,1,()=>{s[c]=null}),Ra()),~t?(n=s[t],n?n.p(a,r):(n=s[t]=i[t](a),n.c()),Ft(n,1),n.m(e,null)):n=null)},i(a){l||(Ft(n),l=!0)},o(a){Ht(n),l=!1},d(a){a&&mt(e),~t&&s[t].d()}}}function Fa(o){let e,t;return e=new Xn({props:{border_mode:"contrast",$$slots:{default:[Ba]},$$scope:{ctx:o}}}),{c(){no(e.$$.fragment)},m(n,l){lo(e,n,l),t=!0},p(n,[l]){const i={};l&3&&(i.$$scope={dirty:l,ctx:n}),e.$set(i)},i(n){t||(Ft(e.$$.fragment,n),t=!0)},o(n){Ht(e.$$.fragment,n),t=!1},d(n){oo(e,n)}}}let Qo="pip install gradio_client",Jo="npm i -D @gradio/client";function Ha(o,e,t){let{current_language:n}=e;return o.$$set=l=>{"current_language"in l&&t(0,n=l.current_language)},[n]}class Ga extends Da{constructor(e){super(),Ma(this,e,Ha,Fa,za,{current_language:0})}get current_language(){return this.$$.ctx[0]}set current_language(e){this.$$set({current_language:e}),Sa()}}const{SvelteComponent:Za,append:Ot,attr:fn,detach:io,element:pn,empty:Wa,flush:Rn,init:Qa,insert:ro,noop:Yo,safe_not_equal:Ja,set_data:wi,text:dn}=window.__gradio__svelte__internal;function Ya(o){let e,t,n,l;return{c(){e=pn("h3"),t=dn(`fn_index: 17 `),n=pn("span"),l=dn(o[1]),fn(n,"class","post svelte-41kcm6"),fn(e,"class","svelte-41kcm6")},m(i,s){ro(i,e,s),Ot(e,t),Ot(e,n),Ot(n,l)},p(i,s){s&2&&wi(l,i[1])},d(i){i&&io(e)}}}function Ka(o){let e,t,n,l="/"+o[0],i;return{c(){e=pn("h3"),t=dn(`api_name: 18 `),n=pn("span"),i=dn(l),fn(n,"class","post svelte-41kcm6"),fn(e,"class","svelte-41kcm6")},m(s,_){ro(s,e,_),Ot(e,t),Ot(e,n),Ot(n,i)},p(s,_){_&1&&l!==(l="/"+s[0])&&wi(i,l)},d(s){s&&io(e)}}}function Xa(o){let e;function t(i,s){return i[2]?Ka:Ya}let n=t(o),l=n(o);return{c(){l.c(),e=Wa()},m(i,s){l.m(i,s),ro(i,e,s)},p(i,[s]){n===(n=t(i))&&l?l.p(i,s):(l.d(1),l=n(i),l&&(l.c(),l.m(e.parentNode,e)))},i:Yo,o:Yo,d(i){i&&io(e),l.d(i)}}}function xa(o,e,t){let{api_name:n=null}=e,{fn_index:l=null}=e,{named:i}=e;return o.$$set=s=>{"api_name"in s&&t(0,n=s.api_name),"fn_index"in s&&t(1,l=s.fn_index),"named"in s&&t(2,i=s.named)},[n,l,i]}class ki extends Za{constructor(e){super(),Qa(this,e,xa,Xa,Ja,{api_name:0,fn_index:1,named:2})}get api_name(){return this.$$.ctx[0]}set api_name(e){this.$$set({api_name:e}),Rn()}get fn_index(){return this.$$.ctx[1]}set fn_index(e){this.$$set({fn_index:e}),Rn()}get named(){return this.$$.ctx[2]}set named(e){this.$$set({named:e}),Rn()}}const{SvelteComponent:e_,append:R,attr:de,binding_callbacks:Ko,check_outros:yi,create_component:Wt,destroy_component:Qt,destroy_each:Nn,detach:B,element:ie,empty:t_,ensure_array_like:qt,flush:yt,group_outros:Ei,init:n_,insert:F,mount_component:Jt,noop:o_,safe_not_equal:l_,set_data:De,space:so,text:D,transition_in:Ke,transition_out:Xe}=window.__gradio__svelte__internal;function Xo(o,e,t){const n=o.slice();return n[20]=e[t].label,n[15]=e[t].parameter_name,n[21]=e[t].type,n[13]=e[t].python_type,n[22]=e[t].component,n[14]=e[t].example_input,n[23]=e[t].seri
18alizer,n[19]=t,n}function xo(o,e,t){const n=o.slice();return n[22]=e[t].component,n[14]=e[t].example_input,n[19]=t,n}function el(o,e,t){const n=o.slice();return n[13]=e[t].python_type,n[14]=e[t].example_input,n[15]=e[t].parameter_name,n[16]=e[t].parameter_has_default,n[17]=e[t].parameter_default,n[19]=t,n}function i_(o){let e,t;return e=new ki({props:{named:o[4],fn_index:o[1]}}),{c(){Wt(e.$$.fragment)},m(n,l){Jt(e,n,l),t=!0},p(n,l){const i={};l&16&&(i.named=n[4]),l&2&&(i.fn_index=n[1]),e.$set(i)},i(n){t||(Ke(e.$$.fragment,n),t=!0)},o(n){Xe(e.$$.fragment,n),t=!1},d(n){Qt(e,n)}}}function r_(o){let e,t;return e=new ki({props:{named:o[4],api_name:o[0].api_name}}),{c(){Wt(e.$$.fragment)},m(n,l){Jt(e,n,l),t=!0},p(n,l){const i={};l&16&&(i.named=n[4]),l&1&&(i.api_name=n[0].api_name),e.$set(i)},i(n){t||(Ke(e.$$.fragment,n),t=!0)},o(n){Xe(e.$$.fragment,n),t=!1},d(n){Qt(e,n)}}}function s_(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g;t=new Zt({props:{code:o[7]?.innerText}});let m=qt(o[10]),p=[];for(let h=0;h<m.length;h+=1)p[h]=tl(xo(o,m,h));function v(h,q){return h[4]?c_:__}let k=v(o),C=k(o),b=qt(o[3]),y=[];for(let h=0;h<b.length;h+=1)y[h]=nl(Xo(o,b,h));return{c(){e=ie("div"),Wt(t.$$.fragment),n=so(),l=ie("div"),i=ie("pre"),s=D(`import { Client } from "@gradio/client"; 19`);for(let h=0;h<p.length;h+=1)p[h].c();_=D(` 20const client = await Client.connect(`),a=ie("span"),r=D('"'),c=D(o[2]),f=D('"'),u=D(`); 21const result = await client.predict(`),C.c(),d=D(", { ");for(let h=0;h<y.length;h+=1)y[h].c();$=D(` 22}); 23 24console.log(result.data); 25`),de(e,"class","copy svelte-114qcyq"),de(a,"class","token string svelte-114qcyq"),de(i,"class","svelte-114qcyq")},m(h,q){F(h,e,q),Jt(t,e,null),F(h,n,q),F(h,l,q),R(l,i),R(i,s);for(let w=0;w<p.length;w+=1)p[w]&&p[w].m(i,null);R(i,_),R(i,a),R(a,r),R(a,c),R(a,f),R(i,u),C.m(i,null),R(i,d);for(let w=0;w<y.length;w+=1)y[w]&&y[w].m(i,null);R(i,$),o[12](l),g=!0},p(h,q){const w={};if(q&128&&(w.code=h[7]?.innerText),t.$set(w),q&1024){m=qt(h[10]);let A;for(A=0;A<m.length;A+=1){const L=xo(h,m,A);p[A]?p[A].p(L,q):(p[A]=tl(L),p[A].c(),p[A].m(i,_))}for(;A<p.length;A+=1)p[A].d(1);p.length=m.length}if((!g||q&4)&&De(c,h[2]),k===(k=v(h))&&C?C.p(h,q):(C.d(1),C=k(h),C&&(C.c(),C.m(i,d))),q&520){b=qt(h[3]);let A;for(A=0;A<b.length;A+=1){const L=Xo(h,b,A);y[A]?y[A].p(L,q):(y[A]=nl(L),y[A].c(),y[A].m(i,$))}for(;A<y.length;A+=1)y[A].d(1);y.length=b.length}},i(h){g||(Ke(t.$$.fragment,h),g=!0)},o(h){Xe(t.$$.fragment,h),g=!1},d(h){h&&(B(e),B(n),B(l)),Qt(t),Nn(p,h),C.d(),Nn(y,h),o[12](null)}}}function a_(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g,m,p,v,k,C,b=o[0].api_name+"",
vendor: 5,481 bytes, lines 25-37
25y,h,q,w,A,L;t=new Zt({props:{code:o[6]?.innerText}});let j=o[8]&&p_(),G=qt(o[3]),S=[];for(let P=0;P<G.length;P+=1)S[P]=ol(el(o,G,P));return{c(){e=ie("div"),Wt(t.$$.fragment),n=so(),l=ie("div"),i=ie("pre"),s=ie("span"),s.textContent="from",_=D(" gradio_client "),a=ie("span"),a.textContent="import",r=D(" Client"),j&&j.c(),c=D(` 26 27client = Client(`),f=ie("span"),u=D('"'),d=D(o[2]),$=D('"'),g=D(`) 28result = client.`),m=ie("span"),m.textContent="predict",p=D("(");for(let P=0;P<S.length;P+=1)S[P].c();v=D(` 29 api_name=`),k=ie("span"),C=D('"/'),y=D(b),h=D('"'),q=D(` 30) 31`),w=ie("span"),w.textContent="print",A=D("(result)"),de(e,"class","copy svelte-114qcyq"),de(s,"class","highlight"),de(a,"class","highlight"),de(f,"class","token string svelte-114qcyq"),de(m,"class","highlight"),de(k,"class","api-name svelte-114qcyq"),de(w,"class","highlight"),de(i,"class","svelte-114qcyq")},m(P,O){F(P,e,O),Jt(t,e,null),F(P,n,O),F(P,l,O),R(l,i),R(i,s),R(i,_),R(i,a),R(i,r),j&&j.m(i,null),R(i,c),R(i,f),R(f,u),R(f,d),R(f,$),R(i,g),R(i,m),R(i,p);for(let Q=0;Q<S.length;Q+=1)S[Q]&&S[Q].m(i,null);R(i,v),R(i,k),R(k,C),R(k,y),R(k,h),R(i,q),R(i,w),R(i,A),o[11](l),L=!0},p(P,O){const Q={};if(O&64&&(Q.code=P[6]?.innerText),t.$set(Q),(!L||O&4)&&De(d,P[2]),O&8){G=qt(P[3]);let T;for(T=0;T<G.length;T+=1){const J=el(P,G,T);S[T]?S[T].p(J,O):(S[T]=ol(J),S[T].c(),S[T].m(i,v))}for(;T<S.length;T+=1)S[T].d(1);S.length=G.length}(!L||O&1)&&b!==(b=P[0].api_name+"")&&De(y,b)},i(P){L||(Ke(t.$$.fragment,P),L=!0)},o(P){Xe(t.$$.fragment,P),L=!1},d(P){P&&(B(e),B(n),B(l)),Qt(t),j&&j.d(),Nn(S,P),o[11](null)}}}function tl(o){let e,t,n,l=o[14].url+"",i,s,_=o[22]+"",a,r,c,f;return{c(){e=D(` 32const response_`),t=D(o[19]),n=D(' = await fetch("'),i=D(l),s=D(`"); 33const example`),a=D(_),r=D(" = await response_"),c=D(o[19]),f=D(`.blob(); 34 `)},m(u,d){F(u,e,d),F(u,t,d),F(u,n,d),F(u,i,d),F(u,s,d),F(u,a,d),F(u,r,d),F(u,c,d),F(u,f,d)},p:o_,d(u){u&&(B(e),B(t),B(n),B(i),B(s),B(a),B(r),B(c),B(f))}}}function __(o){let e;return{c(){e=D(o[1])},m(t,n){F(t,e,n)},p(t,n){n&2&&De(e,t[1])},d(t){t&&B(e)}}}function c_(o){let e,t,n=o[0].api_name+"",l,i;return{c(){e=ie("span"),t=D('"/'),l=D(n),i=D('"'),de(e,"class","api-name svelte-114qcyq")},m(s,_){F(s,e,_),R(e,t),R(e,l),R(e,i)},p(s,_){_&1&&n!==(n=s[0].api_name+"")&&De(l,n)},d(s){s&&B(e)}}}function u_(o){let e,t,n=o[15]+"",l,i,s=Ye(o[14],o[13].type,"js")+"",_,a;return{c(){e=D(` 35 `),t=ie("span"),l=D(n),i=D(": "),_=D(s),a=D(", "),de(t,"class","example-inputs")},m(r,c){F(r,e,c),F(r,t,c),R(t,l),R(t,i),R(t,_),F(r,a,c)},p(r,c){c&8&&n!==(n=r[15]+"")&&De(l,n),c&8&&s!==(s=Ye(r[14],r[13].type,"js")+"")&&De(_,s)},d(r){r&&(B(e),B(t),B(a))}}}function f_(o){let e,t,n=o[15]+"",l,i,s=o[22]+"",_,a,r,c,f=o[20]+"",u,d,$=o[22]+"",g,m;return{c(){e=D(` 36 `),t=ie("span"),l=D(n),i=D(": example"),_=D(s),a=D(", "),r=ie("span"),c=D(" // blob in '"),u=D(f),d=D("' "),g=D($),m=D(" component"),de(t,"class","example-inputs"),de(r,"class","desc svelte-114qcyq")},m(p,v){F(p,e,v),F(p,t,v),R(t,l),R(t,i),R(t,_),F(p,a,v),F(p,r,v),R(r,c),R(r,u),R(r,d),R(r,g),R(r,m)},p(p,v){v&8&&n!==(n=p[15]+"")&&De(l,n),v&8&&s!==(s=p[22]+"")&&De(_,s),v&8&&f!==(f=p[20]+"")&&De(u,f),v&8&&$!==($=p[22]+"")&&De(g,$)},d(p){p&&(B(e),B(t),B(a),B(r))}}}function nl(o){let e,t;function n(s,_){return _&8&&(e=null),e==null&&(e=!!s[9].includes(s[22])),e?f_:u_}let l=n(o,-1),i=l(o);return{c(){i.c(),t=t_()},m(s,_){i.m(s,_),F(s,t,_)},p(s,_){l===(l=n(s,_))&&i?i.p(s,_):(i.d(1),i=l(s),i&&(i.c(),i.m(t.parentNode,t)))},d(s){s&&B(t),i.d(s)}}}function p_(o){let e;return{c(){e=D(", file")},m(t,n){F(t,e,n)},d(t){t&&B(e)}}}function ol(o){let e,t=o[15]?o[15]+"=":"",n,l,i=Ye(o[16]?o[17]:o[14],o[13].type,"py")+"",s,_;return{c(){e=D(` 37 `),n=D(t),l=ie("span"),s=D(i),_=D(",")},m(a,r){F(a,e,r),F(a,n,r),F(a,l,r),R(l,s),F(a,_,r)},p(a,r){r&8&&t!==(t=a[15]?a[15]+"=":"")&&De(n,t),r&8&&i!==(i=Ye(a[16]?a[17]:a[14],a[13].type,"py")+"")&&De(s,i)},d(a){a&&(B(e),B(n),B(l),B(_))}}}function d_(o){let e,t,n,l;const i=[a_,s_],s=[];function _(a,r){return a[5]==="python"?0:a[5]==="javascript"?1:-1}return~(t=_(o))&&(n=s[t]=i[t](o)),{c(){e=ie("code"),n&&n.c(),de(e,"class","svelte-114qcyq")},m(a,r){F(a,e,r),~t&&s[t].m(e,null),l=!0},p(a,r){let c=t;t=_(a),t===c?~t&&s[t].p(a,r):(n&&(Ei(),Xe(s[c],1,1,()=>{s[c]=null}),yi()),~t?(n=s[t],n?n.p(a,r):(n=s[t]=i[t](a),n.c()),Ke(n,1),n.m(e,null)):n=null)},i(a){l||(Ke(n),l=!0)},o(a){Xe(n),l=!1},d(a){a&&B(e),~t&&s[t].d()}}}function m_(o){let e,t,n,l,i,s;const _=[r_,i_],a=[];function r(c,f){return c[4]?0:1}return t=r(o),n=a[t]=_[t](o),i=new Xn({props:{$$slots:{default:[d_]},$$scope:{ctx:o}}}),{c(){e=ie("div"),n.c(),l=so(),Wt(i.$$.fragment),de(e,"class","container svelte-114qcyq")},m(c,f){F(c,e,f),a[t].m(e,null),R(e,l),Jt(i,e,null),s=!0},p(c,[f]){let u=t;t=r(c),t===u?a[t].p(c,f):(Ei(),Xe(a[u],1,1,()=>{a[u]=null}),yi(),n=a[t],n?n.p(c,f):(n=a[t]=_[t](c),n.c()),Ke(n,1),n.m(e,l));const d={};f&67109119&&(d.$$scope={dirty:f,ctx:c}),i.$set(d)},i(c){s||(Ke(n),Ke(i.$$.fragment,c),s=!0)},o(c){Xe(n),Xe(i.$$.fragment,c),s=!1},d(c){c&&B(e),a[t].d(),Qt(i)}}}function h_(o,e,t){let{dependency:n}=e,{dependency_index:l}=e,{root:i}=e,{endpoint_parameters:s}=e,{named:_}=e,{current_language:a}=e,r,c,f=s.some(m=>hi(m.example_input)),u=["Audio","File","Image","Video"],d=s.filter(m=>u.includes(m.component));function $(m){Ko[m?"unshift":"push"](()=>{r=m,t(6,r)})}function g(m){Ko[m?"unshift":"push"](()=>{c=m,t(7,c)})}return o.$$set=m=>{"dependency"in m&&t(0,n=m.dependency),"dependency_index"in m&&t(1,l=m.depen
37dency_index),"root"in m&&t(2,i=m.root),"endpoint_parameters"in m&&t(3,s=m.endpoint_parameters),"named"in m&&t(4,_=m.named),"current_language"in m&&t(5,a=m.current_language)},[n,l,i,s,_,a,r,c,f,u,d,$,g]}class g_ extends e_{constructor(e){super(),n_(this,e,h_,m_,l_,{dependency:0,dependency_index:1,root:2,endpoint_parameters:3,named:4,current_language:5})}get dependency(){return this.$$.ctx[0]}set dependency(e){this.$$set({dependency:e}),yt()}get dependency_index(){return this.$$.ctx[1]}set dependency_index(e){this.$$set({dependency_index:e}),yt()}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),yt()}get endpoint_parameters(){return this.$$.ctx[3]}set endpoint_parameters(e){this.$$set({endpoint_parameters:e}),yt()}get named(){return this.$$.ctx[4]}set named(e){this.$$set({named:e}),yt()}get current_language(){return this.$$.ctx[5]}set current_language(e){this.$$set({current_language:e}),yt()}}const{SvelteComponent:v_,append:W,attr:Me,binding_callbacks:$_,create_component:Ci,destroy_component:Ai,destroy_each:Li,detach:Ne,element:Re,ensure_array_like:mn,flush:St,init:b_,insert:Ue,mount_component:qi,safe_not_equal:w_,set_data:It,space:k_,text:K,transition_in:Pi,transition_out:Oi}=window.__gradio__svelte__internal,{onMount:y_,tick:E_}=window.__gradio__svelte__internal;function ll(o,e,t){const n=o.slice();return n[13]=e[t].call,n[14]=e[t].api_name,n}function il(o,e,t){const n=o.slice();return n[13]=e[t].call,n[14]=e[t].api_name,n}function C_(o){let e,t,n,l,i,s,_,a=mn(o[5]),r=[];for(let c=0;c<a.length;c+=1)r[c]=sl(ll(o,a,c));return{c(){e=Re("pre"),t=K(`import { Client } from "@gradio/client"; 38 39const app = await Client.connect(`),n=Re("span"),l=K('"'),i=K(o[0]),s=K('"'),_=K(`); 40`);for(let c=0;c<r.length;c+=1)r[c].c();Me(n,"class","token string svelte-j71ub0"),Me(e,"class","svelte-j71ub0")},m(c,f){Ue(c,e,f),W(e,t),W(e,n),W(n,l),W(n,i),W(n,s),W(e,_);for(let u=0;u<r.length;u+=1)r[u]&&r[u].m(e,null)},p(c,f){if(f&1&&It(i,c[0]),f&32){a=mn(c[5]);let u;for(u=0;
40u<a.length;u+=1){const d=ll(c,a,u);r[u]?r[u].p(d,f):(r[u]=sl(d),r[u].c(),r[u].m(e,null))}for(;u<r.length;u+=1)r[u].d(1);r.length=a.length}},d(c){c&&Ne(e),Li(r,c)}}}function A_(o){let e,t,n,l,i,s,_,a,r,c,f=mn(o[4]),u=[];for(let d=0;d<f.length;d+=1)u[d]=al(il(o,f,d));return{c(){e=Re("pre"),t=Re("span"),t.textContent="from",n=K(" gradio_client "),l=Re("span"),l.textContent="import",i=K(` Client, file 41 42client = Client(`),s=Re("span"),_=K('"'),a=K(o[0]),r=K('"'),c=K(`) 43`);for(let d=0;d<u.length;d+=1)u[d].c();Me(t,"class","highlight"),Me(l,"class","highlight"),Me(s,"class","token string svelte-j71ub0"),Me(e,"class","svelte-j71ub0")},m(d,$){Ue(d,e,$),W(e,t),W(e,n),W(e,l),W(e,i),W(e,s),W(s,_),W(s,a),W(s,r),W(e,c);for(let g=0;g<u.length;g+=1)u[g]&&u[g].m(e,null)},p(d,$){if($&1&&It(a,d[0]),$&16){f=mn(d[4]);let g;for(g=0;g<f.length;g+=1){const m=il(d,f,g);u[g]?u[g].p(m,$):(u[g]=al(m),u[g].c(),u[g].m(e,null))}for(;g<u.length;g+=1)u[g].d(1);u.length=f.length}},d(d){d&&Ne(e),Li(u,d)}}}function rl(o){let e;return{c(){e=K(",")},m(t,n){Ue(t,e,n)},d(t){t&&Ne(e)}}}function sl(o){let e,t,n,l=o[14]+"",i,s,_=o[13]+"",a,r,c=o[13]&&rl();return{c(){e=K(` 44await client.predict(`),t=Re("span"),n=K(` 45 "/`),i=K(l),s=K('"'),c&&c.c(),a=K(_),r=K(`); 46 `),Me(t,"class","api-name svelte-j71ub0")},m(f,u){Ue(f,e,u),Ue(f,t,u),W(t,n),W(t,i),W(t,s),c&&c.m(f,u),Ue(f,a,u),Ue(f,r,u)},p(f,u){u&32&&l!==(l=f[14]+"")&&It(i,l),f[13]?c||(c=rl(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null),u&32&&_!==(_=f[13]+"")&&It(a,_)},d(f){f&&(Ne(e),Ne(t),Ne(a),Ne(r)),c&&c.d(f)}}}function al(o){let e,t,n,l=o[13]+"",i,s,_,a,r=o[14]+"",c,f,u;return{c(){e=K(` 47client.`),t=Re("span"),n=K(`predict( 48`),i=K(l),s=K(" api_name="),_=Re("span"),a=K('"/'),c=K(r),f=K('"'),u=K(` 49) 50`),Me(_,"class","api-name svelte-j71ub0"),Me(t,"class","highlight")},m(d,$){Ue(d,e,$),Ue(d,t,$),W(t,n),W(t,i),W(t,s),W(t,_),W(_,a),W(_,c),W(_,f),W(t,u)},p(d,$){$&16&&l!==(l=d[13]+"")&&It(i,l),$&16&&r!==(r=d[14]+"")&&It(c,r)},d(d){d&&(Ne(e),Ne(t))}}}function L_(o){let e,t,n,l,i,s;n=new Zt({props:{code:o[3]}});function _(c,f){if(c[1]==="python")return A_;if(c[1]==="javascript")return C_}let a=_(o),r=a&&a(o);return{c(){e=Re("code"),t=Re("div"),Ci(n.$$.fragment),l=k_(),i=Re("div"),r&&r.c(),Me(t,"class","copy svelte-j71ub0"),Me(e,"class","svelte-j71ub0")},m(c,f){Ue(c,e,f),W(e,t),qi(n,t,null),W(e,l),W(e,i),r&&r.m(i,null),o[9](i),s=!0},p(c,f){const u={};f&8&&(u.code=c[3]),n.$set(u),a===(a=_(c))&&r?r.p(c,f):(r&&r.d(1),r=a&&a(c),r&&(r.c(),r.m(i,null)))},i(c){s||(Pi(n.$$.fragment,c),s=!0)},o(c){Oi(n.$$.fragment,c),s=!1},d(c){c&&Ne(e),Ai(n),r&&r.d(),o[9](null)}}}function q_(o){let e,t,n;return t=new Xn({props:{border_mode:"focus",$$slots:{default:[L_]},$$scope:{ctx:o}}}),{c(){e=Re("div"),Ci(t.$$.fragment),Me(e,"class","container svelte-j71ub0")},m(l,i){Ue(l,e,i),qi(t,e,null),n=!0},p(l,[i]){const s={};i&524351&&(s.$$scope={dirty:i,ctx:l}),t.$set(s)},i(l){n||(Pi(t.$$.fragment,l),n=!0)},o(l){Oi(t.$$.fragment,l),n=!1},d(l){l&&Ne(e),Ai(t)}}}function P_(o,e,t){let{dependencies:n}=e,{short_root:l}=e,{root:i}=e,{current_language:s}=e,_,a,{api_calls:r=[]}=e;async function c(){return await(await fetch(i+"info/?all_endpoints=true")).json()}let f,u=[],d=[];function $(m,p){const v=`/${n[m.fn_index].api_name}`,C=m.data.filter(b=>typeof b<"u").map((b,y)=>{if(f[v]){const h=f[v].parameters[y];if(!h)return;const q=h.parameter_name,w=h.python_type.type;return p==="py"?` ${q}=${Ye(b,w,"py")}`:` ${q}: ${Ye(b,w,"js")}`}return` ${Ye(b,void 0,p)}`}).filter(b=>typeof b<"u").join(`, 51`);return C?p==="py"?`${C}, 52`:` { 53${C}, 54}`:p==="py"?"":` 55`}y_(async()=>{f=(await c()).named_endpoints;let p=r.map(C=>$(C,"py")),v=r.map(C=>$(C,"js")),k=r.map(C=>n[C.fn_index].api_name||"");t(4,u=p.map((C,b)=>({call:C,api_name:k[b]}))),t(5,d=v.map((C,b)=>({call:C,api_name:k[b]}))),await E_(),t(3,a=_.innerText)});function g(m){$_[m?"unshift":"push"](()=>{_=m,t(2,_)})}return o.$$set=m=>{"dependencies"in m&&t(6,n=m.dependencies),"short_root"in m&&t(0,l=m.short_root),"root"in m&&t(7,i=m.root),"current_language"in m&&t(1,s=m.current_language),"api_calls"in m&&t(8,r=m.api_calls)},[l,s,_,a,u,d,n,i,r,g]}class O_ extends v_{constructor(e){super(),b_(this,e,P_,q_,w_,{dependencies:6,short_root:0,root:7,current_language:1,api_calls:8})}get dependencies(){return this.$$.ctx[6]}set dependencies(e){this.$$set({dependencies:e}),St()}get short_root(){return this.$$.ctx[0]}set short_root(e){this.$$set({short_root:e}),St()}get root(){return this.$$.ctx[7]}set root(e){this.$$set({root:e}),St()}get current_language(){return this.$$.ctx[1]}set current_language(e){this.$$set({current_language:e}),St()}get api_calls(){return this.$$.ctx[8]}set api_calls(e){this.$$set({api_calls:e}),St()}}const T_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3cpath%20d='M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z'%20fill='%235a9fd4'%20%3e%3c/path%3e%3cpath%20d='M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z'%20fill='%23ffd43b'%20%3e%3c/path%3e%3c/svg%3e",I_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3crect%20width='32'%20height='32'%20fill='%23f7df1e'%3e%3c/rect%3e%3cpath%20d='M21.5,25a3.27,3.27,0,0,0,3,1.83c1.25,0,2-.63,2-1.49,0-1-.81-1.39-2.19-2L23.56,23C21.39,22.1,20,20.94,20,18.49c0-2.25,1.72-4,4.41-4a4.44,4.44,0,0,1,4.27,2.41l-2.34,1.5a2,2,0,0,0-1.93-1.29,1.31,1.31,0,0,0-1.44,1.29c0,.9.56,1.27,1.85,1.83l.75.32c2.55,1.1,4,2.21,4,4.72,0,2.71-2.12,4.19-5,4.19a5.78,5.78,0,0,1-5.48-3.07Zm-10.63.26c.48.84.91,1.55,1.94,1.55s1.61-.39,1.61-1.89V14.69h3V25c0,3.11-1.83,4.53-4.49,4.53a4.66,4.66,0,0,1-4.51-2.75Z'%20%3e%3c/path%3e%3c/svg%3e",{SvelteComponent:j_,append:Oe,attr:vt,check_outros:D_,create_component:R_,destroy_component:S_,destroy_each:V_,detach:ve,element:Ge,empty:M_,ensure_array_like:_l,flush:nn,group_outros:z_,init:N_,insert:$e,mount_component:U_,noop:B_,safe_not_equal:F_,set_data:jt,set_style:H_,space:Pt,text:je,toggle_class:cl,transition_in:cn,transition_out:Un}=window.__gradio__svelte__internal;function ul(o,e,t){const n=o.slice();return n[4]=e[t].label,n[5]=e[t].type,n[6]=e[t].python_type,n[7]=e[t].component,n[8]=e[t].seri
vendor: 5,543 bytes, lines 55-58
55alizer,n[10]=t,n}function G_(o){let e;return{c(){e=je("1 element")},m(t,n){$e(t,e,n)},p:B_,d(t){t&&ve(e)}}}function Z_(o){let e=o[3]=="python"?"tuple":"list",t,n,l=o[1].length+"",i,s;return{c(){t=je(e),n=je(" of "),i=je(l),s=je(` 56 elements`)},m(_,a){$e(_,t,a),$e(_,n,a),$e(_,i,a),$e(_,s,a)},p(_,a){a&8&&e!==(e=_[3]=="python"?"tuple":"list")&&jt(t,e),a&2&&l!==(l=_[1].length+"")&&jt(i,l)},d(_){_&&(ve(t),ve(n),ve(i),ve(s))}}}function fl(o){let e;return{c(){e=Ge("span"),e.textContent=`[${o[10]}]`,vt(e,"class","code svelte-16h224k")},m(t,n){$e(t,e,n)},d(t){t&&ve(e)}}}function W_(o){let e=o[2][o[10]].type+"",t;return{c(){t=je(e)},m(n,l){$e(n,t,l)},p(n,l){l&4&&e!==(e=n[2][n[10]].type+"")&&jt(t,e)},d(n){n&&ve(t)}}}function Q_(o){let e=o[6].type+"",t;return{c(){t=je(e)},m(n,l){$e(n,t,l)},p(n,l){l&2&&e!==(e=n[6].type+"")&&jt(t,e)},d(n){n&&ve(t)}}}function pl(o){let e,t,n,l,i,s,_,a,r,c=o[4]+"",f,u,d=o[7]+"",$,g,m,p=o[1].length>1&&fl(o);function v(b,y){return b[3]==="python"?Q_:W_}let k=v(o),C=k(o);return{c(){e=Ge("hr"),t=Pt(),n=Ge("div"),l=Ge("p"),p&&p.c(),i=Pt(),s=Ge("span"),C.c(),_=Pt(),a=Ge("p"),r=je('The output value that appears in the "'),f=je(c),u=je('" '),$=je(d),g=je(` 57 component.`),m=Pt(),vt(e,"class","hr svelte-16h224k"),vt(s,"class","code highlight svelte-16h224k"),vt(a,"class","desc svelte-16h224k"),H_(n,"margin","10px")},m(b,y){$e(b,e,y),$e(b,t,y),$e(b,n,y),Oe(n,l),p&&p.m(l,null),Oe(l,i),Oe(l,s),C.m(s,null),Oe(n,_),Oe(n,a),Oe(a,r),Oe(a,f),Oe(a,u),Oe(a,$),Oe(a,g),Oe(n,m)},p(b,y){b[1].length>1?p||(p=fl(b),p.c(),p.m(l,i)):p&&(p.d(1),p=null),k===(k=v(b))&&C?C.p(b,y):(C.d(1),C=k(b),C&&(C.c(),C.m(s,null))),y&2&&c!==(c=b[4]+"")&&jt(f,c),y&2&&d!==(d=b[7]+"")&&jt($,d)},d(b){b&&(ve(e),ve(t),ve(n)),p&&p.d(),C.d()}}}function dl(o){let e,t,n;return t=new si({props:{margin:!1}}),{c(){e=Ge("div"),R_(t.$$.fragment),vt(e,"class","load-wrap")},m(l,i){$e(l,e,i),U_(t,e,null),n=!0},i(l){n||(cn(t.$$.fragment,l),n=!0)},o(l){Un(t.$$.fragment,l),n=!1},d(l){l&&ve(e),S_(t)}}}function J_(o){let e,t,n,l,i,s,_,a;function r(g,m){return g[1].length>1?Z_:G_}let c=r(o),f=c(o),u=_l(o[1]),d=[];for(let g=0;g<u.length;g+=1)d[g]=pl(ul(o,u,g));let $=o[0]&&dl();return{c(){e=Ge("h4"),t=Ge("div"),t.innerHTML='<div class="toggle-dot toggle-right svelte-16h224k"></div>',n=je(` 58 Returns `),f.c(),l=Pt(),i=Ge("div");for(let g=0;g<d.length;g+=1)d[g].c();s=Pt(),$&&$.c(),_=M_(),vt(t,"class","toggle-icon svelte-16h224k"),vt(e,"class","svelte-16h224k"),cl(i,"hide",o[0])},m(g,m){$e(g,e,m),Oe(e,t),Oe(e,n),f.m(e,null),$e(g,l,m),$e(g,i,m);for(let p=0;p<d.length;p+=1)d[p]&&d[p].m(i,null);$e(g,s,m),$&&$.m(g,m),$e(g,_,m),a=!0},p(g,[m]){if(c===(c=r(g))&&f?f.p(g,m):(f.d(1),f=c(g),f&&(f.c(),f.m(e,null))),m&14){u=_l(g[1]);let p;for(p=0;p<u.length;p+=1){const v=ul(g,u,p);d[p]?d[p].p(v,m):(d[p]=pl(v),d[p].c(),d[p].m(i,null))}for(;p<d.length;p+=1)d[p].d(1);d.length=u.length}(!a||m&1)&&cl(i,"hide",g[0]),g[0]?$?m&1&&cn($,1):($=dl(),$.c(),cn($,1),$.m(_.parentNode,_)):$&&(z_(),Un($,1,1,()=>{$=null}),D_())},i(g){a||(cn($),a=!0)},o(g){Un($),a=!1},d(g){g&&(ve(e),ve(l),ve(i),ve(s),ve(_)),f.d(),V_(d,g),$&&$.d(g)}}}function Y_(o,e,t){let{is_running:n}=e,{endpoint_returns:l}=e,{js_returns:i}=e,{current_language:s}=e;return o.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,l=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,s=_.current_language)},[n,l,i,s]}class K_ extends j_{constructor(e){super(),N_(this,e,Y_,J_,F_,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),nn()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),nn()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),nn()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),nn()}}const{SvelteComponent:X_,append:V,attr:Y,bubble:ml,check_outros:hn,create_component:st,destroy_component:at,destroy_each:hl,detach:_e,element:ne,empty:ao,ensure_array_like:on,flush:Et,group_outros:gn,init:x_,insert:ce,listen:ec,mount_component:_t,safe_not_equal:tc,set_data:gl,set_style:Ct,space:me,src_url_equal:nc,text:ae,transition_in:re,transition_out:be}=window.__gradio__svelte__internal,{onMount:oc,createEventDispatcher:lc}=window.__gradio__svelte__internal;function vl(o,e,t){const n=o.slice();return n[18]=e[t],n[20]=t,n}function $l(o,e,t){const n=o.slice();return n[21]=e[t][0],n[22]=e[t][1],n}function bl(o){let e,t,n,l;const i=[rc,ic],s=[];function _(a,r){return a[7]?0:1}return e=_(o),t=s[e]=i[e](o),{c(){t.c(),n=ao()},m(a,r){s[e].m(a,r),ce(a,n,r),l=!0},p(a,r){t.p(a,r)},i(a){l||(re(t),l=!0)},o(a){be(t),l=!1},d(a){a&&_e(n),s[e].d(a)}}}function ic(o){let e,t;return e=new Fs({props:{root:o[0]}}),e.$on("close",o[15]),{c(){st(e.$$.fragment)},m(n,l){_t(e,n,l),t=!0},p(n,l){const i={};l&1&&(i.root=n[0]),e.$set(i)},i(n){t||(re(e.$$.fragment,n),t=!0)},o(n){be(e.$$.fragment,n),t=!1},d(n){at(e,n)}}}function rc(o){let e,t,n,l,i,s,_,a,r,c,f,u,d,$,g,m,p,v,k,C,b,y,h,q,w;t=new xs({props:{root:o[2]||o[0],api_count:o[7]}}),t.$on("close",o[12]);let A=on(o[8]),L=[];for(let T=0;T<A.length;T+=1)L[T]=wl($l(o,A,T));const j=[ac,sc],G=[];function S(T,J){return T[3].length?0:1}y=S(o),h=G[y]=j[y](o);let P=on(o[1]),O=[];for(let T=0;T<P.length;T+=1)O[T]=El(vl(o,P,T));const Q=T=>be(O[T],1,1,()=>{O[T]=null});return{c(){e=ne("div"),st(t.$$.fragment),n=me(),l=ne("div"),i=ne("div"),s=ne("p"),_=ae("Use the "),a=ne("co
58de"),a.textContent="gradio_client",r=me(),c=ne("a"),f=ae("Python library"),u=ae(` or the 59 `),d=ne("code"),d.textContent="@gradio/client",$=me(),g=ne("a"),m=ae("Javascript package"),p=ae(` to query the app 60 via API.`),v=me(),k=ne("div"),C=ne("div");for(let T=0;T<L.length;T+=1)L[T].c();b=me(),h.c(),q=me();for(let T=0;T<O.length;T+=1)O[T].c();Y(e,"class","banner-wrap svelte-17lxwht"),Y(a,"class","library svelte-17lxwht"),Y(c,"href",Fn),Y(c,"target","_blank"),Y(c,"class","svelte-17lxwht"),Y(d,"class","library svelte-17lxwht"),Y(g,"href",Bn),Y(g,"target","_blank"),Y(g,"class","svelte-17lxwht"),Y(i,"class","client-doc svelte-17lxwht"),Y(C,"class","snippets svelte-17lxwht"),Y(k,"class","endpoint svelte-17lxwht"),Y(l,"class","docs-wrap svelte-17lxwht")},m(T,J){ce(T,e,J),_t(t,e,null),ce(T,n,J),ce(T,l,J),V(l,i),V(i,s),V(s,_),V(s,a),V(s,r),V(s,c),V(c,f),V(s,u),V(s,d),V(s,$),V(s,g),V(g,m),V(s,p),V(l,v),V(l,k),V(k,C);for(let ue=0;ue<L.length;ue+=1)L[ue]&&L[ue].m(C,null);V(k,b),G[y].m(k,null),V(k,q);for(let ue=0;ue<O.length;ue+=1)O[ue]&&O[ue].m(k,null);w=!0},p(T,J){const ue={};if(J&5&&(ue.root=T[2]||T[0]),t.$set(ue),J&272){A=on(T[8]);let N;for(N=0;N<A.length;N+=1){const Be=$l(T,A,N);L[N]?L[N].p(Be,J):(L[N]=wl(Be),L[N].c(),L[N].m(C,null))}for(;N<L.length;N+=1)L[N].d(1);L.length=A.length}let We=y;if(y=S(T),y===We?G[y].p(T,J):(gn(),be(G[We],1,1,()=>{G[We]=null}),hn(),h=G[y],h?h.p(T,J):(h=G[y]=j[y](T),h.c()),re(h,1),h.m(k,q)),J&119){P=on(T[1]);let N;for(N=0;N<P.length;N+=1){const Be=vl(T,P,N);O[N]?(O[N].p(Be,J),re(O[N],1)):(O[N]=El(Be),O[N].c(),re(O[N],1),O[N].m(k,null))}for(gn(),N=P.length;N<O.length;N+=1)Q(N);hn()}},i(T){if(!w){re(t.$$.fragment,T),re(h);for(let J=0;J<P.length;J+=1)re(O[J]);w=!0}},o(T){be(t.$$.fragment,T),be(h),O=O.filter(Boolean);for(let J=0;J<O.length;J+=1)be(O[J]);w=!1},d(T){T&&(_e(e),_e(n),_e(l)),at(t),hl(L,T),G[y].d(),hl(O,T)}}}function wl(o){let e,t,n,l,i=o[21]+"",s,_,a,r,c;function f(){return o[13](o[21])}return{c(){e=ne("li"),t=ne("img"),l=me(),s=ae(i),_=me(),nc(t.src,n=o[22])||Y(t,"src",n),Y(t,"alt",""),Y(t,"class","svelte-17lxwht"),Y(e,"class",a="snippet "+(o[4]===o[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")},m(u,d){ce(u,e,d),V(e,t),V(e,l),V(e,s),V(e,_),r||(c=ec(e,"click",f),r=!0)},p(u,d){o=u,d&16&&a!==(a="snippet "+(o[4]===o[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")&&Y(e,"class",a)},d(u){u&&_e(e),r=!1,c()}}}function sc(o){let e,t,n,l,i,s,_,a,r,c;n=new Ga({props:{current_language:o[4]}});let f=o[2]&&kl(o);return a=new Kn({props:{size:"sm",variant:"primary",$$slots:{default:[_c]},$$scope:{ctx:o}}}),a.$on("click",o[14]),{c(){e=ne("p"),e.textContent="1. Install the client if you don't already have it installed.",t=me(),st(n.$$.fragment),l=me(),i=ne("p"),s=ae(`2. Find the API endpoint below corresponding to your desired 61 function in the app. Copy the code snippet, replacing the 62 placeholder values with your own input data. 63 `),f&&f.c(),_=ae(` Or 64 `),st(a.$$.fragment),r=ae(` 65 to automatically generate your API requests.`),Y(e,"class","padded svelte-17lxwht"),Y(i,"class","padded svelte-17lxwht")},m(u,d){ce(u,e,d),ce(u,t,d),_t(n,u,d),ce(u,l,d),ce(u,i,d),V(i,s),f&&f.m(i,null),V(i,_),_t(a,i,null),V(i,r),c=!0},p(u,d){const $={};d&16&&($.current_language=u[4]),n.$set($),u[2]?f?f.p(u,d):(f=kl(u),f.c(),f.m(i,_)):f&&(f.d(1),f=null);const g={};d&33554432&&(g.$$scope={dirty:d,ctx:u}),a.$set(g)},i(u){c||(re(n.$$.fragment,u),re(a.$$.fragment,u),c=!0)},o(u){be(n.$$.fragment,u),be(a.$$.fragment,u),c=!1},d(u){u&&(_e(e),_e(t),_e(l),_e(i)),at(n,u),f&&f.d(),at(a)}}}function ac(o){let e,t,n,l=o[3].length+"",i,s,_,a,r,c,f,u,d,$,g,m,p,v;return d=new O_({props:{current_language:o[4],api_calls:o[3],dependencies:o[1],root:o[0],short_root:o[2]||o[0]}}),{c(){e=ne("div"),t=ne("p"),n=ae("ðª Recorded API Calls ("),i=ae(l),s=ae(")"),_=me(),a=ne("p"),r=ae(`Here is the code snippet to replay the most recently recorded API 66 calls using the `),c=ae(o[4]),f=ae(` 67 client.`),u=me(),st(d.$$.fragment),$=me(),g=ne("p"),g.textContent=`Note: Some API calls only affect the UI, so when using the 68 clients, the desired result may be achieved with only a subset of 69 the recorded calls.`,m=me(),p=ne("p"),p.textContent="API Documentation",Y(t,"id","num-recorded-api-calls"),Ct(t,"font-size","var(--text-lg)"),Ct(t,"font-weight","bold"),Ct(t,"margin","10px 0px"),Ct(p,"font-size","var(--text-lg)"),Ct(p,"font-weight","bold"),Ct(p,"margin","30px 0px 10px")},m(k,C){ce(k,e,C),V(e,t),V(t,n),V(t,i),V(t,s),V(e,_),V(e,a),V(a,r),V(a,c),V(a,f),V(e,u),_t(d,e,null),V(e,$),V(e,g),ce(k,m,C),ce(k,p,C),v=!0},p(k,C){(!v||C&8)&&l!==(l=k[3].length+"")&&gl(i,l),(!v||C&16)&&gl(c,k[4]);const b={};C&16&&(b.current_language=k[4]),C&8&&(b.api_calls=k[3]),C&2&&(b.dependencies=k[1]),C&1&&(b.root=k[0]),C&5&&(b.short_root=k[2]||k[0]),d.$set(b)},i(k){v||(re(d.$$.fragment,k),v=!0)},o(k){be(d.$$.fragment,k),v=!1},d(k){k&&(_e(e),_e(m),_e(p)),at(d)}}}function kl(o){let e,t,n,l,i;
69return{c(){e=ae(`If this is a private Space, you may need to pass your 70 Hugging Face token as well (`),t=ne("a"),n=ae("read more"),i=ae(")."),Y(t,"href",l=(o[4]=="python"?Fn:Bn)+Cl),Y(t,"class","underline svelte-17lxwht"),Y(t,"target","_blank")},m(s,_){ce(s,e,_),ce(s,t,_),V(t,n),ce(s,i,_)},p(s,_){_&16&&l!==(l=(s[4]=="python"?Fn:Bn)+Cl)&&Y(t,"href",l)},d(s){s&&(_e(e),_e(t),_e(i))}}}function _c(o){let e;return{c(){e=ae("ðª Use the API Recorder")},m(t,n){ce(t,e,n)},d(t){t&&_e(e)}}}function yl(o){let e,t,n,l,i,s,_,a;return t=new g_({props:{named:!0,endpoint_parameters:o[5].named_endpoints["/"+o[18].api_name].parameters,dependency:o[18],dependency_index:o[20],current_language:o[4],root:o[2]||o[0]}}),l=new ga({props:{endpoint_returns:o[5].named_endpoints["/"+o[18].api_name].parameters,js_returns:o[6].named_endpoints["/"+o[18].api_name].parameters,is_running:Al,current_language:o[4]}}),s=new K_({props:{endpoint_returns:o[5].named_endpoints["/"+o[18].api_name].returns,js_returns:o[6].named_endpoints["/"+o[18].api_name].returns,is_running:Al,current_language:o[4]}}),{c(){e=ne("div"),st(t.$$.fragment),n=me(),st(l.$$.fragment),i=me(),st(s.$$.fragment),_=me(),Y(e,"class","endpoint-container svelte-17lxwht")},m(r,c){ce(r,e,c),_t(t,e,null),V(e,n),_t(l,e,null),V(e,i),_t(s,e,null),V(e,_),a=!0},p(r,c){const f={};c&34&&(f.endpoint_parameters=r[5].named_endpoints["/"+r[18].api_name].parameters),c&2&&(f.dependency=r[18]),c&16&&(f.current_language=r[4]),c&5&&(f.root=r[2]||r[0]),t.$set(f);const u={};c&34&&(u.endpoint_returns=r[5].named_endpoints["/"+r[18].api_name].parameters),c&66&&(u.js_returns=r[6].named_endpoints["/"+r[18].api_name].parameters),c&16&&(u.current_language=r[4]),l.$set(u);const d={};c&34&&(d.endpoint_returns=r[5].named_endpoints["/"+r[18].api_name].returns),c&66&&(d.js_returns=r[6].named_endpoints["/"+r[18].api_name].returns),c&16&&(d.current_language=r[4]),s.$set(d)},i(r){a||(re(t.$$.fragment,r),re(l.$$.fragment,r),re(s.$$.fragment,r),a=!0)},o(r){be(t.$$.fragment,r),be(l.$$.fragment,r),be(s.$$.fragment,r),a=!1},d(r){r&&_e(e),at(t),at(l),at(s)}}}function El(o){let e,t,n=o[18].show_api&&o[5].named_endpoints["/"+o[18].api_name]&&yl(o);return{c(){n&&n.c(),e=ao()},m(l,i){n&&n.m(l,i),ce(l,e,i),t=!0},p(l,i){l[18].show_api&&l[5].named_endpoints["/"+l[18].api_name]?n?(n.p(l,i),i&34&&re(n,1)):(n=yl(l),n.c(),re(n,1),n.m(e.parentNode,e)):n&&(gn(),be(n,1,1,()=>{n=null}),hn())},i(l){t||(re(n),t=!0)},o(l){be(n),t=!1},d(l){l&&_e(e),n&&n.d(l)}}}function cc(o){let e,t,n=o[5]&&bl(o);return{c(){n&&n.c(),e=ao()},m(l,i){n&&n.m(l,i),ce(l,e,i),t=!0},p(l,[i]){l[5]?n?(n.p(l,i),i&32&&re(n,1)):(n=bl(l),n.c(),re(n,1),n.m(e.parentNode,e)):n&&(gn(),be(n,1,1,()=>{n=null}),hn())},i(l){t||(re(n),t=!0)},o(l){be(n),t=!1},d(l){l&&_e(e),n&&n.d(l)}}}const Bn="https://www.gradio.app/guides/getting-started-with-the-js-client",Fn="https://www.gradio.app/guides/getting-started-with-the-python-client",Cl="#connecting-to-a-hugging-face-space";let Al=!1;function uc(o,e,t){let{dependencies:n}=e,{root:l}=e,{app:i}=e,{space_id:s}=e,{root_node:_}=e,a=n.filter(b=>b.show_api).length;l===""&&(l=location.protocol+"//"+location.host+location.pathname),l.endsWith("/")||(l+="/");let{api_calls:r=[]}=e,c="python";const f=[["python",T_],["javascript",I_]];async function u(){return await(await fetch(l+"info")).json()}async function d(){return await i.view_api()}let $,g;u().then(b=>{t(5,$=b)}),d().then(b=>{t(6,g=b)});const m=lc();oc(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function p(b){ml.call(this,o,b)}const v=b=>t(4,c=b),k=()=>m("close",{api_recorder_visible:!0});function C(b){ml.call(this,o,b)}return o.$$set=b=>{"dependencies"in b&&t(1,n=b.dependencies),"root"in b&&t(0,l=b.root),"app"in b&&t(10,i=b.app),"space_id"in b&&t(2,s=b.space_id),"root_node"in b&&t(11,_=b.root_node),"api_calls"in b&&t(3,r=b.api_calls)},[l,n,s,r,c,$,g,a,f,m,i,_,p,v,k,C]}class fc extends X_{constructor(e){super(),x_(this,e,uc,cc,tc,{dependencies:1,root:0,app:10,space_id:2,root_node:11,api_calls:3})}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),Et()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Et()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),Et()}get space_id(){return this.$$.ctx[2]}set space_id(e){this.$$set({space_id:e}),Et()}get root_node(){return this.$$.ctx[11]}set root_node(e){this.$$set({root_node:e}),Et()}get api_calls(){return this.$$.ctx[3]}set api_calls(e){this.$$set({api_calls:e}),Et()}}const{SvelteComponent:pc,append:ft,attr:un,detach:Hn,element:Gn,flush:Ll,init:dc,insert:Zn,noop:ql,safe_not_equal:mc,set_data:Ti,text:pt}=window.__gradio__svelte__internal;function Pl(o){let e,t,n,l=o[1][o[0][o[0].length-1].fn_index].api_name+"",i;return{c(){e=pt("| "),t=Gn("span"),n=pt("/"),i=pt(l),un(t,"class","api-name svelte-3xfzl5")},m(s,_){Zn(s,e,_),Zn(s,t,_),ft(t,n),ft(t,i)},p(s,_){_&3&&l!==(l=s[1][s[0][s[0].length-1].fn_index].api_name+"")&&Ti(i,l)}
70,d(s){s&&(Hn(e),Hn(t))}}}function hc(o){let e,t,n,l,i=o[0].length+"",s,_,a=o[0].length>0&&Pl(o);return{c(){e=Gn("div"),t=pt("ð "),n=Gn("span"),n.textContent="Recording API Calls...",l=pt(` 71 (`),s=pt(i),_=pt(") "),a&&a.c(),un(n,"class","message svelte-3xfzl5"),un(e,"id","api-recorder"),un(e,"class","svelte-3xfzl5")},m(r,c){Zn(r,e,c),ft(e,t),ft(e,n),ft(e,l),ft(e,s),ft(e,_),a&&a.m(e,null)},p(r,[c]){c&1&&i!==(i=r[0].length+"")&&Ti(s,i),r[0].length>0?a?a.p(r,c):(a=Pl(r),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:ql,o:ql,d(r){r&&Hn(e),a&&a.d()}}}function gc(o,e,t){let{api_calls:n=[]}=e,{dependencies:l}=e;return o.$$set=i=>{"api_calls"in i&&t(0,n=i.api_calls),"dependencies"in i&&t(1,l=i.dependencies)},[n,l]}class vc extends pc{constructor(e){super(),dc(this,e,gc,hc,mc,{api_calls:0,dependencies:1})}get api_calls(){return this.$$.ctx[0]}set api_calls(e){this.$$set({api_calls:e}),Ll()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),Ll()}}const Ol=ir(ai),{SvelteComponent:$c,add_flush_callback:bc,assign:vn,bind:Tl,binding_callbacks:Wn,bubble:wc,check_outros:kc,compute_rest_props:Il,construct_svelte_component:jl,create_component:Dl,create_slot:yc,destroy_component:Rl,detach:Ec,empty:Cc,exclude_internal_props:Ac,flush:He,get_all_dirty_from_scope:Lc,get_slot_changes:qc,get_spread_object:Sl,get_spread_update:Vl,group_outros:Pc,init:Oc,insert:Tc,mount_component:Ml,not_equal:Ic,transition_in:Qn,transition_out:Jn,update_slot_base:jc}=window.__gradio__svelte__internal,{bind:Dc,binding_callbacks:Rc}=window.__gradio__svelte__internal;function Sc(o){let e;const t=o[12].default,n=yc(t,o,o[16],null);return{c(){n&&n.c()},m(l,i){n&&n.m(l,i),e=!0},p(l,i){n&&n.p&&(!e||i&65536)&&jc(n,t,l,l[16],e?qc(t,l[16],i,null):Lc(l[16]),null)},i(l){e||(Qn(n,l),e=!0)},o(l){Jn(n,l),e=!1},d(l){n&&n.d(l)}}}function Vc(o){let e,t,n,l;const i=[{elem_id:o[6]},{elem_classes:o[7]},{target:o[3]},o[9],{theme_mode:o[4]},{root:o[2]},{gradio:o[5]}];function s(r){o[14](r)}var _=o[8];function a(r,c){let f={$$slots:{default:[Sc]},$$scope:{ctx:r}};for(let u=0;u<i.length;u+=1)f=vn(f,i[u]);return c!==void 0&&c&764&&(f=vn(f,Vl(i,[c&64&&{elem_id:r[6]},c&128&&{elem_classes:r[7]},c&8&&{target:r[3]},c&512&&Sl(r[9]),c&16&&{theme_mode:r[4]},c&4&&{root:r[2]},c&32&&{gradio:r[5]}]))),r[1]!==void 0&&(f.value=r[1]),{props:f}}return _&&(e=jl(_,a(o)),o[13](e),Wn.push(()=>Tl(e,"value",s)),e.$on("prop_change",o[15])),{c(){e&&Dl(e.$$.fragment),n=Cc()},m(r,c){e&&Ml(e,r,c),Tc(r,n,c),l=!0},p(r,[c]){if(_!==(_=r[8])){if(e){Pc();const f=e;Jn(f.$$.fragment,1,0,()=>{Rl(f,1)}),kc()}_?(e=jl(_,a(r,c)),r[13](e),Wn.push(()=>Tl(e,"value",s)),e.$on("prop_change",r[15]),Dl(e.$$.fragment),Qn(e.$$.fragment,1),Ml(e,n.parentNode,n)):e=null}else if(_){const f=c&764?Vl(i,[c&64&&{elem_id:r[6]},c&128&&{elem_classes:r[7]},c&8&&{target:r[3]},c&512&&Sl(r[9]),c&16&&{theme_mode:r[4]},c&4&&{root:r[2]},c&32&&{gradio:r[5]}]):{};c&65536&&(f.$$scope={dirty:c,ctx:r}),!t&&c&2&&(t=!0,f.value=r[1],bc(()=>t=!1)),e.$set(f)}},i(r){l||(e&&Qn(e.$$.fragment,r),l=!0)},o(r){e&&Jn(e.$$.fragment,r),l=!1},d(r){r&&Ec(n),o[13](null),e&&Rl(e,r)}}}function Mc(o,e,t){const n=["root","component","target","theme_mode","instance","value","gradio","elem_id","elem_classes","_id"];let l=Il(e,n),{$$slots:i={},$$scope:s}=e,{root:_}=e,{component:a}=e,{target:r}=e,{theme_mode:c}=e,{instance:f}=e,{value:u}=e,{gradio:d}=e,{elem_id:$}=e,{elem_classes:g}=e,{_id:m}=e;const p=(h,q,w)=>new CustomEvent("prop_change",{detail:{id:h,prop:q,value:w}});function v(h){return new Proxy(h,{construct(w,A){const L=new w(...A),j=Object.keys(L.$$.props);function G(S){return function(P){const O=p(m,S,P);r.dispatchEvent(O)}}return j.forEach(S=>{Rc.push(()=>Dc(L,S,G(S)))}),L}})}const k=v(a);function C(h){Wn[h?"unshift":"push"](()=>{f=h,t(0,f)})}function b(h){u=h,t(1,u)}function y(h){wc.call(this,o,h)}return o.$$set=h=>{e=vn(vn({},e),Ac(h)),t(9,l=Il(e,n)),"root"in h&&t(2,_=h.root),"component"in h&&t(10,a=h.component),"target"in h&&t(3,r=h.target),"theme_mode"in h&&t(4,c=h.theme_mode),"instance"in h&&t(0,f=h.instance),"value"in h&&t(1,u=h.value),"gradio"in h&&t(5,d=h.gradio),"elem_id"in h&&t(6,$=h.elem_id),"elem_classes"in h&&t(7,g=h.elem_classes),"_id"in h&&t(11,m=h._id),"$$scope"in h&&t(16,s=h.$$scope)},[f,u,_,r,c,d,$,g,k,l,a,m,i,C,b,y,s]}class zc extends $c{constructor(e){super(),Oc(this,e,Mc,Vc,Ic,{root:2,component:10,target:3,theme_mode:4,instance:0,value:1,gradio:5,elem_id:6,elem_classes:7,_id:11})}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),He()}get component(){return this.$$.ctx[10]}set component(e){this.$$set({component:e}),He()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),He()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),He()}get instance(){return this.$$.ctx[0]}set instance(e){this.$$set({instance:e}),He()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),He()}get gradio(){return this.$$.ctx[5]}set gradio(e){this.$$set({gradio:e}),He()}get elem_id(){return this.$$.ctx[6]}set elem_id(e){this.$$set({elem_id:e}),He()}get elem_classes(){return this.$$.ctx[7]}set elem_classes(e){this.$$set({elem_classes:e}),He()}get _id(){return this.$$.ctx[11]}set _id(e){this.$$set({_id:e}),He()}}const{SvelteComponent:Nc,add_flush_callback:zl,assign:Uc,bind:Nl,binding_callbacks:Ul,bubble:Bl,check_outros:Ii,create_component:ji,destroy_component:Di,detach:_o,empty:co,ensure_array_like:Fl,flush:Je,get_spread_object:Bc,get_spread_update:Fc,group_outros:Ri,init:Hc,insert:uo,mount_component:Si,outro_and_destroy_block:Gc,safe_not_equal:Zc,transition_in:Tt,transition_out:Gt,update_keyed_each:Wc}=window.__gradio__svelte__internal,{onMount:Qc,createEventDispatcher:Jc,setContext:Yc}=window.__gradio__svelte__internal;function Hl(o,e,t){const n=o.slice();return n[15]=e[t],n}function Gl(o){let e=[],t=new Map,n,l,i=Fl(o[0].children);const s=_=>_[15].id;for(let _=0;_<i.length;_+=1){let a=Hl(o,i,_),r=s(a);t.set(r,e[_]=Zl(r,a))}return{c(){for(let _=0;_<e.length;_+=1)e[_].c();n=co()},m(_,a){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(_,a);uo(_,n,a),l=!0},p(_,a){a&207&&(i=Fl(_[0].children),Ri(),e=Wc(e,a,s,1,_,i,t,n.parentNode,Gc,Zl,n,Hl),Ii())},i(_){if(!l){for(let a=0;a<i.length;a+=1)Tt(e[a]);l=!0}},o(_){for(let a=0;a<e.length;a+=1)Gt(e[a]);l=!1},d(_){_&&_o(n);for(let a=0;a<e.length;a+=1)e[a].d(_)}}}function Zl(o,e){let t,n,l;return n=new Vi({props:{node:e[15],component:e[15].component,target:e[2],id:e[15].id,root:e[1],theme_mode:e[3],max_file_size:e[6],client:e[7]}}),n.$on("destroy",e[9]),n.$on("mount",e[10]),{key:o,first:null,c(){t=co(),ji(n.$$.fragment),this.first=t},m(i,s){uo(i,t,s),Si(n,i,s),l=!0},p(i,s){e=i;const _={};s&1&&(_.node=e[15]),s&1&&(_.component=e[15].component),s&4&&(_.target=e[2]),s&1&&(_.id=e[15].id),s&2&&(_.root=e[1]),s&8&&(_.theme_mode=e[3]),s&64&&(_.max_file_size=e[6]),s&128&&(_.client=e[7]),n.$set(_)},i(i){l||(Tt(n.$$.fragment,i),l=!0)},o(i){Gt(n.$$.fragment,i),l=!1},d(i){i&&_o(t),Di(n,i)}}}function Kc(o){let e,t,n=o[0].children&&o[0].children.length&&Gl(o);return{c(){n&&n.c(),e=co()}
71,m(l,i){n&&n.m(l,i),uo(l,e,i),t=!0},p(l,i){l[0].children&&l[0].children.length?n?(n.p(l,i),i&1&&Tt(n,1)):(n=Gl(l),n.c(),Tt(n,1),n.m(e.parentNode,e)):n&&(Ri(),Gt(n,1,1,()=>{n=null}),Ii())},i(l){t||(Tt(n),t=!0)},o(l){Gt(n),t=!1},d(l){l&&_o(e),n&&n.d(l)}}}function Xc(o){let e,t,n,l;const i=[{_id:o[0].id},{component:o[0].component},{elem_id:"elem_id"in o[0].props&&o[0].props.elem_id||`component-${o[0].id}`},{elem_classes:"elem_classes"in o[0].props&&o[0].props.elem_classes||[]},{target:o[2]},o[0].props,{theme_mode:o[3]},{root:o[1]},{gradio:new Eo(o[0].id,o[2],o[3],o[4],o[1],o[5],o[6],Ol,o[7])}];function s(r){o[11](r)}function _(r){o[12](r)}let a={$$slots:{default:[Kc]},$$scope:{ctx:o}};for(let r=0;r<i.length;r+=1)a=Uc(a,i[r]);return o[0].instance!==void 0&&(a.instance=o[0].instance),o[0].props.value!==void 0&&(a.value=o[0].props.value),e=new zc({props:a}),Ul.push(()=>Nl(e,"instance",s)),Ul.push(()=>Nl(e,"value",_)),{c(){ji(e.$$.fragment)},m(r,c){Si(e,r,c),l=!0},p(r,[c]){const f=c&255?Fc(i,[c&1&&{_id:r[0].id},c&1&&{component:r[0].component},c&1&&{elem_id:"elem_id"in r[0].props&&r[0].props.elem_id||`component-${r[0].id}`},c&1&&{elem_classes:"elem_classes"in r[0].props&&r[0].props.elem_classes||[]},c&4&&{target:r[2]},c&1&&Bc(r[0].props),c&8&&{theme_mode:r[3]},c&2&&{root:r[1]},{gradio:new Eo(r[0].id,r[2],r[3],r[4],r[1],r[5],r[6],Ol,r[7])}]):{};c&262351&&(f.$$scope={dirty:c,ctx:r}),!t&&c&1&&(t=!0,f.instance=r[0].instance,zl(()=>t=!1)),!n&&c&1&&(n=!0,f.value=r[0].props.value,zl(()=>n=!1)),e.$set(f)},i(r){l||(Tt(e.$$.fragment,r),l=!0)},o(r){Gt(e.$$.fragment,r),l=!1},d(r){Di(e,r)}}}function xc(o,e,t){let{root:n}=e,{node:l}=e,{parent:i=null}=e,{target:s}=e,{theme_mode:_}=e,{version:a}=e,{autoscroll:r}=e,{max_file_size:c}=e,{client:f}=e;const u=Jc();let d=[];Qc(()=>{u("mount",l.id);for(const v of d)u("mount",v.id);return()=>{u("destroy",l.id);for(const v of d)u("mount",v.id)}}),Yc("BLOCK_KEY",i);function $(v){Bl.call(this,o,v)}function g(v){Bl.call(this,o,v)}function m(v){o.$$.not_equal(l.instance,v)&&(l.instance=v,t(0,l),t(14,d))}function p(v){o.$$.not_equal(l.props.value,v)&&(l.props.value=v,t(0,l),t(14,d))}return o.$$set=v=>{"root"in v&&t(1,n=v.root),"node"in v&&t(0,l=v.node),"parent"in v&&t(8,i=v.parent),"target"in v&&t(2,s=v.target),"theme_mode"in v&&t(3,_=v.theme_mode),"version"in v&&t(4,a=v.version),"autoscroll"in v&&t(5,r=v.autoscroll),"max_file_size"in v&&t(6,c=v.max_file_size),"client"in v&&t(7,f=v.client)},o.$$.update=()=>{o.$$.dirty&1&&t(0,l.children=l.children&&l.children.filter(v=>{const k=l.type!=="statustracker";return k||d.push(v),k}),l),o.$$.dirty&1&&l.type==="form"&&(l.children?.every(v=>!v.props.visible)?t(0,l.props.visible=!1,l):t(0,l.props.visible=!0,l))},[l,n,s,_,a,r,c,f,i,$,g,m,p]}class Vi extends Nc{constructor(e){super(),Hc(this,e,xc,Xc,Zc,{root:1,node:0,parent:8,target:2,theme_mode:3,version:4,autoscroll:5,max_file_size:6,client:7})}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),Je()}get node(){return this.$$.ctx[0]}set node(e){this.$$set({node:e}),Je()}get parent(){return this.$$.ctx[8]}set parent(e){this.$$set({parent:e}),Je()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),Je()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),Je()}get version(){return this.$$.ctx[4]}set version(e){this.$$set({version:e}),Je()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),Je()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),Je()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),Je()}}const{SvelteComponent:eu,create_component:tu,destroy_component:nu,flush:lt,init:ou,mount_component:lu,safe_not_equal:iu,transition_in:ru,transition_out:su}=window.__gradio__svelte__internal,{onMount:au,createEventDispatcher:_u}=window.__gradio__svelte__internal;function cu(o){let e,t;return e=new Vi({props:{node:o[0],root:o[1],target:o[2],theme_mode:o[3],version:o[4],autoscroll:o[5],max_file_size:o[6],client:o[7]}}
vendor: 8,608 bytes, line 71
71),{c(){tu(e.$$.fragment)},m(n,l){lu(e,n,l),t=!0},p(n,[l]){const i={};l&1&&(i.node=n[0]),l&2&&(i.root=n[1]),l&4&&(i.target=n[2]),l&8&&(i.theme_mode=n[3]),l&16&&(i.version=n[4]),l&32&&(i.autoscroll=n[5]),l&64&&(i.max_file_size=n[6]),l&128&&(i.client=n[7]),e.$set(i)},i(n){t||(ru(e.$$.fragment,n),t=!0)},o(n){su(e.$$.fragment,n),t=!1},d(n){nu(e,n)}}}function uu(o,e,t){let{rootNode:n}=e,{root:l}=e,{target:i}=e,{theme_mode:s}=e,{version:_}=e,{autoscroll:a}=e,{max_file_size:r=null}=e,{client:c}=e;const f=_u();return au(()=>{f("mount")}),o.$$set=u=>{"rootNode"in u&&t(0,n=u.rootNode),"root"in u&&t(1,l=u.root),"target"in u&&t(2,i=u.target),"theme_mode"in u&&t(3,s=u.theme_mode),"version"in u&&t(4,_=u.version),"autoscroll"in u&&t(5,a=u.autoscroll),"max_file_size"in u&&t(6,r=u.max_file_size),"client"in u&&t(7,c=u.client)},[n,l,i,s,_,a,r,c]}class fu extends eu{constructor(e){super(),ou(this,e,uu,cu,iu,{rootNode:0,root:1,target:2,theme_mode:3,version:4,autoscroll:5,max_file_size:6,client:7})}get rootNode(){return this.$$.ctx[0]}set rootNode(e){this.$$set({rootNode:e}),lt()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),lt()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),lt()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),lt()}get version(){return this.$$.ctx[4]}set version(e){this.$$set({version:e}),lt()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),lt()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),lt()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),lt()}}const pu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='576'%20height='576'%20viewBox='0%200%20576%20576'%20fill='none'%3e%3cpath%20d='M287.5%20229L86%20344.5L287.5%20460L489%20344.5L287.5%20229Z'%20stroke='url(%23paint0_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M287.5%20116L86%20231.5L287.5%20347L489%20231.5L287.5%20116Z'%20stroke='url(%23paint1_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M86%20344L288%20229'%20stroke='url(%23paint2_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='bevel'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_102_7'%20x1='60'%20y1='341'%20x2='429.5'%20y2='344'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_102_7'%20x1='513.5'%20y1='231'%20x2='143.5'%20y2='231'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_102_7'%20x1='60'%20y1='344'%20x2='428.987'%20y2='341.811'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",du={accordion:{component:()=>I(()=>import("./Index-Bb09QJrB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},annotatedimage:{component:()=>I(()=>import("./Index-CCzXjsFp.js"),__vite__mapDeps([11,1,2,3,4,5,6,7,12,13,14,15,16]),import.meta.url)},audio:{example:()=>I(()=>import("./Example-uQ8MuYg6.js"),__vite__mapDeps([17,18]),import.meta.url),component:()=>I(()=>import("./index-8Tv0pFGK.js"),__vite__mapDeps([19,2,3,4,5,6,12,13,20,21,15,22,23,24,25,26,27,28,29,1,7,30,17,18,31]),import.meta.url)},box:{component:()=>I(()=>import("./Index-8eTw_Sgr.js"),__vite__mapDeps([32,1,2,3,4,5,6,7]),import.meta.url)},button:{component:()=>I(()=>import("./Index-BzR4luAq.js"),__vite__mapDeps([33,3,4,1,2,5,6,7]),import.meta.url)},chatbot:{component:()=>I(()=>import("./Index-h4DOHpBZ.js"),__vite__mapDeps([34,2,3,4,5,6,35,20,15,36,37,38,39,40,41,42,43,44,45,46,1,7,12,47]),import.meta.url)},checkbox:{example:()=>I(()=>import("./Example-CZ-iEz1g.js"),__vite__mapDeps([48,18]),import.meta.url),component:()=>I(()=>import("./Index-REvFgcP5.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,50,51]),import.meta.url)},checkboxgroup:{example:()=>I(()=>import("./Example-CRm1Pmw_.js"),__vite__mapDeps([52,18]),import.meta.url),component:()=>I(()=>import("./Index-ifRua2Qz.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,54,50,55]),import.meta.url)},code:{example:()=>I(()=>import("./Example-Wp-_4AVX.js"),__vite__mapDeps([56,57]),import.meta.url),component:()=>I(()=>import("./Index-BZXlgoQn.js").then(o=>o.F),__vite__mapDeps([58,3,4,1,2,5,6,7,45,46,21,15,12,13,56,57,59]),import.meta.url)},colorpicker:{example:()=>I(()=>import("./Example-BaLyJYAe.js"),__vite__mapDeps([60,61]),import.meta.url),component:()=>I(()=>import("./Index-BVCwhbGi.js"),__vite__mapDeps([62,2,3,4,5,6,54,50,1,7,60,61,63]),import.meta.url)},column:{component:()=>I(()=>import("./Index-BQgACJ6i.js"),__vite__mapDeps([8,2,3,4,5,6,9]),import.meta.url)},dataframe:{example:()=>I(()=>import("./Example-CMXuI9oj.js"),__vite__mapDeps([64,65]),import.meta.url),component:()=>I(()=>import("./Index-jjDf9XWn.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,35,25,26,40,41,42,43,44,67,64,65,68]),import.meta.url)},dataset:{component:()=>I(()=>import("./Index-DSRrUSW7.js"),__vite__mapDeps([69,1,2,3,4,5,6,7,70]),import.meta.url)},downloadbutton:{component:()=>I(()=>import("./Index-DfjvSBdK.js"),__vite__mapDeps([71,3,4,1,2,5,6,7,72]),import.meta.url)},dropdown:{example:()=>I(()=>import("./Example-CUwox43B.js"),__vite__mapDeps([73,18]),import.meta.url),component:()=>I(()=>import("./Index-AAPqF2Dk.js"),__vite__mapDeps([74,2,3,4,5,6,54,50,75,1,7,73,18,76]),import.meta.url)},file:{example:()=>I(()=>import("./Example-DrmWnoSo.js"),__vite__mapDeps([77,78]),import.meta.url),component:()=>I(()=>import("./Index-BpG7x5p-.js"),__vite__mapDeps([79,80,2,3,4,5,6,12,13,81,25,26,27,21,15,24,82,1,7,30,29,77,78]),import.meta.url)},fileexplorer:{example:()=>I(()=>import("./Example-CIFMxn5c.js"),__vite__mapDeps([83,84]),import.meta.url),component:()=>I(()=>import("./Index-CQiMRxXB.js"),__vite__mapDeps([85,2,3,4,5,6,81,1,7,12,86]),import.meta.url)},form:{component:()=>I(()=>import("./Index-DDCF2BFd.js"),__vite__mapDeps([87,88]),import.meta.url)},gallery:{component:()=>I(()=>import("./Index-Cg7tFvM7.js"),__vite__mapDeps([89,1,2,3,4,5,6,7,30,29,12,13,20,21,15,14,25,26,27,24,36,37,80,81,82,90,78]),import.meta.url)},group:{component:()=>I(()=>import("./Index-CS2xVf8J.js"),__vite__mapDeps([91,92]),import.meta.url)},highlightedtext:{component:()=>I(()=>import("./Index-C7l6xT25.js"),__vite__mapDeps([93,94,2,3,4,5,6,1,7,12,13,95]),import.meta.url)},html:{example:()=>I(()=>import("./Example-C2a4WxRl.js"),__vite__mapDeps([96,97]),import.meta.url),component:()=>I(()=>import("./Index-C7RTbroj.js"),__vite__mapDeps([98,2,3,4,5,6,1,7,99]),import.meta.url)},image:{example:()=>I(()=>import("./Example-BNhy9Nko.js"),__vite__mapDeps([100,36,15,2,3,4,5,6,37,101]),import.meta.url),component:()=>I(()=>import("./Index-DHRe32sv.js"),__vite__mapDeps([102,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,30,100,101]),import.meta.url)},imageeditor:{example:()=>I(()=>import("./Example-DovLUjA2.js"),__vite__mapDeps([105,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,106,101]),import.meta.url),component:()=>I(()=>import("./Index-vyEXH25o.js"),__vite__mapDeps([107,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,108,109,45,24,110,101]),import.meta.url)},json:{component:()=>I(()=>import("./Index-Cs9aavKb.js"),__vite__mapDeps([111,1,2,3,4,5,6,7,45,46,13,12,112]),import.meta.url)},label:{component:()=>I(()=>import("./Index-uvE60a-g.js"),__vite__mapDeps([113,2,3,4,5,6,1,7,12,13,114]),import.meta.url)},markdown:{example:()=>I(()=>import("./Example-DyGpBxhn.js"),__vite__mapDeps([115,41,42,5,43]),import.meta.url),component:()=>I(()=>import("./Index-CrUUPQTe.js"),__vite__mapDeps([116,40,2,3,4,5,6,41,42,43,44,1,7,115]),import.meta.url)},model3d:{example:()=>I(()=>import("./Example-BQyGztrG.js"),__vite__mapDeps([117,18]),import.meta.url),component:()=>I(()=>import("./Index-DFRQv7O6.js"),__vite__mapDeps([118,3,4,2,5,6,12,21,15,81,24,25,26,27,1,7,13,30,29,117,18,119]),import.meta.url)},multimodaltextbox:{example:()=>I(()=>import("./Example-C-V2TL_j.js"),__vite__mapDeps([120,36,15,2,3,4,5,6,37,121]),import.meta.url),component:()=>I(()=>import("./Index-Di49lUxK.js"),__vite__mapDeps([122,2,3,4,5,6,54,50,81,22,123,25,26,36,15,37,1,7,120,121,124]),import.meta.url)},number:{example:()=>I(()=>import("./Example-CqL1e7EB.js"),__vite__mapDeps([125,18]),import.meta.url),component:()=>I(()=>import("./Index-DvoNHnsL.js"),__vite__mapDeps([126,1,2,3,4,5,6,7,54,50,127
71]),import.meta.url)},paramviewer:{example:()=>I(()=>import("./Example-C9__vDgN.js"),__vite__mapDeps([128,18]),import.meta.url),component:()=>I(()=>import("./Index-CJNxQKtx.js"),__vite__mapDeps([129,42,5,130]),import.meta.url)},plot:{component:()=>I(()=>import("./Index-T3NbKzMg.js"),__vite__mapDeps([131,5,2,3,4,6,94,67,13,1,7,12,132]),import.meta.url)},radio:{example:()=>I(()=>import("./Example-BoMLuz1A.js"),__vite__mapDeps([133,18]),import.meta.url),component:()=>I(()=>import("./Index-m-O5JWMO.js"),__vite__mapDeps([134,1,2,3,4,5,6,7,54,50,133,18,135]),import.meta.url)},row:{component:()=>I(()=>import("./Index-1_0fVzj5.js"),__vite__mapDeps([136,2,3,4,5,6,137]),import.meta.url)},slider:{example:()=>I(()=>import("./Example-BrizabXh.js"),__vite__mapDeps([138,18]),import.meta.url),component:()=>I(()=>import("./Index-D1b6UIfy.js"),__vite__mapDeps([139,1,2,3,4,5,6,7,54,50,140]),import.meta.url)},state:{component:()=>I(()=>import("./Index-uRgjJb4U.js"),[],import.meta.url)},statustracker:{component:()=>I(()=>import("./index-4775hVua.js"),__vite__mapDeps([141,2,3,4,5,6,1,7]),import.meta.url)},tabitem:{component:()=>I(()=>import("./Index-BSqMaEqV.js"),__vite__mapDeps([142,143,2,3,4,5,6,144,8,9,145]),import.meta.url)},tabs:{component:()=>I(()=>import("./Index-CEy_Cj6Y.js"),__vite__mapDeps([146,143,2,3,4,5,6,144]),import.meta.url)},textbox:{example:()=>I(()=>import("./Example-C7XUkkid.js"),__vite__mapDeps([147,148]),import.meta.url),component:()=>I(()=>import("./Index-9XNZQpVV.js"),__vite__mapDeps([149,150,2,3,4,5,6,54,50,45,46,1,7,151,147,148]),import.meta.url)},uploadbutton:{component:()=>I(()=>import("./Index-DD5Sgt6x.js"),__vite__mapDeps([152,3,4,1,2,5,6,7,153]),import.meta.url)},video:{example:()=>I(()=>import("./Example-DiYvEkKz.js"),__vite__mapDeps([154,38,15,2,3,4,5,6,39,155]),import.meta.url),component:()=>I(()=>import("./index-BdCgfgnQ.js"),__vite__mapDeps([156,25,3,4,2,5,6,26,27,21,15,24,12,123,28,29,103,13,20,14,36,37,75,1,7,104,38,39,23,154,155,30,157,101]),import.meta.url)}},it={};function Wl({api_url:o,name:e,id:t,variant:n}){const l=window.__GRADIO__CC__,i={...du,...l||{}};if(it[`${t}-${n}`])return{component:it[`${t}-${n}`],name:e};try{if(!i?.[t]?.[n]&&!i?.[e]?.[n])throw new Error;return it[`${t}-${n}`]=(i?.[t]?.[n]||i?.[e]?.[n])(),{name:e,component:it[`${t}-${n}`]}}catch{try{return it[`${t}-${n}`]=hu(o,t,n),{name:e,component:it[`${t}-${n}`]}}catch(_){if(n==="example")return it[`${t}-${n}`]=I(()=>import("./Example-DxdiEFS_.js"),__vite__mapDeps([158,18]),import.meta.url),{name:e,component:it[`${t}-${n}`]};throw console.error(`failed to load: ${e}`),console.error(_),_}}}function mu(o){return new Promise((e,t)=>{const n=document.createElement("link");n.rel="stylesheet",n.href=o,document.head.appendChild(n),n.onload=()=>e(),n.onerror=()=>t()})}function hu(o,e,t){return Promise.all([mu(`${o}/custom_component/${e}/${t}/style.css`),I(()=>import(`${o}/custom_component/${e}/${t}/index.js`),[],import.meta.url)]).then(([n,l])=>l)}function gu(){const o=an({}),e={},t={},n=new Map,l=new Map,i=new Map,s={};function _({fn_index:r,status:c,queue:f=!0,size:u,position:d=null,eta:$=null,message:g=null,progress:m}){const p=t[r],v=e[r],k=s[r],C=p.map(b=>{let y;const h=n.get(b)||0;if(k==="pending"&&c!=="pending"){let q=h-1;n.set(b,q<0?0:q),y=q>0?"pending":c}else k==="pending"&&c==="pending"?y="pending":k!=="pending"&&c==="pending"?(y="pending",n.set(b,h+1)):y=c;return{id:b,queue_position:d,queue_size:u,eta:$,status:y,message:g,progress:m}});v.forEach(b=>{const y=l.get(b)||0;if(k==="pending"&&c!=="pending"){let h=y-1;l.set(b,h<0?0:h),i.set(b,c)}else k!=="pending"&&c==="pending"?(l.set(b,y+1),i.set(b,c)):i.delete(b)}),o.update(b=>(C.forEach(({id:y,queue_position:h,queue_size:q,eta:w,status:A,message:L,progress:j})=>{b[y]={queue:f,queue_size:q,queue_position:h,eta:w,message:L,progress:j,status:A,fn_index:r}}),b)),s[r]=c}function a(r,c,f){e[r]=c,t[r]=f}return{update:_,register:a,subscribe:o.subscribe,get_status_for_fn(r){return s[r]},get_inputs_to_update(){return i}}}let At=[];function vu(){let o,e=an({}),t={},n,l,i,s,_=gu();const a=an();let r=[],c,f={},u;
71function d({app:y,components:h,layout:q,dependencies:w,root:A,options:L}){c=y,v(r),r=h,n=new Set,l=new Set,At=[],i=new Map,o=new Map,s={},u={id:q.id,type:"column",props:{interactive:!1,scale:L.fill_height?1:null},has_modes:!1,instance:null,component:null,component_class_id:"",key:null},h.push(u),w.forEach(j=>{_.register(j.id,j.inputs,j.outputs),j.frontend_fn=Ql(j.js,!!j.backend_fn,j.inputs.length,j.outputs.length),Jl(j.targets,j.id,t),Yl(j,n,l)}),e.set(t),i=Kl(h,A),s=h.reduce((j,G)=>(j[G.id]=G,j),{}),g(q,A).then(()=>{a.set(u)})}function $({render_id:y,components:h,layout:q,root:w,dependencies:A}){Kl(h,w).forEach((P,O)=>{i.set(O,P)}),t={},A.forEach(P=>{_.register(P.id,P.inputs,P.outputs),P.frontend_fn=Ql(P.js,!!P.backend_fn,P.inputs.length,P.outputs.length),Jl(P.targets,P.id,t),Yl(P,n,l)}),e.set(t);let j=s[q.id],G=[];const S=P=>{G.push(P),P.children&&P.children.forEach(O=>{S(O)})};S(j),v(G),Object.entries(s).forEach(([P,O])=>{let Q=Number(P);O.rendered_in===y&&(delete s[Q],o.has(Q)&&o.delete(Q))}),h.forEach(P=>{s[P.id]=P,o.set(P.id,P)}),j.parent&&(j.parent.children[j.parent.children.indexOf(j)]=s[q.id]),g(q,w,j.parent).then(()=>{a.set(u)})}async function g(y,h,q){const w=s[y.id];return w.component=(await i.get(w.component_class_id))?.default,w.parent=q,w.type==="dataset"&&(w.props.component_map=zi(w.type,w.component_class_id,h,r,w.props.components).example_components),t[w.id]&&(w.props.attached_events=Object.keys(t[w.id])),w.props.interactive=bu(w.id,w.props.interactive,w.props.value,
71n,l),w.props.server=wu(w.id,w.props.server_fns,c),w.key!=null&&f[w.key]!==void 0&&(w.props.value=f[w.key]),o.set(w.id,w),y.children&&(w.children=await Promise.all(y.children.map(A=>g(A,h,w)))),w}let m=!1,p=an(!1);function v(y){y.forEach(h=>{h.key!=null&&(f[h.key]=h.props.value)})}function k(){a.update(y=>{for(let h=0;h<At.length;h++)for(let q=0;q<At[h].length;q++){const w=At[h][q];if(!w)continue;const A=s[w.id];if(!A)continue;let L;w.value instanceof Map?L=new Map(w.value):w.value instanceof Set?L=new Set(w.value):Array.isArray(w.value)?L=[...w.value]:w.value===null?L=null:typeof w.value=="object"?L={...w.value}:L=w.value,A.props[w.prop]=L}return y}),At=[],m=!1,p.set(!1)}function C(y){y&&(At.push(y),m||(m=!0,p.set(!0),requestAnimationFrame(k)))}function b(y){const h=o.get(y);return h?h.instance.get_value?h.instance.get_value():h.props.value:null}return{layout:a,targets:e,update_value:C,get_data:b,loading_status:_,scheduled_updates:p,create_layout:(...y)=>requestAnimationFrame(()=>d(...y)),rerender_layout:$}}const Mi=Object.getPrototypeOf(async function(){}).constructor;function Ql(o,e,t,n){if(!o)return null;const l=e?t===1:n===1;try{return new Mi("__fn_args",` let result = await (${o})(...__fn_args); 72 return (${l} && !Array.isArray(result)) ? [result] : result;`)}catch(i){return console.error("Could not parse custom js method."),console.error(i),null}}function Jl(o,e,t){return o.forEach(([n,l])=>{t[n]||(t[n]={}),t[n]?.[l]&&!t[n]?.[l].includes(e)?t[n][l].push(e):t[n][l]=[e]}),t}function Yl(o,e,t){return o.inputs.forEach(n=>e.add(n)),o.outputs.forEach(n=>t.add(n)),[e,t]}function $u(o){return Array.isArray(o)&&o.length===0||o===""||o===0||!o}function bu(o,e,t,n,l){return e===!1?!1:e===!0?!0:!!(n.has(o)||!l.has(o)&&$u(t))}function wu(o,e,t){return e?e.reduce((n,l)=>(n[l]=async(...i)=>(i.length===1&&(i=i[0]),await t.component_server(o,l,i)),n),{}):{}}function zi(o,e,t,n,l){let i=new Map;o==="dataset"&&l&&l.forEach(_=>{if(i.has(_))return;let a;const r=n.find(c=>c.type===_);r&&(a=Wl({api_url:t,name:_,id:r.component_class_id,variant:"example"}),i.set(_,a.component))});const s=Wl({api_url:t,name:o,id:e,variant:"component"});return{component:s.component,name:s.name,example_components:i.size>0?i:void 0}}function Kl(o,e){let t=new Map;return o.forEach(n=>{const{component:l,example_components:i}=zi(n.type,n.component_class_id,e,o);if(t.set(n.component_class_id,l),i)for(const[s,_]of i)t.set(s,_)}),t}const{SvelteComponent:ku,append:Ee,attr:x,check_outros:ln,component_subscribe:Vt,create_component:$n,destroy_component:bn,detach:Te,element:ze,empty:Xl,flush:se,globals:yu,group_outros:rn,init:Eu,insert:Ve,listen:fo,mount_component:wn,noop:Sn,safe_not_equal:Cu,set_data:Ni,set_style:sn,space:Ze,src_url_equal:Ui,text:Bi,transition_in:we,transition_out:Se}=window.__gradio__svelte__internal,{document:Yn}=yu,{tick:Vn}=window.__gradio__svelte__internal;function xl(o){return Yn.title=o[2],{c:Sn,m:Sn,d:Sn}}function ei(o){let e,t;return e=new fu({props:{rootNode:o[13],root:o[0],target:o[3],theme_mode:o[9],version:o[12],autoscroll:o[4],max_file_size:o[10].config.max_file_size,client:o[10]}}),e.$on("mount",o[25]),{c(){$n(e.$$.fragment)},m(n,l){wn(e,n,l),t=!0},p(n,l){const i={};l[0]&8192&&(i.rootNode=n[13]),l[0]&1&&(i.root=n[0]),l[0]&8&&(i.target=n[3]),l[0]&512&&(i.theme_mode=n[9]),l[0]&4096&&(i.version=n[12]),l[0]&16&&(i.autoscroll=n[4]),l[0]&1024&&(i.max_file_size=n[10].config.max_file_size),l[0]&1024&&(i.client=n[10]),e.$set(i)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Se(e.$$.fragment,n),t=!1},d(n){bn(e,n)}}}function ti(o){let e,t,n,l=o[18]("common.built_with_gradio")+"",i,s,_,a,r,c=o[5]&&ni(o);return{c(){e=ze("footer"),c&&c.c(),t=Ze(),n=ze("a"),i=Bi(l),s=Ze(),_=ze("img"),Ui(_.src,a=pu)||x(_,"src",a),x(_,"alt",r=o[18]("common.logo")),x(_,"class","svelte-1rjryqp"),x(n,"href","https://gradio.app"),x(n,"class","built-with
72svelte-1rjryqp"),x(n,"target","_blank"),x(n,"rel","noreferrer"),x(e,"class","svelte-1rjryqp")},m(f,u){Ve(f,e,u),c&&c.m(e,null),Ee(e,t),Ee(e,n),Ee(n,i),Ee(n,s),Ee(n,_)},p(f,u){f[5]?c?c.p(f,u):(c=ni(f),c.c(),c.m(e,t)):c&&(c.d(1),c=null),u[0]&262144&&l!==(l=f[18]("common.built_with_gradio")+"")&&Ni(i,l),u[0]&262144&&r!==(r=f[18]("common.logo"))&&x(_,"alt",r)},d(f){f&&Te(e),c&&c.d()}}}function ni(o){let e,t=o[18]("errors.use_via_api")+"",n,l,i,s,_,a,r,c,f;return{c(){e=ze("button"),n=Bi(t),l=Ze(),i=ze("img"),a=Ze(),r=ze("div"),r.textContent="·",Ui(i.src,s=mi)||x(i,"src",s),x(i,"alt",_=o[18]("common.logo")),x(i,"class","svelte-1rjryqp"),x(e,"class","show-api svelte-1rjryqp"),x(r,"class","svelte-1rjryqp")},m(u,d){Ve(u,e,d),Ee(e,n),Ee(e,l),Ee(e,i),Ve(u,a,d),Ve(u,r,d),c||(f=fo(e,"click",o[34]),c=!0)},p(u,d){d[0]&262144&&t!==(t=u[18]("errors.use_via_api")+"")&&Ni(n,t),d[0]&262144&&_!==(_=u[18]("common.logo"))&&x(i,"alt",_)},d(u){u&&(Te(e),Te(a),Te(r)),c=!1,f()}}}function oi(o){let e,t,n,l,i;return t=new vc({props:{api_calls:o[16],dependencies:o[1]}}),{c(){e=ze("div"),$n(t.$$.fragment),x(e,"id","api-recorder-container"),x(e,"class","svelte-1rjryqp")},m(s,_){Ve(s,e,_),wn(t,e,null),n=!0,l||(i=fo(e,"click",o[35]),l=!0)},p(s,_){const a={};_[0]&65536&&(a.api_calls=s[16]),_[0]&2&&(a.dependencies=s[1]),t.$set(a)},i(s){n||(we(t.$$.fragment,s),n=!0)},o(s){Se(t.$$.fragment,s),n=!1},d(s){s&&Te(e),bn(t),l=!1,i()}}}function li(o){let e,t,n,l,i,s,_,a;return i=new fc({props:{root_node:o[13],dependencies:o[1],root:o[0],app:o[10],space_id:o[11],api_calls:o[16]}}),i.$on("close",o[37]),{c(){e=ze("div"),t=ze("div"),n=Ze(),l=ze("div"),$n(i.$$.fragment),x(t,"class","backdrop svelte-1rjryqp"),x(l,"class","api-docs-wrap svelte-1rjryqp"),x(e,"class","api-docs svelte-1rjryqp")},m(r,c){Ve(r,e,c),Ee(e,t),Ee(e,n),Ee(e,l),wn(i,l,null),s=!0,_||(a=fo(t,"click",o[36]),_=!0)},p(r,c){const f={};c[0]&8192&&(f.root_node=r[13]),c[0]&2&&(f.dependencies=r[1]),c[0]&1&&(f.root=r[0]),c[0]&1024&&(f.app=r[10]),c[0]&2048&&(f.space_id=r[11]),c[0]&65536&&(f.api_calls=r[16]),i.$set(f)},i(r){s||(we(i.$$.fragment,r),s=!0)},o(r){Se(i.$$.fragment,r),s=!1},d(r){r&&Te(e),bn(i),_=!1,a()}}}function ii(o){let e,t;return e=new ks({props:{messages:o[17]}}),e.$on("close",o[24]),{c(){$n(e.$$.fragment)},m(n,l){wn(e,n,l),t=!0},p(n,l){const i={};l[0]&131072&&(i.messages=n[17]),e.$set(i)},i(n){t||(we(e.$$.fragment,n),t=!0)},o(n){Se(e.$$.fragment,n),t=!1},d(n){bn(e,n)}}}function Au(o){let e,t,n,l,i,s,_,a,r,c,f=o[7]&&xl(o),u=o[13]&&o[10].config&&ei(o),d=o[6]&&ti(o),$=o[15]&&oi(o),g=o[14]&&o[13]&&li(o),m=o[17]&&ii(o);return{c(){f&&f.c(),e=Xl(),t=Ze(),n=ze("div"),l=ze("div"),u&&u.c(),i=Ze(),d&&d.c(),s=Ze(),$&&$.c(),_=Ze(),g&&g.c(),a=Ze(),m&&m.c(),r=Xl(),x(l,"class","contain svelte-1rjryqp"),sn(l,"flex-grow",o[8]?"1":"auto"),x(n,"class","wrap svelte-1rjryqp"),sn(n,"min-height",o[8]?"100%":"auto")},m(p,v){f&&f.m(Yn.head,null),Ee(Yn.head,e),Ve(p,t,v),Ve(p,n,v),Ee(n,l),u&&u.m(l,null),Ee(n,i),d&&d.m(n,null),Ve(p,s,v),$&&$.m(p,v),Ve(p,_,v),g&&g.m(p,v),Ve(p,a,v),m&&m.m(p,v),Ve(p,r,v),c=!0},p(p,v){p[7]?f||(f=xl(p),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null),p[13]&&p[10].config?u?(u.p(p,v),v[0]&9216&&we(u,1)):(u=ei(p),u.c(),we(u,1),u.m(l,null)):u&&(rn(),Se(u,1,1,()=>{u=null}),ln()),v[0]&256&&sn(l,"flex-grow",p[8]?"1":"auto"),p[6]?d?d.p(p,v):(d=ti(p),d.c(),d.m(n,null)):d&&(d.d(1),d=null),v[0]&256&&sn(n,"min-height",p[8]?"100%":"auto"),p[15]?$?($.p(p,v),v[0]&32768&&we($,1)):($=oi(p),$.c(),we($,1),$.m(_.parentNode,_)):$&&(rn(),Se($,1,1,()=>{$=null}),ln()),p[14]&&p[13]?g?(g.p(p,v),v[0]&24576&&we(g,1)):(g=li(p),g.c(),we(g,1),g.m(a.parentNode,a)):g&&(rn(),Se(g,1,1,()=>{g=null}),ln()),p[17]?m?(m.p(p,v),v[0]&131072&&we(m,1)):(m=ii(p),m.c(),we(m,1),m.m(r.parentNode,r)):m&&(rn(),Se(m,1,1,()=>{m=null}),ln())},i(p){c||(we(u),we($),we(g),we(m),c=!0)},o(p){Se(u),Se($),Se(g),Se(m),c=!1},d(p){p&&(Te(t),Te(n),Te(s),Te(_),Te(a),Te(r)),f&&f.d(p),Te(e),u&&u.d(),d&&d.d(),$&&$.d(p),g&&g.d(p),m&&m.d(p)}}}const Lu=/^'([^]+)'$/,qu=15,Pu=10;function ri(o){return"detail"in o}function Ou(o,e,t){let n,l,i,s,_;Vt(o,ai,E=>t(18,s=E)),rr();let{root:a}=e,{components:r}=e,{layout:c}=e,{dependencies:f}=e,{title:u="Gradio"}=e,{target:d}=e,{autoscroll:$}
72=e,{show_api:g=!0}=e,{show_footer:m=!0}=e,{control_page_title:p=!1}=e,{app_mode:v}=e,{theme_mode:k}=e,{app:C}=e,{space_id:b}=e,{version:y}=e,{js:h}=e,{fill_height:q=!1}=e,{ready:w}=e;const{layout:A,targets:L,update_value:j,get_data:G,loading_status:S,scheduled_updates:P,create_layout:O,rerender_layout:Q}=vu();Vt(o,A,E=>t(13,_=E)),Vt(o,L,E=>t(42,l=E)),Vt(o,S,E=>t(33,n=E)),Vt(o,P,E=>t(43,i=E));let T=new URLSearchParams(window.location.search),J=T.get("view")==="api"&&g,ue=T.get("view")==="api-recorder"&&g;function We(E){t(15,ue=!1),t(14,J=E);let Z=new URLSearchParams(window.location.search);E?Z.set("view","api"):Z.delete("view"),history.replaceState(null,"","?"+Z.toString())}let N=[],{render_complete:Be=!1}=e;async function po(E,Z){const z=f.find(U=>U.id==Z).outputs,M=E?.map((U,pe)=>({id:z[pe],prop:"value_is_output",value:!0}));j(M),await Vn();const te=[];E?.forEach((U,pe)=>{if(typeof U=="object"&&U!==null&&U.__type__==="update")for(const[H,Fe]of Object.entries(U))H!=="__type__"&&te.push({id:z[pe],prop:H,value:Fe});else te.push({id:z[pe],prop:"value",value:U})}),j(te),await Vn()}let mo=new Map,ee=[];function xe(E,Z,z){return{message:E,fn_index:Z,type:z,id:++Hi}}function Fi(E,Z){t(17,ee=[xe(E,-1,Z),...ee])}let Hi=-1,kn=!1;document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(kn=!0)});const Gi=s("blocks.long_requests_queue"),Zi=s("blocks.connection_can_break"),Wi=s("blocks.lost_connection"),ho=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let go=!1,vo=!1;function $t(E,Z=null,z=null){let M=()=>{};function te(){M()}i?M=P.subscribe(U=>{U||($o(E,Z,z),te())}):$o(E,Z,z)}async function $o(E,Z=null,z=null){let M=f.find(H=>H.id===E);const te=S.get_status_for_fn(E);t(17,ee=ee.filter(({fn_index:H})=>H!==E)),M.cancels&&await Promise.all(M.cancels.map(async H=>{const Fe=mo.get(H);return Fe?.cancel(),Fe})),(te==="pending"||te==="generating")&&(M.pending_request=!0);let U={fn_index:E,data:await Promise.all(M.inputs.map(H=>G(H))),event_data:M.collects_event_data?z:null,trigger_id:Z};M.frontend_fn?M.frontend_fn(U.data.concat(await Promise.all(M.outputs.map(H=>G(H))))).then(H=>{M.backend_fn?(U.data=H,pe(U)):po(H,E)}):M.backend_fn&&(M.trigger_mode==="once"?M.pending_request||pe(U):M.trigger_mode==="multiple"?pe(U):M.trigger_mode==="always_last"&&(M.pending_request?M.final_event=U:pe(U)));async function pe(H){ue&&t(16,N=[...N,JSON.parse(JSON.stringify(H))]);let Fe;try{Fe=C.submit(H.fn_index,H.data,H.event_data,H.trigger_id)}catch(fe){t(17,ee=[xe(String(fe),0,"error"),...ee]),S.update({status:"error",fn_index:0,eta:0,queue:!1,queue_position:null}),Yt(n);return}Fe.on("data",({data:fe,fn_index:X})=>{M.pending_request&&M.final_event&&(M.pending_request=!1,pe(M.final_event)),M.pending_request=!1,po(fe,X),Yt(n)}).on("render",({data:fe})=>{let X=fe.components,ye=fe.layout,bt=fe.dependencies,wt=fe.render_id,yn=[];f.forEach((Dt,or)=>{Dt.rendered_in===wt&&yn.push(or)}),yn.reverse().forEach(Dt=>{f.splice(Dt,1)}),bt.forEach(Dt=>{f.push(Dt)}),Q({components:X,layout:ye,root:a,dependencies:f,render_id:wt})}).on("status",({fn_index:fe,...X})=>{if(S.update({...X,status:X.stage,progress:X.progress_data,fn_index:fe}),Yt(n),!go&&b!==null&&X.position!==void 0&&X.position>=2&&X.eta!==void 0&&X.eta>qu&&(go=!0,t(17,ee=[xe(Gi,fe,"warning"),...ee])),!vo&&ho&&X.eta!==void 0&&X.eta>Pu&&(vo=!0,t(17,ee=[xe(Zi,fe,"warning"),...ee])),X.stage==="complete"&&(X.changed_state_ids?.forEach(ye=>{f.filter(bt=>bt.targets.some(([wt,yn])=>wt===ye)).forEach(bt=>{$t(bt.id,H.trigger_id)})}),f.forEach(async ye=>{ye.trigger_after===fe&&$t(ye.id,H.trigger_id)}),Fe.destroy()),X.broken&&ho&&kn)window.setTimeout(()=>{t(17,ee=[xe(Wi,fe,"error"),...ee])},0),$t(M.id,H.trigger_id,z),kn=!1;else if(X.stage==="error"){if(X.message){const ye=X.message.replace(Lu,(bt,wt)=>wt);t(17,ee=[xe(ye,fe,"error"),...ee])}f.map(async ye=>{ye.trigger_after===fe&&!ye.trigger_only_on_success&&$t(ye.id,H.trigger_id)}),Fe.destroy()}}).on("log",({log:fe,fn_index:X,level:ye})=>{t(17,ee=[xe(fe,X,ye),...ee])}),mo.set(E,Fe)}}function Qi(E,Z){if(b===null)return;
72const z=new URL(`https://huggingface.co/spaces/${b}/discussions/new`);E!==void 0&&E.length>0&&z.searchParams.set("title",E),z.searchParams.set("description",Z),window.open(z.toString(),"_blank")}function Ji(E){const Z=E.detail;t(17,ee=ee.filter(z=>z.id!==Z))}const Yi=E=>!!(E&&new URL(E,location.href).origin!==location.origin);async function Ki(){h&&await new Mi(`let result = await (${h})(); 73 return (!Array.isArray(result)) ? [result] : result;`)(),await Vn();for(var E=d.getElementsByTagName("a"),Z=0;Z<E.length;Z++){const z=E[Z].getAttribute("target"),M=E[Z].getAttribute("href");Yi(M)&&z!=="_blank"&&E[Z].setAttribute("target","_blank")}f.forEach(z=>{z.targets[0][1]==="load"&&$t(z.id)}),!Be&&(d.addEventListener("prop_change",z=>{if(!ri(z))throw new Error("not a custom event");const{id:M,prop:te,value:U}=z.detail;j([{id:M,prop:te,value:U}])}),d.addEventListener("gradio",z=>{if(!ri(z))throw new Error("not a custom event");const{id:M,event:te,data:U}=z.detail;if(te==="share"){const{title:pe,description:H}=U;Qi(pe,H)}else te==="error"||te==="warning"?t(17,ee=[xe(U,-1,te),...ee]):te=="clear_status"?Xi(M,"complete",U):l[M]?.[te]?.forEach(H=>{requestAnimationFrame(()=>{$t(H,M,U)})})}),t(27,Be=!0))}function Xi(E,Z,z){z.status=Z,j([{id:E,prop:"loading_status",value:z}])}function Yt(E){let Z=[];Object.entries(E).forEach(([te,U])=>{let pe=f.find(H=>H.id==U.fn_index);pe!==void 0&&(U.scroll_to_output=pe.scroll_to_output,U.show_progress=pe.show_progress,Z.push({id:parseInt(te),prop:"loading_status",value:U}))});const z=S.get_inputs_to_update(),M=Array.from(z).map(([te,U])=>({id:te,prop:"pending",value:U==="pending"}));j([...Z,...M])}const xi=()=>{We(!J)},er=()=>{We(!0),t(15,ue=!1)},tr=()=>{We(!1)},nr=E=>{We(!1),t(16,N=[]),t(15,ue=E.detail.api_recorder_visible)};return o.$$set=E=>{"root"in E&&t(0,a=E.root),"components"in E&&t(28,r=E.components),"layout"in E&&t(29,c=E.layout),"dependencies"in E&&t(1,f=E.dependencies),"title"in E&&t(2,u=E.title),"target"in E&&t(3,d=E.target),"autoscroll"in E&&t(4,$=E.autoscroll),"show_api"in E&&t(5,g=E.show_api),"show_footer"in E&&t(6,m=E.show_footer),"control_page_title"in E&&t(7,p=E.control_page_title),"app_mode"in E&&t(8,v=E.app_mode),"theme_mode"in E&&t(9,k=E.theme_mode),"app"in E&&t(10,C=E.app),"space_id"in E&&t(11,b=E.space_id),"version"in E&&t(12,y=E.version),"js"in E&&t(30,h=E.js),"fill_height"in E&&t(31,q=E.fill_height),"ready"in E&&t(26,w=E.ready),"render_complete"in E&&t(27,Be=E.render_complete)},o.$$.update=()=>{o.$$.dirty[0]&805307395|o.$$.dirty[1]&1&&O({components:r,layout:c,dependencies:f,root:a,app:C,options:{fill_height:q}}),o.$$.dirty[0]&8192&&t(26,w=!!_),o.$$.dirty[1]&4&&Yt(n)},[a,f,u,d,$,g,m,p,v,k,C,b,y,_,J,ue,N,ee,s,A,L,S,P,We,Ji,Ki,w,Be,r,c,h,q,Fi,n,xi,er,tr,nr]}class Tu extends ku{constructor(e){super(),Eu(this,e,Ou,Au,Cu,{root:0,components:28,layout:29,dependencies:1,title:2,target:3,autoscroll:4,show_api:5,show_footer:6,control_page_title:7,app_mode:8,theme_mode:9,app:10,space_id:11,version:12,js:30,fill_height:31,ready:26,render_complete:27,add_new_message:32},null,[-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),se()}get components(){return this.$$.ctx[28]}set components(e){this.$$set({components:e}),se()}get layout(){return this.$$.ctx[29]}set layout(e){this.$$set({layout:e}),se()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),se()}get title(){return this.$$.ctx[2]}set title(e){this.$$set({title:e}),se()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),se()}get autoscroll(){return this.$$.ctx[4]}set autoscroll(e){this.$$set({autoscroll:e}),se()}get show_api(){return this.$$.ctx[5]}set show_api(e){this.$$set({show_api:e}),se()}get show_footer(){return this.$$.ctx[6]}set show_footer(e){this.$$set({show_footer:e}),se()}get control_page_title(){return this.$$.ctx[7]}set control_page_title(e){this.$$set({control_page_title:e}),se()}get app_mode(){return this.$$.ctx[8]}set app_mode(e){this.$$set({app_mode:e}),se()}get theme_mode(){return this.$$.ctx[9]}set theme_mode(e){this.$$set({theme_mode:e}),se()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),se()}get space_id(){return this.$$.ctx[11]}set space_id(e){this.$$set({space_id:e}),se()}get version(){return this.$$.ctx[12]}
73set version(e){this.$$set({version:e}),se()}get js(){return this.$$.ctx[30]}set js(e){this.$$set({js:e}),se()}get fill_height(){return this.$$.ctx[31]}set fill_height(e){this.$$set({fill_height:e}),se()}get ready(){return this.$$.ctx[26]}set ready(e){this.$$set({ready:e}),se()}get render_complete(){return this.$$.ctx[27]}set render_complete(e){this.$$set({render_complete:e}),se()}get add_new_message(){return this.$$.ctx[32]}}const zu=Object.freeze(Object.defineProperty({__proto__:null,default:Tu},Symbol.toStringTag,{value:"Module"}));export{zu as B,Ln as S,ks as T,Vu as c,Mu as f,Su as u}; 74//# sourceMappingURL=Blocks-BS6Kt-qn.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.