1 line
1.5 KiB
Plaintext
1 line
1.5 KiB
Plaintext
{"version":3,"file":"b64-lite.js","sources":["../browser.js"],"sourcesContent":["export function atob(b64) {\n return window.atob(b64) \n}\nexport function btoa(bin) {\n return window.btoa(bin) \n}\nexport function toBase64(input) {\n if (typeof input === 'string')\n return window.btoa(unescape(encodeURIComponent(input)))\n else {\n var buffer = new Uint8Array(input);\n var binary = '';\n for (var b = 0; b < buffer.byteLength; b++) {\n binary += String.fromCharCode(buffer[b]);\n }\n return window.btoa(binary);\n }\n}\nexport function fromBase64(b64) {\n return decodeURIComponent(escape(window.atob(b64)))\n}\nexport function toBuffer(b64) {\n var utf8 = window.atob(b64);\n var result = new Uint8Array(utf8.length);\n for (var i = 0; i < utf8.length; i++) {\n result[i] = utf8.charCodeAt(i);\n }\n return result;\n}\n"],"names":["b64","window","atob","bin","btoa","input","unescape","encodeURIComponent","buffer","Uint8Array","binary","b","byteLength","String","fromCharCode","decodeURIComponent","escape","utf8","result","length","i","charCodeAt"],"mappings":"aAAO,SAAcA,UACZC,OAAOC,KAAKF,iBAEd,SAAcG,UACZF,OAAOG,KAAKD,qBAEd,SAAkBE,MACF,iBAAVA,EACT,OAAOJ,OAAOG,KAAKE,SAASC,mBAAmBF,aAE3CG,EAAS,IAAIC,WAAWJ,GACxBK,EAAS,GACJC,EAAI,EAAGA,EAAIH,EAAOI,WAAYD,IACnCD,GAAUG,OAAOC,aAAaN,EAAOG,WAElCV,OAAOG,KAAKM,uBAGhB,SAAoBV,UAClBe,mBAAmBC,OAAOf,OAAOC,KAAKF,uBAExC,SAAkBA,WACnBiB,EAAOhB,OAAOC,KAAKF,GACnBkB,EAAS,IAAIT,WAAWQ,EAAKE,QACxBC,EAAI,EAAGA,EAAIH,EAAKE,OAAQC,IAC7BF,EAAOE,GAAKH,EAAKI,WAAWD,UAEzBF"} |