{"version":3,"file":"isomorphicAtob-CoF80qYz.mjs","names":[],"sources":["../../src/isomorphicAtob.ts"],"sourcesContent":["/**\n * A function that decodes a string of data which has been encoded using base-64 encoding.\n * Uses `atob` if available, otherwise uses `Buffer` from `globalThis`. If neither are available, returns the data as-is.\n */\nexport const isomorphicAtob = (data: string) => {\n  if (typeof atob !== 'undefined' && typeof atob === 'function') {\n    return atob(data);\n  } else if (typeof globalThis.Buffer !== 'undefined') {\n    return globalThis.Buffer.from(data, 'base64').toString();\n  }\n  return data;\n};\n"],"mappings":";;;;;AAIA,MAAa,kBAAkB,SAAiB;AAC9C,KAAI,OAAO,SAAS,eAAe,OAAO,SAAS,WACjD,QAAO,KAAK,KAAK;UACR,OAAO,WAAW,WAAW,YACtC,QAAO,WAAW,OAAO,KAAK,MAAM,SAAS,CAAC,UAAU;AAE1D,QAAO"}