export function getProviderLevelKey(_0x4fc661={}){if(_0x4fc661?.['supportsReasoningLevel'])return'reasoningLevels';if(_0x4fc661?.['supportsEffortLevel'])return'effortLevels';return null;}export function getLevelsForSelectedModel(_0x276d10={},_0xdf3598=''){const _0x15b4af=getProviderLevelKey(_0x276d10);if(!_0x15b4af)return[];const _0xa16a7d=Array['isArray'](_0x276d10[_0x15b4af])?_0x276d10[_0x15b4af]:[],_0x5ef4dd=String(_0xdf3598||'')['trim'](),_0x3db1e7=_0x5ef4dd?(_0x276d10['models']||[])['find'](_0x40fd55=>_0x40fd55?.['id']===_0x5ef4dd):null,_0xb6b33=Array['isArray'](_0x3db1e7?.[_0x15b4af])?new Set(_0x3db1e7[_0x15b4af]['map'](_0x582895=>String(_0x582895||'')['trim']())['filter'](Boolean)):null;return _0xb6b33?_0xa16a7d['filter'](_0x2bc007=>_0xb6b33['has'](String(_0x2bc007?.['id']||'')['trim']())):_0xa16a7d;}export function buildLevelOptionsHtml({providerData:providerData={},modelId:modelId='',emptyLabel:emptyLabel='Default',escapeAttr:_0xf24d5e,escapeText:_0x97b515,stripDefaultLabelText:stripDefaultLabelText=_0x3fedfe=>String(_0x3fedfe||'')}={}){const _0x34cbe3=getLevelsForSelectedModel(providerData,modelId),_0x2273ad=_0xf24d5e||_0x97b515||(_0x2836c1=>String(_0x2836c1||'')),_0x46ecb2=_0x97b515||_0xf24d5e||(_0x8c678c=>String(_0x8c678c||''));return'<option\x20value=\x22\x22>'+_0x46ecb2(emptyLabel)+'</option>'+_0x34cbe3['map'](_0xe9970b=>'<option\x20value=\x22'+_0x2273ad(_0xe9970b['id'])+'\x22>'+_0x46ecb2(stripDefaultLabelText(_0xe9970b['displayName']||_0xe9970b['id']))+'</option>')['join']('');}