decord/source/modules/native_permissions/NativePermissionStore.tsx

109 lines
3 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 4681
// Function ID: 40791
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 4345, 653, 686, 675, 566, 2]
2026-07-23 10:11:24 +00:00
2026-07-25 08:10:48 +00:00
// Module 4681 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import ME from "ME";
import dispatcher from "dispatcher";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import { NativePermissionStates } from "NativePermissionStatus";
import { AnalyticEvents } from "ME";
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
let closure_9 = { permissionStates: {} };
2026-07-23 10:11:24 +00:00
let tmp2 = ((DeviceSettingsStore) => {
2026-07-20 16:05:17 +00:00
class NativePermissionStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, apply);
2026-07-20 16:05:17 +00:00
items = [, ];
2026-07-23 10:11:24 +00:00
items[0] = NativePermissionStore(outer1_1[7]);
2026-07-20 16:05:17 +00:00
items[1] = {
SET_NATIVE_PERMISSION(arg0) {
return tmp2Result.handleSetNativePermission(arg0);
}
};
2026-07-23 10:11:24 +00:00
obj = outer1_5(apply);
tmp2 = outer1_4;
if (outer1_10()) {
2026-07-20 16:05:17 +00:00
tmp4 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp5 = outer1_5;
constructResult = Reflect.construct(obj, items, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
constructResult = obj.apply(self, items);
}
tmp2Result = tmp2(self, constructResult);
2026-07-23 10:11:24 +00:00
apply = tmp2Result;
2026-07-20 16:05:17 +00:00
return tmp2Result;
}
}
callback2(NativePermissionStore, DeviceSettingsStore);
let obj = {
key: "initialize",
value(arg0) {
2026-07-23 10:11:24 +00:00
let tmp = arg0;
if (null == arg0) {
tmp = outer1_9;
}
outer1_9 = tmp;
2026-07-20 16:05:17 +00:00
}
};
2026-07-23 10:11:24 +00:00
let items = [obj, , , ];
2026-07-20 16:05:17 +00:00
obj = {
key: "getUserAgnosticState",
value() {
2026-07-23 10:11:24 +00:00
return outer1_9;
2026-07-20 16:05:17 +00:00
}
};
items[1] = obj;
obj = {
key: "hasPermission",
value(arg0) {
let tmp2 = null != tmp;
if (tmp2) {
2026-07-23 10:11:24 +00:00
tmp2 = tmp === outer1_7.ACCEPTED;
2026-07-20 16:05:17 +00:00
}
return tmp2;
}
};
items[2] = obj;
items[3] = {
key: "handleSetNativePermission",
value(arg0) {
let permissionType;
let state;
({ state, permissionType } = arg0);
2026-07-23 10:11:24 +00:00
const permissionStates = outer1_9.permissionStates;
2026-07-20 16:05:17 +00:00
let NONE = permissionStates[permissionType];
permissionStates[permissionType] = state;
if (NONE !== state) {
2026-07-23 10:11:24 +00:00
let obj = NativePermissionStore(outer1_1[8]);
2026-07-20 16:05:17 +00:00
obj = { type: permissionType, action: state };
if (null == NONE) {
2026-07-23 10:11:24 +00:00
NONE = outer1_7.NONE;
2026-07-20 16:05:17 +00:00
}
obj.previous_action = NONE;
2026-07-23 10:11:24 +00:00
obj.track(outer1_8.PERMISSIONS_ACKED, obj);
2026-07-20 16:05:17 +00:00
}
}
};
return callback(NativePermissionStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").DeviceSettingsStore);
2026-07-20 16:05:17 +00:00
tmp2.displayName = "NativePermissionStore";
tmp2.persistKey = "NativePermissionsStore";
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("modules/native_permissions/NativePermissionStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;