filesafe/dist/js/auth.js.map

1 line
6.9 KiB
Plaintext
Raw Normal View History

{"version":3,"sources":["auth.js"],"names":["const","lsKeys","token","page","localStorage","user","pass","cloudflareErrors","loaderSection","document","querySelector","classList","add","loginSection","remove","floatingBtn","error","console","content","createElement","innerHTML","toString","swal","title","icon","response","onError","statusText","status","description","data","dest","trigger","value","trim","axios","post","username","password","then","success","window","location","catch","onAxiosError","unhide","code","removeItem","addEventListener","form","event","preventDefault","loginBtn","checkValidity","do","currentTarget","registerBtn","click","verify"],"mappings":"AAEAA,IAAMC,OAAS,CACbC,MAAO,SAGHC,KAAO,CAEXD,MAAOE,aAAaH,OAAOC,OAG3BG,KAAM,KACNC,KAAM,KAGNC,iBAAkB,CAChB,IAAK,gBACL,IAAK,qBACL,IAAK,uBACL,IAAK,wBACL,IAAK,qBACL,IAAK,uBACL,IAAK,0BACL,IAAK,gBACL,IAAK,oBAITJ,OAAW,WACTH,IAAMQ,EAAgBC,SAASC,cAAc,WACzCF,GAAeA,EAAcG,UAAUC,IAAI,aAE/CZ,IAAMa,EAAeJ,SAASC,cAAc,oBACxCG,GAAcA,EAAaF,UAAUG,OAAO,aAEhDd,IAAMe,EAAcN,SAASC,cAAc,mCACvCK,GAAaA,EAAYJ,UAAUG,OAAO,YAChD,EAGAX,QAAY,SAAGa,GACbC,QAAQD,MAAMA,GAEdhB,IAAMkB,EAAUT,SAASU,cAAc,OAKvC,OAJAD,EAAQE,UAAY,kBACPJ,EAAMK,WAAU,8EAGtBC,KAAK,CACVC,MAAO,qBACPC,KAAM,QAFNN,QAGAA,GADJ,EAMAf,aAAiB,SAAGa,GAClB,IAAKA,EAAMS,SACT,OAAOtB,KAAKuB,QAAQV,GAGtBhB,IAAM2B,EAAaxB,KAAKI,iBAAiBS,EAAMS,SAASG,SAAWZ,EAAMS,SAASE,WAC5EE,EAAcb,EAAMS,SAASK,MAAQd,EAAMS,SAASK,KAAKD,YAC3Db,EAAMS,SAASK,KAAKD,YACpB,uFAEJ,OAA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,GAC9BA,EAAMC,gBAFR,IAKAnD,IAAMoD,EAAW3C,SAASC,cAAc,aACpC0C,GACFA,EAASJ,iBAAiB,SAAO,SAAEE,GAC5BD,EAAKI,iBACVlD,KAAKmD,GAAG,QAASJ,EAAMK,cAFzB,IAMFvD,IAAMwD,EAAc/C,SAASC,cAAc,gBACvC8C,GACFA,EAAYR,iBAAiB,SAAO,SAAEE,GACpC,IAAKD,EAAKI,gBAER,OAAOD,EAASK,QAElBtD,KAAKmD,GAAG,WAAYJ,EAAMK,cAF5B,IAMEpD,KAAKD,MAAOC,KAAKuD,SAChBvD,KAAK0C,QAFZ","file":"auth.js","sourcesContent":["/* global swal, axios */\n\nconst lsKeys = {\n token: 'token'\n}\n\nconst page = {\n // user token\n token: localStorage[lsKeys.token],\n\n // HTML elements\n user: null,\n pass: null,\n\n // Better Cloudflare errors\n cloudflareErrors: {\n 520: 'Unknown Error',\n 521: 'Web Server Is Down',\n 522: 'Connection Timed Out',\n 523: 'Origin Is Unreachable',\n 524: 'A Timeout Occurred',\n 525: 'SSL Handshake Failed',\n 526: 'Invalid SSL Certificate',\n 527: 'Railgun Error',\n 530: 'Origin DNS Error'\n }\n}\n\npage.unhide = () => {\n const loaderSection = document.querySelector('#loader')\n if (loaderSection) loaderSection.classList.add('is-hidden')\n\n const loginSection = document.querySelector('#login.is-hidden')\n if (loginSection) loginSection.classList.remove('is-hidden')\n\n const floatingBtn = document.querySelector('.floating-home-button.is-hidden')\n if (floatingBtn) floatingBtn.classList.remove('is-hidden')\n}\n\n// Handler for regular JS errors\npage.onError = error => {\n console.error(error)\n\n const content = document.createElement('div')\n content.innerHTML = `\n <p><code>${error.toString()}</code></p>\n <p>Please check your console for mo