import { Buffer } from 'buffer';

const globalWithBuffer = globalThis;
const RuntimeBuffer = globalWithBuffer.Buffer ?? Buffer;
globalWithBuffer.Buffer = RuntimeBuffer;
const originalSubarray = RuntimeBuffer.prototype.subarray;
RuntimeBuffer.prototype.subarray = function patchedSubarray(start, end) {
  const view = originalSubarray.call(this, start, end);
  return RuntimeBuffer.from(view.buffer, view.byteOffset, view.byteLength);
};
//# sourceMappingURL=index.rn-preamble.js.map
