{"version":3,"file":"application-64d117be.js","sources":["../../../app/components/bundle_components/section_wrapper_component.js","../../../app/components/static_components/footer_component.js","../../../app/components/static_components/header_component.js"],"sourcesContent":["// Pass backend variables to js variables\n/**\n * VARIABLES AND FUNCTIONS THAT NEED INITIATION\n */\nlet windowSize = window.innerWidth\nlet breakpoint = 992;\nlet dynamicImages = true\n\n\n\n/**\n * EVENT LISTENERS\n */\n\n// Execute something on 575 breakpoint (mobile to desktop and vice versa)\n\nif (dynamicImages) {\n setBackgrounds();\n window.addEventListener('resize', function(event) {\n if ((windowSize > breakpoint && window.innerWidth <= breakpoint) || (windowSize <= breakpoint && window.innerWidth > breakpoint)) {\n setBackgrounds();\n }\n windowSize = window.innerWidth;\n }, true);\n\n /**\n * FUNCTIONS\n */\n\n // Get Sections Data and check if it has a background image\n function setBackgrounds() {\n let images = document.querySelectorAll(\".responsive-background-image\");\n\n let isMobile = window.innerWidth <= breakpoint\n images.forEach(image => {\n let imageSrc = image.style.backgroundImage ? image.style.backgroundImage : null;\n if (imageSrc) {\n image.style.backgroundImage = isMobile ? addSizeMobile(imageSrc) : removeSizeMobile(imageSrc)\n }\n });\n }\n\n function addSizeMobile(imageUrl) {\n return imageUrl.replace('\")', '?size=mob\")');\n }\n\n function removeSizeMobile(imageUrl) {\n return imageUrl.replace('?size=mob\")', '\")');\n }\n}","// Para empujar hacia arriba el footer, cuando el botón de whatsapp está abajo\n\nfunction updateFooterMargin() {\n const button = document.getElementById('whatsapp-button');\n if (button) {\n const buttonHeight = button.getBoundingClientRect().height;\n document.documentElement.style.setProperty('--whatsapp-button-height', `${buttonHeight}px`);\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", updateFooterMargin);\nwindow.addEventListener('resize',updateFooterMargin);","\nfunction handleResize() {\n const windowWidth = window.innerWidth;\n\n const resolutionThreshold = 1199;\n\n let offCanvasTag = document.querySelector('.offcanvas.offcanvas-start');\n let offCanvasBackdropTag = document.querySelector('.offcanvas-backdrop');\n\n if (windowWidth > resolutionThreshold) {\n if (offCanvasTag && offCanvasBackdropTag) {\n if (offCanvasTag.classList.contains(\"show\")) {\n offCanvasTag.classList.remove('show');\n offCanvasBackdropTag.classList.remove('show');\n body.style.overflow = '';\n }\n }\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", handleResize);\nwindow.addEventListener('resize', handleResize);\n\n// Tener siempre la altura de la navbar en una custom property\n\nfunction updateHeaderHeight() {\n const header = document.getElementById('header');\n if (header) {\n const headerHeight = header.getBoundingClientRect().height;\n document.documentElement.style.setProperty('--header-height', `${headerHeight}px`);\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n setTimeout(updateHeaderHeight, 500); // Adjust the delay (1000 milliseconds = 1 second)\n window.addEventListener('resize', updateHeaderHeight);\n});"],"names":["windowSize","breakpoint","setBackgrounds","images","isMobile","image","imageSrc","addSizeMobile","removeSizeMobile","imageUrl","event","updateFooterMargin","button","buttonHeight","handleResize","windowWidth","resolutionThreshold","offCanvasTag","offCanvasBackdropTag","updateHeaderHeight","header","headerHeight"],"mappings":"AAIA,IAAIA,EAAa,OAAO,WACpBC,EAAa,IAWE,CAcjB,IAASC,EAAT,UAA0B,CACxB,IAAIC,EAAS,SAAS,iBAAiB,8BAA8B,EAEjEC,EAAW,OAAO,YAAcH,EACpCE,EAAO,QAAQE,GAAS,CACtB,IAAIC,EAAWD,EAAM,MAAM,gBAAkBA,EAAM,MAAM,gBAAkB,KACvEC,IACFD,EAAM,MAAM,gBAAkBD,EAAWG,EAAcD,CAAQ,EAAIE,EAAiBF,CAAQ,EAEpG,CAAK,CACF,EAEQC,EAAT,SAAuBE,EAAU,CAC/B,OAAOA,EAAS,QAAQ,KAAM,aAAa,CAC5C,EAEQD,EAAT,SAA0BC,EAAU,CAClC,OAAOA,EAAS,QAAQ,cAAe,IAAI,CAC5C,EAlBQ,IAAAP,IAYAK,IAIAC,IA7BTN,IACA,OAAO,iBAAiB,SAAU,SAASQ,EAAO,EAC3CV,EAAaC,GAA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