{
  "version": 3,
  "sources": ["encode.web.js"],
  "sourcesContent": ["// Copyright 2026 will Farrell, and datastream contributors.\n// SPDX-License-Identifier: MIT\n/* global TextEncoderStream */\n\n// NOTE: web vs node parity caveat. The browser TextEncoder genuinely only\n// supports UTF-8, so the web encoder is UTF-8-only and throws for any other\n// charset. This is intentionally asymmetric with charsetDecodeStream (web),\n// which accepts every label TextDecoder supports (UTF-16, ISO-8859-1, ...), and\n// with the node encoder, which supports the full iconv set. A detect->encode\n// pipeline that selects a non-UTF-8 charset works under node but throws under\n// web; callers targeting the browser must encode to UTF-8.\nexport const charsetEncodeStream = ({ charset } = {}, _streamOptions = {}) => {\n\t// Default/null charset means UTF-8, matching the node implementation. Only a\n\t// non-UTF-8 charset is rejected; calling with no charset must not throw.\n\tif (\n\t\tcharset !== null &&\n\t\tcharset !== undefined &&\n\t\tString(charset).toUpperCase() !== \"UTF-8\"\n\t) {\n\t\tthrow new Error(\n\t\t\t`charsetEncodeStream: Web only supports UTF-8 encoding, got \"${charset}\"`,\n\t\t);\n\t}\n\treturn new TextEncoderStream();\n};\n\nexport default charsetEncodeStream;\n"],
  "mappings": "AAWO,MAAM,sBAAsB,CAAC,EAAE,QAAQ,IAAI,CAAC,GAAG,iBAAiB,CAAC,MAAM;AAG7E,MACC,YAAY,QACZ,YAAY,UACZ,OAAO,OAAO,EAAE,YAAY,MAAM,SACjC;AACD,UAAM,IAAI;AAAA,MACT,+DAA+D,OAAO;AAAA,IACvE;AAAA,EACD;AACA,SAAO,IAAI,kBAAkB;AAC9B;AAEA,IAAO,qBAAQ;",
  "names": []
}
