"+e.toString()+"
",swal({title:"An error occurred!",icon:"error",content:a})},onAxiosError:function(e,a){a||console.error(e);var t={520:"Unknown Error",521:"Web Server Is Down",522:"Connection Timed Out",523:"Origin Is Unreachable",524:"A Timeout Occurred",525:"SSL Handshake Failed",526:"Invalid SSL Certificate",527:"Railgun Error",530:"Origin DNS Error"}[e.response.status]||e.response.statusText;if(a)return e.response.data&&e.response.data.description?e.response:{data:{success:!1,description:e.response?e.response.status+" "+t:e.toString()}};var n=e.response.data&&e.response.data.description?e.response.data.description:"There was an error with the request, please check the console for more information.";return swal(e.response.status+" "+t,n,"error")},checkClientVersion:function(e){var a=document.querySelector("#mainScript").src.match(/\?_=(\d+)$/);if(a&&a[1]&&a[1]!==e)return swal({title:"Update detected!",text:"Client assets have been updated. Reload to display the latest version?",icon:"info",buttons:{confirm:{text:"Reload",closeModal:!1}}}).then((function(){window.location.reload()}))},checkIfPublic:function(){return axios.get("api/check",{onDownloadProgress:function(){"undefined"==typeof render||render.done||render.do(),"undefined"==typeof newsfeed||newsfeed.done||newsfeed.do(),page.apiChecked||(page.apiChecked=!0)}}).then((function(e){return e.data.version&&page.checkClientVersion(e.data.version),page.private=e.data.private,page.enableUserAccounts=e.data.enableUserAccounts,page.maxSize=parseInt(e.data.maxSize),page.maxSizeBytes=1e6*page.maxSize,page.chunkSizeConfig={max:e.data.chunkSize&&parseInt(e.data.chunkSize.max)||95,default:e.data.chunkSize&&parseInt(e.data.chunkSize.default)},page.temporaryUploadAges=e.data.temporaryUploadAges,page.fileIdentifierLength=e.data.fileIdentifierLength,page.stripTagsConfig=e.data.stripTags,page.preparePage()})).catch(page.onInitError)},preparePage:function(){if(!page.private)return page.prepareUpload();if(page.token)return page.verifyToken(page.token,!0);var e=document.querySelector("#loginToUpload");e.href="auth",e.classList.remove("is-loading"),page.enableUserAccounts?e.innerText="Anonymous upload is disabled.\nLog in or register to upload.":e.innerText="Running in private mode.\nLog in to upload."},verifyToken:function(e,a){return axios.post("api/tokens/verify",{token:e}).then((function(t){return!1===t.data.success?swal({title:"An error occurred!",text:t.data.description,icon:"error"}).then((function(){a&&(localStorage.removeItem("token"),window.location.reload())})):(localStorage[lsKeys.token]=e,page.token=e,page.prepareUpload())})).catch(page.onInitError)},prepareUpload:function(){if(page.token){var e=document.querySelector('#linksColumn a[href="auth"]');e&&e.setAttribute("href","dashboard"),document.querySelector("#albumDiv").classList.remove("is-hidden"),page.albumSelect=document.querySelector("#albumSelect"),page.albumSelectOnChange=function(){page.album=parseInt(page.albumSelect.value),"function"==typeof page.prepareShareX&&page.prepareShareX()},page.albumSelect.addEventListener("change",page.albumSelectOnChange),page.fetchAlbums()}else page.enableUserAccounts&&(document.querySelector("#loginLinkText").innerHTML="Create an account and keep track of your uploads");page.prepareUploadConfig(),document.querySelector("#maxSize > span").innerHTML=page.getPrettyBytes(page.maxSizeBytes),document.querySelector("#loginToUpload").classList.add("is-hidden"),page.prepareDropzone(),"function"==typeof page.prepareShareX&&page.prepareShareX();var a=document.querySelector("#urlMaxSize");a&&(page.urlMaxSize=parseInt(a.innerHTML),page.urlMaxSizeBytes=1e6*page.urlMaxSize,a.innerHTML=page.getPrettyBytes(page.urlMaxSizeBytes),document.querySelector("#uploadUrls").addEventListener("click",(function(e){page.addUrlsToQueue()})));for(var t=document.querySelector("#tabs"),n=t.querySelectorAll("li"),r=function(e){var a=n[e].dataset.id,t=document.querySelector("#"+a);t&&(n[e].addEventListener("click",(function(){page.setActiveTab(e)})),page.tabs.push({tab:n[e],content:t}))},i=0;iMax length is '+page.albumTitleMaxLength+' characters.
\nMax length is '+page.albumDescMaxLength+' characters.
\n'+L+"
":"")+"\n ",m.querySelector("div.control").appendChild(b),u.appendChild(m)}}var T=document.createElement("div");T.className="field",T.innerHTML='\n\n \n
\n\n This configuration will only be used in this browser.
\n After reloading the page, some of them will also be applied to the ShareX config that you can download by clicking on the ShareX icon below.\n