2026-10-09 10:00:15 +00:00
|
|
|
// Module ID: 1247
|
|
|
|
|
// Function ID: 1248
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: ProtoUtils
|
2026-10-08 09:57:35 +00:00
|
|
|
// Dependencies: [1210, 2]
|
2026-09-05 10:56:28 +00:00
|
|
|
// Exports: b64ToProto, protoToB64
|
|
|
|
|
|
2026-10-09 10:00:15 +00:00
|
|
|
// Module 1247 (ProtoUtils)
|
2026-10-08 09:57:35 +00:00
|
|
|
import _mod1210 from "module_1210" /* 1210 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-05 10:56:28 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const BINARY_READ_OPTIONS = {
|
2026-10-03 08:58:59 +00:00
|
|
|
readerFactory(buf) {
|
2026-10-08 09:57:35 +00:00
|
|
|
const BinaryReader = _mod1210.BinaryReader;
|
2026-09-05 10:56:28 +00:00
|
|
|
const textDecoder = new TextDecoder("utf-8");
|
2026-10-03 08:58:59 +00:00
|
|
|
const binaryReader = new BinaryReader(buf, textDecoder);
|
2026-09-05 10:56:28 +00:00
|
|
|
return binaryReader;
|
|
|
|
|
}
|
|
|
|
|
};
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("utils/ProtoUtils.tsx");
|
2026-09-05 10:56:28 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
export { BINARY_READ_OPTIONS };
|
2026-09-05 10:56:28 +00:00
|
|
|
export const b64ToProto = function b64ToProto(fromBinary, actionData) {
|
|
|
|
|
let fromBinaryResult = null;
|
|
|
|
|
if (null != actionData) {
|
2026-10-03 08:58:59 +00:00
|
|
|
fromBinary = fromBinary.fromBinary;
|
2026-10-08 09:57:35 +00:00
|
|
|
const obj = _mod1210;
|
2026-10-03 08:58:59 +00:00
|
|
|
fromBinaryResult = fromBinary(obj.base64decode(actionData), obj);
|
2026-09-05 10:56:28 +00:00
|
|
|
}
|
|
|
|
|
return fromBinaryResult;
|
|
|
|
|
};
|
|
|
|
|
export const protoToB64 = function protoToB64(toBinary, favoriteGifs) {
|
2026-10-08 09:57:35 +00:00
|
|
|
const obj = _mod1210;
|
2026-10-03 08:58:59 +00:00
|
|
|
return obj.base64encode(toBinary.toBinary(favoriteGifs));
|
2026-09-05 10:56:28 +00:00
|
|
|
};
|