Buckets:

HuggingFaceDocBuilder's picture
download
raw
2.17 kB
import{r as u,d as h,p as g,c as _,b as p,a as b,h as d,e as v,m as k,s as y,f as $,g as w,E as j,i as x,j as A,k as C,l as m}from"./BrY_21Bg.js";function M(o){if(/^\/(docs|learn)/.test(o)){const e=o.slice(1).split("/"),t=e.shift(),s=e.shift(),n=(t==="learn"?/^(?:pr_\d+)$/:/^(?:(master|main)|v[\d.]+(rc\d+)?|pr_\d+)$/).test(e[0])?e.shift():"main",i=/^[a-z]{2}(-[A-Z]{2})?$/.test(e[0])?e.shift():"ja",f=e.join("/");if(s==="diffusers"&&n==="main"&&i==="ja")return`/docs/diffusers/main/ja/${f}`}}class F{anchor;#s=new Map;#t=new Map;#e=new Map;#i=new Set;#a=!0;constructor(e,t=!0){this.anchor=e,this.#a=t}#r=e=>{if(this.#s.has(e)){var t=this.#s.get(e),s=this.#t.get(t);if(s)u(s),this.#i.delete(t);else{var a=this.#e.get(t);a&&(u(a.effect),this.#t.set(t,a.effect),this.#e.delete(t),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[r,n]of this.#s){if(this.#s.delete(r),r===e)break;const i=this.#e.get(n);i&&(h(i.effect),this.#e.delete(n))}for(const[r,n]of this.#t){if(r===t||this.#i.has(r))continue;const i=()=>{if(Array.from(this.#s.values()).includes(r)){var c=document.createDocumentFragment();k(n,c),c.append(_()),this.#e.set(r,{effect:n,fragment:c})}else h(n);this.#i.delete(r),this.#t.delete(r)};this.#a||!s?(this.#i.add(r),g(n,i,!1)):i()}}};#n=e=>{this.#s.delete(e);const t=Array.from(this.#s.values());for(const[s,a]of this.#e)t.includes(s)||(h(a.effect),this.#e.delete(s))};ensure(e,t){var s=b,a=y();if(t&&!this.#t.has(e)&&!this.#e.has(e))if(a){var r=document.createDocumentFragment(),n=_();r.append(n),this.#e.set(e,{effect:p(()=>t(n)),fragment:r})}else this.#t.set(e,p(()=>t(this.anchor)));if(this.#s.set(s,e),a){for(const[i,f]of this.#t)i===e?s.unskip_effect(f):s.skip_effect(f);for(const[i,f]of this.#e)i===e?s.unskip_effect(f.effect):s.skip_effect(f.effect);s.oncommit(this.#r),s.ondiscard(this.#n)}else d&&(this.anchor=v),this.#r(s)}}function R(o,e,t=!1){var s;d&&(s=v,w());var a=new F(o),r=t?j:0;function n(i,f){if(d){var c=x(s);if(i!==parseInt(c.substring(1))){var l=A();C(l),a.anchor=l,m(!1),a.ensure(i,f),m(!0);return}}a.ensure(i,f)}$(()=>{var i=!1;e((f,c=0)=>{i=!0,n(c,f)}),i||n(-1,null)},r)}export{F as B,M as g,R as i};

Xet Storage Details

Size:
2.17 kB
·
Xet hash:
d42d64015c9fac99d5f59c19d776ef65beaa843d14758766f2add43c080b9e60

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