decord/source/utils/ClipboardUtils.native.tsx

100 lines
2.6 KiB
TypeScript
Raw Normal View History

// Module ID: 7190
// Function ID: 7191
2026-07-20 16:05:17 +00:00
// Name: _copy
// Dependencies: [5, 7191, 2]
2026-07-20 16:05:17 +00:00
// Exports: copy, getString
// Module 7190 (_copy)
import useClipboardDefault from "useClipboard" /* 7191 */;
2026-08-24 06:08:38 +00:00
import closure_2 from "asyncGeneratorStep" /* 5 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
function _copy() {
const self = this;
const tmp = callback((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
c3 = 0;
c2 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0, arg1) {
if (c2 === 2) {
c2 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c2 = 2;
if (0 === c3) {
if (arg0 === 1) {
c2 = 3;
throw arg1;
} else if (arg0 === 2) {
c2 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
obj1 = callback(table[1]);
2026-07-29 08:29:29 +00:00
obj1.setString(callback);
if (table != null) {
table();
}
c3 = 1;
c2 = 1;
obj1 = { value: null, done: false };
obj1[0] = Promise.resolve();
return obj1;
}
} else if (arg0 === 1) {
c2 = 3;
throw arg1;
} else if (arg0 === 2) {
c2 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
c2 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp13) {
c2 = tmp;
throw tmp13;
}
}
})();
});
2026-08-24 06:08:38 +00:00
closure_3 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("utils/ClipboardUtils.native.tsx");
2026-07-20 16:05:17 +00:00
export const SUPPORTS_COPY = true;
export const copy = function copy() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _copy.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
export const getString = function getString() {
2026-08-24 06:08:38 +00:00
return useClipboardDefault.getString();
2026-07-20 16:05:17 +00:00
};