Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
// Module ID: 16682
|
|
// Function ID: 16683
|
|
// Name: vibegrationsPreviewClaims
|
|
// Dependencies: [32, 2]
|
|
// Exports: awaitVibegrationsPreviewClaim, clearVibegrationsPreviewClaims, resolveVibegrationsPreviewClaim
|
|
|
|
// Module 16682 (vibegrationsPreviewClaims)
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
|
|
const map = new Map();
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/vibegrations/lib/vibegrationsPreviewClaims.tsx");
|
|
|
|
export const awaitVibegrationsPreviewClaim = function awaitVibegrationsPreviewClaim(projectId, id) {
|
|
value = id.get(id);
|
|
if (null != value) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(value.timer);
|
|
value.resolve(null);
|
|
}
|
|
return new Promise((resolve) => {
|
|
projectId = resolve;
|
|
const result = id.set(id, {
|
|
resolve,
|
|
timer: setTimeout(() => {
|
|
map.delete(closure_1);
|
|
closure_0(null);
|
|
}, 5000),
|
|
projectId
|
|
});
|
|
});
|
|
};
|
|
export const resolveVibegrationsPreviewClaim = function resolveVibegrationsPreviewClaim(id, upload_token) {
|
|
value = map.get(id);
|
|
if (null != value) {
|
|
map.delete(id);
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(value.timer);
|
|
const obj2 = { uploadToken: upload_token };
|
|
value.resolve(obj2);
|
|
}
|
|
};
|
|
export const clearVibegrationsPreviewClaims = function clearVibegrationsPreviewClaims(projectId) {
|
|
const items = [...map];
|
|
while (tmp !== undefined) {
|
|
let tmp4 = _slicedToArray(tmp2, 2);
|
|
[tmp5, tmp6] = tmp4;
|
|
let obj = tmp6;
|
|
if (tmp6.projectId === projectId) {
|
|
let deleteResult = map.delete(tmp5);
|
|
let _clearTimeout = clearTimeout;
|
|
let clearTimeoutResult = clearTimeout(obj.timer);
|
|
let resolveResult = obj.resolve(null);
|
|
}
|
|
continue;
|
|
}
|
|
};
|