import{A as g,E as d,u as o,H as m,I as e}from"./index-Bm2SqMk3.js";import{a as y}from"./aborting-Bc8cczc3.js";function x(t){g(t,d(async()=>{try{const i=o.getContainingView(t);if(!i.initialized||!t.statsReadyAndRegionNotTooLarge)return;const{rpcManager:n}=o.getSession(t),{sources:r,mafFilter:s,adapterConfig:c}=t;if(!r)return;const a=m.getRpcSessionId(t),u=await n.call(a,"MultiVariantGetSimplifiedFeatures",{regions:i.dynamicBlocks.contentBlocks,sources:r,mafFilter:s,sessionId:a,adapterConfig:c});e(t)&&t.setFeatures(u.map(p=>new o.SimpleFeature(p)))}catch(i){!y.isAbortException(i)&&e(t)&&(console.error(i),o.getSession(t).notifyError(`${i}`,i))}},{delay:1e3}))}export{x as getMultiVariantFeaturesAutorun};
