{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/utils/headers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxE;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAOhH","sourcesContent":["import type { ProviderHeaders } from \"../types.ts\";\n\nexport function headersToRecord(headers: Headers): Record<string, string> {\n\tconst result: Record<string, string> = {};\n\tfor (const [key, value] of headers.entries()) {\n\t\tresult[key] = value;\n\t}\n\treturn result;\n}\n\nexport function providerHeadersToRecord(headers: ProviderHeaders | undefined): Record<string, string> | undefined {\n\tif (!headers) return undefined;\n\tconst result: Record<string, string> = {};\n\tfor (const [key, value] of Object.entries(headers)) {\n\t\tif (value !== null) result[key] = value;\n\t}\n\treturn Object.keys(result).length > 0 ? result : undefined;\n}\n"]}