UNPKG

@codex-storage/marketplace-ui-components

Version:
26 lines (25 loc) 636 B
import { Codex as l } from "@codex-storage/sdk-js"; import { B as c } from "../../browser-DTlYvKdE.js"; const f = new l(void 0); let e; self.addEventListener("message", function(o) { const { type: r, ...n } = o.data; if (r === "abort") { console.debug("Aborting request"), e == null || e(); return; } const a = (t, p) => { self.postMessage({ type: "progress", loaded: t, total: p }); }, d = new c(n.file, a), s = f.data.upload(d); return e = s.abort, s.result.then((t) => { self.postMessage({ type: "completed", value: t }); }); }); //# sourceMappingURL=worker.js.map