{ "version": 3, "sources": ["../src/js/filter.js"], "sourcesContent": ["document.addEventListener('DOMContentLoaded', function () {\n\tconst filterBtns = document.querySelectorAll('.filter-button')\n\tconst properties = document.querySelectorAll('.property')\n\n\tfilterBtns.forEach((button) => {\n\t\tconst allButton = document.querySelector('.filter-button[data-category=\"all\"]')\n\n\t\tbutton.addEventListener('click', function () {\n\t\t\tfilterBtns.forEach((btn) => {\n\t\t\t\tif (btn !== button) {\n\t\t\t\t\tbtn.classList.remove('active')\n\t\t\t\t}\n\t\t\t})\n\t\t\tbutton.classList.toggle('active')\n\t\t\tif (button.classList.contains('active')) {\n\t\t\t\tallButton.classList.remove('active')\n\t\t\t} else {\n\t\t\t\tallButton.classList.add('active')\n\t\t\t}\n\n\t\t\tconst filter = button.dataset.category\n\n\t\t\tproperties.forEach((property) => {\n\t\t\t\tif (button.classList.contains('active') && filter !== 'all') {\n\t\t\t\t\tif (property.dataset.category.includes(filter)) {\n\t\t\t\t\t\tproperty.style.display = 'grid'\n\t\t\t\t\t} else {\n\t\t\t\t\t\tproperty.style.display = 'none'\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tproperty.style.display = 'grid'\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t})\n})\n"], "mappings": "MAAA,SAAS,iBAAiB,mBAAoB,UAAY,CACzD,GAAM,GAAa,SAAS,iBAAiB,kBACvC,EAAa,SAAS,iBAAiB,aAE7C,EAAW,QAAQ,AAAC,GAAW,CAC9B,GAAM,GAAY,SAAS,cAAc,uCAEzC,EAAO,iBAAiB,QAAS,UAAY,CAC5C,EAAW,QAAQ,AAAC,GAAQ,CAC3B,AAAI,IAAQ,GACX,EAAI,UAAU,OAAO,YAGvB,EAAO,UAAU,OAAO,UACxB,AAAI,EAAO,UAAU,SAAS,UAC7B,EAAU,UAAU,OAAO,UAE3B,EAAU,UAAU,IAAI,UAGzB,GAAM,GAAS,EAAO,QAAQ,SAE9B,EAAW,QAAQ,AAAC,GAAa,CAChC,AAAI,EAAO,UAAU,SAAS,WAAa,IAAW,MACrD,AAAI,EAAS,QAAQ,SAAS,SAAS,GACtC,EAAS,MAAM,QAAU,OAEzB,EAAS,MAAM,QAAU,OAG1B,EAAS,MAAM,QAAU", "names": [] }