{"version":3,"sources":["script.js"],"names":["window","addEventListener","openMenu","document","querySelector","closeMenu","menu","body","error","headerTop","main","openMenuFunc","classList","add","closeMenuFunc","removeAttribute","e","ul","querySelectorAll","form","childArr","arr","forEach","item","contains","target","setNavBg","scrollY","offsetTop","style","backgroundColor","btnUp","remove","scrollTo","top","behavior","isEmpty","node","Array","from","i","length","element","value","trim","borderColor","btn","options","label","selectedLabel","innerHTML","parentNode","textContent","display","_loop","x","setAttribute","err","choose","_loop2","parentElement","applyForm","applyInputs","regExp","modal","title","message","btnName","insertAdjacentHTML","concat","closeRm","rmModal","location","preventDefault","test","formData","FormData","fetch","method","then","response","json","data","db","JSON","parse","reset","donateForm","donateInput","donatePrice","stopPropagation","tab","btnSel","bodySel","tabBtnClass","tabBodyClass","tabBtn","tabBody","_loop3","closePy","pyModal"],"mappings":"AAAA,aAEAA,OAAAC,iBAAA,QAAA,WACA,IAAAC,EAAAC,SAAAC,cAAA,aACAC,EAAAF,SAAAC,cAAA,cACAE,EAAAH,SAAAC,cAAA,OACAG,EAAAJ,SAAAC,cAAA,QACAI,GAAA,EAEAC,EAAAN,SAAAC,cAAA,eACAM,EAAAP,SAAAC,cAAA,QAEAO,EAAA,WACAL,EAAAM,UAAAC,IAAA,cACAN,EAAAK,UAAAC,IAAA,SAGAC,EAAA,WACAR,EAAAS,gBAAA,SACAR,EAAAQ,gBAAA,UAGAb,EAAAD,iBAAA,QAAAU,GAEAN,EAAAJ,iBAAA,SAAA,WACAa,OAGAd,OAAAC,iBAAA,WAAA,SAAAe,GACA,IAAAC,EAAAX,EAAAY,iBAAA,MACAC,EAAAb,EAAAY,iBAAA,QAEA,SAAAE,EAAAC,GACAA,EAAAC,SAAA,SAAAC,GACAA,EAAAtB,iBAAA,QAAAU,MAIAL,EAAAM,UAAAY,SAAA,eAAAjB,EAAAK,UAAAY,SAAA,UACAJ,EAAAH,GACAG,EAAAD,GAEAH,EAAAS,SAAAnB,GACAQ,QAKA,IAAAY,EAAA,WACA1B,O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,SAAA,WACAmG,EAAAvE,MAAAwB,QAAA,UAEA,MAAAI","file":"all.js","sourcesContent":["'use strict';\r\n\r\nwindow.addEventListener('load', () => {\r\n const openMenu = document.querySelector('.openMenu');\r\n const closeMenu = document.querySelector('.closeMenu');\r\n const menu = document.querySelector('nav');\r\n const body = document.querySelector('body');\r\n let error = false;\r\n\r\n const headerTop = document.querySelector('.header_top');\r\n const main = document.querySelector('main');\r\n\r\n const openMenuFunc = () => {\r\n menu.classList.add('active_nav');\r\n body.classList.add('left');\r\n };\r\n\r\n const closeMenuFunc = () => {\r\n menu.removeAttribute('class');\r\n body.removeAttribute('class');\r\n };\r\n\r\n openMenu.addEventListener('click', openMenuFunc);\r\n\r\n closeMenu.addEventListener('click', () => {\r\n closeMenuFunc();\r\n });\r\n \r\n window.addEventListener('mouseup', (e) => {\r\n const ul = menu.querySelectorAll('ul');\r\n const form = menu.querySelectorAll('form');\r\n \r\n function childArr (arr) {\r\n arr.forEach(item => {\r\n item.addEventListener('click', openMenuFunc);\r\n });\r\n }\r\n\r\n if (menu.classList.contains('active_nav') && body.classList.contains('left')) {\r\n childArr(ul);\r\n childArr(form);\r\n \r\n if (e.target !== menu) {\r\n closeMenuFunc();\r\n }\r\n }\r\n });\r\n\r\n const setNavBg = () => {\r\n if (window.scrollY > main.offsetTop - 91) {\r\n headerTop.style.backgroundColor = '#f1f1f1';\r\n } else {\r\n headerTop.style.backgroundColor = '';\r\n }\r\n };\r\n\r\n window.addEventListener('scroll', () => {\r\n setNavBg();\r\n });\r\n\r\n setNavBg();\r\n\r\n const btnUp = document.querySelector('.btnUp');\r\n\r\n const docUp = () => {\r\n if (window.scrollY >= 600) {\r\n btnUp.classList.add('btnShow');\r\n } else {\r\n btnUp.classList.remove('btnShow');\r\n }\r\n };\r\n\r\n window.addEventListener('scroll', docUp);\r\n\r\n btnUp.addEventListener('click', () => {\r\n window.scrollTo({ top: 0, behavior: 'smooth' });\r\n });\r\n\r\n const isEmpty = (node) => {\r\n const arr = Array.from(node);\r\n for (let i = 0; i < arr.length; i++) {\r\n const element = arr[i];\r\n\r\n if (element.value.trim() === '') {\r\n error = true;\r\n element.style.borderColor = '#ED3237';\r\n } else {\r\n element.style.borderColor = '#29BB00';\r\n }\r\n }\r\n };\r\n\r\n // choose application\r\n try {\r\n const btn = document.querySelector('.selected');\r\n const options = document.querySelector('.options');\r\n const label = document.querySelectorAll('.app_label input');\r\n const selectedLabel = document.querySelector('.app_label input[selected]');\r\n\r\n btn.innerHTML = selectedLabel.parentNode.textContent;\r\n\r\n btn.addEventListener('click', () => {\r\n options.style.display = 'block';\r\n });\r\n\r\n window.addEventListener('mouseup', (e) => {\r\n if (e.target !== options) {\r\n options.style.display = 'none';\r\n }\r\n });\r\n\r\n for (let i = 0; i < label.length; i++) {\r\n \r\n label[i].addEventListener('click', () => {\r\n \r\n for (let x = 0; x < label.length; x++) {\r\n label[x].removeAttribute('selected');\r\n }\r\n \r\n label[i].setAttribute('selected', '');\r\n btn.innerHTML = label[i].parentNode.textContent;\r\n options.style.display = 'none';\r\n });\r\n }\r\n } catch(err){}\r\n\r\n // choose exchanges\r\n try {\r\n const choose = (node) => {\r\n const btn = Array.from(document.querySelectorAll(node));\r\n\r\n for (let i = 0; i < btn.length; i++) {\r\n btn[i].addEventListener('click', () => {\r\n for (let x = 0; x < btn.length; x++) {\r\n btn[x].removeAttribute('selected');\r\n btn[x].parentElement.classList.remove('active_label');\r\n }\r\n\r\n btn[i].setAttribute('selected', '');\r\n btn[i].parentElement.classList.add('active_label');\r\n });\r\n }\r\n };\r\n\r\n choose('[data-card] input');\r\n choose('[data-bank] input');\r\n choose('[data-anonym] input');\r\n } catch(err){}\r\n\r\n // apply page\r\n try{\r\n const applyForm = document.querySelector('.apply_form');\r\n const applyInputs = document.querySelectorAll('.apply_form input, textarea');\r\n const regExp = /^[+-]?\\d+$/;\r\n\r\n const modal = (title, message, btnName) => {\r\n const footer = document.querySelector('footer');\r\n\r\n footer.insertAdjacentHTML('afterend', `\r\n
${message}
\r\n \r\n