const sleep=ms=>new Promise(r=>setTimeout(r,ms)); await eda.dmt_EditorControl.openDocument('f126ffb29c92f9b2'); await sleep(1500); const nat = b => { const o={bubbles:true,cancelable:true,view:window,button:0}; for (const t of ['pointerdown','mousedown','pointerup','mouseup','click']) b.dispatchEvent(new (t.startsWith('pointer')?PointerEvent:MouseEvent)(t,o)); }; for (const b of document.querySelectorAll('button')) if ((b.innerText||'').trim()==='确认' && b.offsetParent!==null) { nat(b); break; } await sleep(1500); await eda.pcb_Document.save(); await sleep(2000); const out=[]; for (const q of await eda.pcb_PrimitivePoured.getAll()) { let f=[]; try { f=q.getState_PourFills()||[]; } catch(e){} out.push(f.length); } return {fills: out, pour:(await eda.pcb_PrimitivePour.getAll()).map(p=>[p.getState_PourName(),p.getState_Net(),p.getState_Layer()])};