PageSourceSearch

https://www.eacs2014.pt/wp-content/themes/theme/dist/js/script.js?v=6abfb3f3a3150&ver=7.1.2

js eacs2014.pt collected 2026-10-02 13:39:14 UTC 18,343 bytes, 2 lines download raw bytes

1/*! For license information please see script.js.LICENSE.txt */
2(()=>{"use strict";function e(){var n,r,o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function l(e,o,c,a){var l=o&&o.prototype instanceof s?o:s,u=Object.create(l.prototype);return t(u,"_invoke",function(e,t,o){var c,a,l,s=0,u=o||[],d=!1,f={p:0,n:0,v:n,a:m,f:m.bind(n,4),d:function(e,t){return c=e,a=0,l=n,f.n=t,i}};function m(e,t){for(a=e,l=t,r=0;!d&&s&&!o&&r<u.length;r++){var o,c=u[r],m=f.p,p=c[2];e>3?(o=p===t)&&(l=c[(a=c[4])?5:(a=3,3)],c[4]=c[5]=n):c[0]<=m&&((o=e<2&&m<c[1])?(a=0,f.v=t,f.n=c[1]):m<p&&(o=e<3||c[0]>t||t>p)&&(c[4]=e,c[5]=t,f.n=p,a=0))}if(o||e>1)return i;throw d=!0,t}return function(o,u,p){if(s>1)throw TypeError("Generator is already running");for(d&&1===u&&m(u,p),a=u,l=p;(r=a<2?n:l)||!d;){c||(a?a<3?(a>1&&(f.n=-1),m(a,l)):f.n=l:f.v=l);try{if(s=2,c){if(a||(o="next"),r=c[o]){if(!(r=r.call(c,l)))throw TypeError("iterator result is not an object");if(!r.done)return r;l=r.value,a<2&&(a=0)}else 1===a&&(r=c.return)&&r.call(c),a<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),a=1);c=n}else if((r=(d=f.n<0)?l:e.call(t,f))!==i)break}catch(e){c=n,a=1,l=e}finally{s=1}}return{value:r,done:d}}}(e,c,a),!0),u}var i={};function s(){}function u(){}function d(){}r=Object.getPrototypeOf;var f=[][c]?r(r([][c]())):(t(r={},c,function(){return this}),r),m=d.prototype=s.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,t(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e}return u.prototype=d,t(m,"constructor",d),t(d,"constructor",u),u.displayName="GeneratorFunction",t(d,a,"GeneratorFunction"),t(m),t(m,a,"Generator"),t(m,c,function(){return this}),t(m,"toString",function(){return"[object Generator]"}),(e=function(){return{w:l,m:p}})()}function t(e,n,r,o){var c=Object.defineProperty;try{c({},"",{})}catch(e){c=0}t=function(e,n,r,o){function a(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?c?c(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(a("next",0),a("throw",1),a("return",2))},t(e,n,r,o)}function n(e,t,n,r,o,c,a){try{var l=e[c](a),i=l.value}catch(e){return void n(e)}l.done?t(i):Promise.resolve(i).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise(function(o,c){var a=e.apply(t,r);function l(e){n(a,o,c,l,i,"next",e)}function i(e){n(a,o,c,l,i,"throw",e)}l(void 0)})}}var o,c,a,l,i,s;document.querySelectorAll(".timer-card").forEach(function(e){var t=new Date(e.getAttribute("data-target-date")).getTime(),n=function(){var n=(new Date).getTime(),o=t-n;if(o>0){var c=Math.floor(o/864e5),a=Math.floor(o%864e5/36e5),l=Math.floor(o%36e5/6e4),i=Math.floor(o%6e4/1e3);e.querySelector(".days").textContent=c,e.querySelector(".hours").textContent=a,e.querySelector(".minutes").textContent=l,e.querySelector(".seconds").textContent=i}else clearInterval(r),e.querySelector(".days").textContent="0",e.querySelector(".hours").textContent="0",e.querySelector(".minutes").textContent="0",e.querySelector(".seconds").textContent="0"},r=setInterval(n,1e3);n()}),(o=document.querySelectorAll(".dropdownBlock")).length>0&&o.forEach(function(e){var t=e.querySelector(".dropdownDefaultButton"),n=e.querySelector(".dropdownLangs");t.addEventListener("click",function(){n.classList.toggle("hidden")})}),function(){var e=document.querySelector(".show-more-block-w");if(e){var t=e.querySelector(".show-more-block-btn"),n=e.querySelector(".show-more-block-content"),r=t.dataset.defLabel,o=t.dataset.toggleLabel;t.addEventListener("click",function(){t.querySelector("span").innerHTML=n.classList.contains("hidden")?o:r,n.classList.toggle("hidden")})}}(),function(){var e=document.querySelector(".promocode-btn");if(e){var t=e.querySelector("input"),n=e.dataset.href;e.addEventListener("click",function(){if(navigator.clipboard)navigator.clipboard.writeText(t.value).then(function(){e.classList.add("-copied"),e.querySelector("span").innerHTML="Copied"}).catch(function(e){});else if("hidden"!==t.type){t.select();try{document.execCommand("copy"),e.classList.add("-copied"),e.querySelector("span").innerHTML="Copied"}catch(e){}}setTimeout(function(){window.open(n,"_blank")},500)})}}(),(c=document.querySelectorAll(".see-more")).length>
20&&c.forEach(function(e){e.addEventListener("click",function(t){t.preventDefault(),e.closest(".card").classList.toggle("expanded")})}),function(){var e=document.querySelectorAll(".payments-card-list");e.length>0&&e.forEach(function(e){var t=e.querySelector(".payments-card-list__btn");if(t){var n=e.querySelectorAll(".payments-card-list__items .hidden"),r=t.dataset.defLabel,o=t.dataset.toggleLabel;t.addEventListener("click",function(){t.querySelector("span").innerHTML===r?t.querySelector("span").innerHTML=o:t.querySelector("span").innerHTML=r,n.forEach(function(e){e.classList.toggle("!inline-block")})})}})}(),function(){var e=document.querySelectorAll(".accordion-collapse-block");e.length>0&&e.forEach(function(t){var n=t.querySelector(".accordion-collapse2__btn"),r=t.querySelector(".accordion-collapse2__content");n.addEventListener("click",function(){e.forEach(function(e){e!==t&&e.querySelector(".accordion-collapse2__content").classList.add("hidden")}),r.classList.toggle("hidden")})})}(),(a=document.querySelector("#subscriber-form"))&&a.addEventListener("submit",function(e){e.preventDefault();var t=a.querySelector('input[type="email"]'),n=a.querySelector('input[name="subscriber_form_nonce"]');if(t&&n){var r=t.value,o=n.value,c=new FormData;c.append("action","subscribe_form"),c.append("email",r),c.append("subscriber_form_nonce",o),fetch(ajax.url||"/wp-admin/admin-ajax.php",{method:"POST",credentials:"same-origin",body:c}).then(function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()}).then(function(e){"Ok"===e.status?(a.reset(),document.querySelector(".success-message")&&document.querySelector(".success-message").classList.remove("hidden")):console.error("Subscription error:",e.message)}).catch(function(e){console.error("Error submitting form:",e)})}else console.error("Required form fields not found")}),function(){var e=document.querySelectorAll(".toggle-block");e.length>0&&e.forEach(function(e){var t=e.querySelector(".toggle-block-btn"),n=e.querySelectorAll(".toggle-block-card");if(t){var r=Array.from(n).filter(function(e){return e.classList.contains("hidden")});t.addEventListener("click",function(){r.forEach(function(e){e.classList.toggle("!block")})})}})}(),function(){if(document.getElementById("review-comments-form")){var t=function(e){n.forEach(function(t){var n=parseInt(t.dataset.value);t.src=n<=e?t.dataset.starIconEmpty:t.dataset.starIconFull})},n=document.querySelectorAll(".stars img"),o=document.querySelector(".stars"),c=0;n.forEach(function(e){e.addEventListener("mouseover",function(){var n=parseInt(e.dataset.value);t(n)}),e.addEventListener("mouseout",function(){t(c)}),e.addEventListener("click",function(){c=parseInt(e.dataset.value),o.setAttribute("data-rating",c)})}),document.getElementById("review-comments-form").addEventListener("submit",function(){var n=r(e().m(function n(r){var o,a,l,i,s,u,d,f,m;return e().w(function(e){for(;;)switch(e.n){case 0:return r.preventDefault(),o=document.querySelector("#commentc-form-msg"),a=r.target,l=r.target.rev_comments_form_nonce.value,i=r.target.name.value,s=r.target.email.value,u=r.target.msg.value,(d=new FormData).append("action","review_comments_form"),d.append("nonce",l),d.append("page_id",a.dataset.id),d.append("name",i),d.append("email",s),d.append("review",u),d.append("rating",c),e.n=1,fetch(ajax.url,{method:"POST",body:d});case 1:return f=e.v,e.n=2,f.json();case 2:(m=e.v).success?(o.innerHTML=m.data.message,o.style="display:block",a.reset(),t(0)):console.log(m);case 3:return e.a(2)}},n)}));return function(e){return n.apply(this,arguments)}}())}}(),(l=document.querySelectorAll(".comments-reply-btn"))&&l.length>0&&l.forEach(function(t){var n=t.dataset.parent,o=t.dataset.page,c=t.dataset.scs,a=t.dataset.nameLabel,l=t.dataset.emailLabel,i=t.dataset.msgLabel,s=t.dataset.btnLabel,u=t.closest(".reply-section")||t.parentElement.querySelector(".reply-section");t.addEventListener("click",function(){if(document.querySelectorAll(".reply-form").forEach(function(e){return e.remove()}),document.querySelectorAll(".reply-success").forEach(function(e){return e.remove()}),!u.querySelector(".reply-form")){var t=document.createElement("form");t.classList.add("reply-form","p-2","border","rounded-2","bg-gray-50","text-sm"),t.style.marginTop="1rem",t.innerHTML=' \n                    <input type="hidden" name="page_id" value="'.concat(o,'">\n\n                    <div class="flex gap-2 mb-2">\n                        <div class="md:w-1/2">\n                            <label class="block mb-1">').concat(a,'</label>\n                            <input type="text" name="name" required class="w-full bg-white block py-2 px-[15px] rounded-[5px] text-sm text-primary placeholder:text-primary w-full bg-transparent border border-blue-1300 appearance-none focus:bg-gray-1700 focus:ring-0 h-[36px] focus:border-blue-600 peer">\n                        </div>\n                        <div class="md:w-1/2">\n                            <label class="block mb-1">').concat(l,'</label>\n                            <input type="email" name="email" required class="w-full bg-white block py-2 px-[15px] rounded-[5px] text-sm text-primary placeholder:text-primary w-full bg-transparent border border-blue-1300 appearance-none focus:bg-gray-1700 focus:ring-0 h-[36px] focus:border-blue-600 peer">\n                        </div>\n                    </div>\n\n                    <div class="mb-2">\n                        <label class="block mb-1">').concat(i,'</label>\n                        <textarea name="review" rows="2" required class="w-full bg-white block py-2 px-[15px] rounded-[5px] text-sm text-primary placeholder:text-primary w-full bg-transparent border border-blue-1300 appearance-none focus:bg-gray-1700 focus:ring-0 h-[76px] focus:border-blue-600 peer"></textarea>\n                    </div>\n\n                    <button type="submit" class="bg-blue-500 text-white px-3 py-1 rounded text-sm">').concat(s,"</button>\n                "),u.appendChild(t),t.addEventListener("submit",function(){var o=r(e().m(function r(o){var a,l,i,s;return e().w(function(e){for(;;)switch(e.n){case 0:return o.preventDefault(),(a=new FormData(t)).append("action","review_comments_form"),a.append("parent_comment_id",n),a.append("nonce",ajax.nonces.rev_comments_form_action),e.n=1,fetch(ajax.url,{method:"POST",body:a});case 1:return l=e.v,e.n=2,l.json();case 2:(i=e.v).success?(t.remove(),(s=document.createElement("div")).classList.add("reply-success","text-green-600","mt-2","text-sm"),s.textContent=c,u.appendChild(s)):alert(i.data||"An error occurred.");case 3:return e.a(2)}},r)}));return function(e){return o.apply(this,arguments)}}())}})}),document.getElementById("hamburger").addEventListener("click",function(){document.querySelector(".sidebar").classList.toggle("active")}),document.getElementById("cross").addEventListener("click",function(){document.querySelector(".sidebar").classList.remove("active")}),window.innerWidth<=768&&document.querySelectorAll("li.menu-item-has-children").forEach(function(e){if(!e.querySelector(".g-btn-child-menu")){var t=document.createElement("button");t.classList.add("g-btn-child-menu"),t.type="button",e.appendChild(t),t.addEventListener("click",function(t){t.preventDefault(),e.classList.toggle("-toggle")})}}),function(){var e=document.querySelectorAll(".infoblock-v4-tab");e&&e.length>0&&e.forEach(function(e){var t=e.querySelectorAll(".infoblock-v4-tab__label"),n=e.querySelectorAll(".infoblock-v4-tab__content");t.forEach(function(e,r){e.addEventListener("click",function(){t.forEach(function(e,t){e.classList.remove("-toggle"),n[t].classList.remove("block"),n[t].classList.add("hidden")}),t[r].classList.add("-toggle"),n[r].classList.remove("hidden"),n[r].classList.add("block")})})})}(),function(){var e=document.querySelector(".load-slots-modal-btn");if(e){var t=e.dataset.id;e.addEventListener("click",function(){var e=new FormData;e.append("action","slot_offers_popup"),e.append("id",t),fetch(ajax.url,{method:"POST",body:e}).then(function(e){return e.text()}).then(function(e){try{var t=JSON.parse(e);if(t.msg)return void alert(t.msg)}catch(e){}document.querySelector("body").insertAdjacentHTML("beforeend",e)}).catch(function(e){return console.error(e)})}),document.addEventListener("click",function(e){e.target.classList.contains("slot-offers-modal__close")&&e.target.closest(".slot-offers-modal").remove()})}}(),function(){var e=document.querySelector(".g-main-subscribe-form");if(e){var t=document.querySelector(".g-subscribe-form .g-subscribe-form--errors");e.addEventListener("submit",function(n){n.preventDefault();var r=new FormData;r.append("action","subscribe_block_form"),r.append("main_subscribe_form_nonce",n.target.main_subscribe_form_nonce.value),r.append("email",n.target.email.value),t.style.display="none",e.classList.remove("-error"),fetch("/wp-admin/admin-ajax.php",{method:"POST",body:r}).then(function(e){return e.json()}).then(function(r){if("error"===r.status){for(var o="",c=0;c<r.errors.length;c++)o+="<li>"+r.errors[c]+"</li>";t.innerHTML='<ul class="error-text">'+o+"</ul>",t.style.display="block",e.classList.add("-error")}else t.style.display="block",t.innerHTML="<ul><li>"+r.msg+"</li></ul>",n.target.email.value="",e.classList.remove("-error")}).catch(function(e){return console.error(e)})})}}(),(i=document.querySelectorAll(".g-contact-form")).length&&i.forEac
2h(function(t){var n=t.querySelector("form"),o=t.querySelector(".g-contact-form-scs-form-message");n&&n.addEventListener("submit",function(e){e.preventDefault();var p=n.phone?n.phone.value:"",m=n.msg?n.msg.value:"",msg=p?"Phone: "+p+"\n\n"+m:m,b=n.querySelector("button"),sp=b.querySelector("span"),txt=sp?sp.textContent:"";b.disabled=!0;if(sp)sp.textContent="Sending...";fetch("https://ai.vrs-n8n.net/webhook/c9916f0c-10ac-4a2e-8a78-aa77be7cc7ac",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.name.value,email:n.email.value,message:msg})}).then(function(){n.reset();o&&(o.classList.remove("hidden"),o.style="display:block!important",setTimeout(function(){o.style="display:none";o.classList.add("hidden")},4000))}).catch(function(err){console.error("Fetch error:",err);alert("Server error. Try again later.")}).finally(function(){b.disabled=!1;if(sp)sp.textContent=txt})})}),function(){var e=document.querySelector(".author-page-tabs");if(e){var t=e.querySelectorAll(".author-page-tabs__btn"),n=document.querySelectorAll(".author-page-tabs__content");t.forEach(function(e,r){e.addEventListener("click",function(){t.forEach(function(e,r){t[r].classList.remove("-toggle"),n[r].classList.remove("-toggle")}),e.classList.toggle("-toggle"),n[r].classList.toggle("-toggle")})})}}(),function(){var e=document.querySelector('input[name="header-search-input"]');if(e){var t,n,r=document.querySelector(".header-search-block"),o=null==r?void 0:r.querySelector(".header-search-block__btn"),c=null==r?void 0:r.querySelector(".header-search-block__box"),a=document.querySelector("#srb"),l=null==a||null===(t=a.closest("header"))||void 0===t?void 0:t.querySelector(".search-res-block");null==o||o.addEventListener("click",function(){null==c||c.classList.toggle("hidden"),null!=c&&c.classList.contains("hidden")&&(a&&(a.style.display="none"),l&&l.remove(),e.value="")}
2),e.addEventListener("keyup",function(e){var t=e.target.value.trim();clearTimeout(n),t.length>3?n=setTimeout(function(){var e=new FormData;e.append("action","search_request"),e.append("query",t),fetch(ajax.url,{method:"POST",body:e}).then(function(e){return e.text()}).then(function(e){a&&(a.innerHTML=e,a.style.display="block")}).catch(function(e){console.error("Search error:",e)})},500):(l&&l.remove(),a&&(a.style.display="none"))})}}(),(s=document.querySelector(".catfish-v2-block"))&&s.querySelector(".catfish-v2-block__btn").addEventListener("click",function(){s.classList.toggle("-toggle")}),function(){var e=document.querySelector(".catfish-block");if(e){var t=parseInt(e.dataset.displayAfterTheFirstScreen),n=document.querySelector(".cookies-block"),r=document.querySelectorAll(".main-offers-table-block .main-offers-table-block__item");1===t?window.addEventListener("scroll",function(){(window.scrollY||document.documentElement.scrollTop)>=640&&e.classList.add("-toggle")}):r&&r.length>=9?window.addEventListener("scroll",function(){var t,n,o,c,a,l,i,s,u;!0==(t=r[9],n=window.pageYOffset+t.getBoundingClientRect().top,o=window.pageXOffset+t.getBoundingClientRect().left,c=window.pageXOffset+t.getBoundingClientRect().right,a=window.pageYOffset+t.getBoundingClientRect().bottom,l=window.pageYOffset,i=window.pageXOffset,s=window.pageXOffset+document.documentElement.clientWidth,u=window.pageYOffset+document.documentElement.clientHeight,a>l&&n<u&&c>i&&o<s)&&e.classList.add("-toggle")}):setTimeout(function(){e.classList.add("-toggle")},3e3),e.querySelector(".catfish-block__close").addEventListener("click",function(){e.classList.remove("-toggle"),e.classList.contains("-only-once")&&e.remove(),n&&n.classList.remove("-bottom-m")})}}(),function(){var e=document.querySelectorAll(".discleimers-head__block");e&&e.length>0&&(e.forEach(function(t){t.querySelector(".discleimers-head__btn").addEventListener("click",function(n){n.stopPropagation(),e.forEach(function(e){e!==t&&e.classList.remove("-toggle")}),t.classList.toggle("-toggle")})}),document.addEventListener("click",function(t){t.target.closest(".discleimers-head__block")||e.forEach(function(e){e.classList.remove("-toggle")})}))}(),function(){var e=document.querySelector(".header-present-block");if(e&&!(window.outerWidth>768)){var t=e.querySelector(".header-present-block__btn"),n=e.querySelector(".header-present-block__drop");t&&n&&(t.addEventListener("click",function(e){e.stopPropagation(),n.classList.toggle("hidden")}),document.addEventListener("click",function(t){e.contains(t.target)||n.classList.add("hidden")}))}}(),function(){var e=document.querySelector(".hidden-iframe");e&&document.querySelector(".hidden-iframe-btn").addEventListener("click",function(){e.classList.toggle("hidden")})}()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.