GIF = {
const [gif, workerScript] = await Promise.all([
require("gif.js@0.2"),
require
.resolve("gif.js@0.2/dist/gif.worker.js")
.then(fetch)
.then((response) => response.blob())
.then((blob) => URL.createObjectURL(blob, { type: "text/javascript" }))
]);
return class extends gif {
constructor(options) {
super({ workerScript, ...options });
}
};
}