import{g as c}from"./vendor-react-BUCujlKS.js";var h={exports:{}},w=h.exports,f;function _(){return f||(f=1,(function(x,m){(function(y,s){s(m)})(w,function(y){const s=Symbol("newer"),o=Symbol("older");class k{constructor(t,e){typeof t!="number"&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}_markEntryAsUsed(t){t!==this.newest&&(t[s]&&(t===this.oldest&&(this.oldest=t[s]),t[s][o]=t[o]),t[o]&&(t[o][s]=t[s]),t[s]=void 0,t[o]=this.newest,this.newest&&(this.newest[s]=t),this.newest=t)}assign(t){let e,i=this.limit||Number.MAX_VALUE;this._keymap.clear();let p=t[Symbol.iterator]();for(let l=p.next();!l.done;l=p.next()){let n=new v(l.value[0],l.value[1]);if(this._keymap.set(n.key,n),e?(e[s]=n,n[o]=e):this.oldest=n,e=n,i--==0)throw new Error("overflow")}this.newest=e,this.size=this._keymap.size}get(t){var e=this._keymap.get(t);return e?(this._markEntryAsUsed(e),e.value):void 0}set(t,e){var i=this._keymap.get(t);return i?(i.value=e,this._markEntryAsUsed(i),this):(this._keymap.set(t,i=new v(t,e)),this.newest?(this.newest[s]=i,i[o]=this.newest):this.oldest=i,this.newest=i,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var t=this.oldest;if(t)return this.oldest[s]?(this.oldest=this.oldest[s],this.oldest[o]=void 0):(this.oldest=void 0,this.newest=void 0),t[s]=t[o]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]}find(t){let e=this._keymap.get(t);return e?e.value:void 0}has(t){return this._keymap.has(t)}delete(t){var e=this._keymap.get(t);return e?(this._keymap.delete(e.key),e[s]&&e[o]?(e[o][s]=e[s],e[s][o]=e[o]):e[s]?(e[s][o]=void 0,this.oldest=e[s]):e[o]?(e[o][s]=void 0,this.newest=e[o]):this.oldest=this.newest=void 0,this.size--,e.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new a(this.oldest)}values(){return new d(this.oldest)}entries(){return this}[Symbol.iterator](){return new u(this.oldest)}forEach(t,e){typeof e!="object"&&(e=this);let i=this.oldest;for(;i;)t.call(e,i.value,i.key,this),i=i[s]}toJSON(){for(var t=new Array(this.size),e=0,i=this.oldest;i;)t[e++]={key:i.key,value:i.value},i=i[s];return t}toString(){for(var t="",e=this.oldest;e;)t+=String(e.key)+":"+e.value,e=e[s],e&&(t+=" < ");return t}}y.LRUMap=k;function v(r,t){this.key=r,this.value=t,this[s]=void 0,this[o]=void 0}function u(r){this.entry=r}u.prototype[Symbol.iterator]=function(){return this},u.prototype.next=function(){let r=this.entry;return r?(this.entry=r[s],{done:!1,value:[r.key,r.value]}):{done:!0,value:void 0}};function a(r){this.entry=r}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let r=this.entry;return r?(this.entry=r[s],{done:!1,value:r.key}):{done:!0,value:void 0}};function d(r){this.entry=r}d.prototype[Symbol.iterator]=function(){return this},d.prototype.next=function(){let r=this.entry;return r?(this.entry=r[s],{done:!1,value:r.value}):{done:!0,value:void 0}}})})(h,h.exports)),h.exports}var g=_();const S=c(g);export{S as L};
