{"version":3,"file":"getBinaryStreamResponse-web.mjs","sourceRoot":"","sources":["../../src/getBinaryStreamResponse-web.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,gBAAkC;IAM9E,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,eAAe,EAAE,CAAC;IAC1D,OAAO;QACL,GAAG,QAAQ;QACX,QAAQ,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC5C,kBAAkB,EAAE,SAAS;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { NodeReadableStream } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse, StreamableMethod } from \"./common.js\";\n\n/**\n * Resolves a StreamableMethod into a binary stream response using browser streaming.\n * Returns both the raw HttpResponse (for status/header inspection) and a blobBody Promise.\n * Error handling is left to the caller so that generated deserializers can apply\n * operation-specific error deserialization (per-status-code details, exception headers, etc.).\n *\n * @public\n */\nexport async function getBinaryStreamResponse(streamableMethod: StreamableMethod): Promise<\n  HttpResponse & {\n    blobBody?: Promise<Blob>;\n    readableStreamBody?: NodeReadableStream;\n  }\n> {\n  const response = await streamableMethod.asBrowserStream();\n  return {\n    ...response,\n    blobBody: new Response(response.body).blob(),\n    readableStreamBody: undefined,\n  };\n}\n"]}