PageSourceSearch

https://kazuo63667s-sketch2lineart.hf.space/assets/Blocks-BrGSw8d-.js

js kazuo63667s-sketch2lineart.hf.space collected 2026-10-03 17:01:14 UTC 109,959 bytes, 76 lines download raw bytes

1const __vite__fileDeps=["./Index-BgELO62W.js","./Button-BM3Gfoxv.js","./Index-DvJ399W-.js","./index-D6iiusuW.js","./index-Ds_LdHYW.css","./_commonjsHelpers-BosuxZz1.js","./Index-B4pUrfBk.css","./Button-CTZL5Nos.css","./Index-INgKs-Lw.js","./Index-CptIZeFZ.css","./Index-nQCfNo8e.css","./Index-C3l2NYW5.js","./BlockLabel-S59nE2jv.js","./Empty-CgtesKU7.js","./Image-Bsh8Umrh.js","./file-url-DulxDZ3L.js","./Index-Cr62iXTg.css","./Example-uQ8MuYg6.js","./Example-D7K5RtQ2.css","./index-2g-QOiU-.js","./ShareButton-C2urwshD.js","./DownloadLink-C3h3PR_b.js","./Music-CDm0RGMk.js","./Trim-UKwaW4UI.js","./Undo-CpmTQw3B.js","./ModifyUpload.svelte_svelte_type_style_lang-EVTRkPJ7.js","./ModifyUpload-RL_SHQmd.css","./ModifyUpload-CkTozhK_.js","./SelectSource-CJD0tR5U.js","./Upload-Cp8Go_XF.js","./UploadText-DWPYSfVS.js","./index-9HmesOWo.css","./Index-Br0on3s9.js","./Index-BEdjhdex.js","./Index-Bv_rU9uo.js","./index-CnqicUFC.js","./Image-D4FP5rNG.js","./Image-B8dFOee4.css","./Video-DgoV3B-X.js","./Video-DJw86Ppo.css","./Index.svelte_svelte_type_style_lang-Cp94WWVp.js","./Example.
1svelte_svelte_type_style_lang-DyHaW-Bg.js","./prism-python-b7Hj1w62.js","./Example-CCXcg0ow.css","./Index-B2S_zKCm.css","./Check-Ck0iADAu.js","./Copy-ZPOKSMtK.js","./Index-DHlElFN7.css","./Example-CZ-iEz1g.js","./Index-2er3m2wk.js","./Info-Cs8uP4Sq.js","./Index-BTCbxfal.css","./Example-CRm1Pmw_.js","./Index-CYcVNHLo.js","./BlockTitle-BG3S3JH7.js","./Index-D8o7u_T6.css","./Example-Wp-_4AVX.js","./Example-oomIF0ca.css","./Index-DXAmymL2.js","./Index-BrtrebwU.css","./Example-BaLyJYAe.js","./Example-Bw8Q_3wB.css","./Index-DJP3Hjnr.js","./Index-B6tpubC5.css","./Example-CMXuI9oj.js","./Example-CX34aPix.css","./Index-Dmx8Zb6D.js","./dsv-DB8NKgIY.js","./Index-CR9lHGQe.css","./Index-TLSfC7yd.js","./Index-BBQ7BIGZ.css","./Index-BB0YoQ3k.js","./Index-tcNSQSor.css","./Example-CUwox43B.js","./Index-CMDnMkRp.js","./DropdownArrow-CQGNKtt7.js","./Index-BAQumg2K.css","./Example-DrmWnoSo.js","./Example-DpWs9cEC.css","./Index-O-CfKA7n.js","./FileUpload-Ch6QRXCy.js","./File-BQ_9P3Ye.js","./FileUpload-2TE7T7kD.css","./Example-CIFMxn5c.js","./Example-DfhEULNF.css","./Index-CiEkmok8.js","./Index-YPTlsVjp.css","./Index-DDCF2BFd.js","./Index-B0JJ6p9c.css","./Index-BjhbWyTj.js","./Index-CnEIM1a1.css","./Index-CS2xVf8J.js","./Index-C-7D3Y3j.css","./Index-DI87c1CL.js","./color-D3rXOt6M.js","./Index-Dwy3Ni24.css","./Example-C2a4WxRl.js","./Example-CSw4pLi5.css","./Index-CtPgCiLM.js","./Index-BGmqBTg_.css","./Example-B5ra0LMm.js","./Example-DikqVAPo.css","./Index-C2EiMH1Q.js","./ImageUploader-CP2SxGu9.js","./ImageUploader-B7bPUstM.css","./Example-9wbbXnZg.js","./Example-6rv12T44.css","./Index-BmQO2_-v.js","./url-BybKzMWq.js","./__vite-browser-external-DFe-p4yY.js","./Index-DAGKYUjg.css","./Index-DMYdUYyt.js","./Index-729KAuZc.css","./Index-Dj491TSo.js","./Index-BM4_tjMk.css","./Example-DZJukuNR.js","./Index-cV8rExtZ.js","./Example-BQyGztrG.js","./Index-C3CIAFxq.js","./Index-Pyhmzacd.css","./Example-Ddx5bQlL.js","./Example-sa1k2iUl.css","./Index-CBUBKpdy.js","./Video-fsmLZWjA.js","./Index-CIApqITO.css","./Example-CqL1e7EB.js","./Index-DgTZt0Wv.js","./Index-BUublr_b.css","./Example-C9__vDgN.js","./Index-B6djv07B.js","./Index-BWK3q5UU.css","./Index-TD4kkMYv.js","./Index-D-1bCrLQ.css","./Example-BoMLuz1A.js","./Index-Bm40fReu.js","./Index-BSqct-uf.css","./Index-DPQUg1KC.js","./Index-COkUHsKJ.css","./Example-BrizabXh.js","./Index-D-Msc1SI.js","./Index-CJeiS5ET.css","./index-D1FxdObD.js","./Index-AGFdWl_D.js","./Tabs-BaIn9tfL.js","./Tabs-DX5TEub2.css","./Index-thdqX2vf.css","./Index-CnMHQSls.js","./Example-C7XUkkid.js","./Example-Cj3ii62O.css","./Index-DPgNZtxV.js","./Textbox-OSHpBx5r.js","./Textbox-D8IAzrZj.css","./Index-CESI8pTU.js","./Index-DYDmCduo.css","./Example-CIm9Zvy8.js","./Example-B5CSTz0f.css","./index-B6OSkX25.js","./index-CgvweMVN.css","./Example-DxdiEFS_.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2import{a as is,L as fi,b as ss,$ as pi,w as cn,d as rs}from"./Index-DvJ399W-.js";import{_ as q}from"./index-D6iiusuW.js";import{c as as,f as Al,a as Xn,B as xn}from"./Button-BM3Gfoxv.js";const{SvelteComponent:_s,append:cs,attr:je,detach:us,init:fs,insert:ps,noop:Cn,safe_not_equal:ms,svg_element:Ll}=window.__gradio__svelte__internal;function ds(l){let e,t;return{c(){e=Ll("svg"),t=Ll("path"),je(t,"stroke-linecap","round"),je(t,"stroke-linejoin","round"),je(t,"d","M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"),je(e,"fill","none"),je(e,"stroke","currentColor"),je(e,"viewBox","0 0 24 24"),je(e,"width","100%"),je(e,"height","100%"),je(e,"xmlns","http://www.w3.org/2000/svg"),je(e,"aria-hidden","true"),je(e,"stroke-width","2"),je(e,"stroke-linecap","round"),je(e,"stroke-linejoin","round")},m(n,o){ps(n,e,o),cs(e,t)},p:Cn,i:Cn,o:Cn,d(n){n&&us(e)}}}let hs=class extends _s{constructor(e){super(),fs(this,e,null,ds,ms,{})}};const{SvelteComponent:gs,append:vs,attr:Oe,detach:$s,init:bs,insert:ks,noop:An,safe_not_equal:ws,svg_element:ql}=window.__gradio__svelte__internal;function ys(l){let e,t;return{c(){e=ql("svg"),t=ql("path"),Oe(t,"stroke-linecap","round"),Oe(t,"stroke-linejoin","round"),Oe(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"),Oe(e,"fill","none"),Oe(e,"stroke","currentColor"),Oe(e,"viewBox","0 0 24 24"),Oe(e,"width","100%"),Oe(e,"height","100%"),Oe(e,"xmlns","http://www.w3.org/2000/svg"),Oe(e,"aria-hidden","true"),Oe(e,"stroke-width","2"),Oe(e,"stroke-linecap","round"),Oe(e,"stroke-linejoin","round")},m(n,o){ks(n,e,o),vs(e,t)},p:An,i:An,o:An,d(n){n&&$s(e)}}}class Es extends gs{constructor(e){super(),bs(this,e,null,ys,ws,{})}}const{SvelteComponent:Cs,append:As,attr:Ie,detach:Ls,init:qs,insert:Ps,noop:Ln,safe_not_equal:Ts,svg_element:Pl}=window.__gradio__svelte__internal;function js(l){let e,t;return{c(){e=Pl("svg"),t=Pl("path"),Ie(t,"stroke-linecap","round"),Ie(t,"stroke-linejoin","round"),Ie(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"),Ie(e,"fill","none"),Ie(e,"stroke","currentColor"),Ie(e,"stroke-width","2"),Ie(e,"viewBox","0 0 24 24"),Ie(e,"width","100%"),Ie(e,"height","100%"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"aria-hidden","true"),Ie(e,"stroke-linecap","round"),Ie(e,"stroke-linejoin","round")},m(n,o){Ps(n,e,o),As(e,t)},p:Ln,i:Ln,o:Ln,d(n){n&&Ls(e)}}}class Os extends Cs{constructor(e){super(),qs(this,e,null,js,Ts,{})}}
2class qn extends Error{constructor(e){super(e),this.name="ShareError"}}async function Nu(l,e){if(window.__gradio_space__==null)throw new qn("Must be on Spaces to share.");let t,n,o;if(e==="url"){const a=await fetch(l);t=await a.blob(),n=a.headers.get("content-type")||"",o=a.headers.get("content-disposition")||""}else t=Is(l),n=l.split(";")[0].split(":")[1],o="file"+n.split("/")[1];const i=new File([t],o,{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 qn(`Upload failed: ${a.error}`)}throw new qn("Upload failed.")}return await s.text()}function Is(l){for(var e=l.split(","),t=e[0].match(/:(.*?);/)[1],n=atob(e[1]),o=n.length,i=new Uint8Array(o);o--;)i[o]=n.charCodeAt(o);return new Blob([i],{type:t})}function Uu(l){l.addEventListener("click",e);async function e(t){const n=t.composedPath(),[o]=n.filter(i=>i?.tagName==="BUTTON"&&i.classList.contains("copy_code_button"));if(o){let i=function(r){r.style.opacity="1",setTimeout(()=>{r.style.opacity="0"},2e3)};t.stopImmediatePropagation();const s=o.parentElement.innerText.trim(),_=Array.from(o.children)[1];await Ds(s)&&i(_)}}return{destroy(){l.removeEventListener("click",e)}}}async function Ds(l){let e=!1;if("clipboard"in navigator)await navigator.clipboard.writeText(l),e=!0;else{const t=document.createElement("textarea");t.value=l,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 Bu=l=>{const e=Math.floor(l/3600),t=Math.floor(l%3600/60),n=Math.round(l)%60,o=`${t<10?"0":""}${t}`,i=`${n<10?"0":""}${n}`;return e>0?`${e}:${o}:${i}`:`${t}:${i}`};class Tl{#e;#t;constructor(e,t,n,o,i,s,_,a=c=>c,r){this.#e=e,this.theme=n,this.version=o,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 Rs(l,{from:e,to:t},n={}){const o=getComputedStyle(l),i=o.transform==="none"?"":o.transform,[s,_]=o.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:m=p=>Math.sqrt(p)*120,easing:u=as}=n;return{delay:c,duration:is(m)?m(Math.sqrt(a*a+r*r)):m,easing:u,css:(p,k)=>{const g=k*a,v=k*r,f=p+k*e.width/t.width,d=p+k*e.height/t.height;return`transform: ${i} translate(${g}px, ${v}px) scale(${f}, ${d});`}}}const{SvelteComponent:Ss,add_render_callback:Vs,append:De,attr:le,bubble:jl,check_outros:Ms,create_component:el,create_in_transition:zs,create_out_transition:Ns,destroy_component:tl,detach:Us,element:xe,flush:Pn,group_outros:Bs,init:Fs,insert:Hs,listen:Tn,mount_component:nl,run_all:Gs,safe_not_equal:Zs,set_data:Ol,space:xt,stop_propagation:Il,text:Dl,transition_in:zt,transition_out:Nt}=window.__gradio__svelte__internal,{createEventDispatcher:Ws,onMount:Qs}=window.__gradio__svelte__internal;function Js(l){let e,t;return e=new hs({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(zt(e.$$.fragment,n),t=!0)},o(n){Nt(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Ys(l){let e,t;return e=new Es({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(zt(e.$$.fragment,n),t=!0)},o(n){Nt(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Ks(l){let e,t;return e=new Os({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(zt(e.$$.fragment,n),t=!0)},o(n){Nt(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Xs(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g,v,f,d,h,b,w,C,$,j,O,E,A,B;const K=[Ks,Ys,Js],V=[];function D(L,W){return L[1]==="warning"?0:L[1]==="info"?1:L[1]==="error"?2:-1}return~(n=D(l))&&(o=V[n]=K[n](l)),{c(){e=xe("div"),t=xe("div"),o&&o.c(),s=xt(),_=xe("div"),a=xe("div"),r=Dl(l[1]),m=xt(),u=xe("div"),p=Dl(l[0]),v=xt(),f=xe("button"),d=xe("span"),d.textContent="×",b=xt(),w=xe("div"),le(t,"class",i="toast-icon "+l[1]+" svelte-z3l7qj"),le(a,"class",c="toast-title "+l[1]+" svelte-z3l7qj"),le(u,"class",k="toast-text "+l[1]+" svelte-z3l7qj"),le(_,"class",g="toast-details "+l[1]+" svelte-z3l7qj"),le(d,"aria-hidden","true"),le(f,"class",h="toast-close "+l[1]+" svelte-z3l7qj"),le(f,"type","button"),le(f,"aria-label","Close"),le(f,"data-testid","toast-close"),le(w,"class",C="timer "+l[1]+" svelte-z3l7qj"),le(e,"class",$="toast-body "+l[1]+" svelte-z3l7qj"),le(e,"role","alert"),le(e,"data-testid","toast-body")},m(L,W){Hs(L,e,W),De(e,t),~n&&V[n].m(t,null),De(e,s),De(e,_),De(_,a),De(a,r),De(_,m),De(_,u),De(u,p),De(e,v),De(e,f),De(f,d),De(e,b),De(e,w),E=!0,A||(B=[Tn(f,"click",l[2]),Tn(e,"click",Il(l[4])),Tn(e,"keydown",Il(l[5]))],A=!0)},p(L,[W]){let P=n;n=D(L),n!==P&&(o&&(Bs(),Nt(V[P],1,1,()=>{V[P]=null}),Ms()),~n?(o=V[n],o||(o=V[n]=K[n](L),o.c()),zt(o,1),o.m(t,null)):o=null),(!E||W&2&&i!==(i="toast-icon "+L[1]+" svelte-z3l7qj"))&&le(t,"class",i),(!E||W&2)&&Ol(r,L[1]),(!E||W&2&&c!==(c="toast-title "+L[1]+" svelte-z3l7qj"))&&le(a,"class",c),(!E||W&1)&&Ol(p,L[0]),(!E||W&2&&k!==(k="toast-text "+L[1]+" svelte-z3l7qj"))&&le(u,"class",k),(!E||W&2&&g!==(g="toast-details "+L[1]+" svelte-z3l7qj"))&&le(_,"class",g),(!E||W&2&&h!==(h="toast-close "+L[1]+" svelte-z3l7qj"))&&le(f,"class",h),(!E||W&2&&C!==(C="timer "+L[1]+" svelte-z3l7qj"))&&le(w,"class",C),(!E||W&2&&$!==($="toast-body "+L[1]+" svelte-z3l7qj"))&&le(e,"class",$)},i(L){E||(zt(o),L&&Vs(()=>{E&&(O&&O.end(1),j=zs(e,Al,{duration:200,delay:100}),j.start())}),E=!0)},o(L){Nt(o),j&&j.invalidate(),L&&(O=Ns(e,Al,{duration:200})),E=!1},d(L){L&&Us(e),~n&&V[n].d(),L&&O&&O.end(),A=!1,Gs(B)}}}function xs(l,e,t){let{message:n=""}=e,{type:o}=e,{id:i}=e;const s=Ws();function _(){s("close",i)}Qs(()=>{setTimeout(()=>{_()},1e4)});function a(c){jl.call(this,l,c)}function r(c){jl.call(this,l,c)}return l.$$set=c=>{"message"in c&&t(0,n=c.message),"type"in c&&t(1,o=c.type),"id"in c&&t(3,i=c.id)},[n,o,_,i,a,r]}
2class er extends Ss{constructor(e){super(),Fs(this,e,xs,Xs,Zs,{message:0,type:1,id:3})}get message(){return this.$$.ctx[0]}set message(e){this.$$set({message:e}),Pn()}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),Pn()}get id(){return this.$$.ctx[3]}set id(e){this.$$set({id:e}),Pn()}}const{SvelteComponent:tr,append:nr,attr:lr,bubble:or,check_outros:ir,create_animation:sr,create_component:rr,destroy_component:ar,detach:mi,element:di,ensure_array_like:Rl,fix_and_outro_and_destroy_block:_r,fix_position:cr,flush:ur,group_outros:fr,init:pr,insert:hi,mount_component:mr,noop:dr,safe_not_equal:hr,set_style:gr,space:vr,transition_in:gi,transition_out:vi,update_keyed_each:$r}=window.__gradio__svelte__internal;function Sl(l,e,t){const n=l.slice();return n[2]=e[t].type,n[3]=e[t].message,n[4]=e[t].id,n}function Vl(l,e){let t,n,o,i,s=dr,_;return n=new er({props:{type:e[2],message:e[3],id:e[4]}}),n.$on("close",e[1]),{key:l,first:null,c(){t=di("div"),rr(n.$$.fragment),o=vr(),gr(t,"width","100%"),this.first=t},m(a,r){hi(a,t,r),mr(n,t,null),nr(t,o),_=!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(){cr(t),s()},a(){s(),s=sr(t,i,Rs,{duration:300})},i(a){_||(gi(n.$$.fragment,a),_=!0)},o(a){vi(n.$$.fragment,a),_=!1},d(a){a&&mi(t),ar(n)}}}function br(l){let e,t=[],n=new Map,o,i=Rl(l[0]);const s=_=>_[4];for(let _=0;_<i.length;_+=1){let a=Sl(l,i,_),r=s(a);n.set(r,t[_]=Vl(r,a))}return{c(){e=di("div");for(let _=0;_<t.length;_+=1)t[_].c();lr(e,"class","toast-wrap svelte-pu0yf1")},m(_,a){hi(_,e,a);for(let r=0;r<t.length;r+=1)t[r]&&t[r].m(e,null);o=!0},p(_,[a]){if(a&1){i=Rl(_[0]),fr();for(let r=0;r<t.length;r+=1)t[r].r();t=$r(t,a,s,1,_,i,n,e,_r,Vl,null,Sl);for(let r=0;r<t.length;r+=1)t[r].a();ir()}},i(_){if(!o){for(let a=0;a<i.length;a+=1)gi(t[a]);o=!0}},o(_){for(let a=0;a<t.length;a+=1)vi(t[a]);o=!1},d(_){_&&mi(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function kr(l){l.length>0&&"parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0)}function wr(l,e,t){let{messages:n=[]}=e;function o(i){or.call(this,l,i)}return l.$$set=i=>{"messages"in i&&t(0,n=i.messages)},l.$$.update=()=>{l.$$.dirty&1&&kr(n)},[n,o]}class yr extends tr{constructor(e){super(),pr(this,e,wr,br,hr,{messages:0})}get messages(){return this.$$.ctx[0]}set messages(e){this.$$set({messages:e}),ur()}}const{SvelteComponent:Er,append:jn,attr:We,detach:Cr,init:Ar,insert:Lr,noop:On,safe_not_equal:qr,set_style:It,svg_element:en}=window.__gradio__svelte__internal;function Pr(l){let e,t,n,o;return{c(){e=en("svg"),t=en("g"),n=en("path"),o=en("path"),We(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"),We(o,"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"),We(e,"width","100%"),We(e,"height","100%"),We(e,"viewBox","0 0 5 5"),We(e,"version","1.1"),We(e,"xmlns","http://www.w3.org/2000/svg"),We(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),We(e,"xml:space","preserve"),It(e,"fill","currentColor"),It(e,"fill-rule","evenodd"),It(e,"clip-rule","evenodd"),It(e,"stroke-linejoin","round"),It(e,"stroke-miterlimit","2")},m(i,s){Lr(i,e,s),jn(e,t),jn(t,n),jn(t,o)},p:On,i:On,o:On,d(i){i&&Cr(e)}}}class $i extends Er{constructor(e){super(),Ar(this,e,null,Pr,qr,{})}}const{SvelteComponent:Tr,append:et,attr:tn,create_component:jr,destroy_component:Or,detach:In,element:bt,flush:Ir,init:Dr,insert:Dn,listen:Rr,mount_component:Sr,safe_not_equal:Vr,set_data:Mr,space:Rn,text:Ml,transition_in:zr,transition_out:Nr}=window.__gradio__svelte__internal,{createEventDispatcher:Ur}=window.__gradio__svelte__internal;function Br(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g;return u=new $i({}),{c(){e=bt("div"),t=bt("h1"),t.textContent="API Docs",n=Rn(),o=bt("p"),i=Ml(`No API Routes found for
3		`),s=bt("code"),_=Ml(l[0]),a=Rn(),r=bt("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=Rn(),m=bt("button"),jr(u.$$.fragment),tn(s,"class","svelte-e1ha0f"),tn(o,"class","attention svelte-e1ha0f"),tn(e,"class","wrap prose svelte-e1ha0f"),tn(m,"class","svelte-e1ha0f")},m(v,f){Dn(v,e,f),et(e,t),et(e,n),et(e,o),et(o,i),et(o,s),et(s,_),et(e,a),et(e,r),Dn(v,c,f),Dn(v,m,f),Sr(u,m,null),p=!0,k||(g=Rr(m,"click",l[2]),k=!0)},p(v,[f]){(!p||f&1)&&Mr(_,v[0])},i(v){p||(zr(u.$$.fragment,v),p=!0)},o(v){Nr(u.$$.fragment,v),p=!1},d(v){v&&(In(e),In(c),In(m)),Or(u),k=!1,g()}}}function Fr(l,e,t){const n=Ur();let{root:o}=e;const i=()=>n("close");return l.$$set=s=>{"root"in s&&t(0,o=s.root)},[o,n,i]}class Hr extends Tr{constructor(e){super(),Dr(this,e,Fr,Br,Vr,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Ir()}}const bi="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:Gr,append:Re,attr:tt,create_component:zl,destroy_component:Nl,detach:Vt,element:nt,flush:Ul,init:Zr,insert:Mt,listen:Wr,mount_component:Bl,safe_not_equal:Qr,set_data:Fl,space:nn,src_url_equal:Jr,text:Et,transition_in:Hl,transition_out:Gl}=window.__gradio__svelte__internal,{createEventDispatcher:Yr}=window.__gradio__svelte__internal;function Zl(l){let e;return{c(){e=Et("s")},m(t,n){Mt(t,e,n)},d(t){t&&Vt(e)}}}function Kr(l){let e;return{c(){e=Et("🪄 API Recorder")},m(t,n){Mt(t,e,n)},d(t){t&&Vt(e)}}}function Xr(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g,v,f,d,h,b,w,C,$=l[1]>1&&Zl();return v=new Xn({props:{size:"sm",variant:"primary",$$slots:{default:[Kr]},$$scope:{ctx:l}}}),v.$on("click",l[3]),h=new $i({}),{c(){e=nt("h2"),t=nt("img"),o=nn(),i=nt("div"),s=Et(`API documentation
13		`),_=nt("div"),a=Et(l[0]),r=nn(),c=nt("span"),m=nt("span"),u=Et(l[1]),p=Et(" API endpoint"),$&&$.c(),k=nt("br"),g=nn(),zl(v.$$.fragment),f=nn(),d=nt("button"),zl(h.$$.fragment),Jr(t.src,n=bi)||tt(t,"src",n),tt(t,"alt",""),tt(t,"class","svelte-3n2nxs"),tt(_,"class","url svelte-3n2nxs"),tt(m,"class","url svelte-3n2nxs"),tt(c,"class","counts svelte-3n2nxs"),tt(e,"class","svelte-3n2nxs"),tt(d,"class","svelte-3n2nxs")},m(j,O){Mt(j,e,O),Re(e,t),Re(e,o),Re(e,i),Re(i,s),Re(i,_),Re(_,a),Re(e,r),Re(e,c),Re(c,m),Re(m,u),Re(c,p),$&&$.m(c,null),Re(c,k),Re(c,g),Bl(v,c,null),Mt(j,f,O),Mt(j,d,O),Bl(h,d,null),b=!0,w||(C=Wr(d,"click",l[4]),w=!0)},p(j,[O]){(!b||O&1)&&Fl(a,j[0]),(!b||O&2)&&Fl(u,j[1]),j[1]>1?$||($=Zl(),$.c(),$.m(c,k)):$&&($.d(1),$=null);const E={};O&32&&(E.$$scope={dirty:O,ctx:j}),v.$set(E)},i(j){b||(Hl(v.$$.fragment,j),Hl(h.$$.fragment,j),b=!0)},o(j){Gl(v.$$.fragment,j),Gl(h.$$.fragment,j),b=!1},d(j){j&&(Vt(e),Vt(f),Vt(d)),$&&$.d(),Nl(v),Nl(h),w=!1,C()}}}function xr(l,e,t){let{root:n}=e,{api_count:o}=e;const i=Yr(),s=()=>i("close",{api_recorder_visible:!0}),_=()=>i("close");return l.$$set=a=>{"root"in a&&t(0,n=a.root),"api_count"in a&&t(1,o=a.api_count)},[n,o,i,s,_]}class ea extends Gr{constructor(e){super(),Zr(this,e,xr,Xr,Qr,{root:0,api_count:1})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Ul()}get api_count(){return this.$$.ctx[1]}set api_count(e){this.$$set({api_count:e}),Ul()}}function $t(l,e,t=null){return e===void 0?t==="py"?"None":null:l===null&&t==="py"?"None":e==="string"||e==="str"?t===null?l:'"'+l+'"':e==="number"?t===null?parseFloat(l):l:e==="boolean"||e=="bool"?t==="py"?(l=String(l),l==="true"?"True":"False"):t==="js"?l:l==="true":e==="List[str]"?(l=JSON.stringify(l),l):e.startsWith("Literal['")?'"'+l+'"':t===null?l===""?null:JSON.parse(l):typeof l=="string"?l===""?t==="py"?"None":"null":l:(t==="py"&&(l=Nn(l)),ta(l))}function ki(l){if(typeof l=="object"&&l!==null&&l.hasOwnProperty("url")&&l.hasOwnProperty("meta")&&typeof l.meta=="object"&&l.meta!==null&&l.meta._type==="gradio.FileData")return!0;
vendor: 16,379 bytes, lines 13-35
13if(typeof l=="object"&&l!==null){for(let e in l)if(typeof l[e]=="object"&&ki(l[e]))return!0}return!1}function Nn(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&"url"in l&&"meta"in l&&l.meta?._type==="gradio.FileData"?`file('${l.url}')`:(Array.isArray(l)?l.forEach((e,t)=>{typeof e=="object"&&e!==null&&(l[t]=Nn(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=Nn(l[e])}),l)}function ta(l){let e=JSON.stringify(l,(o,i)=>i===null?"UNQUOTEDNone":typeof i=="string"&&i.startsWith("file(")&&i.endsWith(")")?`UNQUOTED${i}`:i);const t=/"UNQUOTEDfile\(([^)]*)\)"/g;e=e.replace(t,(o,i)=>`file(${i})`);const n=/"UNQUOTEDNone"/g;return e.replace(n,"None")}const{SvelteComponent:na,append:ie,attr:it,check_outros:la,create_component:oa,destroy_component:ia,destroy_each:sa,detach:me,element:Ve,empty:wi,ensure_array_like:Wl,flush:ln,group_outros:ra,init:aa,insert:de,mount_component:_a,noop:ca,safe_not_equal:ua,set_data:mt,set_style:ct,space:ut,text:Ee,toggle_class:Ql,transition_in:un,transition_out:Un}=window.__gradio__svelte__internal;function Jl(l,e,t){const n=l.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 Yl(l){let e;return{c(){e=Ee("s")},m(t,n){de(t,e,n)},d(t){t&&me(e)}}}function fa(l){let e=l[2][l[11]].type+"",t;return{c(){t=Ee(e)},m(n,o){de(n,t,o)},p(n,o){o&4&&e!==(e=n[2][n[11]].type+"")&&mt(t,e)},d(n){n&&me(t)}}}function pa(l){let e=l[5].type+"",t,n,o=l[8]&&l[9]===null&&Kl();return{c(){t=Ee(e),o&&o.c(),n=wi()},m(i,s){de(i,t,s),o&&o.m(i,s),de(i,n,s)},p(i,s){s&2&&e!==(e=i[5].type+"")&&mt(t,e),i[8]&&i[9]===null?o||(o=Kl(),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(i){i&&(me(t),me(n)),o&&o.d(i)}}}function Kl(l){let e;return{c(){e=Ee(` |
14							None`)},m(t,n){de(t,e,n)},d(t){t&&me(e)}}}function ma(l){let e,t,n=$t(l[9],l[5].type,"py")+"",o;return{c(){e=Ve("span"),e.textContent="Default: ",t=Ve("span"),o=Ee(n),it(t,"class","code svelte-1yt946s"),ct(t,"font-size","var(--text-sm)")},m(i,s){de(i,e,s),de(i,t,s),ie(t,o)},p(i,s){s&2&&n!==(n=$t(i[9],i[5].type,"py")+"")&&mt(o,n)},d(i){i&&(me(e),me(t))}}}function da(l){let e;return{c(){e=Ve("span"),e.textContent="Required",ct(e,"font-weight","bold")},m(t,n){de(t,e,n)},p:ca,d(t){t&&me(e)}}}function Xl(l){let e,t,n,o,i,s=(l[7]&&l[3]=="python"?l[7]:"["+l[11]+"]")+"",_,a,r,c,m,u,p,k=l[4]+"",g,v,f=l[6]+"",d,h,b;function w(A,B){return A[3]==="python"?pa:fa}let C=w(l),$=C(l);function j(A,B){return!A[8]||A[3]=="javascript"?da:ma}let O=j(l),E=O(l);return{c(){e=Ve("hr"),t=ut(),n=Ve("div"),o=Ve("p"),i=Ve("span"),_=Ee(s),a=ut(),r=Ve("span"),$.c(),c=ut(),E.c(),m=ut(),u=Ve("p"),p=Ee('The input value that is provided in the "'),g=Ee(k),v=Ee('" '),d=Ee(f),h=Ee(`
15				component.`),b=ut(),it(e,"class","hr svelte-1yt946s"),it(i,"class","code svelte-1yt946s"),ct(i,"margin-right","10px"),it(r,"class","code highlight svelte-1yt946s"),ct(r,"margin-right","10px"),ct(o,"white-space","nowrap"),ct(o,"overflow-x","auto"),it(u,"class","desc svelte-1yt946s"),ct(n,"margin","10px")},m(A,B){de(A,e,B),de(A,t,B),de(A,n,B),ie(n,o),ie(o,i),ie(i,_),ie(o,a),ie(o,r),$.m(r,null),ie(o,c),E.m(o,null),ie(n,m),ie(n,u),ie(u,p),ie(u,g),ie(u,v),ie(u,d),ie(u,h),ie(n,b)},p(A,B){B&10&&s!==(s=(A[7]&&A[3]=="python"?A[7]:"["+A[11]+"]")+"")&&mt(_,s),C===(C=w(A))&&$?$.p(A,B):($.d(1),$=C(A),$&&($.c(),$.m(r,null))),O===(O=j(A))&&E?E.p(A,B):(E.d(1),E=O(A),E&&(E.c(),E.m(o,null))),B&2&&k!==(k=A[4]+"")&&mt(g,k),B&2&&f!==(f=A[6]+"")&&mt(d,f)},d(A){A&&(me(e),me(t),me(n)),$.d(),E.d()}}}function xl(l){let e,t,n;return t=new fi({props:{margin:!1}}),{c(){e=Ve("div"),oa(t.$$.fragment),it(e,"class","load-wrap")},m(o,i){de(o,e,i),_a(t,e,null),n=!0},i(o){n||(un(t.$$.fragment,o),n=!0)},o(o){Un(t.$$.fragment,o),n=!1},d(o){o&&me(e),ia(t)}}}function ha(l){let e,t,n,o=l[1].length+"",i,s,_,a,r,c,m,u,p=l[1].length!=1&&Yl(),k=Wl(l[1]),g=[];for(let f=0;f<k.length;f+=1)g[f]=Xl(Jl(l,k,f));let v=l[0]&&xl();return{c(){e=Ve("h4"),t=Ve("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=Ee(`
16	Accepts `),i=Ee(o),s=Ee(" parameter"),p&&p.c(),_=Ee(":"),a=ut(),r=Ve("div");for(let f=0;f<g.length;f+=1)g[f].c();c=ut(),v&&v.c(),m=wi(),it(t,"class","toggle-icon svelte-1yt946s"),it(e,"class","svelte-1yt946s"),Ql(r,"hide",l[0])},m(f,d){de(f,e,d),ie(e,t),ie(e,n),ie(e,i),ie(e,s),p&&p.m(e,null),ie(e,_),de(f,a,d),de(f,r,d);for(let h=0;h<g.length;h+=1)g[h]&&g[h].m(r,null);de(f,c,d),v&&v.m(f,d),de(f,m,d),u=!0},p(f,[d]){if((!u||d&2)&&o!==(o=f[1].length+"")&&mt(i,o),f[1].length!=1?p||(p=Yl(),p.c(),p.m(e,_)):p&&(p.d(1),p=null),d&14){k=Wl(f[1]);let h;for(h=0;h<k.length;h+=1){const b=Jl(f,k,h);g[h]?g[h].p(b,d):(g[h]=Xl(b),g[h].c(),g[h].m(r,null))}for(;h<g.length;h+=1)g[h].d(1);g.length=k.length}(!u||d&1)&&Ql(r,"hide",f[0]),f[0]?v?d&1&&un(v,1):(v=xl(),v.c(),un(v,1),v.m(m.parentNode,m)):v&&(ra(),Un(v,1,1,()=>{v=null}),la())},i(f){u||(un(v),u=!0)},o(f){Un(v),u=!1},d(f){f&&(me(e),me(a),me(r),me(c),me(m)),p&&p.d(),sa(g,f),v&&v.d(f)}}}function ga(l,e,t){let{is_running:n}=e,{endpoint_returns:o}=e,{js_returns:i}=e,{current_language:s}=e;return l.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,o=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,s=_.current_language)},[n,o,i,s]}class va extends na{constructor(e){super(),aa(this,e,ga,ha,ua,{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}),ln()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),ln()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),ln()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),ln()}}const{SvelteComponent:$a,create_component:ba,destroy_component:ka,detach:wa,flush:ya,init:Ea,insert:Ca,mount_component:Aa,safe_not_equal:La,set_data:qa,text:Pa,transition_in:Ta,transition_out:ja}=window.__gradio__svelte__internal;function Oa(l){let e;return{c(){e=Pa(l[0])},m(t,n){Ca(t,e,n)},p(t,n){n&1&&qa(e,t[0])},d(t){t&&wa(e)}}}function Ia(l){let e,t;return e=new Xn({props:{size:"sm",$$slots:{default:[Oa]},$$scope:{ctx:l}}}),e.$on("click",l[1]),{c(){ba(e.$$.fragment)},m(n,o){Aa(e,n,o),t=!0},p(n,[o]){const i={};o&9&&(i.$$scope={dirty:o,ctx:n}),e.$set(i)},i(n){t||(Ta(e.$$.fragment,n),t=!0)},o(n){ja(e.$$.fragment,n),t=!1},d(n){ka(e,n)}}}function Da(l,e,t){let{code:n}=e,o="copy";function i(){navigator.clipboard.writeText(n),t(0,o="copied!"),setTimeout(()=>{t(0,o="copy")},1500)}return l.$$set=s=>{"code"in s&&t(2,n=s.code)},[o,i,n]}class jt extends $a{constructor(e){super(),Ea(this,e,Da,Ia,La,{code:2})}get code(){return this.$$.ctx[2]}set code(e){this.$$set({code:e}),ya()}}const{SvelteComponent:Ra,append:yi,attr:Ut,check_outros:Sa,create_component:ll,destroy_component:ol,detach:dt,element:ht,flush:Va,group_outros:Ma,init:za,insert:gt,mount_component:il,noop:Ei,safe_not_equal:Na,space:Ci,transition_in:Bt,transition_out:Ft}=window.__gradio__svelte__internal;function Ua(l){let e,t,n,o,i,s;return t=new jt({props:{code:to}}),{c(){e=ht("div"),ll(t.$$.fragment),n=Ci(),o=ht("div"),i=ht("pre"),i.textContent=`$ ${to}`,Ut(e,"class","copy svelte-hq8ezf"),Ut(i,"class","svelte-hq8ezf")},m(_,a){gt(_,e,a),il(t,e,null),gt(_,n,a),gt(_,o,a),yi(o,i),s=!0},p:Ei,i(_){s||(Bt(t.$$.fragment,_),s=!0)},o(_){Ft(t.$$.fragment,_),s=!1},d(_){_&&(dt(e),dt(n),dt(o)),ol(t)}}}function Ba(l){let e,t,n,o,i,s;return t=new jt({props:{code:eo}}),{c(){e=ht("div"),ll(t.$$.fragment),n=Ci(),o=ht("div"),i=ht("pre"),i.textContent=`$ ${eo}`,Ut(e,"class","copy svelte-hq8ezf"),Ut(i,"class","svelte-hq8ezf")},m(_,a){gt(_,e,a),il(t,e,null),gt(_,n,a),gt(_,o,a),yi(o,i),s=!0},p:Ei,i(_){s||(Bt(t.$$.fragment,_),s=!0)},o(_){Ft(t.$$.fragment,_),s=!1},d(_){_&&(dt(e),dt(n),dt(o)),ol(t)}}}function Fa(l){let e,t,n,o;const i=[Ba,Ua],s=[];function _(a,r){return a[0]==="python"?0:a[0]==="javascript"?1:-1}return~(t=_(l))&&(n=s[t]=i[t](l)),{c(){e=ht("code"),n&&n.c(),Ut(e,"class","svelte-hq8ezf")},m(a,r){gt(a,e,r),~t&&s[t].m(e,null),o=!0},p(a,r){let c=t;t=_(a),t===c?~t&&s[t].p(a,r):(n&&(Ma(),Ft(s[c],1,1,()=>{s[c]=null}),Sa()),~t?(n=s[t],n?n.p(a,r):(n=s[t]=i[t](a),n.c()),Bt(n,1),n.m(e,null)):n=null)},i(a){o||(Bt(n),o=!0)},o(a){Ft(n),o=!1},d(a){a&&dt(e),~t&&s[t].d()}}}function Ha(l){let e,t;return e=new xn({props:{border_mode:"contrast",$$slots:{default:[Fa]},$$scope:{ctx:l}}}),{c(){ll(e.$$.fragment)},m(n,o){il(e,n,o),t=!0},p(n,[o]){const i={};o&3&&(i.$$scope={dirty:o,ctx:n}),e.$set(i)},i(n){t||(Bt(e.$$.fragment,n),t=!0)},o(n){Ft(e.$$.fragment,n),t=!1},d(n){ol(e,n)}}}let eo="pip install gradio_client",to="npm i -D @gradio/client";function Ga(l,e,t){let{current_language:n}=e;return l.$$set=o=>{"current_language"in o&&t(0,n=o.current_language)},[n]}class Za extends Ra{constructor(e){super(),za(this,e,Ga,Ha,Na,{current_language:0})}get current_language(){return this.$$.ctx[0]}set current_language(e){this.$$set({current_language:e}),Va()}}const{SvelteComponent:Wa,append:Lt,attr:mn,detach:sl,element:dn,empty:Qa,flush:Sn,init:Ja,insert:rl,noop:no,safe_not_equal:Ya,set_data:Ai,text:hn}=window.__gradio__svelte__internal;function Ka(l){let e,t,n,o;return{c(){e=dn("h3"),t=hn(`fn_index:
17		`),n=dn("span"),o=hn(l[1]),mn(n,"class","post svelte-41kcm6"),mn(e,"class","svelte-41kcm6")},m(i,s){rl(i,e,s),Lt(e,t),Lt(e,n),Lt(n,o)},p(i,s){s&2&&Ai(o,i[1])},d(i){i&&sl(e)}}}function Xa(l){let e,t,n,o="/"+l[0],i;return{c(){e=dn("h3"),t=hn(`api_name:
18		`),n=dn("span"),i=hn(o),mn(n,"class","post svelte-41kcm6"),mn(e,"class","svelte-41kcm6")},m(s,_){rl(s,e,_),Lt(e,t),Lt(e,n),Lt(n,i)},p(s,_){_&1&&o!==(o="/"+s[0])&&Ai(i,o)},d(s){s&&sl(e)}}}function xa(l){let e;function t(i,s){return i[2]?Xa:Ka}let n=t(l),o=n(l);return{c(){o.c(),e=Qa()},m(i,s){o.m(i,s),rl(i,e,s)},p(i,[s]){n===(n=t(i))&&o?o.p(i,s):(o.d(1),o=n(i),o&&(o.c(),o.m(e.parentNode,e)))},i:no,o:no,d(i){i&&sl(e),o.d(i)}}}function e_(l,e,t){let{api_name:n=null}=e,{fn_index:o=null}=e,{named:i}=e;return l.$$set=s=>{"api_name"in s&&t(0,n=s.api_name),"fn_index"in s&&t(1,o=s.fn_index),"named"in s&&t(2,i=s.named)},[n,o,i]}class Li extends Wa{constructor(e){super(),Ja(this,e,e_,xa,Ya,{api_name:0,fn_index:1,named:2})}get api_name(){return this.$$.ctx[0]}set api_name(e){this.$$set({api_name:e}),Sn()}get fn_index(){return this.$$.ctx[1]}set fn_index(e){this.$$set({fn_index:e}),Sn()}get named(){return this.$$.ctx[2]}set named(e){this.$$set({named:e}),Sn()}}const{SvelteComponent:t_,append:I,attr:ue,binding_callbacks:lo,check_outros:qi,create_component:Wt,destroy_component:Qt,destroy_each:Bn,detach:M,element:ne,empty:n_,ensure_array_like:Ct,flush:_t,group_outros:Pi,init:l_,insert:z,mount_component:Jt,noop:o_,safe_not_equal:i_,set_data:qe,space:al,text:T,transition_in:Je,transition_out:Ye}=window.__gradio__svelte__internal;function oo(l,e,t){const n=l.slice();return n[21]=e[t].label,n[22]=e[t].type,n[14]=e[t].python_type,n[23]=e[t].component,n[15]=e[t].example_input,n[24]=e[t].serializer,n[20]=t,n}function io(l,e,t){const n=l.slice();return n[21]=e[t].label,n[22]=e[t].type,n[14]=e[t].python_type,n[23]=e[t].component,n[15]=e[t].example_input,n[24]=e[t].serializer,n[20]=t,n}function so(l,e,t){const n=l.slice();return n[14]=e[t].python_type,n[15]=e[t].example_input,n[16]=e[t].parameter_name,n[17]=e[t].parameter_has_default,n[18]=e[t].parameter_default,n[20]=t,n}function s_(l){let e,t;return e=new Li({props:{named:l[5],fn_index:l[1]}}),{c(){Wt(e.$$.fragment)},m(n,o){Jt(e,n,o),t=!0},p(n,o){const i={};o&32&&(i.named=n[5]),o&2&&(i.fn_index=n[1]),e.$set(i)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){Qt(e,n)}}}function r_(l){let e,t;return e=new Li({props:{named:l[5],api_name:l[0].api_name}}),{c(){Wt(e.$$.fragment)},m(n,o){Jt(e,n,o),t=!0},p(n,o){const i={};o&32&&(i.named=n[5]),o&1&&(i.api_name=n[0].api_name),e.$set(i)},i(n){t||(Je(e.$$.fragment,n),t=!0)},o(n){Ye(e.$$.fragment,n),t=!1},d(n){Qt(e,n)}}}function a_(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g;t=new jt({props:{code:l[8]?.innerText}});let v=Ct(l[11]),f=[];for(let $=0;$<v.length;$+=1)f[$]=ro(io(l,v,$));function d($,j){return $[5]?u_:c_}let h=d(l),b=h(l),w=Ct(l[3]),C=[];for(let $=0;$<w.length;$+=1)C[$]=_o(oo(l,w,$));return{c(){e=ne("div"),Wt(t.$$.fragment),n=al(),o=ne("div"),i=ne("pre"),s=T(`import { Client } from "@gradio/client";
19`);for(let $=0;$<f.length;$+=1)f[$].c();_=T(`
20const app = await Client.connect(`),a=ne("span"),r=T('"'),c=T(l[2]),m=T('"'),u=T(`);
21const result = await app.predict(`),b.c(),p=T(", [");for(let $=0;$<C.length;$+=1)C[$].c();k=T(`
22	]);
23
24console.log(result.data);
25`),ue(e,"class","copy svelte-114qcyq"),ue(a,"class","token string svelte-114qcyq"),ue(i,"class","svelte-114qcyq")},m($,j){z($,e,j),Jt(t,e,null),z($,n,j),z($,o,j),I(o,i),I(i,s);for(let O=0;O<f.length;O+=1)f[O]&&f[O].m(i,null);I(i,_),I(i,a),I(a,r),I(a,c),I(a,m),I(i,u),b.m(i,null),I(i,p);for(let O=0;O<C.length;O+=1)C[O]&&C[O].m(i,null);I(i,k),l[13](o),g=!0},p($,j){const O={};if(j&256&&(O.code=$[8]?.innerText),t.$set(O),j&2048){v=Ct($[11]);let E;for(E=0;E<v.length;E+=1){const A=io($,v,E);f[E]?f[E].p(A,j):(f[E]=ro(A),f[E].c(),f[E].m(i,_))}for(;E<f.length;E+=1)f[E].d(1);f.length=v.length}if((!g||j&4)&&qe(c,$[2]),h===(h=d($))&&b?b.p($,j):(b.d(1),b=h($),b&&(b.c(),b.m(i,p))),j&1048){w=Ct($[3]);let E;for(E=0;E<w.length;E+=1){const A=oo($,w,E);C[E]?C[E].p(A,j):(C[E]=_o(A),C[E].c(),C[E].m(i,k))}for(;E<C.length;E+=1)C[E].d(1);C.length=w.length}},i($){g||(Je(t.$$.fragment,$),g=!0)},o($){Ye(t.$$.fragment,$),g=!1},d($){$&&(M(e),M(n),M(o)),Qt(t),Bn(f,$),b.d(),Bn(C,$),l[13](null)}}}function __(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g,v,f,d,h,b,w=l[0].api_name+"",C,$,j,O,E,A;t=new jt({props:{code:l[7]?.innerText}});let B=l[9]&&m_(),K=Ct(l[3]),V=[];for(let D=0;D<K.length;D+=1)V[D]=co(so(l,K,D));return{c(){e=ne("div"),Wt(t.$$.fragment),n=al(),o=ne("div"),i=ne("pre"),s=ne("span"),s.textContent="from",_=T(" gradio_client "),a=ne("span"),a.textContent="import",r=T(" Client"),B&&B.c(),c=T(`
26
27client = Client(`),m=ne("span"),u=T('"'),p=T(l[2]),k=T('"'),g=T(`)
28result = client.`),v=ne("span"),v.textContent="predict",f=T("(");for(let D=0;D<V.length;D+=1)V[D].c();d=T(`
29		api_name=`),h=ne("span"),b=T('"/'),C=T(w),$=T('"'),j=T(`
30)
31`),O=ne("span"),O.textContent="print",E=T("(result)"),ue(e,"class","copy svelte-114qcyq"),ue(s,"class","highlight"),ue(a,"class","highlight"),ue(m,"class","token string svelte-114qcyq"),ue(v,"class","highlight"),ue(h,"class","api-name svelte-114qcyq"),ue(O,"class","highlight"),ue(i,"class","svelte-114qcyq")},m(D,L){z(D,e,L),Jt(t,e,null),z(D,n,L),z(D,o,L),I(o,i),I(i,s),I(i,_),I(i,a),I(i,r),B&&B.m(i,null),I(i,c),I(i,m),I(m,u),I(m,p),I(m,k),I(i,g),I(i,v),I(i,f);for(let W=0;W<V.length;W+=1)V[W]&&V[W].m(i,null);I(i,d),I(i,h),I(h,b),I(h,C),I(h,$),I(i,j),I(i,O),I(i,E),l[12](o),A=!0},p(D,L){const W={};if(L&128&&(W.code=D[7]?.innerText),t.$set(W),(!A||L&4)&&qe(p,D[2]),L&8){K=Ct(D[3]);let P;for(P=0;P<K.length;P+=1){const Q=so(D,K,P);V[P]?V[P].p(Q,L):(V[P]=co(Q),V[P].c(),V[P].m(i,d))}for(;P<V.length;P+=1)V[P].d(1);V.length=K.length}(!A||L&1)&&w!==(w=D[0].api_name+"")&&qe(C,w)},i(D){A||(Je(t.$$.fragment,D),A=!0)},o(D){Ye(t.$$.fragment,D),A=!1},d(D){D&&(M(e),M(n),M(o)),Qt(t),B&&B.d(),Bn(V,D),l[12](null)}}}function ro(l){let e,t,n,o=l[15].url+"",i,s,_=l[23]+"",a,r,c,m;return{c(){e=T(`
32const response_`),t=T(l[20]),n=T(' = await fetch("'),i=T(o),s=T(`");
33const example`),a=T(_),r=T(" = await response_"),c=T(l[20]),m=T(`.blob();
34						`)},m(u,p){z(u,e,p),z(u,t,p),z(u,n,p),z(u,i,p),z(u,s,p),z(u,a,p),z(u,r,p),z(u,c,p),z(u,m,p)},p:o_,d(u){u&&(M(e),M(t),M(n),M(i),M(s),M(a),M(r),M(c),M(m))}}}function c_(l){let e;return{c(){e=T(l[1])},m(t,n){z(t,e,n)},p(t,n){n&2&&qe(e,t[1])},d(t){t&&M(e)}}}function u_(l){let e,t,n=l[0].api_name+"",o,i;return{c(){e=ne("span"),t=T('"/'),o=T(n),i=T('"'),ue(e,"class","api-name svelte-114qcyq")},m(s,_){z(s,e,_),I(e,t),I(e,o),I(e,i)},p(s,_){_&1&&n!==(n=s[0].api_name+"")&&qe(o,n)},d(s){s&&M(e)}}}function f_(l){let e,t,n=$t(l[15],l[14].type,"js")+"",o,i,s,_,a=l[4][l[20]].type+"",r,c,m,u=l[21]+"",p,k,g=l[23]+"",v,f,d=l[4][l[20]].description&&ao(l);return{c(){e=T(`		
35				`),t=ne("span"),o=T(n),i=T(", "),s=ne("span"),_=T("// "),r=T(a),c=T(" "),d&&d.c(),m=T(" in '"),p=T(u),k=T("' "),v=T(g),f=T(" component"),ue(t,"class","example-inputs"),ue(s,"class","desc 
35svelte-114qcyq")},m(h,b){z(h,e,b),z(h,t,b),I(t,o),z(h,i,b),z(h,s,b),I(s,_),I(s,r),I(s,c),d&&d.m(s,null),I(s,m),I(s,p),I(s,k),I(s,v),I(s,f)},p(h,b){b&8&&n!==(n=$t(h[15],h[14].type,"js")+"")&&qe(o,n),b&16&&a!==(a=h[4][h[20]].type+"")&&qe(r,a),h[4][h[20]].description?d?d.p(h,b):(d=ao(h),d.c(),d.m(s,m)):d&&(d.d(1),d=null),b&8&&u!==(u=h[21]+"")&&qe(p,u),b&8&&g!==(g=h[23]+"")&&qe(v,g)},d(h){h&&(M(e),M(t),M(i),M(s)),d&&d.d()}}}function p_(l){let e,t,n,o=l[23]+"",i,s,_,a,r=l[21]+"",c,m,u=l[23]+"",p,k;return{c(){e=T(`
36				`),t=ne("span"),n=T("example"),i=T(o),s=T(", "),_=ne("span"),a=T("	// blob in '"),c=T(r),m=T("' "),p=T(u),k=T(" component"),ue(t,"class","example-inputs"),ue(_,"class","desc svelte-114qcyq")},m(g,v){z(g,e,v),z(g,t,v),I(t,n),I(t,i),z(g,s,v),z(g,_,v),I(_,a),I(_,c),I(_,m),I(_,p),I(_,k)},p(g,v){v&8&&o!==(o=g[23]+"")&&qe(i,o),v&8&&r!==(r=g[21]+"")&&qe(c,r),v&8&&u!==(u=g[23]+"")&&qe(p,u)},d(g){g&&(M(e),M(t),M(s),M(_))}}}function ao(l){let e,t=l[4][l[20]].description+"",n,o;return{c(){e=T("("),n=T(t),o=T(")")},m(i,s){z(i,e,s),z(i,n,s),z(i,o,s)},p(i,s){s&16&&t!==(t=i[4][i[20]].description+"")&&qe(n,t)},d(i){i&&(M(e),M(n),M(o))}}}function _o(l){let e,t;function n(s,_){return _&8&&(e=null),e==null&&(e=!!s[10].includes(s[23])),e?p_:f_}let o=n(l,-1),i=o(l);return{c(){i.c(),t=n_()},m(s,_){i.m(s,_),z(s,t,_)},p(s,_){o===(o=n(s,_))&&i?i.p(s,_):(i.d(1),i=o(s),i&&(i.c(),i.m(t.parentNode,t)))},d(s){s&&M(t),i.d(s)}}}function m_(l){let e;return{c(){e=T(", file")},m(t,n){z(t,e,n)},d(t){t&&M(e)}}}function co(l){let e,t=l[16]?l[16]+"=":"",n,o,i=$t(l[17]?l[18]:l[15],l[14].type,"py")+"",s,_;return{c(){e=T(`
37		`),n=T(t),o=ne("span"),s=T(i),_=T(",")},m(a,r){z(a,e,r),z(a,n,r),z(a,o,r),I(o,s),z(a,_,r)},p(a,r){r&8&&t!==(t=a[16]?a[16]+"=":"")&&qe(n,t),r&8&&i!==(i=$t(a[17]?a[18]:a[15],a[14].type,"py")+"")&&qe(s,i)},d(a){a&&(M(e),M(n),M(o),M(_))}}}function d_(l){let e,t,n,o;const i=[__,a_],s=[];function _(a,r){return a[6]==="python"?0:a[6]==="javascript"?1:-1}return~(t=_(l))&&(n=s[t]=i[t](l)),{c(){e=ne("code"),n&&n.c(),ue(e,"class","svelte-114qcyq")},m(a,r){z(a,e,r),~t&&s[t].m(e,null),o=!0},p(a,r){let c=t;t=_(a),t===c?~t&&s[t].p(a,r):(n&&(Pi(),Ye(s[c],1,1,()=>{s[c]=null}),qi()),~t?(n=s[t],n?n.p(a,r):(n=s[t]=i[t](a),n.c()),Je(n,1),n.m(e,null)):n=null)},i(a){o||(Je(n),o=!0)},o(a){Ye(n),o=!1},d(a){a&&M(e),~t&&s[t].d()}}}function h_(l){let e,t,n,o,i,s;const _=[r_,s_],a=[];function r(c,m){return c[5]?0:1}return t=r(l),n=a[t]=_[t](l),i=new xn({props:{$$slots:{default:[d_]},$$scope:{ctx:l}}}),{c(){e=ne("div"),n.c(),o=al(),Wt(i.$$.fragment),ue(e,"class","container svelte-114qcyq")},m(c,m){z(c,e,m),a[t].m(e,null),I(e,o),Jt(i,e,null),s=!0},p(c,[m]){let u=t;t=r(c),t===u?a[t].p(c,m):(Pi(),Ye(a[u],1,1,()=>{a[u]=null}),qi(),n=a[t],n?n.p(c,m):(n=a[t]=_[t](c),n.c()),Je(n,1),n.m(e,o));const p={};m&134218239&&(p.$$scope={dirty:m,ctx:c}),i.$set(p)},i(c){s||(Je(n),Je(i.$$.fragment,c),s=!0)},o(c){Ye(n),Ye(i.$$.fragment,c),s=!1},d(c){c&&M(e),a[t].d(),Qt(i)}}}function g_(l,e,t){let{dependency:n}=e,{dependency_index:o}=e,{root:i}=e,{endpoint_parameters:s}=e,{js_parameters:_}=e,{named:a}=e,{current_language:r}=e,c,m,u=s.some(f=>ki(f.example_input)),p=["Audio","File","Image","Video"],k=s.filter(f=>p.includes(f.component));function g(f){lo[f?"unshift":"push"](()=>{c=f,t(7,c)})}function v(f){lo[f?"unshift":"push"](()=>{m=f,t(8,m)})}return l.$$set=f=>{"dependency"in f&&t(0,n=f.dependency),"dependency_index"in f&&t(1,o=f.dependency_index),"root"in f&&t(2,i=f.root),"endpoint_parameters"in f&&t(3,s=f.endpoint_parameters),"js_parameters"in f&&t(4,_=f.js_parameters),"named"in f&&t(5,a=f.named),"current_language"in f&&t(6,r=f.current_language)},[n,o,i,s,_,a,r,c,m,u,p,k,g,v]}class v_ extends t_{constructor(e){super(),l_(this,e,g_,h_,i_,{dependency:0,dependency_index:1,root:2,endpoint_parameters:3,js_parameters:4,named:5,current_language:6})}get dependency(){return this.$$.ctx[0]}set dependency(e){this.$$set({dependency:e}),_t()}get dependency_index(){return this.$$.ctx[1]}set dependency_index(e){this.$$set({dependency_index:e}),_t()}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),_t()}get endpoint_parameters(){return this.$$.ctx[3]}set endpoint_parameters(e){this.$$set({endpoint_parameters:e}),_t()}get js_parameters(){return this.$$.ctx[4]}set js_parameters(e){this.$$set({js_parameters:e}),_t()}get named(){return this.$$.ctx[5]}set named(e){this.$$set({named:e}),_t()}get current_language(){return this.$$.ctx[6]}set current_language(e){this.$$set({current_language:e}),_t()}}const{SvelteComponent:$_,append:G,attr:Me,binding_callbacks:uo,check_outros:b_,create_component:_l,destroy_component:cl,destroy_each:Ti,detach:he,element:Ce,ensure_array_like:gn,flush:Dt,group_outros:k_,init:w_,insert:ge,mount_component:ul,safe_not_equal:y_,set_data:Pt,space:ji,text:Z,transition_in:Ht,transition_out:Gt}=window.__gradio__svelte__internal;function fo(l,e,t){const n=l.slice();return n[10]=e[t],n}function po(l,e,t){const n=l.slice();return n[10]=e[t],n}function E_(l){let e,t,n,o,i,s,_,a,r,c,m,u;t=new jt({props:{code:l[5]?.innerText}});let p=gn(l[3]),k=[];for(let g=0;g<p.length;g+=1)k[g]=ho(fo(l,p,g));return{c(){e=Ce("div"),_l(t.$$.fragment),n=ji(),o=Ce("div"),i=Ce("pre"),s=Z(`import { Client } from "@gradio/client";
38
39const app = await Client.connect(`),_=Ce("span"),a=Z('"'),r=Z(l[1]),c=Z('"'),m=Z(`);
40`);for(let g=0;g<k.length;g+=1)k[g].c();Me(e,"class","copy svelte-j71ub0"),Me(_,"class","token string svelte-j71ub0"),Me(i,"class","svelte-j71ub0")},m(g,v){ge(g,e,v),ul(t,e,null),ge(g,n,v),ge(g,o,v),G(o,i),G(i,s),G(i,_),G(_,a),G(_,r),G(_,c),G(i,m);for(let f=0;f<k.length;f+=1)k[f]&&k[f].m(i,null);l[9](o),u=!0},p(g,v){const f={};if(v&32&&(f.code=g[5]?.innerText),t.$set(f),(!u||v&2)&&Pt(r,g[1]),v&9){p=gn(g[3]);let d;for(d=0;d<p.length;d+=1){const h=fo(g,p,d);k[d]?k[d].p(h,v):(k[d]=ho(h),k[d].c(),k[d].m(i,null))}for(;d<k.length;d+=1)k[d].d(1);k.length=p.length}},i(g){u||(Ht(t.$$.fragment,g),u=!0)},o(g){Gt(t.$$.fragment,g),u=!1},d(g){g&&(he(e),he(n),he(o)),cl(t),Ti(k,g),l[9](null)}}}function C_(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g;t=new jt({props:{code:l[4]?.innerText}});let v=gn(l[3]),f=[];for(let d=0;d<v.length;d+=1)f[d]=go(po(l,v,d));return{c(){e=Ce("div"),_l(t.$$.fragment),n=ji(),o=Ce("div"),i=Ce("pre"),s=Ce("span"),s.textContent="from",_=Z(" gradio_client "),a=Ce("span"),a.textContent="import",r=Z(` Client, file
41
42client = Client(`),c=Ce("span"),m=Z('"'),u=Z(l[1]),p=Z('"'),k=Z(`)
43`);for(let d=0;d<f.length;d+=1)f[d].c();Me(e,"class","copy svelte-j71ub0"),Me(s,"class","highlight"),Me(a,"class","highlight"),Me(c,"class","token string svelte-j71ub0"),Me(i,"class","svelte-j71ub0")},m(d,h){ge(d,e,h),ul(t,e,null),ge(d,n,h),ge(d,o,h),G(o,i),G(i,s),G(i,_),G(i,a),G(i,r),G(i,c),G(c,m),G(c,u),G(c,p),G(i,k);for(let b=0;b<f.length;b+=1)f[b]&&f[b].m(i,null);l[8](o),g=!0},p(d,h){const b={};if(h&16&&(b.code=d[4]?.innerText),t.$set(b),(!g||h&2)&&Pt(u,d[1]),h&73){v=gn(d[3]);let w;for(w=0;w<v.length;w+=1){const C=po(d,v,w);f[w]?f[w].p(C,h):(f[w]=go(C),f[w].c(),f[w].m(i,null))}for(;w<f.length;w+=1)f[w].d(1);f.length=v.length}},i(d){g||(Ht(t.$$.fragment,d),g=!0)},o(d){Gt(t.$$.fragment,d),g=!1},d(d){d&&(he(e),he(n),he(o)),cl(t),Ti(f,d),l[8](null)}}}function mo(l){let e,t,n,o=l[0][l[10].fn_index].api_name+"",i,s,_,a=JSON.stringify(l[10].data,null,2)+"",r,c;return{c(){e=Z("client.predict("),t=Ce("span"),n=Z('"/'),i=Z(o),s=Z('"'),_=Z('", '),r=Z(a),c=Z(");"),Me(t,"class","api-name svelte-j71ub0")},m(m,u){ge(m,e,u),ge(m,t,u),G(t,n),G(t,i),G(t,s),ge(m,_,u),ge(m,r,u),ge(m,c,u)},p(m,u){u&9&&o!==(o=m[0][m[10].fn_index].api_name+"")&&Pt(i,o),u&8&&a!==(a=JSON.stringify(m[10].data,null,2)+"")&&Pt(r,a)},d(m){m&&(he(e),he(t),he(_),he(r),he(c))}}}function ho(l){let e,t,n=l[0][l[10].fn_index].backend_fn&&mo(l);return{c(){e=Z(`
44`),n&&n.c(),t=Z(`
45						`)},m(o,i){ge(o,e,i),n&&n.m(o,i),ge(o,t,i)},p(o,i){o[0][o[10].fn_index].backend_fn?n?n.p(o,i):(n=mo(o),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(o){o&&(he(e),he(t)),n&&n.d(o)}}}function go(l){let e,t,n,o=l[6](l[10])+"",i,s,_,a,r=l[0][l[10].fn_index].api_name+"",c,m,u;return{c(){e=Z(`
46client.`),t=Ce("span"),n=Z(`predict(
47`),i=Z(o),s=Z("  api_name="),_=Ce("span"),a=Z('"/'),c=Z(r),m=Z('"'),u=Z(`
48)
49`),Me(_,"class","api-name svelte-j71ub0"),Me(t,"class","highlight")},m(p,k){ge(p,e,k),ge(p,t,k),G(t,n),G(t,i),G(t,s),G(t,_),G(_,a),G(_,c),G(_,m),G(t,u)},p(p,k){k&8&&o!==(o=p[6](p[10])+"")&&Pt(i,o),k&9&&r!==(r=p[0][p[10].fn_index].api_name+"")&&Pt(c,r)},d(p){p&&(he(e),he(t))}}}function A_(l){let e,t,n,o;const i=[C_,E_],s=[];function _(a,r){return a[2]==="python"?0:a[2]==="javascript"?1:-1}
vendor: 11,788 bytes, lines 49-56
49return~(t=_(l))&&(n=s[t]=i[t](l)),{c(){e=Ce("code"),n&&n.c(),Me(e,"class","svelte-j71ub0")},m(a,r){ge(a,e,r),~t&&s[t].m(e,null),o=!0},p(a,r){let c=t;t=_(a),t===c?~t&&s[t].p(a,r):(n&&(k_(),Gt(s[c],1,1,()=>{s[c]=null}),b_()),~t?(n=s[t],n?n.p(a,r):(n=s[t]=i[t](a),n.c()),Ht(n,1),n.m(e,null)):n=null)},i(a){o||(Ht(n),o=!0)},o(a){Gt(n),o=!1},d(a){a&&he(e),~t&&s[t].d()}}}function L_(l){let e,t,n;return t=new xn({props:{border_mode:"focus",$$slots:{default:[A_]},$$scope:{ctx:l}}}),{c(){e=Ce("div"),_l(t.$$.fragment),Me(e,"class","container svelte-j71ub0")},m(o,i){ge(o,e,i),ul(t,e,null),n=!0},p(o,[i]){const s={};i&32831&&(s.$$scope={dirty:i,ctx:o}),t.$set(s)},i(o){n||(Ht(t.$$.fragment,o),n=!0)},o(o){Gt(t.$$.fragment,o),n=!1},d(o){o&&he(e),cl(t)}}}function q_(l,e,t){let{dependencies:n}=e,{root:o}=e,{current_language:i}=e,{endpoints_info:s}=e,_,a,{api_calls:r=[]}=e;function c(p){const k=`/${n[p.fn_index].api_name}`,g=p.data.map((v,f)=>{const d=s[k].parameters[f],h=d.parameter_name,b=d.python_type.type;return`  ${h}=${$t(v,b,"py")}`}).join(`,
50`);return g?`${g},
51`:`${g}`}function m(p){uo[p?"unshift":"push"](()=>{_=p,t(4,_)})}function u(p){uo[p?"unshift":"push"](()=>{a=p,t(5,a)})}return l.$$set=p=>{"dependencies"in p&&t(0,n=p.dependencies),"root"in p&&t(1,o=p.root),"current_language"in p&&t(2,i=p.current_language),"endpoints_info"in p&&t(7,s=p.endpoints_info),"api_calls"in p&&t(3,r=p.api_calls)},[n,o,i,r,_,a,c,s,m,u]}class P_ extends $_{constructor(e){super(),w_(this,e,q_,L_,y_,{dependencies:0,root:1,current_language:2,endpoints_info:7,api_calls:3})}get dependencies(){return this.$$.ctx[0]}set dependencies(e){this.$$set({dependencies:e}),Dt()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),Dt()}get current_language(){return this.$$.ctx[2]}set current_language(e){this.$$set({current_language:e}),Dt()}get endpoints_info(){return this.$$.ctx[7]}set endpoints_info(e){this.$$set({endpoints_info:e}),Dt()}get api_calls(){return this.$$.ctx[3]}set api_calls(e){this.$$set({api_calls:e}),Dt()}}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",j_="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:O_,append:Se,attr:vt,check_outros:I_,create_component:D_,destroy_component:R_,destroy_each:S_,detach:ve,element:Ge,empty:V_,ensure_array_like:vo,flush:on,group_outros:M_,init:z_,insert:$e,mount_component:N_,noop:U_,safe_not_equal:B_,set_data:Tt,set_style:F_,space:At,text:ze,toggle_class:$o,transition_in:fn,transition_out:Fn}=window.__gradio__svelte__internal;function bo(l,e,t){const n=l.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].serializer,n[10]=t,n}function H_(l){let e;return{c(){e=ze("1 element")},m(t,n){$e(t,e,n)},p:U_,d(t){t&&ve(e)}}}function G_(l){let e=l[3]=="python"?"tuple":"list",t,n,o=l[1].length+"",i,s;return{c(){t=ze(e),n=ze(" of "),i=ze(o),s=ze(`
52		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")&&Tt(t,e),a&2&&o!==(o=_[1].length+"")&&Tt(i,o)},d(_){_&&(ve(t),ve(n),ve(i),ve(s))}}}function ko(l){let e;return{c(){e=Ge("span"),e.textContent=`[${l[10]}]`,vt(e,"class","code svelte-16h224k")},m(t,n){$e(t,e,n)},d(t){t&&ve(e)}}}function Z_(l){let e=l[2][l[10]].type+"",t;return{c(){t=ze(e)},m(n,o){$e(n,t,o)},p(n,o){o&4&&e!==(e=n[2][n[10]].type+"")&&Tt(t,e)},d(n){n&&ve(t)}}}function W_(l){let e=l[6].type+"",t;return{c(){t=ze(e)},m(n,o){$e(n,t,o)},p(n,o){o&2&&e!==(e=n[6].type+"")&&Tt(t,e)},d(n){n&&ve(t)}}}function wo(l){let e,t,n,o,i,s,_,a,r,c=l[4]+"",m,u,p=l[7]+"",k,g,v,f=l[1].length>1&&ko(l);function d(w,C){return w[3]==="python"?W_:Z_}let h=d(l),b=h(l);return{c(){e=Ge("hr"),t=At(),n=Ge("div"),o=Ge("p"),f&&f.c(),i=At(),s=Ge("span"),b.c(),_=At(),a=Ge("p"),r=ze('The output value that appears in the "'),m=ze(c),u=ze('" '),k=ze(p),g=ze(`
53				component.`),v=At(),vt(e,"class","hr svelte-16h224k"),vt(s,"class","code highlight svelte-16h224k"),vt(a,"class","desc svelte-16h224k"),F_(n,"margin","10px")},m(w,C){$e(w,e,C),$e(w,t,C),$e(w,n,C),Se(n,o),f&&f.m(o,null),Se(o,i),Se(o,s),b.m(s,null),Se(n,_),Se(n,a),Se(a,r),Se(a,m),Se(a,u),Se(a,k),Se(a,g),Se(n,v)},p(w,C){w[1].length>1?f||(f=ko(w),f.c(),f.m(o,i)):f&&(f.d(1),f=null),h===(h=d(w))&&b?b.p(w,C):(b.d(1),b=h(w),b&&(b.c(),b.m(s,null))),C&2&&c!==(c=w[4]+"")&&Tt(m,c),C&2&&p!==(p=w[7]+"")&&Tt(k,p)},d(w){w&&(ve(e),ve(t),ve(n)),f&&f.d(),b.d()}}}function yo(l){let e,t,n;return t=new fi({props:{margin:!1}}),{c(){e=Ge("div"),D_(t.$$.fragment),vt(e,"class","load-wrap")},m(o,i){$e(o,e,i),N_(t,e,null),n=!0},i(o){n||(fn(t.$$.fragment,o),n=!0)},o(o){Fn(t.$$.fragment,o),n=!1},d(o){o&&ve(e),R_(t)}}}function Q_(l){let e,t,n,o,i,s,_,a;function r(g,v){return g[1].length>1?G_:H_}let c=r(l),m=c(l),u=vo(l[1]),p=[];for(let g=0;g<u.length;g+=1)p[g]=wo(bo(l,u,g));let k=l[0]&&yo();return{c(){e=Ge("h4"),t=Ge("div"),t.innerHTML='<div class="toggle-dot toggle-right svelte-16h224k"></div>',n=ze(`
54	Returns `),m.c(),o=At(),i=Ge("div");for(let g=0;g<p.length;g+=1)p[g].c();s=At(),k&&k.c(),_=V_(),vt(t,"class","toggle-icon svelte-16h224k"),vt(e,"class","svelte-16h224k"),$o(i,"hide",l[0])},m(g,v){$e(g,e,v),Se(e,t),Se(e,n),m.m(e,null),$e(g,o,v),$e(g,i,v);for(let f=0;f<p.length;f+=1)p[f]&&p[f].m(i,null);$e(g,s,v),k&&k.m(g,v),$e(g,_,v),a=!0},p(g,[v]){if(c===(c=r(g))&&m?m.p(g,v):(m.d(1),m=c(g),m&&(m.c(),m.m(e,null))),v&14){u=vo(g[1]);let f;for(f=0;f<u.length;f+=1){const d=bo(g,u,f);p[f]?p[f].p(d,v):(p[f]=wo(d),p[f].c(),p[f].m(i,null))}for(;f<p.length;f+=1)p[f].d(1);p.length=u.length}(!a||v&1)&&$o(i,"hide",g[0]),g[0]?k?v&1&&fn(k,1):(k=yo(),k.c(),fn(k,1),k.m(_.parentNode,_)):k&&(M_(),Fn(k,1,1,()=>{k=null}),I_())},i(g){a||(fn(k),a=!0)},o(g){Fn(k),a=!1},d(g){g&&(ve(e),ve(o),ve(i),ve(s),ve(_)),m.d(),S_(p,g),k&&k.d(g)}}}function J_(l,e,t){let{is_running:n}=e,{endpoint_returns:o}=e,{js_returns:i}=e,{current_language:s}=e;return l.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,o=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,s=_.current_language)},[n,o,i,s]}class Y_ extends O_{constructor(e){super(),z_(this,e,J_,Q_,B_,{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}),on()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),on()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),on()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),on()}}const{SvelteComponent:K_,append:R,attr:Y,bubble:Eo,check_outros:vn,create_component:st,destroy_component:rt,destroy_each:Co,detach:_e,element:te,empty:fl,ensure_array_like:sn,flush:kt,group_outros:$n,init:X_,insert:ce,listen:x_,mount_component:at,safe_not_equal:ec,set_data:Ao,set_style:wt,space:pe,src_url_equal:tc,text:ae,transition_in:se,transition_out:be}=window.__gradio__svelte__internal,{onMount:nc,createEventDispatcher:lc}=window.__gradio__svelte__internal;function Lo(l,e,t){const n=l.slice();return n[18]=e[t],n[20]=t,n}function qo(l,e,t){const n=l.slice();return n[21]=e[t][0],n[22]=e[t][1],n}function Po(l){let e,t,n,o;const i=[ic,oc],s=[];function _(a,r){return a[7]?0:1}return e=_(l),t=s[e]=i[e](l),{c(){t.c(),n=fl()},m(a,r){s[e].m(a,r),ce(a,n,r),o=!0},p(a,r){t.p(a,r)},i(a){o||(se(t),o=!0)},o(a){be(t),o=!1},d(a){a&&_e(n),s[e].d(a)}}}function oc(l){let e,t;return e=new Hr({props:{root:l[0]}}),e.$on("close",l[15]),{c(){st(e.$$.fragment)},m(n,o){at(e,n,o),t=!0},p(n,o){const i={};o&1&&(i.root=n[0]),e.$set(i)},i(n){t||(se(e.$$.fragment,n),t=!0)},o(n){be(e.$$.fragment,n),t=!1},d(n){rt(e,n)}}}function ic(l){let e,t,n,o,i,s,_,a,r,c,m,u,p,k,g,v,f,d,h,b,w,C,$,j,O;t=new ea({props:{root:l[2]||l[0],api_count:l[7]}}),t.$on("close",l[12]);let E=sn(l[8]),A=[];for(let P=0;P<E.length;P+=1)A[P]=To(qo(l,E,P));const B=[rc,sc],K=[];function V(P,Q){return P[3].length?0:1}C=V(l),$=K[C]=B[C](l);let D=sn(l[1]),L=[];for(let P=0;P<D.length;P+=1)L[P]=Io(Lo(l,D,P));const W=P=>be(L[P],1,1,()=>{L[P]=null});return{c(){e=te("div"),st(t.$$.fragment),n=pe(),o=te("div"),i=te("div"),s=te("p"),_=ae("Use the "),a=te("code"),a.textContent="gradio_client",r=pe(),c=te("a"),m=ae("Python library"),u=ae(` or the
55					`),p=te("code"),p.textContent="@gradio/client",k=pe(),g=te("a"),v=ae("Javascript package"),f=ae(` to query the app
56					via API.`),d=pe(),h=te("div"),b=te("div");for(let P=0;P<A.length;P+=1)A[P].c();w=pe(),$.c(),j=pe();for(let P=0;P<L.length;P+=1)L[P].c();Y(e,"class","banner-wrap svelte-17lxwht"),Y(a,"class","library svelte-17lxwht"),Y(c,"href",Gn),Y(c,"target","_blank"),Y(c,"class","svelte-17lxwht"),Y(p,"class","library svelte-17lxwht"),Y(g,"href",Hn),Y(g,"target","_blank"),Y(g,"class","svelte-17lxwht"),Y(i,"class","client-doc svelte-17lxwht"),Y(b,"class","snippets svelte-17lxwht"),Y(h,"class","endpoint svelte-17lxwht"),Y(o,"class","docs-wrap svelte-17lxwht")},m(P,Q){ce(P,e,Q),at(t,e,null),ce(P,n,Q),ce(P,o,Q),R(o,i),R(i,s),R(s,_),R(s,a),R(s,r),R(s,c),R(c,m),R(s,u),R(s,p),R(s,k),R(s,g),R(g,v),R(s,f),R(o,d),R(o,h),R(h,b);for(let ke=0;ke<A.length;ke+=1)A[ke]&&A[ke].m(b,null);R(h,w),K[C].m(h,null),R(h,j);for(let ke=0;ke<L.length;ke+=1)L[ke]&&L[ke].m(h,null);O=!0},p(P,Q){const ke={};if(Q&5&&(ke.root=P[2]||P[0]),t.$set(ke),Q&272){E=sn(P[8]);let U;for(U=0;U<E.length;U+=1){const Be=qo(P,E,U);A[U]?A[U].p(Be,Q):(A[U]=To(Be),A[U].c(),A[U].m(b,null))}for(;U<A.length;U+=1)A[U].d(1);A.length=E.length}let Ze=C;if(C=V(P),C===Ze?K[C].p(P,Q):($n(),be(K[Ze],1,1,()=>{K[Ze]=null}),vn(),$=K[C],$?$.p(P,Q):($=K[C]=B[C](P),$.c()),se($,1),$.m(h,j)),Q&119){D=sn(P[1]);let U;for(U=0;U<D.length;U+=1){const Be=Lo(P,D,U);L[U]?(L[U].p(Be,Q),se(L[U],1)):(L[U]=Io(Be),L[U].c(),se(L[U],1),L[U].m(h,null))}for($n(),U=D.length;U<L.length;U+=1)W(U);vn()}},i(P){if(!O){se(t.$$.fragment,P),se($);for(let Q=0;Q<D.length;Q+=1)se(L[Q]);O=!0}}
56,o(P){be(t.$$.fragment,P),be($),L=L.filter(Boolean);for(let Q=0;Q<L.length;Q+=1)be(L[Q]);O=!1},d(P){P&&(_e(e),_e(n),_e(o)),rt(t),Co(A,P),K[C].d(),Co(L,P)}}}function To(l){let e,t,n,o,i=l[21]+"",s,_,a,r,c;function m(){return l[13](l[21])}return{c(){e=te("li"),t=te("img"),o=pe(),s=ae(i),_=pe(),tc(t.src,n=l[22])||Y(t,"src",n),Y(t,"alt",""),Y(t,"class","svelte-17lxwht"),Y(e,"class",a="snippet "+(l[4]===l[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")},m(u,p){ce(u,e,p),R(e,t),R(e,o),R(e,s),R(e,_),r||(c=x_(e,"click",m),r=!0)},p(u,p){l=u,p&16&&a!==(a="snippet "+(l[4]===l[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")&&Y(e,"class",a)},d(u){u&&_e(e),r=!1,c()}}}function sc(l){let e,t,n,o,i,s,_,a,r,c;n=new Za({props:{current_language:l[4]}});let m=l[2]&&jo(l);return a=new Xn({props:{size:"sm",variant:"primary",$$slots:{default:[ac]},$$scope:{ctx:l}}}),a.$on("click",l[14]),{c(){e=te("p"),e.textContent="1. Install the client if you don't already have it installed.",t=pe(),st(n.$$.fragment),o=pe(),i=te("p"),s=ae(`2. Find the API endpoint below corresponding to your desired
57						function in the app. Copy the code snippet, replacing the
58						placeholder values with your own input data.
59						`),m&&m.c(),_=ae(` Or
60						`),st(a.$$.fragment),r=ae(`
61						to automatically generate your API requests.`),Y(e,"class","padded svelte-17lxwht"),Y(i,"class","padded svelte-17lxwht")},m(u,p){ce(u,e,p),ce(u,t,p),at(n,u,p),ce(u,o,p),ce(u,i,p),R(i,s),m&&m.m(i,null),R(i,_),at(a,i,null),R(i,r),c=!0},p(u,p){const k={};p&16&&(k.current_language=u[4]),n.$set(k),u[2]?m?m.p(u,p):(m=jo(u),m.c(),m.m(i,_)):m&&(m.d(1),m=null);const g={};p&33554432&&(g.$$scope={dirty:p,ctx:u}),a.$set(g)},i(u){c||(se(n.$$.fragment,u),se(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(o),_e(i)),rt(n,u),m&&m.d(),rt(a)}}}function rc(l){let e,t,n,o=l[3].length+"",i,s,_,a,r,c,m,u,p,k,g,v,f,d;return p=new P_({props:{current_language:l[4],api_calls:l[3],dependencies:l[1],root:l[2]||l[0],endpoints_info:l[5].named_endpoints}}),{c(){e=te("div"),t=te("p"),n=ae("🪄 Recorded API Calls ("),i=ae(o),s=ae(")"),_=pe(),a=te("p"),r=ae(`Here is the code snippet to replay the most recently recorded API
62							calls using the `),c=ae(l[4]),m=ae(`
63							client.`),u=pe(),st(p.$$.fragment),k=pe(),g=te("p"),g.textContent=`Note: the above list may include extra API calls that affect the
64							UI, but are not necessary for the clients.`,v=pe(),f=te("p"),f.textContent="API Documentation",wt(t,"font-size","var(--text-lg)"),wt(t,"font-weight","bold"),wt(t,"margin","10px 0px"),wt(f,"font-size","var(--text-lg)"),wt(f,"font-weight","bold"),wt(f,"margin","30px 0px 10px")},m(h,b){ce(h,e,b),R(e,t),R(t,n),R(t,i),R(t,s),R(e,_),R(e,a),R(a,r),R(a,c),R(a,m),R(e,u),at(p,e,null),R(e,k),R(e,g),ce(h,v,b),ce(h,f,b),d=!0},p(h,b){(!d||b&8)&&o!==(o=h[3].length+"")&&Ao(i,o),(!d||b&16)&&Ao(c,h[4]);const w={};b&16&&(w.current_language=h[4]),b&8&&(w.api_calls=h[3]),b&2&&(w.dependencies=h[1]),b&5&&(w.root=h[2]||h[0]),b&32&&(w.endpoints_info=h[5].named_endpoints),p.$set(w)},i(h){d||(se(p.$$.fragment,h),d=!0)},o(h){be(p.$$.fragment,h),d=!1},d(h){h&&(_e(e),_e(v),_e(f)),rt(p)}}}function jo(l){let e,t,n,o,i;return{c(){e=ae(`If this is a private Space, you may need to pass your
65							Hugging Face token as well (`),t=te("a"),n=ae("read more"),i=ae(")."),Y(t,"href",o=(l[4]=="python"?Gn:Hn)+Do),Y(t,"class","underline svelte-17lxwht"),Y(t,"target","_blank")},m(s,_){ce(s,e,_),ce(s,t,_),R(t,n),ce(s,i,_)},p(s,_){_&16&&o!==(o=(s[4]=="python"?Gn:Hn)+Do)&&Y(t,"href",o)},d(s){s&&(_e(e),_e(t),_e(i))}}}function ac(l){let e;return{c(){e=ae("🪄 Use the API Recorder")},m(t,n){ce(t,e,n)},d(t){t&&_e(e)}}}function Oo(l){let e,t,n,o,i,s,_,a;return t=new v_({props:{named:!0,endpoint_parameters:l[5].named_endpoints["/"+l[18].api_name].parameters,js_parameters:l[6].named_endpoints["/"+l[18].api_name].parameters,dependency:l[18],dependency_index:l[20],current_language:l[4],root:l[2]||l[0]}}),o=new va({props:{endpoint_returns:l[5].named_endpoints["/"+l[18].api_name].parameters,js_returns:l[6].named_endpoints["/"+l[18].api_name].parameters,is_running:Ro,current_language:l[4]}}),s=new Y_({props:{endpoint_returns:l[5].named_endpoints["/"+l[18].api_name].returns,js_returns:l[6].named_endpoints["/"+l[18].api_name].returns,is_running:Ro,current_language:l[4]}}),{c(){e=te("div"),st(t.$$.fragment),n=pe(),st(o.$$.fragment),i=pe(),st(s.$$.fragment),_=pe(),Y(e,"class","endpoint-container svelte-17lxwht")},m(r,c){ce(r,e,c),at(t,e,null),R(e,n),at(o,e,null),R(e,i),at(s,e,
65null),R(e,_),a=!0},p(r,c){const m={};c&34&&(m.endpoint_parameters=r[5].named_endpoints["/"+r[18].api_name].parameters),c&66&&(m.js_parameters=r[6].named_endpoints["/"+r[18].api_name].parameters),c&2&&(m.dependency=r[18]),c&16&&(m.current_language=r[4]),c&5&&(m.root=r[2]||r[0]),t.$set(m);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]),o.$set(u);const p={};c&34&&(p.endpoint_returns=r[5].named_endpoints["/"+r[18].api_name].returns),c&66&&(p.js_returns=r[6].named_endpoints["/"+r[18].api_name].returns),c&16&&(p.current_language=r[4]),s.$set(p)},i(r){a||(se(t.$$.fragment,r),se(o.$$.fragment,r),se(s.$$.fragment,r),a=!0)},o(r){be(t.$$.fragment,r),be(o.$$.fragment,r),be(s.$$.fragment,r),a=!1},d(r){r&&_e(e),rt(t),rt(o),rt(s)}}}function Io(l){let e,t,n=l[18].show_api&&Oo(l);return{c(){n&&n.c(),e=fl()},m(o,i){n&&n.m(o,i),ce(o,e,i),t=!0},p(o,i){o[18].show_api?n?(n.p(o,i),i&2&&se(n,1)):(n=Oo(o),n.c(),se(n,1),n.m(e.parentNode,e)):n&&($n(),be(n,1,1,()=>{n=null}),vn())},i(o){t||(se(n),t=!0)},o(o){be(n),t=!1},d(o){o&&_e(e),n&&n.d(o)}}}function _c(l){let e,t,n=l[5]&&Po(l);return{c(){n&&n.c(),e=fl()},m(o,i){n&&n.m(o,i),ce(o,e,i),t=!0},p(o,[i]){o[5]?n?(n.p(o,i),i&32&&se(n,1)):(n=Po(o),n.c(),se(n,1),n.m(e.parentNode,e)):n&&($n(),be(n,1,1,()=>{n=null}),vn())},i(o){t||(se(n),t=!0)},o(o){be(n),t=!1},d(o){o&&_e(e),n&&n.d(o)}}}const Hn="https://www.gradio.app/guides/getting-started-with-the-js-client",Gn="https://www.gradio.app/guides/getting-started-with-the-python-client",Do="#connecting-to-a-hugging-face-space";let Ro=!1;function cc(l,e,t){let{dependencies:n}=e,{root:o}=e,{app:i}=e,{space_id:s}=e,{root_node:_}=e,a=n.filter(w=>w.show_api).length;o===""&&(o=location.protocol+"//"+location.host+location.pathname),o.endsWith("/")||(o+="/");let{api_calls:r=[]}=e,c="python";const m=[["python",T_],["javascript",j_]];async function u(){return await(await fetch(o+"info")).json()}async function p(){return await i.view_api()}let k,g;u().then(w=>{t(5,k=w)}),p().then(w=>{t(6,g=w)});const v=lc();nc(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));
65function f(w){Eo.call(this,l,w)}const d=w=>t(4,c=w),h=()=>v("close",{api_recorder_visible:!0});function b(w){Eo.call(this,l,w)}return l.$$set=w=>{"dependencies"in w&&t(1,n=w.dependencies),"root"in w&&t(0,o=w.root),"app"in w&&t(10,i=w.app),"space_id"in w&&t(2,s=w.space_id),"root_node"in w&&t(11,_=w.root_node),"api_calls"in w&&t(3,r=w.api_calls)},[o,n,s,r,c,k,g,a,m,v,i,_,f,d,h,b]}class uc extends K_{constructor(e){super(),X_(this,e,cc,_c,ec,{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}),kt()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),kt()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),kt()}get space_id(){return this.$$.ctx[2]}set space_id(e){this.$$set({space_id:e}),kt()}get root_node(){return this.$$.ctx[11]}set root_node(e){this.$$set({root_node:e}),kt()}get api_calls(){return this.$$.ctx[3]}set api_calls(e){this.$$set({api_calls:e}),kt()}}const{SvelteComponent:fc,append:ft,attr:pn,detach:Zn,element:Wn,flush:So,init:pc,insert:Qn,noop:Vo,safe_not_equal:mc,set_data:Oi,text:pt}=window.__gradio__svelte__internal;function Mo(l){let e,t,n,o=l[1][l[0][l[0].length-1].fn_index].api_name+"",i;return{c(){e=pt("| "),t=Wn("span"),n=pt("/"),i=pt(o),pn(t,"class","api-name svelte-3xfzl5")},m(s,_){Qn(s,e,_),Qn(s,t,_),ft(t,n),ft(t,i)},p(s,_){_&3&&o!==(o=s[1][s[0][s[0].length-1].fn_index].api_name+"")&&Oi(i,o)},d(s){s&&(Zn(e),Zn(t))}}}function dc(l){let e,t,n,o,i=l[0].length+"",s,_,a=l[0].length>0&&Mo(l);return{c(){e=Wn("div"),t=pt("🟠 "),n=Wn("span"),n.textContent="Recording API Calls...",o=pt(`
66	(`),s=pt(i),_=pt(") "),a&&a.c(),pn(n,"class","message svelte-3xfzl5"),pn(e,"id","api-recorder"),pn(e,"class","svelte-3xfzl5")},m(r,c){Qn(r,e,c),ft(e,t),ft(e,n),ft(e,o),ft(e,s),ft(e,_),a&&a.m(e,null)},p(r,[c]){c&1&&i!==(i=r[0].length+"")&&Oi(s,i),r[0].length>0?a?a.p(r,c):(a=Mo(r),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:Vo,o:Vo,d(r){r&&Zn(e),a&&a.d()}}}function hc(l,e,t){let{api_calls:n=[]}=e,{dependencies:o}=e;return l.$$set=i=>{"api_calls"in i&&t(0,n=i.api_calls),"dependencies"in i&&t(1,o=i.dependencies)},[n,o]}class gc extends fc{constructor(e){super(),pc(this,e,hc,dc,mc,{api_calls:0,dependencies:1})}get api_calls(){return this.$$.ctx[0]}set api_calls(e){this.$$set({api_calls:e}),So()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),So()}}const zo=ss(pi),{SvelteComponent:vc,add_flush_callback:$c,assign:bn,bind:No,binding_callbacks:Jn,bubble:bc,check_outros:kc,compute_rest_props:Uo,construct_svelte_component:Bo,create_component:Fo,create_slot:wc,destroy_component:Ho,detach:yc,empty:Ec,exclude_internal_props:Cc,flush:He,get_all_dirty_from_scope:Ac,get_slot_changes:Lc,get_spread_object:Go,get_spread_update:Zo,group_outros:qc,init:Pc,insert:Tc,mount_component:Wo,not_equal:jc,transition_in:Yn,transition_out:Kn,update_slot_base:Oc}=window.__gradio__svelte__internal,{bind:Ic,binding_callbacks:Dc}=window.__gradio__svelte__internal;function Rc(l){let e;const t=l[12].default,n=wc(t,l,l[16],null);return{c(){n&&n.c()},m(o,i){n&&n.m(o,i),e=!0},p(o,i){n&&n.p&&(!e||i&65536)&&Oc(n,t,o,o[16],e?Lc(t,o[16],i,null):Ac(o[16]),null)},i(o){e||(Yn(n,o),e=!0)},o(o){Kn(n,o),e=!1},d(o){n&&n.d(o)}}}function Sc(l){let e,t,n,o;const i=[{elem_id:l[6]},{elem_classes:l[7]},{target:l[3]},l[9],{theme_mode:l[4]},{root:l[2]},{gradio:l[5]}];function s(r){l[14](r)}var _=l[8];function a(r,c){let m={$$slots:{default:[Rc]},$$scope:{ctx:r}};for(let u=0;u<i.length;u+=1)m=bn(m,i[u]);return c!==void 0&&c&764&&(m=bn(m,Zo(i,[c&64&&{elem_id:r[6]},c&128&&{elem_classes:r[7]},c&8&&{target:r[3]},c&512&&Go(r[9]),c&16&&{theme_mode:r[4]},c&4&&{root:r[2]},c&32&&{gradio:r[5]}]))),r[1]!==void 0&&(m.value=r[1]),{props:m}}return _&&(e=Bo(_,a(l)),l[13](e),Jn.push(()=>No(e,"value",s)),e.$on("prop_change",l[15])),{c(){e&&Fo(e.$$.fragment),n=Ec()},m(r,c){e&&Wo(e,r,c),Tc(r,n,c),o=!0},p(r,[c]){if(_!==(_=r[8])){if(e){qc();const m=e;Kn(m.$$.fragment,1,0,()=>{Ho(m,1)}),kc()}_?(e=Bo(_,a(r,c)),r[13](e),Jn.push(()=>No(e,"value",s)),e.$on("prop_change",r[15]),Fo(e.$$.fragment),Yn(e.$$.fragment,1),Wo(e,n.parentNode,n)):e=null}else if(_){const m=c&764?Zo(i,[c&64&&{elem_id:r[6]},c&128&&{elem_classes:r[7]},c&8&&{target:r[3]},c&512&&Go(r[9]),c&16&&{theme_mode:r[4]},c&4&&{root:r[2]},c&32&&{gradio:r[5]}]):{};c&65536&&(m.$$scope={dirty:c,ctx:r}),!t&&c&2&&(t=!0,m.value=r[1],$c(()=>t=!1)),e.$set(m)}},i(r){o||(e&&Yn(e.$$.fragment,r),o=!0)},o(r){e&&Kn(e.$$.fragment,r),o=!1},d(r){r&&yc(n),l[13](null),e&&Ho(e,r)}}}function Vc(l,e,t){const n=["root","component","target","theme_mode","instance","value","gradio","elem_id","elem_classes","_id"];let o=Uo(e,n),{$$slots:i={},$$scope:s}=e,{root:_}=e,{component:a}=e,{target:r}=e,{theme_mode:c}=e,{instance:m}=e,{value:u}=e,{gradio:p}=e,{elem_id:k}=e,{elem_classes:g}=e,{_id:v}=e;const f=($,j,O)=>
vendor: 6,965 bytes, line 66
66new CustomEvent("prop_change",{detail:{id:$,prop:j,value:O}});function d($){return new Proxy($,{construct(O,E){const A=new O(...E),B=Object.keys(A.$$.props);function K(V){return function(D){const L=f(v,V,D);r.dispatchEvent(L)}}return B.forEach(V=>{Dc.push(()=>Ic(A,V,K(V)))}),A}})}const h=d(a);function b($){Jn[$?"unshift":"push"](()=>{m=$,t(0,m)})}function w($){u=$,t(1,u)}function C($){bc.call(this,l,$)}return l.$$set=$=>{e=bn(bn({},e),Cc($)),t(9,o=Uo(e,n)),"root"in $&&t(2,_=$.root),"component"in $&&t(10,a=$.component),"target"in $&&t(3,r=$.target),"theme_mode"in $&&t(4,c=$.theme_mode),"instance"in $&&t(0,m=$.instance),"value"in $&&t(1,u=$.value),"gradio"in $&&t(5,p=$.gradio),"elem_id"in $&&t(6,k=$.elem_id),"elem_classes"in $&&t(7,g=$.elem_classes),"_id"in $&&t(11,v=$._id),"$$scope"in $&&t(16,s=$.$$scope)},[m,u,_,r,c,p,k,g,h,o,a,v,i,b,w,C,s]}class Mc extends vc{constructor(e){super(),Pc(this,e,Vc,Sc,jc,{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:zc,add_flush_callback:Qo,assign:Nc,bind:Jo,binding_callbacks:Yo,bubble:Ko,check_outros:Ii,create_component:Di,destroy_component:Ri,detach:pl,empty:ml,ensure_array_like:Xo,flush:Qe,get_spread_object:Uc,get_spread_update:Bc,group_outros:Si,init:Fc,insert:dl,mount_component:Vi,outro_and_destroy_block:Hc,safe_not_equal:Gc,transition_in:qt,transition_out:Zt,update_keyed_each:Zc}=window.__gradio__svelte__internal,{onMount:Wc,createEventDispatcher:Qc,setContext:Jc}=window.__gradio__svelte__internal;function xo(l,e,t){const n=l.slice();return n[15]=e[t],n}function ei(l){let e=[],t=new Map,n,o,i=Xo(l[0].children);const s=_=>_[15].id;for(let _=0;_<i.length;_+=1){let a=xo(l,i,_),r=s(a);t.set(r,e[_]=ti(r,a))}return{c(){for(let _=0;_<e.length;_+=1)e[_].c();n=ml()},m(_,a){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(_,a);dl(_,n,a),o=!0},p(_,a){a&207&&(i=Xo(_[0].children),Si(),e=Zc(e,a,s,1,_,i,t,n.parentNode,Hc,ti,n,xo),Ii())},i(_){if(!o){for(let a=0;a<i.length;a+=1)qt(e[a]);o=!0}},o(_){for(let a=0;a<e.length;a+=1)Zt(e[a]);o=!1},d(_){_&&pl(n);for(let a=0;a<e.length;a+=1)e[a].d(_)}}}function ti(l,e){let t,n,o;return n=new Mi({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:l,first:null,c(){t=ml(),Di(n.$$.fragment),this.first=t},m(i,s){dl(i,t,s),Vi(n,i,s),o=!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){o||(qt(n.$$.fragment,i),o=!0)},o(i){Zt(n.$$.fragment,i),o=!1},d(i){i&&pl(t),Ri(n,i)}}}function Yc(l){let e,t,n=l[0].children&&l[0].children.length&&ei(l);return{c(){n&&n.c(),e=ml()},m(o,i){n&&n.m(o,i),dl(o,e,i),t=!0},p(o,i){o[0].children&&o[0].children.length?n?(n.p(o,i),i&1&&qt(n,1)):(n=ei(o),n.c(),qt(n,1),n.m(e.parentNode,e)):n&&(Si(),Zt(n,1,1,()=>{n=null}),Ii())},i(o){t||(qt(n),t=!0)},o(o){Zt(n),t=!1},d(o){o&&pl(e),n&&n.d(o)}}}function Kc(l){let e,t,n,o;const i=[{_id:l[0].id},{component:l[0].component},{elem_id:"elem_id"in l[0].props&&l[0].props.elem_id||`component-${l[0].id}`},{elem_classes:"elem_classes"in l[0].props&&l[0].props.elem_classes||[]},{target:l[2]},l[0].props,{theme_mode:l[3]},{root:l[1]},{gradio:new Tl(l[0].id,l[2],l[3],l[4],l[1],l[5],l[6],zo,l[7])}];function s(r){l[11](r)}function _(r){l[12](r)}let a={$$slots:{default:[Yc]},$$scope:{ctx:l}};for(let r=0;r<i.length;r+=1)a=Nc(a,i[r]);return l[0].instance!==void 0&&(a.instance=l[0].instance),l[0].props.value!==void 0&&(a.value=l[0].props.value),e=new Mc({props:a}),Yo.push(()=>Jo(e,"instance",s)),Yo.push(()=>Jo(e,"value",_)),{c(){Di(e.$$.fragment)},m(r,c){Vi(e,r,c),o=!0},p(r,[c]){const m=c&255?Bc(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&&Uc(r[0].props),c&8&&{theme_mode:r[3]},c&2&&{root:r[1]},{gradio:new Tl(r[0].id,r[2],r[3],r[4],r[1],r[5],r[6],zo,r[7])}]):{};c&262351&&(m.$$scope={dirty:c,ctx:r}),!t&&c&1&&(t=!0,m.instance=r[0].instance,Qo(()=>t=!1)),!n&&c&1&&(n=!0,m.value=r[0].props.value,Qo(()=>n=!1)),e.$set(m)},i(r){o||(qt(e.$$.fragment,r),o=!0)},o(r){Zt(e.$$.fragment,r),o=!1},d(r){Ri(e,r)}}}function Xc(l,e,t){let{root:n}=e,{node:o}=e,{parent:i=null}=e,{target:s}=e,{theme_mode:_}=e,{version:a}=e,{autoscroll:r}=e,{max_file_size:c}=e,{client:m}=e;const u=Qc();let p=[];Wc(()=>{u("mount",o.id);for(const d of p)u("mount",d.id);return()=>{u("destroy",o.id);for(const d of p)u("mount",d.id)}}),Jc("BLOCK_KEY",i);function k(d){Ko.call(this,l,d)}function g(d){Ko.call(this,l,d)}function v(d){l.$$.not_equal(o.instance,d)&&(o.instance=d,t(0,o),t(14,p))}function f(d){l.$$.not_equal(o.props.value,d)&&(o.props.value=d,t(0,o),t(14,p))}return l.$$set=d=>{"root"in d&&t(1,n=d.root),"node"in d&&t(0,o=d.node),"parent"in d&&t(8,i=d.parent),"target"in d&&t(2,s=d.target),"theme_mode"in d&&t(3,_=d.theme_mode),"version"in d&&t(4,a=d.version),"autoscroll"in d&&t(5,r=d.autoscroll),"max_file_size"in d&&t(6,c=d.max_file_size),"client"in d&&t(7,m=d.client)},l.$$.update=()=>{l.$$.dirty&1&&t(0,o.children=o.children&&o.children.filter(d=>{const h=o.type!=="statustracker";return h||p.push(d),h}),o),l.$$.dirty&1&&o.type==="form"&&(o.children?.every(d=>!d.props.visible)?t(0,o.props.visible=!1,o):t(0,o.props.visible=!0,o))},[o,n,s,_,a,r,c,m,i,k,g,v,f]}class Mi extends zc{constructor(e){super(),Fc(this,e,Xc,Kc,Gc,{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}),Qe()}get node(){return this.$$.ctx[0]}set node(e){this.$$set({node:e}),Qe()}get parent(){return this.$$.ctx[8]}set parent(e){this.$$set({parent:e}),Qe()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),Qe()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),Qe()}get version(){return this.$$.ctx[4]}
66set version(e){this.$$set({version:e}),Qe()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),Qe()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),Qe()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),Qe()}}const{SvelteComponent:xc,create_component:eu,destroy_component:tu,flush:lt,init:nu,mount_component:lu,safe_not_equal:ou,transition_in:iu,transition_out:su}=window.__gradio__svelte__internal,{onMount:ru,createEventDispatcher:au}=window.__gradio__svelte__internal;function _u(l){let e,t;return e=new Mi({props:{node:l[0],root:l[1],target:l[2],theme_mode:l[3],version:l[4],autoscroll:l[5],max_file_size:l[6],client:l[7]}}),{c(){eu(e.$$.fragment)},m(n,o){lu(e,n,o),t=!0},p(n,[o]){const i={};o&1&&(i.node=n[0]),o&2&&(i.root=n[1]),o&4&&(i.target=n[2]),o&8&&(i.theme_mode=n[3]),o&16&&(i.version=n[4]),o&32&&(i.autoscroll=n[5]),o&64&&(i.max_file_size=n[6]),o&128&&(i.client=n[7]),e.$set(i)},i(n){t||(iu(e.$$.fragment,n),t=!0)},o(n){su(e.$$.fragment,n),t=!1},d(n){tu(e,n)}}}function cu(l,e,t){let{rootNode:n}=e,{root:o}=e,{target:i}=e,{theme_mode:s}=e,{version:_}=e,{autoscroll:a}=e,{max_file_size:r=null}=e,{client:c}=e;const m=au();return ru(()=>{m("mount")}),l.$$set=u=>{"rootNode"in u&&t(0,n=u.rootNode),"root"in u&&t(1,o=u.root),"target"in u&&t(2,
vendor: 7,535 bytes, line 66
66i=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,o,i,s,_,a,r,c]}class uu extends xc{constructor(e){super(),nu(this,e,cu,_u,ou,{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 fu="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",pu={accordion:{component:()=>q(()=>import("./Index-BgELO62W.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},annotatedimage:{component:()=>q(()=>import("./Index-C3l2NYW5.js"),__vite__mapDeps([11,1,2,3,4,5,6,7,12,13,14,15,16]),import.meta.url)},audio:{example:()=>q(()=>import("./Example-uQ8MuYg6.js"),__vite__mapDeps([17,18]),import.meta.url),component:()=>q(()=>import("./index-2g-QOiU-.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:()=>q(()=>import("./Index-Br0on3s9.js"),__vite__mapDeps([32,1,2,3,4,5,6,7]),import.meta.url)},button:{component:()=>q(()=>import("./Index-BEdjhdex.js"),__vite__mapDeps([33,3,4,1,2,5,6,7]),import.meta.url)},chatbot:{component:()=>q(()=>import("./Index-Bv_rU9uo.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:()=>q(()=>import("./Example-CZ-iEz1g.js"),__vite__mapDeps([48,18]),import.meta.url),component:()=>q(()=>import("./Index-2er3m2wk.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,50,51]),import.meta.url)},checkboxgroup:{example:()=>q(()=>import("./Example-CRm1Pmw_.js"),__vite__mapDeps([52,18]),import.meta.url),component:()=>q(()=>import("./Index-CYcVNHLo.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,54,50,55]),import.meta.url)},code:{example:()=>q(()=>import("./Example-Wp-_4AVX.js"),__vite__mapDeps([56,57]),import.meta.url),component:()=>q(()=>import("./Index-DXAmymL2.js").then(l=>l.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:()=>q(()=>import("./Example-BaLyJYAe.js"),__vite__mapDeps([60,61]),import.meta.url),component:()=>q(()=>import("./Index-DJP3Hjnr.js"),__vite__mapDeps([62,2,3,4,5,6,54,50,1,7,60,61,63]),import.meta.url)},column:{component:()=>q(()=>import("./Index-INgKs-Lw.js"),__vite__mapDeps([8,9]),import.meta.url)},dataframe:{example:()=>q(()=>import("./Example-CMXuI9oj.js"),__vite__mapDeps([64,65]),import.meta.url),component:()=>q(()=>import("./Index-Dmx8Zb6D.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:()=>q(()=>import("./Index-TLSfC7yd.js"),__vite__mapDeps([69,1,2,3,4,5,6,7,70]),import.meta.url)},downloadbutton:{component:()=>q(()=>import("./Index-BB0YoQ3k.js"),__vite__mapDeps([71,3,4,1,2,5,6,7,72]),import.meta.url)},dropdown:{example:()=>q(()=>import("./Example-CUwox43B.js"),__vite__mapDeps([73,18]),import.meta.url),component:()=>q(()=>import("./Index-CMDnMkRp.js"),__vite__mapDeps([74,2,3,4,5,6,54,50,75,1,7,73,18,76]),import.meta.url)},file:{example:()=>q(()=>import("./Example-DrmWnoSo.js"),__vite__mapDeps([77,78]),import.meta.url),component:()=>q(()=>import("./Index-O-CfKA7n.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:()=>q(()=>import("./Example-CIFMxn5c.js"),__vite__mapDeps([83,84]),import.meta.url),component:()=>q(()=>import("./Index-CiEkmok8.js"),__vite__mapDeps([85,2,3,4,5,6,81,1,7,12,86]),import.meta.url)},form:{component:()=>q(()=>import("./Index-DDCF2BFd.js"),__vite__mapDeps([87,88]),import.meta.url)},gallery:{component:()=>q(()=>import("./Index-BjhbWyTj.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:()=>q(()=>import("./Index-CS2xVf8J.js"),__vite__mapDeps([91,92]),import.meta.url)},highlightedtext:{component:()=>q(()=>import("./Index-DI87c1CL.js"),__vite__mapDeps([93,94,2,3,4,5,6,1,7,12,13,95]),import.meta.url)},html:{example:()=>q(()=>import("./Example-C2a4WxRl.js"),__vite__mapDeps([96,97]),import.meta.url),component:()=>q(()=>import("./Index-CtPgCiLM.js"),__vite__mapDeps([98,2,3,4,5,6,1,7,99]),import.meta.url)},image:{example:()=>q(()=>import("./Example-B5ra0LMm.js"),__vite__mapDeps([100,36,15,2,3,4,5,6,37,101]),import.meta.url),component:()=>q(()=>import("./Index-C2EiMH1Q.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:()=>q(()=>import("./Example-9wbbXnZg.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:()=>q(()=>import("./Index-BmQO2_-v.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:()=>q(()=>import("./Index-DMYdUYyt.js"),__vite__mapDeps([111,1,2,3,4,5,6,7,45,46,13,12,112]),import.meta.url)},label:{component:()=>q(()=>import("./Index-Dj491TSo.js"),__vite__mapDeps([113,2,3,4,5,6,1,7,12,13,114]),import.meta.url)},markdown:{example:()=>q(()=>import("./Example-DZJukuNR.js"),__vite__mapDeps([115,41,5,42,43]),import.meta.url),component:()=>q(()=>import("./Index-cV8rExtZ.js"),__vite__mapDeps([116,40,2,3,4,5,6,41,42,43,44,1,7,115]),import.meta.url)},model3d:{example:()=>q(()=>import("./Example-BQyGztrG.js"),__vite__mapDeps([117,18]),import.meta.url),component:()=>q(()=>import("./Index-C3CIAFxq.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:()=>q(()=>
66import("./Example-Ddx5bQlL.js"),__vite__mapDeps([120,36,15,2,3,4,5,6,37,121]),import.meta.url),component:()=>q(()=>import("./Index-CBUBKpdy.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:()=>q(()=>import("./Example-CqL1e7EB.js"),__vite__mapDeps([125,18]),import.meta.url),component:()=>q(()=>import("./Index-DgTZt0Wv.js"),__vite__mapDeps([126,1,2,3,4,5,6,7,54,50,127]),import.meta.url)},paramviewer:{example:()=>q(()=>import("./Example-C9__vDgN.js"),__vite__mapDeps([128,18]),import.meta.url),component:()=>q(()=>import("./Index-B6djv07B.js"),__vite__mapDeps([129,42,5,130]),import.meta.url)},plot:{component:()=>q(()=>import("./Index-TD4kkMYv.js"),__vite__mapDeps([131,5,2,3,4,6,94,67,13,1,7,12,132]),import.meta.url)},radio:{example:()=>q(()=>import("./Example-BoMLuz1A.js"),__vite__mapDeps([133,18]),import.meta.url),component:()=>q(()=>import("./Index-Bm40fReu.js"),__vite__mapDeps([134,1,2,3,4,5,6,7,54,50,133,18,135]),import.meta.url)},row:{component:()=>q(()=>import("./Index-DPQUg1KC.js"),__vite__mapDeps([136,137]),import.meta.url)},slider:{example:()=>q(()=>import("./Example-BrizabXh.js"),__vite__mapDeps([138,18]),import.meta.url),component:()=>q(()=>import("./Index-D-Msc1SI.js"),__vite__mapDeps([139,1,2,3,4,5,6,7,54,50,140]),import.meta.url)},state:{component:()=>q(()=>import("./Index-uRgjJb4U.js"),[],import.meta.url)},statustracker:{component:()=>q(()=>import("./index-D1FxdObD.js"),__vite__mapDeps([141,2,3,4,5,6,1,7]),import.meta.url)},tabitem:{component:()=>q(()=>import("./Index-AGFdWl_D.js"),__vite__mapDeps([142,143,2,3,4,5,6,144,8,9,145]),import.meta.url)},tabs:{component:()=>q(()=>import("./Index-CnMHQSls.js"),__vite__mapDeps([146,143,2,3,4,5,6,144]),import.meta.url)},textbox:{example:()=>q(()=>import("./Example-C7XUkkid.js"),__vite__mapDeps([147,148]),import.meta.url),component:()=>q(()=>import("./Index-DPgNZtxV.js"),__vite__mapDeps([149,150,2,3,4,5,6,54,50,45,46,1,7,151,147,148]),import.meta.url)},uploadbutton:{component:()=>q(()=>import("./Index-CESI8pTU.js"),__vite__mapDeps([152,3,4,1,2,5,6,7,153]),import.meta.url)},video:{example:()=>q(()=>import("./Example-CIm9Zvy8.js"),__vite__mapDeps([154,38,15,2,3,4,5,6,39,155]),import.meta.url),component:()=>q(()=>import("./index-B6OSkX25.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)}},ot={};function ni({api_url:l,name:e,id:t,variant:n}){const o=window.__GRADIO__CC__,i={...pu,...o||{}};if(ot[`${t}-${n}`])return{component:ot[`${t}-${n}`],name:e};try{if(!i?.[t]?.[n]&&!i?.[e]?.[n])throw new Error;return ot[`${t}-${n}`]=(i?.[t]?.[n]||i?.[e]?.[n])(),{name:e,component:ot[`${t}-${n}`]}}catch{try{return ot[`${t}-${n}`]=du(l,t,n),{name:e,component:ot[`${t}-${n}`]}}catch(_){if(n==="example")return ot[`${t}-${n}`]=q(()=>import("./Example-DxdiEFS_.js"),__vite__mapDeps([158,18]),import.meta.url),{name:e,component:ot[`${t}-${n}`]};throw console.error(`failed to load: ${e}`),console.error(_),_}}}function mu(l){return new Promise((e,t)=>{const n=document.createElement("link");n.rel="stylesheet",n.href=l,document.head.appendChild(n),n.onload=()=>e(),n.onerror=()=>t()})}function du(l,e,t){return Promise.all([mu(`${l}/custom_component/${e}/${t}/style.css`),q(()=>import(`${l}/custom_component/${e}/${t}/index.js`),[],import.meta.url)]).then(([n,o])=>o)}function hu(){const l=cn({}),e=[],t=[],n=new Map,o=new Map,i=new Map,s=[];function _({fn_index:r,status:c,queue:m=!0,size:u,position:p=null,eta:k=null,message:g=null,progress:v}){const f=t[r],d=e[r],h=s[r],b=f.map(w=>{let C;const $=n.get(w)||0;if(h==="pending"&&c!=="pending"){let j=$-1;n.set(w,j<0?0:j),C=j>0?"pending":c}else h==="pending"&&c==="pending"?C="pending":h!=="pending"&&c==="pending"?(C="pending",n.set(w,$+1)):C=c;return{id:w,queue_position:p,queue_size:u,eta:k,status:C,message:g,progress:v}});d.forEach(w=>{const C=o.get(w)||0;if(h==="pending"&&c!=="pending"){let $=C-1;o.set(w,$<0?0:$),i.set(w,c)}else h!=="pending"&&c==="pending"?(o.set(w,C+1),i.set(w,c)):i.delete(w)}),l.update(w=>(b.forEach(({id:C,queue_position:$,queue_size:j,eta:O,status:E,message:A,progress:B})=>{w[C]={queue:m,queue_size:j,queue_position:$,eta:O,message:A,progress:B,status:E,fn_index:r}}),w)),s[r]=c}function a(r,c,m){e[r]=c,t[r]=m}return{update:_,register:a,subscribe:l.subscribe,get_status_for_fn(r){return s[r]}
66,get_inputs_to_update(){return i}}}let yt=[];function gu(){let l,e=cn({}),t={},n,o,i,s,_=hu();const a=cn();let r,c;function m({app:d,components:h,layout:b,dependencies:w,root:C,options:$,callback:j}){c=d,r=h,n=new Set,o=new Set,yt=[],i=new Map,l=new Map,s={};const O={id:b.id,type:"column",props:{interactive:!1,scale:$.fill_height?1:null},has_modes:!1,instance:null,component:null,component_class_id:"",key:null};h.push(O),w.forEach((E,A)=>{_.register(A,E.inputs,E.outputs),E.frontend_fn=vu(E.js,!!E.backend_fn,E.inputs.length,E.outputs.length),$u(E.targets,A,t),bu(E,n,o)}),e.set(t),i=Eu(h,C),s=h.reduce((E,A)=>(E[A.id]=A,E),{}),u(b,C).then(()=>{a.set(O),j&&j()})}async function u(d,h){const b=s[d.id];return b.component=(await i.get(b.component_class_id))?.default,b.type==="dataset"&&(b.props.component_map=Ni(b.type,b.component_class_id,h,r,b.props.components).example_components),t[b.id]&&(b.props.attached_events=Object.keys(t[b.id])),b.props.interactive=wu(b.id,b.props.interactive,b.props.value,n,o),b.props.server=yu(b.id,b.props.server_fns,c),l.set(b.id,b),d.children&&(b.children=await Promise.all(d.children.map(w=>u(w,h)))),b}let p=!1,k=cn(!1);function g(){a.update(d=>{for(let h=0;h<yt.length;h++)for(let b=0;b<yt[h].length;b++){const w=yt[h][b],C=s[w.id];if(!C)continue;let $;w.value instanceof Map?$=new Map(w.value):w.value instanceof Set?$=new Set(w.value):Array.isArray(w.value)?$=[...w.value]:w.value===null?$=null:typeof w.value=="object"?$={...w.value}:$=w.value,C.props[w.prop]=$}return d}),yt=[],p=!1,k.set(!1)}function v(d){d&&(yt.push(d),p||(p=!0,k.set(!0),requestAnimationFrame(g)))}function f(d){const h=l.get(d);return h?h.instance.get_value?h.instance.get_value():h.props.value:null}return{layout:a,targets:e,update_value:v,get_data:f,loading_status:_,scheduled_updates:k,create_layout:(...d)=>requestAnimationFrame(()=>m(...d))}}const zi=Object.getPrototypeOf(async function(){}).constructor;function vu(l,e,t,n){if(!l)return null;const o=e?t===1:n===1;try{return new zi("__fn_args",`  let result = await (${l})(...__fn_args);
67  return (${o} && !Array.isArray(result)) ? [result] : result;`)}catch(i){return console.error("Could not parse custom js method."),console.error(i),null}}function $u(l,e,t){return l.forEach(([n,o])=>{t[n]||(t[n]={}),t[n]?.[o]&&!t[n]?.[o].includes(e)?t[n][o].push(e):t[n][o]=[e]}),t}function bu(l,e,t){return l.inputs.forEach(n=>e.add(n)),l.outputs.forEach(n=>t.add(n)),[e,t]}function ku(l){return Array.isArray(l)&&l.length===0||l===""||l===0||!l}function wu(l,e,t,n,o){return e===!1?!1:e===!0?!0:!!(n.has(l)||!o.has(l)&&ku(t))}function yu(l,e,t){return e?e.reduce((n,o)=>(n[o]=async(...i)=>(i.length===1&&(i=i[0]),await t.component_server(l,o,i)),n),{}):{}}function Ni(l,e,t,n,o){let i=new Map;l==="dataset"&&o&&o.forEach(_=>{if(i.has(_))return;let a;const r=n.find(c=>c.type===_);r&&(a=ni({api_url:t,name:_,id:r.component_class_id,variant:"example"}),i.set(_,a.component))});const s=ni({api_url:t,name:l,id:e,variant:"component"});return{component:s.component,name:s.name,example_components:i.size>0?i:void 0}}function Eu(l,e){let t=new Map;return l.forEach(n=>{const{component:o,example_components:i}=Ni(n.type,n.component_class_id,e,l);if(t.set(n.component_class_id,o),i)for(const[s,_]of i)t.set(s,_)}),t}const Cu=(l,e)=>{let t={};l.forEach(n=>{n.key&&(t[n.key]=n)}),e.forEach(n=>{if(n.key){const o=t[n.key];o&&(n.props.value=o.props.value)}})},{SvelteComponent:Au,append:Le,attr:X,check_outros:rn,component_subscribe:Rt,create_component:kn,destroy_component:wn,detach:fe,element:Pe,empty:Vn,flush:oe,globals:Lu,group_outros:an,init:qu,insert:Ae,listen:hl,mount_component:yn,noop:Mn,safe_not_equal:Pu,set_data:Ui,set_style:_n,space:Ue,src_url_equal:gl,text:Bi,transition_in:ye,transition_out:Ne}=window.__gradio__svelte__internal,{document:St}=Lu,{tick:zn}=window.__gradio__svelte__internal;function li(l){return St.title=l[2],{c:Mn,m:Mn,d:Mn}}function oi(l){let e,t,n,o;return{c(){e=Pe("script"),e.innerHTML="",n=Ue(),o=Pe("script"),o.textContent=`
vendor: 146 bytes, lines 67-72
67window.dataLayer = window.dataLayer || [];
68			function gtag() {
69				dataLayer.push(arguments);
70			}
71			gtag("js", new Date());
72			gtag("config", "
72UA-156449732-1
vendor: 52 bytes, lines 72-74
72", {
73				cookie_flags: "samesite=none;secure"
74			});
74`,e.async=!0,e.defer=!0,gl(e.src,t="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1")||X(e,"src",t)},m(i,s){Ae(i,e,s),Ae(i,n,s),Ae(i,o,s)},d(i){i&&(fe(e),fe(n),fe(o))}}}function ii(l){let e,t;return e=new uu({props:{rootNode:l[14],root:l[0],target:l[4],theme_mode:l[10],version:l[13],autoscroll:l[5],max_file_size:l[11].config.max_file_size,client:l[11]}}),e.$on("mount",l[26]),e.$on("destroy",l[36]),{c(){kn(e.$$.fragment)},m(n,o){yn(e,n,o),t=!0},p(n,o){const i={};o[0]&16384&&(i.rootNode=n[14]),o[0]&1&&(i.root=n[0]),o[0]&16&&(i.target=n[4]),o[0]&1024&&(i.theme_mode=n[10]),o[0]&8192&&(i.version=n[13]),o[0]&32&&(i.autoscroll=n[5]),o[0]&2048&&(i.max_file_size=n[11].config.max_file_size),o[0]&2048&&(i.client=n[11]),e.$set(i)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Ne(e.$$.fragment,n),t=!1},d(n){wn(e,n)}}}function si(l){let e,t,n,o=l[19]("common.built_with_gradio")+"",i,s,_,a,r,c=l[6]&&ri(l);return{c(){e=Pe("footer"),c&&c.c(),t=Ue(),n=Pe("a"),i=Bi(o),s=Ue(),_=Pe("img"),gl(_.src,a=fu)||X(_,"src",a),X(_,"alt",r=l[19]("common.logo")),X(_,"class","svelte-1rjryqp"),X(n,"href","https://gradio.app"),X(n,"class","built-with 
74svelte-1rjryqp"),X(n,"target","_blank"),X(n,"rel","noreferrer"),X(e,"class","svelte-1rjryqp")},m(m,u){Ae(m,e,u),c&&c.m(e,null),Le(e,t),Le(e,n),Le(n,i),Le(n,s),Le(n,_)},p(m,u){m[6]?c?c.p(m,u):(c=ri(m),c.c(),c.m(e,t)):c&&(c.d(1),c=null),u[0]&524288&&o!==(o=m[19]("common.built_with_gradio")+"")&&Ui(i,o),u[0]&524288&&r!==(r=m[19]("common.logo"))&&X(_,"alt",r)},d(m){m&&fe(e),c&&c.d()}}}function ri(l){let e,t=l[19]("errors.use_via_api")+"",n,o,i,s,_,a,r,c,m;return{c(){e=Pe("button"),n=Bi(t),o=Ue(),i=Pe("img"),a=Ue(),r=Pe("div"),r.textContent="·",gl(i.src,s=bi)||X(i,"src",s),X(i,"alt",_=l[19]("common.logo")),X(i,"class","svelte-1rjryqp"),X(e,"class","show-api svelte-1rjryqp"),X(r,"class","svelte-1rjryqp")},m(u,p){Ae(u,e,p),Le(e,n),Le(e,o),Le(e,i),Ae(u,a,p),Ae(u,r,p),c||(m=hl(e,"click",l[37]),c=!0)},p(u,p){p[0]&524288&&t!==(t=u[19]("errors.use_via_api")+"")&&Ui(n,t),p[0]&524288&&_!==(_=u[19]("common.logo"))&&X(i,"alt",_)},d(u){u&&(fe(e),fe(a),fe(r)),c=!1,m()}}}function ai(l){let e,t,n,o,i;return t=new gc({props:{api_calls:l[17],dependencies:l[1]}}),{c(){e=Pe("div"),kn(t.$$.fragment),X(e,"id","api-recorder-container"),X(e,"class","svelte-1rjryqp")},m(s,_){Ae(s,e,_),yn(t,e,null),n=!0,o||(i=hl(e,"click",l[38]),o=!0)},p(s,_){const a={};_[0]&131072&&(a.api_calls=s[17]),_[0]&2&&(a.dependencies=s[1]),t.$set(a)},i(s){n||(ye(t.$$.fragment,s),n=!0)},o(s){Ne(t.$$.fragment,s),n=!1},d(s){s&&fe(e),wn(t),o=!1,i()}}}function _i(l){let e,t,n,o,i,s,_,a;return i=new uc({props:{root_node:l[14],dependencies:l[1],root:l[0],app:l[11],space_id:l[12],api_calls:l[17]}}),i.$on("close",l[40]),{c(){e=Pe("div"),t=Pe("div"),n=Ue(),o=Pe("div"),kn(i.$$.fragment),X(t,"class","backdrop svelte-1rjryqp"),X(o,"class","api-docs-wrap svelte-1rjryqp"),X(e,"class","api-docs svelte-1rjryqp")},m(r,c){Ae(r,e,c),Le(e,t),Le(e,n),Le(e,o),yn(i,o,null),s=!0,_||(a=hl(t,"click",l[39]),_=!0)},p(r,c){const m={};c[0]&16384&&(m.root_node=r[14]),c[0]&2&&(m.dependencies=r[1]),c[0]&1&&(m.root=r[0]),c[0]&2048&&(m.app=r[11]),c[0]&4096&&(m.space_id=r[12]),c[0]&131072&&(m.api_calls=r[17]),i.$set(m)},i(r){s||(ye(i.$$.fragment,r),s=!0)},o(r){Ne(i.$$.fragment,r),s=!1},d(r){r&&fe(e),wn(i),_=!1,a()}}}function ci(l){let e,t;return e=new yr({props:{messages:l[18]}}),e.$on("close",l[25]),{c(){kn(e.$$.fragment)},m(n,o){yn(e,n,o),t=!0},p(n,o){const i={};o[0]&262144&&(i.messages=n[18]),e.$set(i)},i(n){t||(ye(e.$$.fragment,n),t=!0)},o(n){Ne(e.$$.fragment,n),t=!1},d(n){wn(e,n)}}}function Tu(l){let e,t,n,o,i,s,_,a,r,c,m,u=l[8]&&li(l),p=l[3]&&oi(),k=l[14]&&l[11].config&&ii(l),g=l[7]&&si(l),v=l[16]&&ai(l),f=l[15]&&l[14]&&_i(l),d=l[18]&&ci(l);return{c(){u&&u.c(),e=Vn(),p&&p.c(),t=Vn(),n=Ue(),o=Pe("div"),i=Pe("div"),k&&k.c(),s=Ue(),g&&g.c(),_=Ue(),v&&v.c(),a=Ue(),f&&f.c(),r=Ue(),d&&d.c(),c=Vn(),X(i,"class","contain svelte-1rjryqp"),_n(i,"flex-grow",l[9]?"1":"auto"),X(o,"class","wrap svelte-1rjryqp"),_n(o,"min-height",l[9]?"100%":"auto")},m(h,b){u&&u.m(St.head,null),Le(St.head,e),p&&p.m(St.head,null),Le(St.head,t),Ae(h,n,b),Ae(h,o,b),Le(o,i),k&&k.m(i,null),Le(o,s),g&&g.m(o,null),Ae(h,_,b),v&&v.m(h,b),Ae(h,a,b),f&&f.m(h,b),Ae(h,r,b),d&&d.m(h,b),Ae(h,c,b),m=!0},p(h,b){h[8]?u||(u=li(h),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),h[3]?p||(p=oi(),p.c(),p.m(t.parentNode,t)):p&&(p.d(1),p=null),h[14]&&h[11].config?k?(k.p(h,b),b[0]&18432&&ye(k,1)):(k=ii(h),k.c(),ye(k,1),k.m(i,null)):k&&(an(),Ne(k,1,1,()=>{k=null}),rn()),b[0]&512&&_n(i,"flex-grow",h[9]?"1":"auto"),h[7]?g?g.p(h,b):(g=si(h),g.c(),g.m(o,null)):g&&(g.d(1),g=null),b[0]&512&&_n(o,"min-height",h[9]?"100%":"auto"),h[16]?v?(v.p(h,b),b[0]&65536&&ye(v,1)):(v=ai(h),v.c(),ye(v,1),v.m(a.parentNode,a)):v&&(an(),Ne(v,1,1,()=>{v=null}),rn()),h[15]&&h[14]?f?(f.p(h,b),b[0]&49152&&ye(f,1)):(f=_i(h),f.c(),ye(f,1),f.m(r.parentNode,r)):f&&(an(),Ne(f,1,1,()=>{f=null}),rn()),h[18]?d?(d.p(h,b),b[0]&262144&&ye(d,1)):(d=ci(h),d.c(),ye(d,1),d.m(c.parentNode,c)):d&&(an(),Ne(d,1,1,()=>{d=null}),rn())},i(h){m||(ye(k),ye(v),ye(f),ye(d),m=!0)},o(h){Ne(k),Ne(v),Ne(f),Ne(d),m=!1},d(h){h&&(fe(n),fe(o),fe(_),fe(a),fe(r),fe(c)),u&&u.d(h),fe(e),p&&p.d(h),fe(t),k&&k.d(),g&&g.d(),v&&v.d(h),f&&f.d(h),d&&d.d(h)}}}const ju=/^'([^]+)'$/,Ou=15,Iu=10;function ui(l){return"detail"in l}function Du(l,e,t){let n,o,i,s,_;Rt(l,pi,y=>t(19,s=y)),rs();let{root:a}=e,{components:r}=e,c=r,{layout:m}=e,{dependencies:u}=e,{title:p="Gradio"}=e,{analytics_enabled:k=!1}=e,{target:g}=e,{autoscroll:v}
74=e,{show_api:f=!0}=e,{show_footer:d=!0}=e,{control_page_title:h=!1}=e,{app_mode:b}=e,{theme_mode:w}=e,{app:C}=e,{space_id:$}=e,{version:j}=e,{js:O}=e,{fill_height:E=!1}=e,{ready:A}=e;const{layout:B,targets:K,update_value:V,get_data:D,loading_status:L,scheduled_updates:W,create_layout:P}=gu();Rt(l,B,y=>t(14,_=y)),Rt(l,K,y=>t(46,o=y)),Rt(l,L,y=>t(35,n=y)),Rt(l,W,y=>t(47,i=y));let Q=new URLSearchParams(window.location.search),ke=Q.get("view")==="api"&&f,Ze=Q.get("view")==="api-recorder"&&f;function U(y){t(16,Ze=!1),t(15,ke=y);let F=new URLSearchParams(window.location.search);y?F.set("view","api"):F.delete("view"),history.replaceState(null,"","?"+F.toString())}let Be=[],{render_complete:Yt=!1}=e;async function vl(y,F){const N=u[F].outputs,S=y?.map((H,we)=>({id:N[we],prop:"value_is_output",value:!0}));V(S),await zn();const ee=[];y?.forEach((H,we)=>{if(typeof H=="object"&&H!==null&&H.__type__==="update")for(const[J,Fe]of Object.entries(H))J!=="__type__"&&ee.push({id:N[we],prop:J,value:Fe});else ee.push({id:N[we],prop:"value",value:H})}),V(ee),await zn()}let $l=new Map,bl=[],x=[];function Ke(y,F,N){return{message:y,fn_index:F,type:N,id:++Hi}}function Fi(y,F){t(18,x=[Ke(y,-1,F),...x])}let Hi=-1,En=!1;document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(En=!0)});const Gi=s("blocks.long_requests_queue"),Zi=s("blocks.connection_can_break"),Wi=s("blocks.lost_connection"),kl=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let wl=!1,yl=!1;function Ot(y,F=null,N=null){let S=()=>{};function ee(){S()}i?S=W.subscribe(H=>{H||(El(y,F,N),ee())}):El(y,F,N)}async function El(y,F=null,N=null){let S=u[y];const ee=L.get_status_for_fn(y);t(18,x=x.filter(({fn_index:J})=>J!==y)),S.cancels&&await Promise.all(S.cancels.map(async J=>{const Fe=$l.get(J);return Fe?.cancel(),Fe})),(ee==="pending"||ee==="generating")&&(S.pending_request=!0);let H={fn_index:y,data:await Promise.all(S.inputs.map(J=>D(J))),event_data:S.collects_event_data?N:null,trigger_id:F};S.frontend_fn?S.frontend_fn(H.data.concat(await Promise.all(S.outputs.map(J=>D(J))))).then(J=>{S.backend_fn?(H.data=J,we(H)):vl(J,y)}):S.backend_fn&&(S.trigger_mode==="once"?S.pending_request||we(H):S.trigger_mode==="multiple"?we(H):S.trigger_mode==="always_last"&&(S.pending_request?S.final_event=H:we(H)));async function we(J){Ze&&t(17,Be=[...Be,J]);let Fe;try{Fe=C.submit(J.fn_index,J.data,J.event_data,J.trigger_id)}catch(Te){t(18,x=[Ke(String(Te),0,"error"),...x]),L.update({status:"error",fn_index:0,eta:0,queue:!1,queue_position:null}),Kt(n);return}Fe.on("data",({data:Te,fn_index:re})=>{S.pending_request&&S.final_event&&(S.pending_request=!1,we(S.final_event)),S.pending_request=!1,vl(Te,re),Kt(n)}).on("status",({fn_index:Te,...re})=>{if(L.update({...re,status:re.stage,progress:re.progress_data,fn_index:Te}),Kt(n),!wl&&$!==null&&re.position!==void 0&&re.position>=2&&re.eta!==void 0&&re.eta>Ou&&(wl=!0,t(18,x=[Ke(Gi,Te,"warning"),...x])),!yl&&kl&&re.eta!==void 0&&re.eta>Iu&&(yl=!0,t(18,x=[Ke(Zi,Te,"warning"),...x])),re.stage==="complete"&&(u.map(async(Xe,Xt)=>{Xe.trigger_after===Te&&Ot(Xt,J.trigger_id)}),Fe.destroy()),re.broken&&kl&&En)window.setTimeout(()=>{t(18,x=[Ke(Wi,Te,"error"),...x])},0),Ot(y,J.trigger_id,N),En=!1;else if(re.stage==="error"){if(re.message){const Xe=re.message.replace(ju,(Xt,os)=>os);t(18,x=[Ke(Xe,Te,"error"),...x])}u.map(async(Xe,Xt)=>{Xe.trigger_after===Te&&!Xe.trigger_only_on_success&&Ot(Xt,J.trigger_id)}),Fe.destroy()}}).on("log",({log:Te,fn_index:re,level:Xe})=>{t(18,x=[Ke(Te,re,Xe),...x])}),$l.set(y,Fe)}}function Qi(y,F){if($===null)return;const N=new URL(`https://huggingface.co/spaces/${$}/discussions/new`);y!==void 0&&y.length>0&&N.searchParams.set("title",y),N.searchParams.set("description",F),window.open(N.toString(),"_blank")}function Ji(y){const F=y.detail;t(18,x=x.filter(N=>N.id!==F))}const Yi=y=>!!(y&&new URL(y,location.href).origin!==location.origin);async function Ki(){O&&await new zi(`let result = await (${O})();
75					return (!Array.isArray(result)) ? [result] : result;`)(),await zn();for(var y=g.getElementsByTagName("a"),F=0;F<y.length;F++){const N=y[F].getAttribute("target"),S=y[F].getAttribute("href");Yi(S)&&N!=="_blank"&&y[F].setAttribute("target","_blank")}u.forEach((N,S)=>{N.targets[0][1]==="load"&&Ot(S)}),!Yt&&(g.addEventListener("prop_change",N=>{if(!ui(N))throw new Error("not a custom event");const{id:S,prop:ee,value:H}=N.detail;V([{id:S,prop:ee,value:H}])}),g.addEventListener("gradio",N=>{if(!ui(N))throw new Error("not a custom event");
75const{id:S,event:ee,data:H}=N.detail;if(ee==="share"){const{title:we,description:J}=H;Qi(we,J)}else ee==="error"||ee==="warning"?t(18,x=[Ke(H,-1,ee),...x]):ee=="clear_status"?Xi(S,"complete",H):o[S]?.[ee]?.forEach(J=>{requestAnimationFrame(()=>{Ot(J,S,H)})})}),t(29,Yt=!0))}function Cl(y){bl=bl.map(F=>F.filter(N=>N!==y))}function Xi(y,F,N){N.status=F,V([{id:y,prop:"loading_status",value:N}])}function Kt(y){const F=Object.entries(y).map(([ee,H])=>{let we=u[H.fn_index];return H.scroll_to_output=we.scroll_to_output,H.show_progress=we.show_progress,{id:parseInt(ee),prop:"loading_status",value:H}}),N=L.get_inputs_to_update(),S=Array.from(N).map(([ee,H])=>({id:ee,prop:"pending",value:H==="pending"}));V([...F,...S])}const xi=({detail:y})=>Cl(y),es=()=>{U(!ke)},ts=()=>{U(!0),t(16,Ze=!1)},ns=()=>{U(!1)},ls=y=>{U(!1),t(17,Be=[]),t(16,Ze=y.detail.api_recorder_visible)};return l.$$set=y=>{"root"in y&&t(0,a=y.root),"components"in y&&t(30,r=y.components),"layout"in y&&t(31,m=y.layout),"dependencies"in y&&t(1,u=y.dependencies),"title"in y&&t(2,p=y.title),"analytics_enabled"in y&&t(3,k=y.analytics_enabled),"target"in y&&t(4,g=y.target),"autoscroll"in y&&t(5,v=y.autoscroll),"show_api"in y&&t(6,f=y.show_api),"show_footer"in y&&t(7,d=y.show_footer),"control_page_title"in y&&t(8,h=y.control_page_title),"app_mode"in y&&t(9,b=y.app_mode),"theme_mode"in y&&t(10,w=y.theme_mode),"app"in y&&t(11,C=y.app),"space_id"in y&&t(12,$=y.space_id),"version"in y&&t(13,j=y.version),"js"in y&&t(32,O=y.js),"fill_height"in y&&t(33,E=y.fill_height),"ready"in y&&t(28,A=y.ready),"render_complete"in y&&t(29,Yt=y.render_complete)},l.$$.update=()=>{l.$$.dirty[0]&1073743875|l.$$.dirty[1]&5&&P({components:r,layout:m,dependencies:u,root:a,app:C,options:{fill_height:E},callback:()=>Cu(c,r)}),l.$$.dirty[0]&16384&&t(28,A=!!_),l.$$.dirty[1]&16&&Kt(n)},[a,u,p,k,g,v,f,d,h,b,w,C,$,j,_,ke,Ze,Be,x,s,B,K,L,W,U,Ji,Ki,Cl,A,Yt,r,m,O,E,Fi,n,xi,es,ts,ns,ls]}class Ru extends Au{constructor(e){super(),qu(this,e,Du,Tu,Pu,{root:0,components:30,layout:31,dependencies:1,title:2,analytics_enabled:3,target:4,autoscroll:5,show_api:6,show_footer:7,control_page_title:8,app_mode:9,theme_mode:10,app:11,space_id:12,version:13,js:32,fill_height:33,ready:28,render_complete:29,add_new_message:34},null,[-1,-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),oe()}get components(){return this.$$.ctx[30]}set components(e){this.$$set({components:e}),oe()}get layout(){return this.$$.ctx[31]}set layout(e){this.$$set({layout:e}),oe()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),oe()}get title(){return this.$$.ctx[2]}set title(e){this.$$set({title:e}),oe()}get analytics_enabled(){return this.$$.ctx[3]}set analytics_enabled(e){this.$$set({analytics_enabled:e}),oe()}get target(){return this.$$.ctx[4]}set target(e){this.$$set({target:e}),oe()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),oe()}get show_api(){return this.$$.ctx[6]}set show_api(e){this.$$set({show_api:e}),oe()}get show_footer(){return this.$$.ctx[7]}set show_footer(e){this.$$set({show_footer:e}),oe()}get control_page_title(){return this.$$.ctx[8]}set control_page_title(e){this.$$set({control_page_title:e}),oe()}get app_mode(){return this.$$.ctx[9]}set app_mode(e){this.$$set({app_mode:e}),oe()}get theme_mode(){return this.$$.ctx[10]}set theme_mode(e){this.$$set({theme_mode:e}),oe()}get app(){return this.$$.ctx[11]}set app(e){this.$$set({app:e}),oe()}get space_id(){return this.$$.ctx[12]}set space_id(e){this.$$set({space_id:e}),oe()}get version(){return this.$$.ctx[13]}set version(e){this.$$set({version:e}),oe()}get js(){return this.$$.ctx[32]}set js(e){this.$$set({js:e}),oe()}get fill_height(){return this.$$.ctx[33]}set fill_height(e){this.$$set({fill_height:e}),oe()}get ready(){return this.$$.ctx[28]}set ready(e){this.$$set({ready:e}),oe()}get render_complete(){return this.$$.ctx[29]}set render_complete(e){this.$$set({render_complete:e}),oe()}get add_new_message(){return this.$$.ctx[34]}}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Ru},Symbol.toStringTag,{value:"Module"}));
75export{Fu as B,qn as S,yr as T,Uu as c,Bu as f,Nu as u};
76//# sourceMappingURL=Blocks-BrGSw8d-.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.