import { html, LitElement } from "./lib/lit.min.js"; export class GetBlobForm extends LitElement { static properties = { hasBlob: { state: true }, }; createRenderRoot() { return this; } async submit(e) { e.preventDefault(); const formData = new FormData(e.target); const sha256 = formData.get("sha256"); this.hasBlob = await fetch("/" + sha256, { method: "HEAD" }).then((res) => res.ok); if (this.hasBlob) { window.open("/" + sha256, "_blank"); } } renderResults() { return html`