function permissionInSet(_0x114b0c,_0x4f968a){if(!_0x114b0c||!_0x4f968a)return![];if(_0x114b0c['includes']('*'))return!![];if(_0x114b0c['includes'](_0x4f968a))return!![];const [_0x2b666d]=_0x4f968a['split'](':');if(_0x114b0c['includes'](_0x2b666d+':*'))return!![];return![];}function hasServerPermission(_0x5321b4,_0x10670f){const _0x3565b8=_0x5321b4?.['permissions']?.['server'];if(!_0x3565b8)return![];return permissionInSet(_0x3565b8,_0x10670f);}function hasEnvPermission(_0x33b8ae,_0x49bba9){if(hasServerPermission(_0x33b8ae,'*'))return!![];const _0x1a1637=_0x33b8ae?.['permissions']?.['environments'];if(!_0x1a1637)return![];for(const _0x4d04cc of Object['values'](_0x1a1637)){if(permissionInSet(_0x4d04cc,_0x49bba9))return!![];}return![];}function hasEnvPermissionOn(_0x2c6a7e,_0x34c7af,_0x58f3cc){if(hasServerPermission(_0x2c6a7e,'*'))return!![];const _0x575241=_0x2c6a7e?.['permissions']?.['environments']?.[_0x34c7af];if(!_0x575241)return![];return permissionInSet(_0x575241,_0x58f3cc);}function hasTeamPermission(_0x573548,_0x39bbda){if(hasServerPermission(_0x573548,'*'))return!![];const _0x25f3ba=_0x573548?.['permissions']?.['teams'];if(!_0x25f3ba)return![];for(const _0xb0312c of Object['values'](_0x25f3ba)){if(permissionInSet(_0xb0312c,_0x39bbda))return!![];}return![];}function hasAnyEnvironment(_0x50c702){if(hasServerPermission(_0x50c702,'*'))return!![];const _0x333c4b=_0x50c702?.['permissions']?.['environments'];return _0x333c4b!=null&&Object['keys'](_0x333c4b)['length']>0x0;}window['Permissions']={'hasServerPermission':hasServerPermission,'hasEnvPermission':hasEnvPermission,'hasEnvPermissionOn':hasEnvPermissionOn,'hasTeamPermission':hasTeamPermission,'hasAnyEnvironment':hasAnyEnvironment};