function importPatched({wasmVersion, arrowVersion}) {
return fetch("https://esm.sh/gh/observablehq/stdlib@v5.8.8/es2022/src/duckdb.bundle.mjs")
.then(response => response.text())
.then(source => source
.replace(/("@duckdb\/duckdb-wasm",)"1.24.0"/, `$1"${wasmVersion}"`)
.replace(/("apache-arrow",)"11.0.0"/, `$1"${arrowVersion}"`)
)
.then(source => import(URL.createObjectURL(new Blob([source], {type: "text/javascript"}))))
.then(module => Object.defineProperty(module.DuckDBClient, "name", {value: "DuckDBClient"}))
.then(C => {
const of = C.of;
C.of = async(...args) => {
const client = await of(...args);
patchSend(client._db);
return client;
};
return C;
})
}