GT2/GT2-Android/node_modules/xdl/build/__sourcemaps__/Session.js.map

1 line
1.3 KiB
Plaintext

{"version":3,"sources":["Session.js"],"names":["async","clientId","await","UserSettings","getAsync","_newIdentifier","setClientIdAsync","clientIdAsync","token","setAsync","type","slugid","v4"],"mappings":";;;;;;;;+BAYOA,aAA+B;AACpC,QAAIC,WAAWC,MAAMC,gDAAaC,QAAbD,CAAsB,aAAtBA,EAAqC,IAArCA,CAArB;AACA,QAAIF,aAAa,IAAjB,EAAuB;AACrBA,iBAAWI,gBAAXJ;AACAC,YAAMI,iBAAiBL,QAAjBK,CAANJ;AACF;AACA,WAAOD,QAAP;AACF,G;;kBAPsBM,a;;;;;;gCASfP,WAAgCQ,KAAhCR,EAA+C;AACpDE,UAAMC,gDAAaM,QAAbN,CAAsB,aAAtBA,EAAqCK,KAArCL,CAAND;AACA,WAAOM,KAAP;AACF,G;;kBAHsBF,gB;;;;;;;AAjBtB;AAAA;AAAA;;;;AAEA;AAAA;AAAA;;;;;;AAEA,SAASD,cAAT,CAAwBK,OAAO,GAA/B,EAAoC;AAClC,SAAOA,OAAO,GAAPA,GAAaC,oCAAOC,EAAPD,EAApB;AACF","file":"../Session.js","sourcesContent":["/**\n * @flow\n */\n\nimport slugid from 'slugid';\n\nimport UserSettings from './UserSettings';\n\nfunction _newIdentifier(type = 'c') {\n return type + '-' + slugid.v4();\n}\n\nexport async function clientIdAsync() {\n var clientId = await UserSettings.getAsync('accessToken', null);\n if (clientId === null) {\n clientId = _newIdentifier();\n await setClientIdAsync(clientId);\n }\n return clientId;\n}\n\nexport async function setClientIdAsync(token: string) {\n await UserSettings.setAsync('accessToken', token);\n return token;\n}\n"],"sourceRoot":"/xdl/src"}