{
  "version": 3,
  "sources": ["../../src/utils/did.utils.ts", "../../src/utils/env.utils.ts"],
  "sourcesContent": ["import {jsonReplacer, jsonReviver} from '@dfinity/utils';\n\n/**\n * Converts data to a Uint8Array for transmission or storage.\n * @template T\n * @param {T} data - The data to convert.\n * @returns {Promise<Uint8Array>} A promise that resolves to a Uint8Array representation of the data.\n */\nexport const toArray = async <T>(data: T): Promise<Uint8Array> => {\n  const blob = new Blob([JSON.stringify(data, jsonReplacer)], {\n    type: 'application/json; charset=utf-8'\n  });\n  return new Uint8Array(await blob.arrayBuffer());\n};\n\n/**\n * Converts a Uint8Array or number array back to the original data type.\n * @template T\n * @param {(Uint8Array | number[])} data - The array to convert.\n * @returns {Promise<T>} A promise that resolves to the original data.\n */\nexport const fromArray = async <T>(data: Uint8Array | number[]): Promise<T> => {\n  const blob = new Blob(\n    [data instanceof Uint8Array ? (data as Uint8Array<ArrayBuffer>) : new Uint8Array(data)],\n    {\n      type: 'application/json; charset=utf-8'\n    }\n  );\n  return JSON.parse(await blob.text(), jsonReviver);\n};\n", "/**\n * Checks if the current environment is a browser.\n * @returns {boolean} True if the current environment is a browser, false otherwise.\n */\nexport const isBrowser = (): boolean => typeof window !== `undefined`;\n"],
  "mappings": ";;AAAA,OAAQ,gBAAAA,EAAc,eAAAC,MAAkB,iBAQjC,IAAMC,EAAU,MAAUC,GAAiC,CAChE,IAAMC,EAAO,IAAI,KAAK,CAAC,KAAK,UAAUD,EAAMH,CAAY,CAAC,EAAG,CAC1D,KAAM,iCACR,CAAC,EACD,OAAO,IAAI,WAAW,MAAMI,EAAK,YAAY,CAAC,CAChD,EAQaC,EAAY,MAAUF,GAA4C,CAC7E,IAAMC,EAAO,IAAI,KACf,CAACD,aAAgB,WAAcA,EAAmC,IAAI,WAAWA,CAAI,CAAC,EACtF,CACE,KAAM,iCACR,CACF,EACA,OAAO,KAAK,MAAM,MAAMC,EAAK,KAAK,EAAGH,CAAW,CAClD,ECzBO,IAAMK,EAAY,IAAe,OAAO,OAAW",
  "names": ["jsonReplacer", "jsonReviver", "toArray", "data", "blob", "fromArray", "isBrowser"]
}
