TimeWidget = {
try {
console.log("Trying to load timesearcher local")
return await require(`http://localhost:8080/dist/TimeWidget.js?${Date.now()}`);
} catch (e) {
try {
console.log("Failed. Trying to load timesearcher from a File Attachment");
return await require(await FileAttachment("TimeWidget@2.js").url());
} catch (e2) {
console.log("Failed. Trying to load timesearcher from NPM");
return await require("time-widget");
}
}
}