"use strict";(self.webpackChunkfeno_web=self.webpackChunkfeno_web||[]).push([["1786"],{4091(e,t,i){function s(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{Uq:()=>r,mu:()=>n,qE:()=>s});class r{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class n{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=Array(e),this._values.fill(0,0,e)}update(e){let t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}},41809(e,t,i){let s,r;i.r(t),i.d(t,{ILanguageFeatureDebounceService:()=>g,LanguageFeatureDebounceService:()=>m});var n,a,u=i(441),h=i(37723),l=i(4091),_=i(80388),c=i(67087),o=i(50804),d=i(33574),v=i(90391),f=function(e,t){return function(i,s){t(i,s,e)}};let g=(0,o.u1)("ILanguageFeatureDebounceService");n=a||(a={}),s=new WeakMap,r=0,n.of=function(e){let t=s.get(e);return void 0===t&&(t=++r,s.set(e,t)),t};class E{constructor(e){this._default=e}get(e){return this._default}update(e,t){return this._default}default(){return this._default}}class p{constructor(e,t,i,s,r,n){this._logService=e,this._name=t,this._registry=i,this._default=s,this._min=r,this._max=n,this._cache=new h.qK(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((e,t)=>(0,u.sN)(a.of(t),e),0)}get(e){let t=this._key(e),i=this._cache.get(t);return i?(0,l.qE)(i.value,this._min,this._max):this.default()}update(e,t){let i=this._key(e),s=this._cache.get(i);s||(s=new l.mu(6),this._cache.set(i,s));let r=(0,l.qE)(s.update(t),this._min,this._max);return(0,v.v$)(e.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){let e=new l.Uq;for(let[,t]of this._cache)e.update(t.value);return e.value}default(){let e=0|this._overall()||this._default;return(0,l.qE)(e,this._min,this._max)}}let m=class{constructor(e,t){this._logService=e,this._data=new Map,this._isDev=t.isExtensionDevelopment||!t.isBuilt}for(e,t,i){let s=i?.min??50,r=i?.max??s**2,n=i?.key??void 0,u=`${a.of(e)},${s}${n?","+n:""}`,h=this._data.get(u);return h||(this._isDev?(this._logService.debug(`[DEBOUNCE: ${t}] is disabled in developed mode`),h=new E(1.5*s)):h=new p(this._logService,t,e,0|this._overallAverage()||1.5*s,s,r),this._data.set(u,h)),h}_overallAverage(){let e=new l.Uq;for(let t of this._data.values())e.update(t.default());return e.value}};m=function(e,t,i,s){var r,n=arguments.length,a=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,s);else for(var u=e.length-1;u>=0;u--)(r=e[u])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([f(0,d.rr),f(1,_.k)],m),(0,c.v)(g,m,1)},80388(e,t,i){i.d(t,{k:()=>s});let s=(0,i(50804).u1)("environmentService")},5803(e,t,i){i.d(t,{d:()=>s});class s{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},67087(e,t,i){i.d(t,{N:()=>a,v:()=>n});var s=i(5803);let r=[];function n(e,t,i){t instanceof s.d||(t=new s.d(t,[],!!i)),r.push([e,t])}function a(){return r}},50804(e,t,i){var s,r;i.d(t,{_$:()=>s,_Y:()=>n,u1:()=>a}),(r=s||(s={})).serviceIds=new Map,r.DI_TARGET="$di$target",r.DI_DEPENDENCIES="$di$dependencies",r.getServiceDependencies=function(e){return e[r.DI_DEPENDENCIES]||[]};let n=a("instantiationService");function a(e){if(s.serviceIds.has(e))return s.serviceIds.get(e);let t=function(e,i,r){if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");e[s.DI_TARGET]===e?e[s.DI_DEPENDENCIES].push({id:t,index:r}):(e[s.DI_DEPENDENCIES]=[{id:t,index:r}],e[s.DI_TARGET]=e)};return t.toString=()=>e,s.serviceIds.set(e,t),t}}}]);