Buckets:

hf-doc-build/doc / diffusers /main /en /_app /immutable /chunks /CopyLLMTxtMenu.44fb6e7c.js
rtrm's picture
download
raw
19.2 kB
import{s as oe,n as K,r as Ce,h as De,t as _e,d as be}from"./scheduler.53228c21.js";import{S as ie,i as ce,y as O,z as P,f as g,d as c,k as a,m as G,l as o,q as X,r as Y,w as pe,e as C,c as Z,s as R,a as E,g as ee,b as j,n as te,u as H,x as ve,t as L,C as Ee,o as q,B as Ne,p as re,j as Ve,E as Ae}from"./index.100fac89.js";import{g as Te}from"./globals.7f7f1b26.js";import{e as xe}from"./each.e59479a4.js";import{I as Ie,c as ze}from"./IconCopy.38cf8f56.js";import{aL as Be}from"./MermaidChart.svelte_svelte_type_style_lang.686c6b12.js";function Le(s){let e,r;return{c(){e=O("svg"),r=O("path"),this.h()},l(t){e=P(t,"svg",{class:!0,width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=g(e);r=P(n,"path",{d:!0,stroke:!0}),g(r).forEach(c),n.forEach(c),this.h()},h(){a(r,"d","M1 1L6 6L11 1"),a(r,"stroke","currentColor"),a(e,"class",s[0]),a(e,"width","1em"),a(e,"height","1em"),a(e,"viewBox","0 0 12 7"),a(e,"fill","none"),a(e,"xmlns","http://www.w3.org/2000/svg")},m(t,n){G(t,e,n),o(e,r)},p(t,[n]){n&1&&a(e,"class",t[0])},i:K,o:K,d(t){t&&c(e)}}}function Ue(s,e,r){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&r(0,t=n.classNames)},[t]}class Oe extends ie{constructor(e){super(),ce(this,e,Ue,Le,oe,{classNames:0})}}function Pe(s){let e,r,t;return{c(){e=O("svg"),r=O("path"),t=O("path"),this.h()},l(n){e=P(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var l=g(e);r=P(l,"path",{d:!0}),g(r).forEach(c),t=P(l,"path",{d:!0}),g(t).forEach(c),l.forEach(c),this.h()},h(){a(r,"d","M7 7h10v10"),a(t,"d","M7 17 17 7"),a(e,"class",s[0]),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"width","24"),a(e,"height","24"),a(e,"viewBox","0 0 24 24"),a(e,"fill","none"),a(e,"stroke","currentColor"),a(e,"stroke-width","1.75"),a(e,"stroke-linecap","round"),a(e,"stroke-linejoin","round")},m(n,l){G(n,e,l),o(e,r),o(e,t)},p(n,[l]){l&1&&a(e,"class",n[0])},i:K,o:K,d(n){n&&c(e)}}}function Se(s,e,r){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&r(0,t=n.classNames)},[t]}class Me extends ie{constructor(e){super(),ce(this,e,Se,Pe,oe,{classNames:0})}}function Re(s){let e,r,t,n;return{c(){e=O("svg"),r=O("title"),t=X("OpenAI"),n=O("path"),this.h()},l(l){e=P(l,"svg",{class:!0,fill:!0,"fill-rule":!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var i=g(e);r=P(i,"title",{});var d=g(r);t=Y(d,"OpenAI"),d.forEach(c),n=P(i,"path",{d:!0}),g(n).forEach(c),i.forEach(c),this.h()},h(){a(n,"d","M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"),a(e,"class",s[0]),a(e,"fill","currentColor"),a(e,"fill-rule","evenodd"),a(e,"height","1em"),a(e,"viewBox","0 0 24 24"),a(e,"width","1em"),a(e,"xmlns","http://www.w3.org/2000/svg")},m(l,i){G(l,e,i),o(e,r),o(r,t),o(e,n)},p(l,[i]){i&1&&a(e,"class",l[0])},i:K,o:K,d(l){l&&c(e)}}}function je(s,e,r){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&r(0,t=n.classNames)},[t]}class qe extends ie{constructor(e){super(),ce(this,e,je,Re,oe,{classNames:0})}}function We(s){let e,r,t,n;return{c(){e=O("svg"),r=O("title"),t=X("Anthropic"),n=O("path"),this.h()},l(l){e=P(l,"svg",{class:!0,fill:!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var i=g(e);r=P(i,"title",{});var d=g(r);t=Y(d,"Anthropic"),d.forEach(c),n=P(i,"path",{d:!0}),g(n).forEach(c),i.forEach(c),this.h()},h(){a(n,"d","M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"),a(e,"class",s[0]),a(e,"fill","currentColor"),a(e,"height","1em"),a(e,"viewBox","0 0 24 24"),a(e,"width","1em"),a(e,"xmlns","http://www.w3.org/2000/svg")},m(l,i){G(l,e,i),o(e,r),o(r,t),o(e,n)},p(l,[i]){i&1&&a(e,"class",l[0])},i:K,o:K,d(l){l&&c(e)}}}function Fe(s,e,r){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&r(0,t=n.classNames)},[t]}class He extends ie{constructor(e){super(),ce(this,e,Fe,We,oe,{classNames:0})}}function Ge(s){let e,r,t,n,l;return{c(){e=O("svg"),r=O("title"),t=X("ModelContextProtocol"),n=O("path"),l=O("path"),this.h()},l(i){e=P(i,"svg",{xmlns:!0,fill:!0,"fill-rule":!0,height:!0,style:!0,viewBox:!0,width:!0,class:!0});var d=g(e);r=P(d,"title",{});var N=g(r);t=Y(N,"ModelContextProtocol"),N.forEach(c),n=P(d,"path",{d:!0}),g(n).forEach(c),l=P(d,"path",{d:!0}),g(l).forEach(c),d.forEach(c),this.h()},h(){a(n,"d","M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"),a(l,"d","M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"),a(e,"xmlns","http://www.w3.org/2000/svg"),a(e,"fill","currentColor"),a(e,"fill-rule","evenodd"),a(e,"height","1em"),pe(e,"flex","none"),pe(e,"line-height","1"),a(e,"viewBox","0 0 24 24"),a(e,"width","1em"),a(e,"class",s[0])},m(i,d){G(i,e,d),o(e,r),o(r,t),o(e,n),o(e,l)},p(i,[d]){d&1&&a(e,"class",i[0])},i:K,o:K,d(i){i&&c(e)}}}function Ke(s,e,r){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&r(0,t=n.classNames)},[t]}class Je extends ie{constructor(e){super(),ce(this,e,Ke,Ge,oe,{classNames:0})}}const{window:fe}=Te;function ke(s,e,r){const t=s.slice();return t[36]=e[r],t}function ye(s){let e,r,t,n,l,i,d,N,z,D,k,y,I,U,p,w,V,B,h,m,$,M,W,v,A="View this page as plain text",T,S,J,ae;i=new Ie({props:{classNames:"w-4 h-4 shrink-0"}}),V=new Be({props:{classNames:"w-4 h-4 shrink-0"}}),M=new Me({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300 shrink-0"}});let Q=xe(s[9]),b=[];for(let f=0;f<Q.length;f+=1)b[f]=$e(ke(s,Q,f));const he=f=>q(b[f],1,1,()=>{b[f]=null});return{c(){e=C("div"),r=R(),t=C("div"),n=C("button"),l=C("div"),Z(i.$$.fragment),d=R(),N=C("div"),z=C("div"),D=X(s[0]),k=R(),y=C("div"),I=X(s[1]),U=R(),p=C("button"),w=C("div"),Z(V.$$.fragment),B=R(),h=C("div"),m=C("div"),$=X(`View as Markdown
`),Z(M.$$.fragment),W=R(),v=C("div"),v.textContent=A,T=R();for(let f=0;f<b.length;f+=1)b[f].c();this.h()},l(f){e=E(f,"DIV",{class:!0,"aria-hidden":!0,style:!0}),g(e).forEach(c),r=j(f),t=E(f,"DIV",{role:!0,class:!0,style:!0,"aria-label":!0});var x=g(t);n=E(x,"BUTTON",{role:!0,class:!0});var _=g(n);l=E(_,"DIV",{class:!0});var ne=g(l);ee(i.$$.fragment,ne),ne.forEach(c),d=j(_),N=E(_,"DIV",{class:!0});var se=g(N);z=E(se,"DIV",{class:!0});var ue=g(z);D=Y(ue,s[0]),ue.forEach(c),k=j(se),y=E(se,"DIV",{class:!0});var u=g(y);I=Y(u,s[1]),u.forEach(c),se.forEach(c),_.forEach(c),U=j(x),p=E(x,"BUTTON",{role:!0,class:!0});var F=g(p);w=E(F,"DIV",{class:!0});var de=g(w);ee(V.$$.fragment,de),de.forEach(c),B=j(F),h=E(F,"DIV",{class:!0});var le=g(h);m=E(le,"DIV",{class:!0});var me=g(m);$=Y(me,`View as Markdown
`),ee(M.$$.fragment,me),me.forEach(c),W=j(le),v=E(le,"DIV",{class:!0,"data-svelte-h":!0}),Ve(v)!=="svelte-8wg9lb"&&(v.textContent=A),le.forEach(c),F.forEach(c),T=j(x);for(let ge=0;ge<b.length;ge+=1)b[ge].l(x);x.forEach(c),this.h()},h(){a(e,"class","fixed inset-0 z-40"),a(e,"aria-hidden","true"),pe(e,"background","transparent"),a(l,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),a(z,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),a(y,"class","text-xs text-gray-600 dark:text-gray-400"),a(N,"class","flex flex-col px-1"),a(n,"role","menuitem"),a(n,"class",we),a(w,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),a(m,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),a(v,"class","text-xs text-gray-600 dark:text-gray-400"),a(h,"class","flex flex-col px-1"),a(p,"role","menuitem"),a(p,"class",we),a(t,"role","menu"),a(t,"class","fixed z-50 backdrop-blur-xl rounded-xl max-h-[420px] overflow-y-auto p-1 border flex flex-col border-gray-200 bg-white dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200"),a(t,"style",s[8]),a(t,"aria-label","Copy menu")},m(f,x){G(f,e,x),G(f,r,x),G(f,t,x),o(t,n),o(n,l),te(i,l,null),o(n,d),o(n,N),o(N,z),o(z,D),o(N,k),o(N,y),o(y,I),o(t,U),o(t,p),o(p,w),te(V,w,null),o(p,B),o(p,h),o(h,m),o(m,$),te(M,m,null),o(h,W),o(h,v),o(t,T);for(let _=0;_<b.length;_+=1)b[_]&&b[_].m(t,null);s[23](t),S=!0,J||(ae=[H(e,"click",s[11]),H(n,"click",s[20]),H(p,"click",s[21])],J=!0)},p(f,x){if((!S||x[0]&1)&&ve(D,f[0]),(!S||x[0]&2)&&ve(I,f[1]),x[0]&16896){Q=xe(f[9]);let _;for(_=0;_<Q.length;_+=1){const ne=ke(f,Q,_);b[_]?(b[_].p(ne,x),L(b[_],1)):(b[_]=$e(ne),b[_].c(),L(b[_],1),b[_].m(t,null))}for(Ee(),_=Q.length;_<b.length;_+=1)he(_);Ne()}(!S||x[0]&256)&&a(t,"style",f[8])},i(f){if(!S){L(i.$$.fragment,f),L(V.$$.fragment,f),L(M.$$.fragment,f);for(let x=0;x<Q.length;x+=1)L(b[x]);S=!0}},o(f){q(i.$$.fragment,f),q(V.$$.fragment,f),q(M.$$.fragment,f),b=b.filter(Boolean);for(let x=0;x<b.length;x+=1)q(b[x]);S=!1},d(f){f&&(c(e),c(r),c(t)),re(i),re(V),re(M),Ae(b,f),s[23](null),J=!1,Ce(ae)}}}function Qe(s){let e,r;return e=new Je({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),r=!0},i(t){r||(L(e.$$.fragment,t),r=!0)},o(t){q(e.$$.fragment,t),r=!1},d(t){re(e,t)}}}function Xe(s){let e,r;return e=new He({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),r=!0},i(t){r||(L(e.$$.fragment,t),r=!0)},o(t){q(e.$$.fragment,t),r=!1},d(t){re(e,t)}}}function Ye(s){let e,r;return e=new qe({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),r=!0},i(t){r||(L(e.$$.fragment,t),r=!0)},o(t){q(e.$$.fragment,t),r=!1},d(t){re(e,t)}}}function $e(s){let e,r,t,n,l,i,d,N=s[36].label+"",z,D,k,y=s[36].description+"",I,U,p,w,V,B,h;const m=[Ye,Xe,Qe],$=[];function M(v,A){return v[36].icon==="chatgpt"?0:v[36].icon==="claude"?1:v[36].icon==="mcp"?2:-1}~(t=M(s))&&(n=$[t]=m[t](s)),p=new Me({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300"}});function W(){return s[22](s[36])}return{c(){e=C("button"),r=C("div"),n&&n.c(),l=R(),i=C("div"),d=C("div"),z=X(N),D=R(),k=C("div"),I=X(y),U=R(),Z(p.$$.fragment),w=R(),this.h()},l(v){e=E(v,"BUTTON",{role:!0,class:!0});var A=g(e);r=E(A,"DIV",{class:!0});var T=g(r);n&&n.l(T),T.forEach(c),l=j(A),i=E(A,"DIV",{class:!0});var S=g(i);d=E(S,"DIV",{class:!0});var J=g(d);z=Y(J,N),J.forEach(c),D=j(S),k=E(S,"DIV",{class:!0});var ae=g(k);I=Y(ae,y),ae.forEach(c),S.forEach(c),U=j(A),ee(p.$$.fragment,A),w=j(A),A.forEach(c),this.h()},h(){a(r,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),a(d,"class","text-sm font-medium text-gray-800 dark:text-gray-200 flex items-center gap-1"),a(k,"class","text-xs text-gray-600 dark:text-gray-400"),a(i,"class","flex flex-col px-1"),a(e,"role","menuitem"),a(e,"class",we)},m(v,A){G(v,e,A),o(e,r),~t&&$[t].m(r,null),o(e,l),o(e,i),o(i,d),o(d,z),o(i,D),o(i,k),o(k,I),o(e,U),te(p,e,null),o(e,w),V=!0,B||(h=H(e,"click",W),B=!0)},p(v,A){s=v},i(v){V||(L(n),L(p.$$.fragment,v),V=!0)},o(v){q(n),q(p.$$.fragment,v),V=!1},d(v){v&&c(e),~t&&$[t].d(),re(p),B=!1,h()}}}function Ze(s){let e,r,t,n,l,i,d,N=(s[5]?"Copied":s[0])+"",z,D,k,y,I,U,p,w,V,B;l=new Ie({props:{classNames:"w-3 h-3 max-sm:w-2.5 max-sm:h-2.5"}}),y=new Oe({props:{classNames:`transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 ${s[4]?"rotate-180":"rotate-0"}`}});let h=s[4]&&ye(s);return{c(){e=C("div"),r=C("div"),t=C("button"),n=C("span"),Z(l.$$.fragment),i=R(),d=C("span"),z=X(N),D=R(),k=C("button"),Z(y.$$.fragment),U=R(),h&&h.c(),this.h()},l(m){e=E(m,"DIV",{class:!0,style:!0});var $=g(e);r=E($,"DIV",{class:!0});var M=g(r);t=E(M,"BUTTON",{class:!0,"aria-live":!0});var W=g(t);n=E(W,"SPAN",{class:!0});var v=g(n);ee(l.$$.fragment,v),v.forEach(c),i=j(W),d=E(W,"SPAN",{});var A=g(d);z=Y(A,N),A.forEach(c),W.forEach(c),D=j(M),k=E(M,"BUTTON",{class:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0});var T=g(k);ee(y.$$.fragment,T),T.forEach(c),M.forEach(c),U=j($),h&&h.l($),$.forEach(c),this.h()},h(){a(n,"class","inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0"),a(t,"class","inline-flex items-center gap-1 max-sm:gap-0.5 h-6 max-sm:h-5 px-2 max-sm:px-1.5 text-[11px] max-sm:text-[9px] font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),a(t,"aria-live","polite"),a(k,"class","inline-flex items-center justify-center w-6 max-sm:w-5 h-6 max-sm:h-5 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),a(k,"aria-haspopup","menu"),a(k,"aria-expanded",s[4]),a(k,"aria-label",I=s[4]?"Close copy menu":"Open copy menu"),a(r,"class","inline-flex rounded-md max-sm:rounded-sm"),a(e,"class",p=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${s[2]?` ${s[2]}`:""}`),a(e,"style",s[3])},m(m,$){G(m,e,$),o(e,r),o(r,t),o(t,n),te(l,n,null),o(t,i),o(t,d),o(d,z),o(r,D),o(r,k),te(y,k,null),s[19](r),o(e,U),h&&h.m(e,null),w=!0,V||(B=[H(fe,"mousedown",s[15]),H(fe,"keydown",s[16]),H(fe,"resize",s[17]),H(fe,"scroll",s[18]),H(t,"click",s[10]),H(k,"click",s[12])],V=!0)},p(m,$){(!w||$[0]&33)&&N!==(N=(m[5]?"Copied":m[0])+"")&&ve(z,N);const M={};$[0]&16&&(M.classNames=`transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 ${m[4]?"rotate-180":"rotate-0"}`),y.$set(M),(!w||$[0]&16)&&a(k,"aria-expanded",m[4]),(!w||$[0]&16&&I!==(I=m[4]?"Close copy menu":"Open copy menu"))&&a(k,"aria-label",I),m[4]?h?(h.p(m,$),$[0]&16&&L(h,1)):(h=ye(m),h.c(),L(h,1),h.m(e,null)):h&&(Ee(),q(h,1,1,()=>{h=null}),Ne()),(!w||$[0]&4&&p!==(p=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${m[2]?` ${m[2]}`:""}`))&&a(e,"class",p),(!w||$[0]&8)&&a(e,"style",m[3])},i(m){w||(L(l.$$.fragment,m),L(y.$$.fragment,m),L(h),w=!0)},o(m){q(l.$$.fragment,m),q(y.$$.fragment,m),q(h),w=!1},d(m){m&&c(e),re(l),re(y),s[19](null),h&&h.d(),V=!1,Ce(B)}}}const we="cursor-pointer text-sm group relative w-full select-none outline-none flex items-center gap-1 px-1.5 py-1.5 rounded-xl text-left transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800";function et(s,e,r){let{label:t="Copy page"}=e,{markdownDescription:n="Copy page as Markdown for LLMs"}=e,{containerClass:l=""}=e,{containerStyle:i=""}=e;const d=typeof window<"u",N=typeof document<"u";function z(){return!d||!window.location?void 0:window.location.href.replace(/#.*$/,"")}const D=z()??"",k=D.endsWith(".md")?D:D+".md";let y=null,I=!1,U=!1,p=null,w=null,V="",B=null,h=null,m=null;const $=[{label:"Open in ChatGPT",description:"Ask questions about this page",icon:"chatgpt",buildUrl:()=>y?`https://chatgpt.com/?hints=search&q=${y}`:"https://chatgpt.com"},{label:"Open in Claude",description:"Ask questions about this page",icon:"claude",buildUrl:()=>y?`https://claude.ai/new?q=${y}`:"https://claude.ai/new"},{label:"Connect to MCP Client",description:"Install MCP server on Cursor, VS Code, etc.",icon:"mcp",buildUrl:()=>"https://huggingface.co/mcp"}];function M(){y||!d||(y=encodeURIComponent(`Read from ${D} so I can ask questions about it.`))}async function W(){return!d||typeof fetch!="function"||!D?"":(M(),h||(m||(m=fetch(D,{headers:{Accept:"text/plain"}}).then(u=>{if(!u.ok)throw new Error(`Failed to fetch source content: ${u.status}`);return u.text()}).then(u=>(h=u,u)).catch(u=>(console.error("Unable to fetch remote markdown",u),h="",""))),m))}async function v(){if(!d){console.warn("Clipboard API unavailable");return}try{const u=await W();if(!u){console.warn("Nothing to copy");return}if(typeof navigator<"u"&&!!navigator.clipboard&&typeof navigator.clipboard.writeText=="function")await navigator.clipboard.writeText(u);else if(N)ze(u);else{console.warn("Clipboard API unavailable");return}r(5,U=!0),await _e(),B&&clearTimeout(B),B=setTimeout(()=>{r(5,U=!1)},2e3)}catch(u){console.error("Failed to write to clipboard",u)}}function A(){r(4,I=!0),d&&p&&_e().then(()=>{if(!p)return;const u=p.getBoundingClientRect(),F=10,de=Math.max(u.width+80,220),le=Math.max(window.innerWidth-u.right,F);r(8,V=`top:${u.bottom+F}px;right:${le}px;min-width:${de}px;`)})}function T(){r(4,I=!1)}function S(){I?T():A()}function J(){d&&(window.open(k,"_blank","noopener,noreferrer"),T())}function ae(u){M(),d&&window.open(u.buildUrl(),"_blank","noopener,noreferrer"),T()}function Q(u){if(!I||!d)return;const F=u.target;w!=null&&w.contains(F)||p!=null&&p.contains(F)||T()}function b(u){u.key==="Escape"&&I&&T()}function he(){I&&T()}function f(){I&&T()}De(()=>{B&&clearTimeout(B)});function x(u){be[u?"unshift":"push"](()=>{p=u,r(6,p)})}const _=()=>{v(),T()},ne=()=>{J()},se=u=>ae(u);function ue(u){be[u?"unshift":"push"](()=>{w=u,r(7,w)})}return s.$$set=u=>{"label"in u&&r(0,t=u.label),"markdownDescription"in u&&r(1,n=u.markdownDescription),"containerClass"in u&&r(2,l=u.containerClass),"containerStyle"in u&&r(3,i=u.containerStyle)},[t,n,l,i,I,U,p,w,V,$,v,T,S,J,ae,Q,b,he,f,x,_,ne,se,ue]}class ot extends ie{constructor(e){super(),ce(this,e,et,Ze,oe,{label:0,markdownDescription:1,containerClass:2,containerStyle:3},null,[-1,-1])}}export{ot as C};

Xet Storage Details

Size:
19.2 kB
·
Xet hash:
4852b534ec33acf3c7db1c62eb5f237ade1a87d9ef0d00846244625be8564983

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.