2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 4725
|
|
|
|
|
// Function ID: 4726
|
2026-07-29 08:29:29 +00:00
|
|
|
// Name: _updateAccessibilityFocusLock
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [3, 4726, 4727, 4665, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 4725 (_updateAccessibilityFocusLock)
|
|
|
|
|
import timestampDefault from "timestamp" /* 3 */;
|
|
|
|
|
import initializeDefault from "initialize" /* 4726 */;
|
|
|
|
|
import SCREEN_READER_ENABLED_GETTER from "SCREEN_READER_ENABLED_GETTER" /* 4727 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
|
|
|
|
let closure_3 = new timestampDefault("AccessibilityFocusLockManager");
|
|
|
|
|
initializeDefault;
|
2026-07-29 08:29:29 +00:00
|
|
|
class AccessibilityFocusLockManager extends tmp3 {
|
|
|
|
|
constructor() {
|
|
|
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
|
|
|
obj = require("SCREEN_READER_ENABLED_GETTER");
|
|
|
|
|
applyArgumentsResult._screenReaderEnabled = obj.getIsScreenReaderEnabled();
|
|
|
|
|
map = new Map();
|
|
|
|
|
applyArgumentsResult._focusLockedNativeIDGroups = map;
|
|
|
|
|
applyArgumentsResult._focusLockEnabled = false;
|
|
|
|
|
applyArgumentsResult._focusLockEnabledDelayTimeoutId = -1;
|
|
|
|
|
applyArgumentsResult._focusLockEnabledDelayTimeout = 250;
|
|
|
|
|
return applyArgumentsResult;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
const prototype = AccessibilityFocusLockManager.prototype;
|
|
|
|
|
prototype["_updateAccessibilityFocusLock"] = function _updateAccessibilityFocusLock(arg0) {
|
|
|
|
|
let flag = arg0;
|
|
|
|
|
if (arg0 === undefined) {
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
const self = this;
|
|
|
|
|
let tmp;
|
2026-08-24 06:08:38 +00:00
|
|
|
let item10014;
|
2026-07-29 08:29:29 +00:00
|
|
|
clearTimeout(this._focusLockEnabledDelayTimeoutId);
|
2026-08-24 06:08:38 +00:00
|
|
|
item10014 = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
const _focusLockedNativeIDGroups = this._focusLockedNativeIDGroups;
|
|
|
|
|
const values = _focusLockedNativeIDGroups.values();
|
|
|
|
|
for (const item10014 of values) {
|
|
|
|
|
tmp = item10014;
|
|
|
|
|
continue;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
if (null != tmp) {
|
|
|
|
|
if (self._screenReaderEnabled) {
|
|
|
|
|
const _setTimeout = setTimeout;
|
|
|
|
|
self._focusLockEnabledDelayTimeoutId = setTimeout(() => {
|
2026-08-24 06:08:38 +00:00
|
|
|
item10014(closure_1_2[3]).enableFocusLock(item10014, flag);
|
2026-07-29 08:29:29 +00:00
|
|
|
}, self._focusLockEnabledDelayTimeout);
|
|
|
|
|
self._focusLockEnabled = true;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
if (self._focusLockEnabled) {
|
2026-08-24 06:08:38 +00:00
|
|
|
item10014(4665).disableFocusLock();
|
2026-07-29 08:29:29 +00:00
|
|
|
self._focusLockEnabled = false;
|
2026-08-24 06:08:38 +00:00
|
|
|
const obj = item10014(4665);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
|
|
|
|
prototype["_initialize"] = function _initialize() {
|
|
|
|
|
const self = this;
|
2026-08-24 06:08:38 +00:00
|
|
|
this._screenReaderEnabledListener = self(4727).addScreenReaderEnabledListener((_screenReaderEnabled) => {
|
2026-07-29 08:29:29 +00:00
|
|
|
self._screenReaderEnabled = _screenReaderEnabled;
|
|
|
|
|
const result = self._updateAccessibilityFocusLock();
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
prototype["_terminate"] = function _terminate() {
|
|
|
|
|
const self = this;
|
|
|
|
|
const _screenReaderEnabledListener = this._screenReaderEnabledListener;
|
|
|
|
|
if (_screenReaderEnabledListener != null) {
|
|
|
|
|
const result = _screenReaderEnabledListener();
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const _focusLockedNativeIDGroups = self._focusLockedNativeIDGroups;
|
|
|
|
|
_focusLockedNativeIDGroups.clear();
|
|
|
|
|
const result1 = self._updateAccessibilityFocusLock();
|
|
|
|
|
};
|
|
|
|
|
prototype["enableAccessibilityFocusLock"] = function enableAccessibilityFocusLock(items) {
|
|
|
|
|
if (0 === items.length) {
|
2026-08-24 06:08:38 +00:00
|
|
|
logger.error("No target view nativeIDs to add.");
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const self = this;
|
|
|
|
|
const _focusLockedNativeIDGroups = this._focusLockedNativeIDGroups;
|
|
|
|
|
const values = _focusLockedNativeIDGroups.values();
|
|
|
|
|
const iter = values[Symbol.iterator]();
|
|
|
|
|
const nextResult = iter.next();
|
|
|
|
|
while (iter !== undefined) {
|
|
|
|
|
let tmp5 = nextResult;
|
|
|
|
|
let tmp6 = nextResult;
|
|
|
|
|
for (const item10024 of nextResult) {
|
|
|
|
|
let tmp7 = item10024;
|
|
|
|
|
if (arg0.includes(item10024)) {
|
2026-08-24 06:08:38 +00:00
|
|
|
let tmp8 = logger;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp9 = item10024;
|
|
|
|
|
let _HermesInternal = HermesInternal;
|
2026-08-24 06:08:38 +00:00
|
|
|
let errorResult1 = logger.error("Duplicate target view nativeID " + tmp7 + " already accessibility focus locked.");
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
continue;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const _focusLockedNativeIDGroups2 = self._focusLockedNativeIDGroups;
|
|
|
|
|
const result = _focusLockedNativeIDGroups2.set(items[0], items);
|
|
|
|
|
const result1 = self._updateAccessibilityFocusLock(true);
|
|
|
|
|
};
|
|
|
|
|
prototype["disableAccessibilityFocusLock"] = function disableAccessibilityFocusLock(items1) {
|
|
|
|
|
if (0 === items1.length) {
|
2026-08-24 06:08:38 +00:00
|
|
|
logger.error("No target view nativeIDs to remove.");
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
const self = this;
|
|
|
|
|
const _focusLockedNativeIDGroups = this._focusLockedNativeIDGroups;
|
|
|
|
|
if (!_focusLockedNativeIDGroups.has(items1[0])) {
|
|
|
|
|
const _HermesInternal = HermesInternal;
|
2026-08-24 06:08:38 +00:00
|
|
|
logger.error("No target view nativeID " + items1[0] + " accessibility focus locked.");
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
const _focusLockedNativeIDGroups2 = self._focusLockedNativeIDGroups;
|
|
|
|
|
_focusLockedNativeIDGroups2.delete(items1[0]);
|
|
|
|
|
const result = self._updateAccessibilityFocusLock();
|
|
|
|
|
};
|
|
|
|
|
const accessibilityFocusLockManager = new AccessibilityFocusLockManager();
|
2026-08-24 06:08:38 +00:00
|
|
|
const tmp2 = new timestampDefault("AccessibilityFocusLockManager");
|
|
|
|
|
let result = require("set").fileFinishedImporting("modules/a11y/native/AccessibilityFocusLockManager.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
export default accessibilityFocusLockManager;
|