mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 17:35:16 +00:00
1 line
7.6 KiB
JSON
1 line
7.6 KiB
JSON
|
{"ast":null,"code":"function e(e) {\n this.message = e;\n}\n\ne.prototype = new Error(), e.prototype.name = \"InvalidCharacterError\";\n\nvar r = \"undefined\" != typeof window && window.atob && window.atob.bind(window) || function (r) {\n var t = String(r).replace(/=+$/, \"\");\n if (t.length % 4 == 1) throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n\n for (var n, o, a = 0, i = 0, c = \"\"; o = t.charAt(i++); ~o && (n = a % 4 ? 64 * n + o : o, a++ % 4) ? c += String.fromCharCode(255 & n >> (-2 * a & 6)) : 0) o = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);\n\n return c;\n};\n\nfunction t(e) {\n var t = e.replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n switch (t.length % 4) {\n case 0:\n break;\n\n case 2:\n t += \"==\";\n break;\n\n case 3:\n t += \"=\";\n break;\n\n default:\n throw \"Illegal base64url string!\";\n }\n\n try {\n return function (e) {\n return decodeURIComponent(r(e).replace(/(.)/g, function (e, r) {\n var t = r.charCodeAt(0).toString(16).toUpperCase();\n return t.length < 2 && (t = \"0\" + t), \"%\" + t;\n }));\n }(t);\n } catch (e) {\n return r(t);\n }\n}\n\nfunction n(e) {\n this.message = e;\n}\n\nfunction o(e, r) {\n if (\"string\" != typeof e) throw new n(\"Invalid token specified\");\n var o = !0 === (r = r || {}).header ? 0 : 1;\n\n try {\n return JSON.parse(t(e.split(\".\")[o]));\n } catch (e) {\n throw new n(\"Invalid token specified: \" + e.message);\n }\n}\n\nn.prototype = new Error(), n.prototype.name = \"InvalidTokenError\";\nexport default o;\nexport { n as InvalidTokenError };","map":{"version":3,"sources":["../lib/atob.js","../lib/base64_url_decode.js","../lib/index.js"],"names":["InvalidCharacterError","message","this","prototype","Error","name","input","str","String","replace","length","bc","bs","buffer","idx","output","charAt","fromCharCode","indexOf","window","atob","bind","decodeURIComponent","m","p","code","charCodeAt","toString","toUpperCase","b64DecodeUnicode","err","InvalidTokenError","token","options","pos","header","JSON","parse","base64_url_decode","split","e"],"mappings":"AAOA,SAASA,CAAT,CAA+BC,CAA/B,EAA+BA;AAC3BC,OAAKD,OAALC,GAAeD,CAAfC;AAGJF;;AAAAA,CAAAA,CAAsBG,SAAtBH,GAAkC,IAAII,KAAJ,EAAlCJ,EACAA,CAAAA,CAAsBG,SAAtBH,CAAgCK,IAAhCL,GAAuC,uBADvCA;;AA8BA,IAAA,CAAA,GAAkC,eAAA,OAAXmB,MAAW,IAC9BA,MAAAA,CAAOC,IADuB,IAE9BD,MAAAA,CAAOC,IAAPD,CAAYE,IAAZF,CAAiBA,MAAjBA,CAF8B,IA3BlC,UAAkBb,CAAlB,EAAkBA;AACd,MAAIC,CAAAA,GAAMC,MAAAA,CAAOF,CAAPE,CAAAA,CAAcC,OAAdD,CAAsB,KAAtBA,EAA6B,EAA7BA,CAAV;AACA,MAAID,CAAAA,CAAIG,MAAJH,GAAa,CAAbA,IAAkB,CAAtB,EACI,MAAM,IAAIP,CAAJ,CACF,mEADE,CAAN;;AAIJ,OAEI,IAAYY,CAAZ,EAAgBC,CAAhB,EAAIF,CAAAA,GAAK,CAAT,EAAwBG,CAAAA,GAAM,CAA9B,EAAiCC,CAAAA,GAAS,EAF9C,EAIKF,CAAAA,GAASN,CAAAA,CAAIS,MAAJT,CAAWO,CAAAA,EAAXP,CAJd,EAIyBO,CAEpBD,CAFoBC,KAGnBF,CAAAA,GAAKD,CAAAA,GAAK,CAALA,GAAc,KAALC,CAAK,GAAKC,CAAnBF,GAA4BE,CAAjCD,EAGED,CAAAA,KAAO,CANUG,IAOpBC,CAAAA,IAAUP,MAAAA,CAAOS,YAAPT,CAAoB,MAAOI,CAAAA,KAAAA,CAAS,CAATA,GAAaD,CAAbC,GAAmB,CAAnBA,CAA3BJ,CAPUM,GAQrB,CAZJ,EA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