{ "version": 3, "sources": ["../src/js/forms.ts", "../src/js/gallery.js", "../src/js/main.js"], "sourcesContent": ["document.addEventListener('DOMContentLoaded', function (e) {\n\t// Contact form\n\tconst form = document.querySelector('form.contact-form');\n\tif (form) {\n\t\tform.addEventListener('submit', async ev => {\n\t\t\tconst submit = form.querySelector('input[type=\"submit\"]');\n\t\t\tif (!submit) {\n\t\t\t\tconsole.warn('Form has no submit button:', form)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tev.preventDefault();\n\n\t\t\tconst inputs = form.querySelectorAll('input, textarea');\n\n\t\t\tsubmit.value = 'Sending...'\n\n\t\t\tconst res = await fetch(form.action, {\n\t\t\t\tmethod: form.method,\n\t\t\t\tbody: new FormData(form),\n\t\t\t\theaders: {\n\t\t\t\t\tAccept: 'application/json'\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (res.ok) {\n\t\t\t\tsubmit.value = 'Sent!'\n\t\t\t\tinputs.forEach(inp => inp.setAttribute('disabled', 'true'))\n\t\t\t} else {\n\t\t\t\tsubmit.value = 'Submit error'\n\t\t\t}\n\t\t})\n\t}\n})\n", "window.addEventListener('DOMContentLoaded', function(e) {\n let galleries = document.querySelectorAll('section.gallery-section');\n if (galleries) {\n for (let i = 0 ; i < galleries.length ; i++) {\n // Loop through galleries to attach event listeners\n let galleryType = galleries[i].querySelector('.container').children[0].classList[0];\n if (galleryType == 'grid') {\n // Grid galleries have a zoom effect on click\n let images = galleries[i].querySelectorAll('img'); // Clickable images\n let zoomed = galleries[i].querySelector('.zoomed-img');\n let zoomedImg = zoomed.querySelector('img');\n let close = zoomed.querySelector('.close');\n for (let h = 0 ; h < images.length ; h++) {\n images[h].addEventListener('click', function(e) {\n zoomedImg.setAttribute('src', e.currentTarget.getAttribute('src'));\n zoomed.classList.toggle('active');\n })\n }\n close.addEventListener('click', function(e) {\n zoomed.classList.toggle('active');\n })\n }\n else {\n // Thumbnail galleries replace the main image on click\n let images = galleries[i].querySelectorAll('.thumb'); // Clickable thumbnails\n for (let j = 0 ; j < images.length ; j++) {\n images[j].addEventListener('click', function(e) {\n // Check if image is not already main image\n let main = galleries[i].querySelector('.main.active');\n let mainAlt = galleries[i].querySelector('.main:not(.active)');\n if (e.currentTarget.getAttribute('src') != main.getAttribute('src')) {\n // Swap the source of the non-showing main image\n mainAlt.setAttribute('src', e.currentTarget.getAttribute('src'));\n // Trigger the animation and swap with class toggles\n main.classList.toggle('active');\n mainAlt.classList.toggle('active');\n }\n })\n }\n // Thumnail galleries also have option for auto-advance\n let galleryContainer = galleries[i].querySelector('.container').children[0];\n if (galleryContainer.classList[1]) {\n let delay = galleryContainer.getAttribute('data-rate') * 1000;\n setInterval(function(e) {\n // get current image position in gallery\n let src = galleries[i].querySelector('.main.active').getAttribute('src');\n let curr = galleries[i].querySelector(`img.thumb[src='${src}'`);\n if (curr.nextElementSibling) {\n curr.nextElementSibling.click();\n }\n else {\n galleries[i].querySelector('img.thumb').click();\n }\n }, delay);\n }\n }\n }\n }\n})", "import './forms'\nimport './gallery'\n\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n\n\t// --> start nav handle\n\tconst hamburger = document.querySelector('.hamburger');\n\thamburger.addEventListener('click', toggleMenu);\n\n\tconst scrollHam = document.querySelector('.scrollnav .hamburger');\n\tscrollHam.addEventListener('click', toggleMenu);\n\n\tconst mobile = document.querySelector('.mobile');\n\n\tconst closeBtn = document.querySelector('.close');\n\tcloseBtn.addEventListener('click', closeNav);\n\n\t//toggle mobile nav (hamburger) button\n\tlet showed = false;\n\tfunction toggleMenu() {\n\t\tif (!showed) {\n\t\t\tmobile.classList.add('open');\n\t\t\tshowed = true;\n\t\t} else {\n\t\t\tmobile.classList.remove('open');\n\t\t\tshowed = false;\n\t\t}\n\t}\n\n\t//add active nav\n\tlet url = window.location.href.split('/');\n\tlet page = url[url.length - 2];\n\tlet links = document.querySelectorAll(`[href='/${page}']`);\n\tif (links.length > 0) {\n\t\tfor (let i = 0; i < links.length; i++) {\n\t\t\tlinks[i].classList.add('active');\n\t\t\tif (links[i].parentElement.classList.contains('dropdown')) {\n\t\t\t\tlinks[i].parentElement.parentElement.classList.add('active');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlinks[i].parentElement.classList.add('active');\n\t\t\t}\n\t\t}\n\t}\n\n\t// Nav slides down when user scrolls up\n\tlet nav = document.querySelector('nav.scrollnav');\n\tlet wrapper = document.querySelector('.page-wrapper');\n\twrapper.addEventListener('scroll', function (e) {\n\t\tif (!nav.classList.contains('scrolling') && wrapper.scrollTop >= 200) {\n\t\t\tnav.classList.add('scrolling');\n\t\t}\n\t\tif (wrapper.scrollTop < 200) {\n\t\t\tnav.classList.remove('scrolling');\n\t\t}\n\t})\n\n\t//close mobile nav button handle\n\tfunction closeNav() {\n\t\tmobile.classList.remove('open');\n\t\tshowed = false;\n\t}\n\t// close mobile nav when click out side of mobile nav container\n\tdocument.addEventListener('click', ev => {\n\t\tif (document.querySelector('.mobile.open')) {\n\t\t\tif (!ev.path.includes(document.querySelector('.mobile.open')) && !ev.path.includes(document.querySelector('.hamburger')) && !ev.path.includes(document.querySelector('.scrollnav .hamburger'))) {\n\t\t\t\tdocument.querySelector('nav.mobile').classList.remove('open');\n\t\t\t\tshowed = false;\n\t\t\t\tconsole.log('here');\n\t\t\t}\n\t\t}\n\t});\n\t// <-- end nav handle\n\n\t//the team section handle (slide right to left when click)\n\tconst theTeamSections = document.querySelectorAll('.the-team-section');\n\ttheTeamSections.forEach(theTeamSection => {\n\t\tconst slides = theTeamSection.querySelectorAll('.slide');\n\t\tconst navs = theTeamSection.querySelectorAll('.nav');\n\n\t\t//set active for first slide\n\t\tslides[0].classList.add('active');\n\t\tnavs[0].classList.add('active');\n\t\tlet active_id = 0;\n\t\t//slides[0].style.transform = `scale(1) translate(0vw)`;\n\t\tnavs.forEach(nav =>\n\t\t\tnav.addEventListener('click', e => {\n\t\t\t\tlet clicked_nav_id = e.currentTarget.getAttribute('id').split('nav-')[1];\n\t\t\t\t//remove old active class\n\t\t\t\tnavs[active_id].classList.remove('active');\n\t\t\t\tslides[active_id].classList.remove('active');\n\t\t\t\tslides[active_id].classList.add('inactive');\n\n\t\t\t\t//add new active class\n\t\t\t\tnavs[clicked_nav_id].classList.add('active');\n\t\t\t\tslides[clicked_nav_id].classList.add('active');\n\t\t\t\tactive_id = clicked_nav_id;\n\t\t\t})\n\t\t)\n\t});\n});\n\ndocument.addEventListener('DOMContentLoaded', function (e) {\n\tlet circles = document.querySelectorAll('.number-block .circled .circle h5');\n\tfor (let i = 0; i < circles.length; i++) {\n\t\tcircles[i].setAttribute('style', `--tooltip-dimension: ${(circles[i].scrollWidth > circles[i].scrollHeight) ? circles[i].scrollWidth : circles[i].scrollHeight}px;`);\n\t\tcircles[i].parentElement.setAttribute('style', `right: calc(-${(circles[i].scrollWidth > circles[i].scrollHeight) ? circles[i].scrollWidth / 2 : circles[i].scrollHeight / 2}px - 2rem);`);\n\t}\n\n\twindow.addEventListener('resize', function (e) {\n\t\tfor (let i = 0; i < circles.length; i++) {\n\t\t\tcircles[i].setAttribute('style', `--tooltip-dimension: ${(circles[i].scrollWidth > circles[i].scrollHeight) ? circles[i].scrollWidth : circles[i].scrollHeight}px;`);\n\t\t\tcircles[i].parentElement.setAttribute('style', `right: calc(-${(circles[i].scrollWidth > circles[i].scrollHeight) ? circles[i].scrollWidth / 2 : circles[i].scrollHeight / 2}px - 2rem);`);\n\t\t}\n\t})\n})\n\n// Pre-footer bar section\ndocument.addEventListener('DOMContentLoaded', function (e) {\n\tlet observer = new IntersectionObserver(toggleBar, { threshold: 1.0 });\n\tlet stickypf = document.querySelector('div.pre-footer.sticky');\n\tlet preFooter = document.querySelector('div.pre-footer:not(.sticky)');\n\tlet closepf = stickypf.querySelector('button.close');\n\n\tlet acsbButton = null;\n\tlet time = 0;\n\tlet getAcsbButton = setInterval(() => {\n\t\tacsbButton = document.querySelector('[data-acsb]:nth-of-type(3)')?.shadowRoot?.querySelector('button');\n\t\tif (acsbButton || time >= 10000) {\n\t\t\tclearInterval(getAcsbButton);\n\t\t} else {\n\t\t\ttime += 50;\n\t\t}\n\t}, 50)\n\n\tif (preFooter && stickypf) {\n\t\tobserver.observe(preFooter);\n\t}\n\n\tfunction toggleBar(entries) {\n\t\tentries.forEach(entry => {\n\t\t\tif (entry.intersectionRatio >= 1.0) {\n\t\t\t\tstickypf.style.display = \"none\";\n\t\t\t} else {\n\t\t\t\tstickypf.style.display = \"block\";\n\t\t\t}\n\t\t})\n\t}\n\n\twindow.addEventListener('scroll', function (e) {\n\t\tif (window.scrollY >= 100 && !getLocalStorage('closedpf')) {\n\t\t\tstickypf.classList.add('show');\n\t\t\tif (acsbButton) {\n\t\t\t\tacsbButton.setAttribute('style', `--offset-top: ${stickypf.scrollHeight + 20}px;`);\n\t\t\t}\n\t\t} else {\n\t\t\tstickypf.classList.remove('show');\n\t\t\tif (acsbButton) {\n\t\t\t\tacsbButton.setAttribute('style', `--offset-top: 20px;`);\n\t\t\t}\n\t\t}\n\t})\n\n\tclosepf.addEventListener('click', function (e) {\n\t\tstickypf.classList.remove('show');\n\t\tsetLocalStorage('closedpf', 'true', 7);\n\t})\n\n\tfunction setLocalStorage(name, value, days) {\n\t\tif (days) {\n\t\t\tvar now = new Date();\n\t\t\tvar ttl = new Date();\n\t\t\tttl.setTime(ttl.getTime() + (days * 24 * 60 * 60 * 1000));\n\n\t\t\tconst item = {\n\t\t\t\tvalue: value,\n\t\t\t\texpiry: now.getTime() + ttl.toUTCString(),\n\t\t\t}\n\n\t\t\tlocalStorage.setItem(name, JSON.stringify(item));\n\t\t} else {\n\t\t\tlocalStorage.setItem(name, value);\n\t\t}\n\t}\n\n\tfunction getLocalStorage(name) {\n\t\tconst itemStr = localStorage.getItem(name);\n\t\t// if the item doesn't exist, return null\n\t\tif (!itemStr) {\n\t\t\treturn null;\n\t\t}\n\t\tconst item = JSON.parse(itemStr);\n\t\tconst now = new Date();\n\t\t// compare the expiry time of the item with the current time\n\t\tif (now.getTime() > item.expiry) {\n\t\t\t// If the item is expired, delete the item from storage\n\t\t\t// and return null\n\t\t\tlocalStorage.removeItem(name);\n\t\t\treturn null;\n\t\t}\n\t\treturn item.value;\n\t}\n})"], "mappings": "mNAAA,SAAS,iBAAiB,mBAAoB,SAAU,EAAG,CAE1D,GAAM,GAAO,SAAS,cAA+B,qBACrD,AAAI,GACH,EAAK,iBAAiB,SAAU,AAAM,GAAM,wBAC3C,GAAM,GAAS,EAAK,cAAgC,wBACpD,GAAI,CAAC,EAAQ,CACZ,QAAQ,KAAK,6BAA8B,GAC3C,OAGD,EAAG,iBAEH,GAAM,GAAS,EAAK,iBAAiB,mBAErC,EAAO,MAAQ,aAUf,AAAI,AARQ,MAAM,OAAM,EAAK,OAAQ,CACpC,OAAQ,EAAK,OACb,KAAM,GAAI,UAAS,GACnB,QAAS,CACR,OAAQ,uBAIF,GACP,GAAO,MAAQ,QACf,EAAO,QAAQ,GAAO,EAAI,aAAa,WAAY,UAEnD,EAAO,MAAQ,oBC7BnB,OAAO,iBAAiB,mBAAoB,SAAS,EAAG,CACpD,GAAI,GAAY,SAAS,iBAAiB,2BAC1C,GAAI,EACA,OAAS,GAAI,EAAI,EAAI,EAAU,OAAS,IAGpC,GAAI,AADc,EAAU,GAAG,cAAc,cAAc,SAAS,GAAG,UAAU,IAC9D,OAAQ,CAEvB,GAAI,GAAS,EAAU,GAAG,iBAAiB,OACvC,EAAS,EAAU,GAAG,cAAc,eACpC,EAAY,EAAO,cAAc,OACjC,EAAQ,EAAO,cAAc,UACjC,OAAS,GAAI,EAAI,EAAI,EAAO,OAAS,IACjC,EAAO,GAAG,iBAAiB,QAAS,SAAS,EAAG,CAC5C,EAAU,aAAa,MAAO,EAAE,cAAc,aAAa,QAC3D,EAAO,UAAU,OAAO,YAGhC,EAAM,iBAAiB,QAAS,SAAS,EAAG,CACxC,EAAO,UAAU,OAAO,gBAG3B,CAED,GAAI,GAAS,EAAU,GAAG,iBAAiB,UAC3C,OAAS,GAAI,EAAI,EAAI,EAAO,OAAS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