export const JUDGE_AGENTS_STORAGE_KEY='judge-selected-agents';function getStorage(_0x1f67f9){if(_0x1f67f9)return _0x1f67f9;return typeof localStorage!=='undefined'?localStorage:null;}export function loadPersistedJudgeAgents(_0x4d7ce4){const _0x405c92=getStorage(_0x4d7ce4);if(!_0x405c92)return new Set();try{const _0x204f58=_0x405c92['getItem'](JUDGE_AGENTS_STORAGE_KEY);if(!_0x204f58)return new Set();const _0x20fba6=JSON['parse'](_0x204f58);return Array['isArray'](_0x20fba6)?new Set(_0x20fba6['filter'](_0x22692d=>typeof _0x22692d==='string')):new Set();}catch{return new Set();}}export function persistJudgeAgents(_0x1ab0fb,_0x3a0a9c){const _0x3fa266=getStorage(_0x3a0a9c);if(!_0x3fa266)return;try{_0x3fa266['setItem'](JUDGE_AGENTS_STORAGE_KEY,JSON['stringify']([..._0x1ab0fb]));}catch{}}export function getTaskDefaultAgent(_0x5ad113){const _0x11ba27=_0x5ad113?.['envVars']?.['default_agent'];return typeof _0x11ba27==='string'&&_0x11ba27?_0x11ba27:null;}export function readServerDefaultAgent(_0x511d33){if(!_0x511d33)return null;const _0x5eaf4e=_0x511d33['default_agent'];return typeof _0x5eaf4e==='string'&&_0x5eaf4e?_0x5eaf4e:null;}export function resolveDefaultJudgeAgent({taskDefaultAgent:_0x637d25,serverDefaultAgent:_0x3b8469,configuredAgents:_0x556904}={}){const _0x8d353e=_0x556904 instanceof Set?_0x556904:new Set(_0x556904||[]);if(_0x8d353e['size']===0x0)return null;if(_0x637d25&&_0x8d353e['has'](_0x637d25))return _0x637d25;if(_0x3b8469&&_0x8d353e['has'](_0x3b8469))return _0x3b8469;return null;}