function permissionInSet(_0x18e9d6,_0x25f1d0){if(!_0x18e9d6||!_0x25f1d0)return![];if(_0x18e9d6['includes']('*'))return!![];if(_0x18e9d6['includes'](_0x25f1d0))return!![];const [_0x516844]=_0x25f1d0['split'](':');if(_0x18e9d6['includes'](_0x516844+':*'))return!![];return![];}function hasServerPermission(_0x4adea4,_0x3a6074){const _0x1963b7=_0x4adea4?.['permissions']?.['server'];if(!_0x1963b7)return![];return permissionInSet(_0x1963b7,_0x3a6074);}function hasEnvPermission(_0x220f3c,_0x1ceddf){if(hasServerPermission(_0x220f3c,'*'))return!![];const _0x3b0ca6=_0x220f3c?.['permissions']?.['environments'];if(!_0x3b0ca6)return![];for(const _0x17f9fb of Object['values'](_0x3b0ca6)){if(permissionInSet(_0x17f9fb,_0x1ceddf))return!![];}return![];}function hasEnvPermissionOn(_0x92c8fa,_0x4550dc,_0x288539){if(hasServerPermission(_0x92c8fa,'*'))return!![];const _0x26c5ef=_0x92c8fa?.['permissions']?.['environments']?.[_0x4550dc];if(!_0x26c5ef)return![];return permissionInSet(_0x26c5ef,_0x288539);}function hasTeamPermission(_0x3d4bf3,_0x1e50c8){if(hasServerPermission(_0x3d4bf3,'*'))return!![];const _0x4219d8=_0x3d4bf3?.['permissions']?.['teams'];if(!_0x4219d8)return![];for(const _0x570541 of Object['values'](_0x4219d8)){if(permissionInSet(_0x570541,_0x1e50c8))return!![];}return![];}function hasAnyEnvironment(_0x1537d4){if(hasServerPermission(_0x1537d4,'*'))return!![];const _0x4f2025=_0x1537d4?.['permissions']?.['environments'];return _0x4f2025!=null&&Object['keys'](_0x4f2025)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};