Buckets:

hf-doc-build/doc / agents-course /main /es /_app /immutable /chunks /CopyLLMTxtMenu.38c593c4.js
rtrm's picture
download
raw
20.6 kB
import{s as se,n as W,r as Ce,i as Ve,t as be,e as _e}from"./scheduler.505acc25.js";import{S as le,i as oe,E as B,F as U,f as d,d as c,k as r,m as G,l as i,q as J,r as Q,D as pe,e as C,c as X,s as R,a as E,g as ee,b as H,n as te,u as Z,C as ve,t as O,G as Ee,o as j,I as Ne,p as re,j as De,w as Ae}from"./index.fbb49fb4.js";import{e as xe}from"./each.e59479a4.js";import{aO as Te}from"./MermaidChart.svelte_svelte_type_style_lang.9ca82795.js";const Be=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function Ue(s){const e=document.createElement("textarea");document.body.appendChild(e),e.value=s,e.select(),document.execCommand("copy"),document.body.removeChild(e)}function ze(s){let e,a,t,n;return{c(){e=B("svg"),a=B("path"),t=B("path"),n=B("rect"),this.h()},l(l){e=U(l,"svg",{class:!0,xmlns:!0,"aria-hidden":!0,fill:!0,focusable:!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var o=d(e);a=U(o,"path",{d:!0,transform:!0}),d(a).forEach(c),t=U(o,"path",{d:!0,transform:!0}),d(t).forEach(c),n=U(o,"rect",{fill:!0,width:!0,height:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(a,"d","M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"),r(a,"transform","translate(0)"),r(t,"d","M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"),r(t,"transform","translate(0)"),r(n,"fill","none"),r(n,"width","32"),r(n,"height","32"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"aria-hidden","true"),r(e,"fill","currentColor"),r(e,"focusable","false"),r(e,"role","img"),r(e,"width","1em"),r(e,"height","1em"),r(e,"preserveAspectRatio","xMidYMid meet"),r(e,"viewBox","0 0 32 32")},m(l,o){G(l,e,o),i(e,a),i(e,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function Le(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Me extends le{constructor(e){super(),oe(this,e,Le,ze,se,{classNames:0})}}function Oe(s){let e,a;return{c(){e=B("svg"),a=B("path"),this.h()},l(t){e=U(t,"svg",{class:!0,width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=d(e);a=U(n,"path",{d:!0,stroke:!0}),d(a).forEach(c),n.forEach(c),this.h()},h(){r(a,"d","M1 1L6 6L11 1"),r(a,"stroke","currentColor"),r(e,"class",s[0]),r(e,"width","1em"),r(e,"height","1em"),r(e,"viewBox","0 0 12 7"),r(e,"fill","none"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(t,n){G(t,e,n),i(e,a)},p(t,[n]){n&1&&r(e,"class",t[0])},i:W,o:W,d(t){t&&c(e)}}}function Pe(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Se extends le{constructor(e){super(),oe(this,e,Pe,Oe,se,{classNames:0})}}function Re(s){let e,a,t;return{c(){e=B("svg"),a=B("path"),t=B("path"),this.h()},l(n){e=U(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=d(e);a=U(l,"path",{d:!0}),d(a).forEach(c),t=U(l,"path",{d:!0}),d(t).forEach(c),l.forEach(c),this.h()},h(){r(a,"d","M7 7h10v10"),r(t,"d","M7 17 17 7"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"width","24"),r(e,"height","24"),r(e,"viewBox","0 0 24 24"),r(e,"fill","none"),r(e,"stroke","currentColor"),r(e,"stroke-width","1.75"),r(e,"stroke-linecap","round"),r(e,"stroke-linejoin","round")},m(n,l){G(n,e,l),i(e,a),i(e,t)},p(n,[l]){l&1&&r(e,"class",n[0])},i:W,o:W,d(n){n&&c(e)}}}function He(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ie extends le{constructor(e){super(),oe(this,e,He,Re,se,{classNames:0})}}function je(s){let e,a,t,n;return{c(){e=B("svg"),a=B("title"),t=J("OpenAI"),n=B("path"),this.h()},l(l){e=U(l,"svg",{class:!0,fill:!0,"fill-rule":!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var o=d(e);a=U(o,"title",{});var f=d(a);t=Q(f,"OpenAI"),f.forEach(c),n=U(o,"path",{d:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(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"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"fill-rule","evenodd"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,o){G(l,e,o),i(e,a),i(a,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function qe(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class We extends le{constructor(e){super(),oe(this,e,qe,je,se,{classNames:0})}}function Fe(s){let e,a,t,n;return{c(){e=B("svg"),a=B("title"),t=J("Anthropic"),n=B("path"),this.h()},l(l){e=U(l,"svg",{class:!0,fill:!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var o=d(e);a=U(o,"title",{});var f=d(a);t=Q(f,"Anthropic"),f.forEach(c),n=U(o,"path",{d:!0}),d(n).forEach(c),o.forEach(c),this.h()},h(){r(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"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,o){G(l,e,o),i(e,a),i(a,t),i(e,n)},p(l,[o]){o&1&&r(e,"class",l[0])},i:W,o:W,d(l){l&&c(e)}}}function Ge(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ze extends le{constructor(e){super(),oe(this,e,Ge,Fe,se,{classNames:0})}}function Ke(s){let e,a,t,n,l;return{c(){e=B("svg"),a=B("title"),t=J("ModelContextProtocol"),n=B("path"),l=B("path"),this.h()},l(o){e=U(o,"svg",{xmlns:!0,fill:!0,"fill-rule":!0,height:!0,style:!0,viewBox:!0,width:!0,class:!0});var f=d(e);a=U(f,"title",{});var N=d(a);t=Q(N,"ModelContextProtocol"),N.forEach(c),n=U(f,"path",{d:!0}),d(n).forEach(c),l=U(f,"path",{d:!0}),d(l).forEach(c),f.forEach(c),this.h()},h(){r(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"),r(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"),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"fill","currentColor"),r(e,"fill-rule","evenodd"),r(e,"height","1em"),pe(e,"flex","none"),pe(e,"line-height","1"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"class",s[0])},m(o,f){G(o,e,f),i(e,a),i(a,t),i(e,n),i(e,l)},p(o,[f]){f&1&&r(e,"class",o[0])},i:W,o:W,d(o){o&&c(e)}}}function Ye(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Je extends le{constructor(e){super(),oe(this,e,Ye,Ke,se,{classNames:0})}}const{window:fe}=Be;function ke(s,e,a){const t=s.slice();return t[36]=e[a],t}function ye(s){let e,a,t,n,l,o,f,N,z,V,k,y,M,P,p,w,D,L,m,g,$,I,q,v,A="View this page as plain text",T,S,K,ae;o=new Me({props:{classNames:"w-4 h-4 shrink-0"}}),D=new Te({props:{classNames:"w-4 h-4 shrink-0"}}),I=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300 shrink-0"}});let Y=xe(s[9]),_=[];for(let h=0;h<Y.length;h+=1)_[h]=$e(ke(s,Y,h));const he=h=>j(_[h],1,1,()=>{_[h]=null});return{c(){e=C("div"),a=R(),t=C("div"),n=C("button"),l=C("div"),X(o.$$.fragment),f=R(),N=C("div"),z=C("div"),V=J(s[0]),k=R(),y=C("div"),M=J(s[1]),P=R(),p=C("button"),w=C("div"),X(D.$$.fragment),L=R(),m=C("div"),g=C("div"),$=J(`View as Markdown
`),X(I.$$.fragment),q=R(),v=C("div"),v.textContent=A,T=R();for(let h=0;h<_.length;h+=1)_[h].c();this.h()},l(h){e=E(h,"DIV",{class:!0,"aria-hidden":!0,style:!0}),d(e).forEach(c),a=H(h),t=E(h,"DIV",{role:!0,class:!0,style:!0,"aria-label":!0});var x=d(t);n=E(x,"BUTTON",{role:!0,class:!0});var b=d(n);l=E(b,"DIV",{class:!0});var ne=d(l);ee(o.$$.fragment,ne),ne.forEach(c),f=H(b),N=E(b,"DIV",{class:!0});var ie=d(N);z=E(ie,"DIV",{class:!0});var ue=d(z);V=Q(ue,s[0]),ue.forEach(c),k=H(ie),y=E(ie,"DIV",{class:!0});var u=d(y);M=Q(u,s[1]),u.forEach(c),ie.forEach(c),b.forEach(c),P=H(x),p=E(x,"BUTTON",{role:!0,class:!0});var F=d(p);w=E(F,"DIV",{class:!0});var de=d(w);ee(D.$$.fragment,de),de.forEach(c),L=H(F),m=E(F,"DIV",{class:!0});var ce=d(m);g=E(ce,"DIV",{class:!0});var me=d(g);$=Q(me,`View as Markdown
`),ee(I.$$.fragment,me),me.forEach(c),q=H(ce),v=E(ce,"DIV",{class:!0,"data-svelte-h":!0}),De(v)!=="svelte-8wg9lb"&&(v.textContent=A),ce.forEach(c),F.forEach(c),T=H(x);for(let ge=0;ge<_.length;ge+=1)_[ge].l(x);x.forEach(c),this.h()},h(){r(e,"class","fixed inset-0 z-40"),r(e,"aria-hidden","true"),pe(e,"background","transparent"),r(l,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(z,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(y,"class","text-xs text-gray-600 dark:text-gray-400"),r(N,"class","flex flex-col px-1"),r(n,"role","menuitem"),r(n,"class",we),r(w,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(g,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(v,"class","text-xs text-gray-600 dark:text-gray-400"),r(m,"class","flex flex-col px-1"),r(p,"role","menuitem"),r(p,"class",we),r(t,"role","menu"),r(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"),r(t,"style",s[8]),r(t,"aria-label","Copy menu")},m(h,x){G(h,e,x),G(h,a,x),G(h,t,x),i(t,n),i(n,l),te(o,l,null),i(n,f),i(n,N),i(N,z),i(z,V),i(N,k),i(N,y),i(y,M),i(t,P),i(t,p),i(p,w),te(D,w,null),i(p,L),i(p,m),i(m,g),i(g,$),te(I,g,null),i(m,q),i(m,v),i(t,T);for(let b=0;b<_.length;b+=1)_[b]&&_[b].m(t,null);s[23](t),S=!0,K||(ae=[Z(e,"click",s[11]),Z(n,"click",s[20]),Z(p,"click",s[21])],K=!0)},p(h,x){if((!S||x[0]&1)&&ve(V,h[0]),(!S||x[0]&2)&&ve(M,h[1]),x[0]&16896){Y=xe(h[9]);let b;for(b=0;b<Y.length;b+=1){const ne=ke(h,Y,b);_[b]?(_[b].p(ne,x),O(_[b],1)):(_[b]=$e(ne),_[b].c(),O(_[b],1),_[b].m(t,null))}for(Ee(),b=Y.length;b<_.length;b+=1)he(b);Ne()}(!S||x[0]&256)&&r(t,"style",h[8])},i(h){if(!S){O(o.$$.fragment,h),O(D.$$.fragment,h),O(I.$$.fragment,h);for(let x=0;x<Y.length;x+=1)O(_[x]);S=!0}},o(h){j(o.$$.fragment,h),j(D.$$.fragment,h),j(I.$$.fragment,h),_=_.filter(Boolean);for(let x=0;x<_.length;x+=1)j(_[x]);S=!1},d(h){h&&(c(e),c(a),c(t)),re(o),re(D),re(I),Ae(_,h),s[23](null),K=!1,Ce(ae)}}}function Qe(s){let e,a;return e=new Je({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){X(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(O(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function Xe(s){let e,a;return e=new Ze({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){X(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(O(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function et(s){let e,a;return e=new We({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){X(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(O(e.$$.fragment,t),a=!0)},o(t){j(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function $e(s){let e,a,t,n,l,o,f,N=s[36].label+"",z,V,k,y=s[36].description+"",M,P,p,w,D,L,m;const g=[et,Xe,Qe],$=[];function I(v,A){return v[36].icon==="chatgpt"?0:v[36].icon==="claude"?1:v[36].icon==="mcp"?2:-1}~(t=I(s))&&(n=$[t]=g[t](s)),p=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300"}});function q(){return s[22](s[36])}return{c(){e=C("button"),a=C("div"),n&&n.c(),l=R(),o=C("div"),f=C("div"),z=J(N),V=R(),k=C("div"),M=J(y),P=R(),X(p.$$.fragment),w=R(),this.h()},l(v){e=E(v,"BUTTON",{role:!0,class:!0});var A=d(e);a=E(A,"DIV",{class:!0});var T=d(a);n&&n.l(T),T.forEach(c),l=H(A),o=E(A,"DIV",{class:!0});var S=d(o);f=E(S,"DIV",{class:!0});var K=d(f);z=Q(K,N),K.forEach(c),V=H(S),k=E(S,"DIV",{class:!0});var ae=d(k);M=Q(ae,y),ae.forEach(c),S.forEach(c),P=H(A),ee(p.$$.fragment,A),w=H(A),A.forEach(c),this.h()},h(){r(a,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(f,"class","text-sm font-medium text-gray-800 dark:text-gray-200 flex items-center gap-1"),r(k,"class","text-xs text-gray-600 dark:text-gray-400"),r(o,"class","flex flex-col px-1"),r(e,"role","menuitem"),r(e,"class",we)},m(v,A){G(v,e,A),i(e,a),~t&&$[t].m(a,null),i(e,l),i(e,o),i(o,f),i(f,z),i(o,V),i(o,k),i(k,M),i(e,P),te(p,e,null),i(e,w),D=!0,L||(m=Z(e,"click",q),L=!0)},p(v,A){s=v},i(v){D||(O(n),O(p.$$.fragment,v),D=!0)},o(v){j(n),j(p.$$.fragment,v),D=!1},d(v){v&&c(e),~t&&$[t].d(),re(p),L=!1,m()}}}function tt(s){let e,a,t,n,l,o,f,N=(s[5]?"Copied":s[0])+"",z,V,k,y,M,P,p,w,D,L;l=new Me({props:{classNames:"w-3 h-3 max-sm:w-2.5 max-sm:h-2.5"}}),y=new Se({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 m=s[4]&&ye(s);return{c(){e=C("div"),a=C("div"),t=C("button"),n=C("span"),X(l.$$.fragment),o=R(),f=C("span"),z=J(N),V=R(),k=C("button"),X(y.$$.fragment),P=R(),m&&m.c(),this.h()},l(g){e=E(g,"DIV",{class:!0,style:!0});var $=d(e);a=E($,"DIV",{class:!0});var I=d(a);t=E(I,"BUTTON",{class:!0,"aria-live":!0});var q=d(t);n=E(q,"SPAN",{class:!0});var v=d(n);ee(l.$$.fragment,v),v.forEach(c),o=H(q),f=E(q,"SPAN",{});var A=d(f);z=Q(A,N),A.forEach(c),q.forEach(c),V=H(I),k=E(I,"BUTTON",{class:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0});var T=d(k);ee(y.$$.fragment,T),T.forEach(c),I.forEach(c),P=H($),m&&m.l($),$.forEach(c),this.h()},h(){r(n,"class","inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0"),r(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"),r(t,"aria-live","polite"),r(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"),r(k,"aria-haspopup","menu"),r(k,"aria-expanded",s[4]),r(k,"aria-label",M=s[4]?"Close copy menu":"Open copy menu"),r(a,"class","inline-flex rounded-md max-sm:rounded-sm"),r(e,"class",p=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${s[2]?` ${s[2]}`:""}`),r(e,"style",s[3])},m(g,$){G(g,e,$),i(e,a),i(a,t),i(t,n),te(l,n,null),i(t,o),i(t,f),i(f,z),i(a,V),i(a,k),te(y,k,null),s[19](a),i(e,P),m&&m.m(e,null),w=!0,D||(L=[Z(fe,"mousedown",s[15]),Z(fe,"keydown",s[16]),Z(fe,"resize",s[17]),Z(fe,"scroll",s[18]),Z(t,"click",s[10]),Z(k,"click",s[12])],D=!0)},p(g,$){(!w||$[0]&33)&&N!==(N=(g[5]?"Copied":g[0])+"")&&ve(z,N);const I={};$[0]&16&&(I.classNames=`transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 ${g[4]?"rotate-180":"rotate-0"}`),y.$set(I),(!w||$[0]&16)&&r(k,"aria-expanded",g[4]),(!w||$[0]&16&&M!==(M=g[4]?"Close copy menu":"Open copy menu"))&&r(k,"aria-label",M),g[4]?m?(m.p(g,$),$[0]&16&&O(m,1)):(m=ye(g),m.c(),O(m,1),m.m(e,null)):m&&(Ee(),j(m,1,1,()=>{m=null}),Ne()),(!w||$[0]&4&&p!==(p=`items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex${g[2]?` ${g[2]}`:""}`))&&r(e,"class",p),(!w||$[0]&8)&&r(e,"style",g[3])},i(g){w||(O(l.$$.fragment,g),O(y.$$.fragment,g),O(m),w=!0)},o(g){j(l.$$.fragment,g),j(y.$$.fragment,g),j(m),w=!1},d(g){g&&c(e),re(l),re(y),s[19](null),m&&m.d(),D=!1,Ce(L)}}}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 rt(s,e,a){let{label:t="Copy page"}=e,{markdownDescription:n="Copy page as Markdown for LLMs"}=e,{containerClass:l=""}=e,{containerStyle:o=""}=e;const f=typeof window<"u",N=typeof document<"u";function z(){return!f||!window.location?void 0:window.location.href.replace(/#.*$/,"")}const V=z()??"",k=V.endsWith(".md")?V:V+".md";let y=null,M=!1,P=!1,p=null,w=null,D="",L=null,m=null,g=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 I(){y||!f||(y=encodeURIComponent(`Read from ${V} so I can ask questions about it.`))}async function q(){return!f||typeof fetch!="function"||!V?"":(I(),m||(g||(g=fetch(V,{headers:{Accept:"text/plain"}}).then(u=>{if(!u.ok)throw new Error(`Failed to fetch source content: ${u.status}`);return u.text()}).then(u=>(m=u,u)).catch(u=>(console.error("Unable to fetch remote markdown",u),m="",""))),g))}async function v(){if(!f){console.warn("Clipboard API unavailable");return}try{const u=await q();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)Ue(u);else{console.warn("Clipboard API unavailable");return}a(5,P=!0),await be(),L&&clearTimeout(L),L=setTimeout(()=>{a(5,P=!1)},2e3)}catch(u){console.error("Failed to write to clipboard",u)}}function A(){a(4,M=!0),f&&p&&be().then(()=>{if(!p)return;const u=p.getBoundingClientRect(),F=10,de=Math.max(u.width+80,220),ce=Math.max(window.innerWidth-u.right,F);a(8,D=`top:${u.bottom+F}px;right:${ce}px;min-width:${de}px;`)})}function T(){a(4,M=!1)}function S(){M?T():A()}function K(){f&&(window.open(k,"_blank","noopener,noreferrer"),T())}function ae(u){I(),f&&window.open(u.buildUrl(),"_blank","noopener,noreferrer"),T()}function Y(u){if(!M||!f)return;const F=u.target;w!=null&&w.contains(F)||p!=null&&p.contains(F)||T()}function _(u){u.key==="Escape"&&M&&T()}function he(){M&&T()}function h(){M&&T()}Ve(()=>{L&&clearTimeout(L)});function x(u){_e[u?"unshift":"push"](()=>{p=u,a(6,p)})}const b=()=>{v(),T()},ne=()=>{K()},ie=u=>ae(u);function ue(u){_e[u?"unshift":"push"](()=>{w=u,a(7,w)})}return s.$$set=u=>{"label"in u&&a(0,t=u.label),"markdownDescription"in u&&a(1,n=u.markdownDescription),"containerClass"in u&&a(2,l=u.containerClass),"containerStyle"in u&&a(3,o=u.containerStyle)},[t,n,l,o,M,P,p,w,D,$,v,T,S,K,ae,Y,_,he,h,x,b,ne,ie,ue]}class ot extends le{constructor(e){super(),oe(this,e,rt,tt,se,{label:0,markdownDescription:1,containerClass:2,containerStyle:3},null,[-1,-1])}}export{ot as C,Me as I,Ue as c};

Xet Storage Details

Size:
20.6 kB
·
Xet hash:
ecd3c39669675aae540baddd794b305b3c86af6faad1b6b95fec0d89276f9ab6

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