decord/source/utils/BasicPermissionUtils.tsx

28 lines
813 B
TypeScript
Raw Normal View History

2026-08-06 08:05:19 +00:00
// Module ID: 3920
// Function ID: 3921
2026-07-29 08:29:29 +00:00
// Name: has
// Dependencies: [506, 2]
2026-07-20 16:05:17 +00:00
2026-08-06 08:05:19 +00:00
// Module 3920 (has)
2026-07-29 08:29:29 +00:00
const result = require("set").fileFinishedImporting("utils/BasicPermissionUtils.tsx");
const prototype = function BasicPermissionUtils() {
return Object.create(new.target.prototype);
}.prototype;
prototype["has"] = function has(arg0, arg1) {
return arg0 & arg1;
};
prototype["asBasicFlag"] = function asBasicFlag(permissions) {
return importAll(506).asUintN(20, permissions);
};
prototype["asBigFlag"] = function asBigFlag(VIEW_CHANNEL) {
const self = this;
if (!Object.hasOwn(this.cache, VIEW_CHANNEL)) {
self.cache[VIEW_CHANNEL] = importAll(506).deserialize(VIEW_CHANNEL);
const obj = importAll(506);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return self.cache[VIEW_CHANNEL];
};
prototype.cache = {};
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default prototype;