decord/alpha/source/modules/rtc/hooks/useReadableSecureFramesFingerprint.tsx

121 lines
3.8 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 8817
// Function ID: 8818
2026-07-20 16:05:17 +00:00
// Name: useReadableSecureFramesFingerprint
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 558, 576, 206, 8794, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 8817 (useReadableSecureFramesFingerprint)
import byteLengthDefault from "byteLength" /* 206 */;
2026-10-03 08:58:59 +00:00
import react2 from "react" /* 576 */;
import react from "react" /* 19 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let tmp;
2026-10-09 10:00:15 +00:00
const _mod8794 = tmp(8794);
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useReadableSecureFramesFingerprint(arg0) {
2026-10-03 08:58:59 +00:00
let chunkSize;
let desiredLength;
let fingerprintBase64;
const obj = react2;
const cResult = obj.c(4);
({ fingerprintBase64, chunkSize, desiredLength } = arg0);
if (cResult[0] === chunkSize) {
if (cResult[1] === desiredLength) {
let tmp4;
if (cResult[2] === fingerprintBase64) {
tmp4 = cResult[3];
}
if (null != fingerprintBase64) {
if ("" !== fingerprintBase64) {
if (null == tmp4) {
const _Error = Error;
const self3 = this;
const self4 = this;
const error = new Error("[useReadableSecureFramesCode] Failed to parse base 64 code.");
throw error;
}
}
}
return tmp4;
}
}
let tmp5 = null;
if (null != fingerprintBase64) {
tmp5 = null;
if ("" !== fingerprintBase64) {
const obj2 = byteLengthDefault;
const toByteArrayResult = obj2.toByteArray(fingerprintBase64);
2026-10-09 10:00:15 +00:00
const tmpResult = _mod8794;
2026-10-03 08:58:59 +00:00
const str7 = tmpResult.generateDisplayableCode(toByteArrayResult, desiredLength, chunkSize);
tmp5 = null;
if (null != str7) {
const _RegExp = RegExp;
const _HermesInternal = HermesInternal;
const self = this;
const self2 = this;
const regExp = new RegExp(".{1," + chunkSize + "}", "g");
const match = str7.match(regExp);
let arr = null;
if (null != match) {
const _Array = Array;
arr = Array.from(match);
}
tmp5 = arr;
}
}
}
cResult[0] = chunkSize;
cResult[1] = desiredLength;
cResult[2] = fingerprintBase64;
cResult[3] = tmp5;
tmp4 = tmp5;
2026-10-08 09:57:35 +00:00
}) : (function useReadableSecureFramesFingerprint(fingerprintBase64) {
2026-07-20 16:05:17 +00:00
fingerprintBase64 = fingerprintBase64.fingerprintBase64;
const chunkSize = fingerprintBase64.chunkSize;
const desiredLength = fingerprintBase64.desiredLength;
const items = [chunkSize, fingerprintBase64, desiredLength];
2026-10-03 08:58:59 +00:00
const memo = react.useMemo(function() {
2026-07-20 16:05:17 +00:00
if (null != fingerprintBase64) {
2026-10-03 08:58:59 +00:00
if ("" !== fingerprintBase64) {
const obj = byteLengthDefault;
const toByteArrayResult = obj.toByteArray(fingerprintBase64);
2026-10-09 10:00:15 +00:00
const obj2 = _mod8794;
2026-10-03 08:58:59 +00:00
const str5 = obj2.generateDisplayableCode(toByteArrayResult, desiredLength, chunkSize);
const tmp12 = chunkSize;
2026-07-20 16:05:17 +00:00
if (null == str5) {
return null;
} else {
const _RegExp = RegExp;
const _HermesInternal = HermesInternal;
2026-10-03 08:58:59 +00:00
const self = this;
const self2 = this;
const regExp = new RegExp(".{1," + tmp12 + "}", "g");
2026-07-20 16:05:17 +00:00
const match = str5.match(regExp);
let arr = null;
if (null != match) {
const _Array = Array;
arr = Array.from(match);
}
return arr;
}
}
}
return null;
}, items);
if (null != fingerprintBase64) {
if ("" !== fingerprintBase64) {
if (null == memo) {
const _Error = Error;
2026-10-03 08:58:59 +00:00
let self = this;
let self2 = this;
const error = new Error("[useReadableSecureFramesCode] Failed to parse base 64 code.");
2026-07-20 16:05:17 +00:00
throw error;
}
}
}
return memo;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/rtc/hooks/useReadableSecureFramesFingerprint.tsx");
export const useReadableSecureFramesFingerprint = tmp2;