export function denoCdn() {
    return globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).resolve('../assets');
}
export const assetLoad = async (name) => {
    const cdnUrl = denoCdn();
    const wasmUrl = cdnUrl + '/' + name;
    try {
        const response = await fetch(wasmUrl);
        if (response.status >= 400) {
            throw new Error(`Error fetching ${response.status}`);
        }
        return new Uint8Array(await response.arrayBuffer());
    }
    catch (err) {
        throw new Error(err.message + ' ' + wasmUrl);
    }
};
//# sourceMappingURL=deno.js.map