{"version":3,"file":"js/463.3f025d37f07e92cd813b.chunk.js","mappings":"gIACO,MAAMA,EAAW,KACpB,IAAI,UAAiB,CACjB,MAAMC,EAAoB,KACtBC,EAAUC,SAASH,IACXA,EAASI,UAAUC,SAAS,UAC5BL,EAASI,UAAUE,OAAO,QAC1BN,EAASO,cAAc,uBAAuBC,MAAMC,UAAY,IACpE,GACF,EAEAC,EAAkBV,IACpB,IAAIW,EACJ,MAAMC,EAAUZ,EAASO,cAAc,uBACvC,GAAIP,EAASI,UAAUC,SAAS,QAC5BO,EAAQJ,MAAMC,UAAY,IAC1BT,EAASI,UAAUE,OAAO,YAEzB,CACDL,IACA,MAAMY,EAAuK,IAAvD,QAAzFF,EAAKC,aAAyC,EAASA,EAAQL,cAAc,cAA2B,IAAPI,OAAgB,EAASA,EAAGG,SAASC,QACpJ,MAAXH,IACAA,EAAQJ,MAAMK,mBAAqB,GAAGA,KACtCD,EAAQJ,MAAMC,UAAYG,EAAQI,aAAe,KACjDhB,EAASI,UAAUa,IAAI,QAE/B,GAEEf,EAAYgB,SAASC,iBAAiB,cAC5CjB,SAAsDA,EAAUC,SAAQ,CAACH,EAAUoB,KAC/E,IAAIT,EACuG,QAA1GA,EAAKX,aAA2C,EAASA,EAASO,cAAc,4BAAyC,IAAPI,GAAyBA,EAAGU,iBAAiB,SAAUC,IACtKZ,EAAeV,EAAS,IAEf,GAAToB,GACAV,EAAeV,EACnB,GAER,E","sources":["webpack:///./wwwroot/js/animation/dropdown.ts"],"sourcesContent":["import { isSmallScreen } from '../utils';\nexport const dropdown = () => {\n if (isSmallScreen()) {\n const closeAllDropdowns = () => {\n dropdowns.forEach((dropdown) => {\n if (dropdown.classList.contains('open')) {\n dropdown.classList.remove('open');\n dropdown.querySelector('.drop-down__content').style.maxHeight = '0';\n }\n });\n };\n const toggleDropdown = (dropdown) => {\n var _a;\n const content = dropdown.querySelector('.drop-down__content');\n if (dropdown.classList.contains('open')) {\n content.style.maxHeight = '0';\n dropdown.classList.remove('open');\n }\n else {\n closeAllDropdowns();\n const transitionDuration = ((_a = content === null || content === void 0 ? void 0 : content.querySelector('div')) === null || _a === void 0 ? void 0 : _a.children.length) * 0.1;\n if (content != null) {\n content.style.transitionDuration = `${transitionDuration}s`;\n content.style.maxHeight = content.scrollHeight + 'px';\n dropdown.classList.add('open');\n }\n }\n };\n const dropdowns = document.querySelectorAll('.drop-down');\n dropdowns === null || dropdowns === void 0 ? void 0 : dropdowns.forEach((dropdown, index) => {\n var _a;\n (_a = dropdown === null || dropdown === void 0 ? void 0 : dropdown.querySelector('.drop-down__title')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', (event) => {\n toggleDropdown(dropdown);\n });\n if (index == 0) {\n toggleDropdown(dropdown);\n }\n });\n }\n};\n"],"names":["dropdown","closeAllDropdowns","dropdowns","forEach","classList","contains","remove","querySelector","style","maxHeight","toggleDropdown","_a","content","transitionDuration","children","length","scrollHeight","add","document","querySelectorAll","index","addEventListener","event"],"sourceRoot":""}