1var C=window.matchMedia("(prefers-reduced-motion: reduce)").matches,T=/(?:\?|&)static=1\b/.test(location.search);function re(){T||document.documentElement.classList.add("js")}function U(e,t,n){var r=new IntersectionObserver(function(i){i.forEach(function(o){o.isIntersecting&&(o.target.classList.add(t),r.unobserve(o.target))})},{rootMargin:"0px 0px -80px 0px",threshold:n});[].forEach.call(e,function(i){r.observe(i)})}function ie(){var e=document.querySelectorAll(".reveal");if(e.length){if(T||C||!("IntersectionObserver"in window)){e.forEach(function(t){t.classList.add("is-visible")});return}U(e,"is-visible",.08)}}function ae(){var e=document.querySelectorAll(".deco");if(e.length){if(C||T||!("IntersectionObserver"in window)){[].forEach.call(e,function(t){t.classList.add("is-lit")});return}U(e,"is-lit",.01)}}function K(e,t,n,r,i){if(!e)return null;var o=Array.prototype.slice.call(e.children);if(!o.length)return null;var s=0;function a(){var u=o[0];if(!u)return 0;var d=parseFloat(getComputedStyle(e).columnGap||"0")||0;return u.getBoundingClientRect().width+d}function l(){e.style.transform="translate3d("+-s*a()+"px,0,0)",o.forEach(function(u,d){var f=d===s;u.classList.toggle("is-active",f),u.setAttribute("aria-hidden",f?"false":"true"),Array.prototype.forEach.call(u.querySelectorAll("a, button, input, select, textarea"),function(g){f?g.removeAttribute("tabindex"):g.setAttribute("tabindex","-1")})}),t&&(t.disabled=s===0),n&&(n.disabled=s===o.length-1),r&&r.length&&Array.prototype.forEach.call(r,function(u,d){u.classList.toggle("is-active",d===s),u.setAttribute("aria-current",d===s?"true":"false")})}function p(u){s=Math.max(0,Math.min(o.length-1,s+u)),l(),E()}t&&t.addEventListener("click",function(){p(-1)}),n&&n.addEventListener("click",function(){p(1)}),r&&r.length&&Array.prototype.forEach.call(r,function(u,d){u.addEventListener("click",function(){s=d,l(),E()})}),e.parentElement.addEventListener("keydown",function(u){u.key==="ArrowLeft"&&p(-1),u.key==="ArrowRight"&&p(1)});var v=null;e.addEventListener("touchstart",function(u){v=u.touches[0].clientX},{passive:!0}),e.addEventListener("touchend",function(u){if(v!==null){var d=u.changedTouches[0].clientX-v;Math.abs(d)>45&&p(d<0?1:-1),v=null}},{passive:!0}),window.addEventListener("resize",l);var w=null;function b(){w&&(clearInterval(w),w=null)}function E(){!i||C||T||o.length<2||(b(),w=setInterval(function(){s=(s+1)%o.length,l()},i))}if(i&&!C&&!T&&o.length>1){var k=e.closest(".featured")||e.parentElement;["mouseenter","focusin","touchstart"].forEach(function(u){k.addEventListener(u,b,{passive:!0})}),["mouseleave","focusout","touchend"].forEach(function(u){k.addEventListener(u,E,{passive:!0})}),document.addEventListener("visibilitychange",function(){document.hidden?b():E()}),E()}return l(),{go:p,render:l,start:E,stop:b}}function oe(){if(document.body.classList.contains("acc")){document.documentElement.classList.remove("has-cursor");return}if(T||!window.matchMedia("(hover:hover) and (pointer:fine)").matches)return;var e=function(u){var d=document.createElement("div");return d.className=u,d.setAttribute("aria-hidden","true"),document.body.appendChild(d),d},t=e("cursor-dot"),n=e("cursor-ring"),r=[].slice.call(document.querySelectorAll(".mesh-glow"));document.documentElement.classList.add("has-cursor");var i=0,o=0,s=0,a=0,l=!1,p=0,v=C?1:.18;function w(){s+=(i-s)*v,a+=(o-a)*v,t.style.transform="translate3d("+i+"px,"+o+"px,0)",n.style.transform="translate3d("+s.toFixed(1)+"px,"+a.toFixed(1)+"px,0)";for(var u=240,d=0;d<r.length;d++){var f=r[d],g=f.parentElement.getBoundingClientRect();if(o>=g.top&&o<=g.bottom){var _=Math.min(o-g.top,g.bottom-o),M=_/u;f.style.opacity=M>1?1:M<0?0:M,f.style.transform="translate3d("+(s-g.left).toFixed(1)+"px,"+(a-g.top).toFixed(1)+"px,0)"}else f.style.opacity!=="0"&&(f.style.opacity="0")}p=requestAnimationFrame(w)}var b=".promo__frame,.esg__media,.topic__media,.dock,.btn--dark,.iconbtn,.topic__overlay,.collage__item--tree,.collage__item--team,.collage__item--hands,.lcc-button:not(.lcc-button--link)";document.addEventListener("mousemove",function(u){i=u.clientX,o=u.clientY;var d=u.target.closest?u.target:null,f=!!(d&&d.closest(b)),g=!!(d&&d.closest(".hero__title"));t.classList.toggle("is-light",f&&!g),n.classList.toggle("is-light",f&&!g),t.classList.toggle("is-title",g),n.classList.toggle("is-title",g);var _=document.querySelector(".hero__mesh .mesh-glow");_&&_.classList.toggle("is-hot",g),l||(l=!0,s=i,a=o,t.classList.add("is-on"),n.classList.add("is-on"),p=requestAnimationFrame(w))},{passive:!0});var E=".topic__link, .station-map__marker";function k(u){if(!u||!u.closest)return!1;var d=u.closest("a,button");return!!d&&!d.closest(E)}document.addEventListener("mouseover",function(u){n.classList.toggle("is-lg",k(u.target))},{passive:!0}),document.addEventListener("mouseout",function(u){k(u.target)&&n.classList.remove("is-lg")},{passive:!0}),document.addEventListener("mouseleave",function(){t.classList.remove("is-on"),n.classList.remove("is-on"),r.forEach(function(u){u.style.opacity="0"})}),document.addEventListener("mouseenter",function(){l&&(t.classList.add("is-on"),n.classList.add("is-on"))}),document.addEventListener("visibilitychange",function(){document.hidden?cancelAnimationFrame(p):l&&(p=requestAnimationFrame(w))})}function se(){var e=document.querySelector(".hero");if(!e)return;var t=e.querySelector(".hero__wordmark #hg");t&&!C&&!T&&function s(a){var l=(performance.now()-a)/1e3,p=294.133489+Math.sin(l*.75)*95,v=-363.95519+
1Math.cos(l*.62)*78;t.setAttribute("gradientTransform","matrix(640.999962,606.000020,-1144.657435,159.091016,"+p.toFixed(3)+","+v.toFixed(3)+")"),requestAnimationFrame(function(){s(a)})}(performance.now());function n(){e.classList.contains("is-ready")||e.classList.add("is-ready")}if(C||T){n();return}var r=[].slice.call(e.querySelectorAll(".collage__item img")),i=r.filter(function(s){return!s.complete});if(!i.length)requestAnimationFrame(n);else{var o=i.length;i.forEach(function(s){var a=function(){--o<=0&&requestAnimationFrame(n)};s.addEventListener("load",a,{once:!0}),s.addEventListener("error",a,{once:!0})})}setTimeout(n,1800)}function le(){var e=Array.prototype.slice.call(document.querySelectorAll(".dock__item"));if(!(!e.length||!("IntersectionObserver"in window))){var t={};e.forEach(function(r){var i=r.getAttribute("href").slice(1),o=document.getElementById(i);o&&(t[i]=r)});var n=new IntersectionObserver(function(r){r.forEach(function(i){var o=t[i.target.id];o&&o.classList.toggle("is-current",i.isIntersecting)})},{rootMargin:"-45% 0px -45% 0px"});Object.keys(t).forEach(function(r){n.observe(document.getElementById(r))})}}function ce(){var e=document.querySelector(".brand");if(!e)return;var t=null;function n(){var r=window.scrollY||document.documentElement.scrollTop||0,i=r>40;i!==t&&(t=i,document.documentElement.classList.toggle("is-shrunk",i))}window.addEventListener("scroll",n,{passive:!0}),n()}function ue(e){if(!e||e.dataset.split)return 0;e.dataset.split="true";let t=0;return function n(r){[...r.childNodes].forEach(i=>{if(i.nodeType===Node.TEXT_NODE){const o=document.createDocumentFragment();i.nodeValue.split(/(\s+)/).forEach(s=>{if(!s)return;if(/^\s+$/.test(s)){o.append(document.createTextNode(s));return}const a=document.createElement("span");a.className="w",a.style.setProperty("--w",t++),a.textContent=s,o.append(a)}),r.replaceChild(o,i);return}i.nodeType===Node.ELEMENT_NODE&&n(i)})}(e),t}function de(){const e=document.body;if(!e.classList.contains("page-article"))return;const t=document.querySelector(".article__title"),n=ue(t);t&&(e.style.setProperty("--ws",(n>8?.04:.055)+"s"),e.style.setProperty("--wn",Math.min(n,8)));const r=document.querySelectorAll(".article__content > p, .article__content > .article__career, .article__back, .more-articles__title");r.forEach((l,p)=>{l.style.setProperty("--i",p%3)}),T||C||!("IntersectionObserver"in window)?r.forEach(l=>l.classList.add("is-in")):U(r,"is-in",.05);const i=window.innerHeight;document.querySelectorAll(".reveal, .article__content > p").forEach(l=>{l.getBoundingClientRect().top<i&&l.classList.add("reveal--load")});let o=!1;const s=()=>{o||(o=!0,e.classList.add("is-ready"))};if(C||T){s();return}const a=document.querySelector(".article__hero img");if(a&&!a.complete){a.addEventListener("load",s,{once:!0}),a.addEventListener("error",s,{once:!0}),window.setTimeout(s,1400);return}requestAnimationFrame(s),window.setTimeout(s,300)}function fe(){var e=document.querySelector(".hero");if(!e||T||C||!window.matchMedia("(hover:hover) and (pointer:fine)").matches)return;var t=[].slice.call(e.querySelectorAll(".collage__item"));if(!t.length)return;var n=1.5,r=4,i=.16,o=.1,s=0,a=0,l=!1,p=!1,v=null,w=t.map(function(){return{cx:0,cy:0,d:n,lift:0}});function b(u){return u<-1?-1:u>1?1:u}function E(){for(var u=!1,d=0;d<t.length;d++){var f=w[d],g=t[d],_=g===v,M=_?r:n,j=_?1:0;f.d+=(M-f.d)*o,f.lift+=(j-f.lift)*o;var F,I;if(l){var A=g.getBoundingClientRect(),O=b((s-A.left-A.width/2)/(A.width/2)),c=b((a-A.top-A.height/2)/(A.height/2));F=O*f.d,I=-c*f.d}else F=0,I=0;f.cx+=(F-f.cx)*i,f.cy+=(I-f.cy)*i,(Math.abs(f.cx-F)>.04||Math.abs(f.cy-I)>.04||Math.abs(f.d-M)>5e-4||Math.abs(f.lift-j)>.005)&&(u=!0);var m=(-6*f.lift).toFixed(1),h=(1+.015*f.lift).toFixed(4);g.style.transform="rotateX("+(-f.cy).toFixed(2)+"deg) rotateY("+f.cx.toFixed(2)+"deg) translateY("+m+"px) scale("+h+")"}if(u||l)requestAnimationFrame(E);else{for(var y=0;y<t.length;y++)t[y].style.transform="";p=!1}}function k(){p||(p=!0,requestAnimationFrame(E))}e.addEventListener("mousemove",function(u){s=u.clientX,a=u.clientY,l=!0,k()},{passive:!0}),t.forEach(function(u){u.addEventListener("mouseenter",function(){v=u}),u.addEventListener("mouseleave",function(){v=null})}),e.addEventListener("mouseleave",function(){l=!1,v=null,k()})}var X=window.matchMedia("(prefers-reduced-motion: reduce)").matches;function R(e){return e?e.replace(/\[\]$/,""):""}function pe(){var e=document.getElementById("drawer");if(!e)return;
1var t=document.getElementById("drawer-title"),n=document.getElementById("drawer-body"),r=document.querySelector(".drawer-source"),i=null;document.querySelectorAll("[data-drawer]").forEach(function(a){a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-controls","drawer"),a.setAttribute("aria-expanded","false")});function o(a,l){var p=r&&r.querySelector('[data-drawer-content="'+a+'"]');if(!(!p||!t||!n)){i=l||null,i&&i.setAttribute("aria-expanded","true"),t.textContent=p.getAttribute("data-drawer-title")||"",n.innerHTML=p.innerHTML,n.scrollTop=0,e.hidden=!1,document.body.style.overflow="hidden",setTimeout(function(){e.classList.add("is-open")},10);var v=e.querySelector(".drawer__close");v&&v.focus()}}function s(){e.hidden||(e.classList.remove("is-open"),document.body.style.overflow="",setTimeout(function(){e.hidden=!0},480),i&&(i.setAttribute("aria-expanded","false"),i.focus(),i=null))}document.addEventListener("click",function(a){var l=a.target.closest("[data-drawer]");if(l){o(l.getAttribute("data-drawer"),l);return}a.target.closest("[data-drawer-close]")&&s()}),document.addEventListener("keydown",function(a){a.key==="Escape"&&s()}),e.addEventListener("keydown",function(a){if(a.key==="Tab"){var l=e.querySelectorAll("a[href], button:not([disabled])");if(l.length){var p=l[0],v=l[l.length-1];a.shiftKey&&document.activeElement===p?(a.preventDefault(),v.focus()):!a.shiftKey&&document.activeElement===v&&(a.preventDefault(),p.focus())}}})}function B(e){var t=[],n={};return e.querySelectorAll("[required]").forEach(function(r){if(r.type==="radio"||r.type==="checkbox"&&/\[\]$/.test(r.name)){if(n[r.name])return;n[r.name]=!0,t.push({type:r.type==="radio"?"radio":"checkbox-group",name:r.name,key:R(r.name),element:r});return}t.push({type:"field",key:R(r.name),element:r})}),t}function z(e,t){if(e.type==="radio"||e.type==="checkbox-group")return Array.prototype.some.call(t.elements[e.name]||[],function(r){return r.checked});var n=e.element;return n.type==="checkbox"?n.checked:n.value.trim()?n.type==="email"?/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(n.value.trim()):n.type==="tel"?n.value.replace(/\D/g,"").length>=7:!0:!1}function te(e,t){if(e.type==="radio"||e.type==="checkbox-group")return z(e,t)?null:"Kérjük, válasszon egy lehetÅséget.";var n=e.element;return n.type==="checkbox"?n.checked?null:"A beküldéshez kérjük, fogadja el a feltételt.":n.value.trim()?n.type==="email"&&!z(e,t)?"Kérjük, adjon meg egy érvényes e-mail cÃmet.":n.type==="tel"&&!z(e,t)?"Kérjük, adjon meg egy érvényes telefonszámot.":null:"Ezt a mezÅt kérjük kitölteni."}function D(e,t,n){var r=e.querySelector('[data-error="'+t+'"]');r&&(r.textContent=n||"",r.hidden=!n);var i=Array.prototype.slice.call(e.querySelectorAll('[name="'+t+'"], [name="'+t+'[]"]'));i.forEach(function(o){o.classList.toggle("is-invalid",!!n),o.setAttribute("aria-invalid",n?"true":"false");var s=o.closest(".check-field, .choice-card, .choice-pill");s&&s.classList.toggle("is-invalid",!!n)})}function me(e){e.querySelectorAll("[required]").forEach(function(t){var n=R(t.name),r=n?e.querySelector('[data-error="'+n+'"]'):null;t.setAttribute("aria-required","true"),r&&(r.id||(r.id="error-"+n),t.setAttribute("aria-describedby",r.id))})}function he(e){e.querySelectorAll("textarea[maxlength]").forEach(function(t){var n=e.querySelector('[data-counter="'+t.id+'"]');if(n){var r=function(){n.textContent=String(t.maxLength-t.value.length)};t.addEventListener("input",r),r()}})}function ve(e){e.querySelectorAll("[data-placeholder-select]").forEach(function(t){var n=function(){t.classList.toggle("has-placeholder",!t.value)};t.addEventListener("change",n),n()})}function ge(e){var t=Array.prototype.slice.call(e.querySelectorAll(".form-section")),n=Array.prototype.slice.call(e.querySelectorAll(".form-step"));function r(){t.forEach(function(o,s){if(n[s]){var a=B(o);n[s].classList.toggle("is-complete",a.length>0&&a.every(function(l){return z(l,e)}))}})}if(e.addEventListener("input",r),e.addEventListener("change",r),r(),"IntersectionObserver"in window){var i=new IntersectionObserver(function(o){o.forEach(function(s){if(s.isIntersecting){var a=t.indexOf(s.target);
1n.forEach(function(l,p){l.classList.toggle("is-current",a===p)})}})},{rootMargin:"-25% 0px -60% 0px",threshold:0});t.forEach(function(o){i.observe(o)})}return{blocks:t,steps:n}}function ne(e,t){var n=null;return t.forEach(function(r){var i=te(r,e);D(e,r.key,i),i&&!n&&(n=r.element)}),n}function ye(e,t,n){if(!t.length)return;var r=e.querySelector(".form-closing"),i=window.matchMedia("(max-width:820px)"),o=0,s=!1,a=document.createElement("div");a.className="stepper";var l=document.createElement("button");l.type="button",l.className="stepper__button stepper__button--back",l.textContent="Vissza";var p=document.createElement("button");p.type="button",p.className="stepper__button stepper__button--next",p.innerHTML='Tovább<span class="stepper__go" aria-hidden="true"></span>',a.appendChild(l),a.appendChild(p);function v(d){o=Math.max(0,Math.min(t.length-1,d)),t.forEach(function(f,g){f.hidden=g!==o}),r&&(r.hidden=o!==t.length-1),n.forEach(function(f,g){f.classList.toggle("is-current",g===o)}),t[o].insertAdjacentElement("afterend",a),l.hidden=o===0,p.hidden=o===t.length-1}function w(d){var f=ne(e,B(t[d]));return f?(f.focus(),!1):!0}function b(d){v(d);var f=e.querySelector(".request-form__header")||e;f.scrollIntoView({behavior:X?"auto":"smooth",block:"start"})}p.addEventListener("click",function(){w(o)&&b(o+1)}),l.addEventListener("click",function(){b(o-1)}),n.forEach(function(d,f){var g=d.querySelector(".form-step__button")||d;g.addEventListener("click",function(_){s&&(_.preventDefault(),!(f>o&&!w(o))&&b(f))})});function E(){s=!0,e.classList.add("is-stepper"),v(o)}function k(){s=!1,e.classList.remove("is-stepper"),t.forEach(function(d){d.hidden=!1}),r&&(r.hidden=!1),a.parentNode&&a.parentNode.removeChild(a)}function u(){i.matches?E():k()}u(),i.addEventListener?i.addEventListener("change",u):i.addListener&&i.addListener(u),e.addEventListener("submit",function(){if(s)for(var d=0;d<t.length;d++){var f=B(t[d]).some(function(g){return!!te(g,e)});if(f){v(d);break}}},!0)}function J(e){return fetch(e.action,{method:"POST",body:new FormData(e),headers:{Accept:"application/json"}}).then(function(t){return t.ok?t.json():t.json().then(function(n){var r=new Error("validation");throw r.body=n,r})})}function be(e){return!window.grecaptcha||!window.siteKey?J(e):new Promise(function(t,n){window.grecaptcha.ready(function(){window.grecaptcha.execute(window.siteKey,{action:"ajaxcaptcha"}).then(function(r){var i=e.querySelector('[name="_recaptcha"]');i&&(i.value=r),J(e).then(t).catch(n)}).catch(n)})})}function Q(){document.body.classList.contains("page-pillar")&&requestAnimationFrame(function(){document.body.classList.add("is-ready")})}function Ee(){var e=document.querySelector("[data-redesign-form]");if(!e){Q();return}pe(),me(e),he(e),ve(e);var t=ge(e),n=B(e);ye(e,t.blocks,t.steps),Q(),e.addEventListener("input",function(r){var i=r.target;if(i.name){var o=R(i.name),s=i.type==="radio"||i.type==="checkbox"&&/\[\]$/.test(i.name)?{type:i.type==="radio"?"radio":"checkbox-group",name:i.name,element:i}:{type:"field",element:i};z(s,e)&&D(e,o,null)}}),e.addEventListener("change",function(r){var i=r.target;if(i.name){var o=R(i.name),s=i.type==="radio"||i.type==="checkbox"&&/\[\]$/.test(i.name)?{type:i.type==="radio"?"radio":"checkbox-group",name:i.name,element:i}:{type:"field",element:i};z(s,e)&&D(e,o,null)}}),e.addEventListener("submit",function(r){r.preventDefault();var i=ne(e,n);if(i){i.focus();var o=i.closest(".form-section, .form-closing");o&&o.scrollIntoView({behavior:X?"auto":"smooth",block:"center"});return}e.classList.add("is-submitting"),be(e).then(function(){e.hidden=!0;var s=document.querySelector("[data-redesign-form-success]");if(s){s.hidden=!1,document.body.style.overflow="hidden";var a=s.querySelector(".success__title");a&&(a.setAttribute("tabindex","-1"),a.focus())}}).catch(function(s){var a=s.body&&s.body.errors?s.body.errors:{},l=null;if(Object.keys(a).forEach(function(v){D(e,v,a[v][0]),l||(l=e.querySelector('[name="'+v+'"], [name="'+v+'[]"]'))}),l){l.focus();var p=l.closest(".form-section, .form-closing");p&&p.scrollIntoView({behavior:X?"auto":"smooth",block:"center"})}}).finally(function(){e.classList.remove("is-submitting")})})}function we(){var e=document.getElementById("quick-menu");if(!e)return;var t=document.getElementById("quick-menu-button"),n=document.getElementById("quick-menu-list");if(!t||!n)return;if(document.body.classList.contains("acc")){n.hidden=!1,t.setAttribute("aria-expanded","true");return}function r(i){e.classList.toggle("is-open",i),t.setAttribute("aria-expanded",i?"true":"false"),n.hidden=!i}t.addEventListener("click",function(i){i.stopPropagation(),r(n.hidden)}),document.addEventListener("click",function(i){!n.hidden&&!e.contains(i.target)&&r(!1)}),document.addEventListener("keydown",function(i){i.key==="Escape"&&!n.hidden&&(r(!1),t.focus())}),r(!1)}const _e=[{key:"normal",label:"Normál · 11-22 kW"},{key:"fast",label:"Gyors · 50-150 kW"},{key:"ultra-fast",label:"Villám · 150 kW fölött"},{key:"type2",label:"Type 2 (AC)"},{key:"ccs",label:"CCS2 (DC)"},{key:"chademo",label:"CHAdeMO (DC)"},{key:"omv",label:"OMV töltÅállomás"}],Z=[{key:"paper",source:"paper",label:"PapÃr"},{key:"plastic",source:"pet_alu",label:"Műanyag / fém"},{key:"glass",source:"glass",label:"Ãveg"},{key:"repont",source:"repont",label:"REpont"},{key:"bulb",source:"bulb",label:"Izzó"},{key:"oil",source:"oil",label:"Használt sütÅolaj"},{key:"battery",source:"battery",label:"Elem"},{key:"light-tube",source:"lighttube",label:"FénycsÅ"}];function ke(e,t){return Promise.resolve(e).then(function(n){return typeof n!="str
1ing"?n:fetch(n).then(function(r){if(!r.ok)throw new Error("Az adatforrás nem érhetÅ el.");return r.json()})}).then(function(n){return Se(n,t)})}function Se(e,t){if(Array.isArray(e))return t==="waste"||Ie(e[0])?Le(e):Ae(e);if(!e||!Array.isArray(e.fajtak)||!Array.isArray(e.pontok))throw new Error("A töltÅállomások adatai nem értelmezhetÅk.");var n=0,r=e.pontok.map(function(i,o){var s=Ce(i,o);return s||n++,s}).filter(Boolean);if(!r.length)throw new Error("Nincsenek elérhetÅ töltÅállomás-adatok.");return{filters:e.fajtak.map(function(i){return{key:String(i.kulcs),label:x(i.nev)}}),stations:r,warning:n?"Néhány töltÅállomás hiányos adatai miatt nem jelenÃthetÅ meg.":""}}function Le(e){if(!e.length)throw new Error("Nincsenek elérhetÅ gyűjtÅpont-adatok.");var t=0,n=e.map(function(r,i){var o=xe(r,i);return o||t++,o}).filter(Boolean);if(!n.length)throw new Error("A gyűjtÅpontok adatai hiányosak.");return{filters:Z.map(function(r){return{key:r.key,label:r.label}}),stations:n,warning:t?"Néhány gyűjtÅpont hiányos adatai miatt nem jelenÃthetÅ meg.":""}}function xe(e,t){if(!e||typeof e!="object")return null;var n=x(e.address),r=Number(e.lat),i=Number(e.lng);if(!n||P(e.lat)||P(e.lng)||!Number.isFinite(r)||!Number.isFinite(i))return null;var o=n.match(/^(\d{4})\s+([^,]+)/),s=Number(e.shop_type);return{id:String(e.id||e.shop_id||"waste-point-"+t),address:n,postalCode:o?o[1]:"",city:o?o[2]:n,latitude:r,longitude:i,chargerCount:0,connectorType:"",power:"",filters:Z.filter(function(a){return Fe(e[a.source])}).map(function(a){return a.key}),store:x(e.organization)||(s===2?"INTERSPAR":"SPAR"),isOmv:!1}}function Ae(e){if(!e.length)throw new Error("Nincsenek elérhetÅ töltÅállomás-adatok.");var t=0,n=0,r=e.map(function(i,o){var s=Te(i,o);return s.station?(s.incomplete&&n++,s.station):(t++,null)}).filter(Boolean);if(!r.length)throw new Error("A töltÅállomások adatai hiányosak.");return{filters:_e,stations:r,warning:t?"Néhány töltÅállomás hiányos adatai miatt nem jelenÃthetÅ meg.":n?"Néhány töltÅállomás adatának részlete hiányzik.":""}}function Te(e,t){if(!e||typeof e!="object")return{station:null};var n=x(e.address),r=Number(e.lat),i=Number(e.lng);if(!n||P(e.lat)||P(e.lng)||!Number.isFinite(r)||!Number.isFinite(i))return{station:null};var o=x(e.charger_type),s=x(e.charger_output),a=Number(e.shop_type),l=n.match(/^(\d{4})\s+([^,]+)/),p=Me(o,s);return(a===3||a===4)&&p.push("omv"),{incomplete:!o||!s||P(e.charger_count)||P(e.shop_type),station:{id:String(e.id||"charger-"+t),address:n,postalCode:l?l[1]:"",city:l?l[2]:n,latitude:r,longitude:i,chargerCount:Number(e.charger_count)||0,connectorType:o,power:s,filters:$(p),store:a===2||a===4?"INTERSPAR":"SPAR",storeLogo:a===3?"sparExpress":a===2||a===4?"interspar":"spar",isOmv:a===3||a===4}}}function Ce(e,t){if(!e||typeof e!="object")return null;var n=x(e.cim),r=Number(e.lat),i=Number(e.lng);return!n||!Number.isFinite(r)||!Number.isFinite(i)?null:{id:String(e.id||"station-"+t),address:n,postalCode:x(e.irsz),city:x(e.telepules)||n,latitude:r,longitude:i,chargerCount:Number(e.db)||0,connectorType:x(e.tipus),power:x(e.telj),filters:$(Array.isArray(e.gyujt)?e.gyujt.map(function(o){return qe(o)}):[]),store:x(e.bolt)||"SPAR",isOmv:!!e.omv}}function qe(e){var t=String(e),n={papir:"paper",muanyag:"plastic",uveg:"glass",olaj:"oil",elem:"battery",fenycso:"light-tube"};return n[t]||t}function Me(e,t){var n=[],r=(e+" "+t).toLowerCase(),i=Array.from(t.matchAll(/(\d+(?:[.,]\d+)?)\s*kW\b/gi));return/type\s*2/.test(r)&&n.push("type2"),r.indexOf("ccs")!==-1&&n.push("ccs"),r.indexOf("chademo")!==-1&&n.push("chademo"),i.forEach(function(o){var s=Number(o[1].replace(",","."));s>150?n.push("ultra-fast"):s>=50?n.push("fast"):n.push("normal")}),i.length||n.push("normal"),$(n)}function x(e){var t=e==null?"":String(e);return new DOMParser().parseFromString(t.replace(/<(?:br|\/(?:p|div|li|h[1-6]))\b[^>]*>/gi," "),"text/html").body.textContent.replace(/\s+/g," ").trim()}function P(e){return e==null||String(e).trim()===""}function Ie(e){return!e||typeof e!="object"?!1:Z.some(function(t){return Object.prototype.hasOwnProperty.call(e,t.s
1ource)})}function Fe(e){return e===!0||Number(e)===1}function $(e){return Array.from(new Set(e))}const Ne=[{elementType:"geometry",stylers:[{color:"#f5f5f5"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.country",elementType:"geometry.fill",stylers:[{visibility:"on"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#1a3b61"},{weight:1.4},{visibility:"on"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#dadada"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#c9c9c9"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],W={latitude:47.18,longitude:19.42,zoom:7};class Pe{constructor(t,n){this.elements=t,this.onStationSelect=n,this.stations=[],this.visibleStations=new Set,this.selectedStation=null,this.center={latitude:W.latitude,longitude:W.longitude},this.zoom=W.zoom,this.google={map:null,markers:new Map,infoWindow:null},this.activeFilter="",this.popupContent="",this.resizeTimer=null,this.bindEvents()}setStations(t){this.stations=t,this.visibleStations=new Set(t),this.stations.forEach(function(n){n.isVisible=!0}),this.updateGoogleMarkers()}setVisibleStations(t){this.visibleStations=new Set(t),this.stations.forEach(function(n){n.isVisible=this.visibleStations.has(n)},this),this.updateGoogleMarkers()}setActiveFilter(t){this.activeFilter=t||"",this.updateGoogleMarkers()}setSelectedStation(t){this.selectedStation=t,this.updateGoogleMarkers()}focus(t){!t||!this.google.map||(this.google.map.panTo({lat:t.latitude,lng:t.longitude}),this.google.map.getZoom()<14&&this.google.map.setZoom(14))}showPopup(t,n){if(this.popupContent=n,!!this.google.map){var r=document.createElement("div"),i=document.createElement("div"),o=document.createElement("button");r.className="station-popup-google",i.className="station-popup-google__content",o.className="station-popup__close station-popup-google__close",o.type="button",o.setAttribute("aria-label","Bezárás"),i.innerHTML=n,o.addEventListener("click",this.hidePopup.bind(this)),r.appendChild(o),r.appendChild(i),this.elements.popup.hidden=!0,this.google.infoWindow||(this.google.infoWindow=new google.maps.InfoWindow({maxWidth:420,headerDisabled:!0})),this.google.infoWindow.setContent(r),this.google.infoWindow.setPosition({lat:t.latitude,lng:t.longitude}),this.google.infoWindow.open({map:this.google.map,shouldFocus:!1})}}hidePopup(){this.popupContent="",this.elements.popup.hidden=!0,this.google.infoWindow&&this.google.infoWindow.close()}enableGoogleMaps(t){return t?this.google.map?Promise.resolve(!0):Promise.all([je(),Oe(t)]).then((function(n){return this.createGoogleMap(n[0]),!0}).bind(this)):Promise.reject(new Error("Hiányzó Google Maps API kulcs."))}bindEvents(){window.addEventListener("resize",(function(){this.google.map&&(clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((function(){google.maps.event.trigger(this.google.map,"resize")}).bind(this),120))}).bind(this)),this.elements.controls&&this.elements.controls.querySelectorAll("[data-map-zoom]").forEach(function(t){t.addEventListener("click",(function(){if(this.google.map){var n=t.dataset.mapZoom==="in"?1:-1;this.google.map.setZoom(this.google.map.getZoom()+n)}}).bind(this))},this)}createGoogleMap(t){this.elements.popup.hidden=!0,this.google.map=new google.maps.Map(this.elements.googleCanvas,{center:{lat:this.center.latitude,lng:this.center.longitude},zoom:Math.round(this.zoom),styles:t,gestureHandling:"cooperative",mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,clickableIcons:!1}),this.stations.forEach(function(n){var r=ze(n,this.google.map,(function(){this.onStationSelect(n,!1)}).bind(this));this.google.markers.set(n.id,r)},this),this.google.map.addListener("zoom_changed",this.updateGoogleMarkers.bind(this)),this.elements.canvas.classList.remove("is-loading-google"),this.elements.canvas.classList.add("is-google-map"),this.updateGoogleMarkers(),this.selectedStation&&this.popupContent&&this.showPopup(this.selectedStation,this.popupContent)}updateGoogleMarkers(){this.google.map&&this.stations.forEach(function(t){var n=this.google.markers.get(t.id);n&&(n.setVisible(t.isVisible),n.setSelected(t===this.selectedStation),n.setMarkerSize(Re(Math.round((this.google.map.getZoom()-3)*6.05),36,70)),n.setActiveFilter(this.activeFilter),n.setZIndex(t===this.selectedStation?999:1))},this)}}function ze(e,t,n){var r=new google.maps.OverlayView,i=new google.maps.LatLng(e.latitude,e.longitude),o=document.createElement("div"),s=document.createElement("button");return o.className="station-map__google-marker-layer station-map__markers",s.type="button",s.className="station-map__marker"+(e.isOmv?" station-map__marker--omv":""),s.title=e.address,s.setAttribute("aria-label",e.address),s.innerHTML='<span class="station-map__marker-icon" aria-hidden="true"></span>',s.addEventListener("click",function(a){a.stopPropagation(),n()}),o.appendChild(s),r.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(o)},r.draw=function(){var a=this.getProjection();if(a){var l=a.fromLatLngToDivPixel(i);o.style.transform="translate("+l.x.toFixed(1)+"px,"+l.y.toFixed(1)+"px)"}},r.onRemove=function(){o.remove()},r.setVisible=function(a){o.hidden=!a},r.setSelected=function(a){s.classList.toggle("is-selected",a)},r.setMarkerSize=function(a){o.style.setProperty("--marker-size",a+"px")},r.setActiveFilter=function(a){o.dataset.activeFilter=a||""},r.setZIndex=function(a){o.style.zIndex=a},r.setMap(t),r}function je(){return Promise.resolve(Ne)}function Oe(e){return window.google&&window.google.maps?Promise.resolve(window.google):new Promise(function(t,n){var r="__stationMapGoogleReady"+Date.now(),i=document.createElement("script");window[r]=function(){delete window[r],t(window.google)},i.async=!0,i.onerror=function(){delete window[r],n(new Error("A Google Maps nem tölthetŠbe."))}
1,i.src="https://maps.googleapis.com/maps/api/js?key="+encodeURIComponent(e)+"&callback="+r,document.head.appendChild(i)})}function Re(e,t,n){return Math.max(t,Math.min(n,e))}function De(){var e=document.getElementById("station-finder");if(!e)return;var t=e.dataset.stationType!=="waste",n=e.dataset.itemLabel||"töltÅállomás",r=e.dataset.allLabel||"Ãsszes töltÅállomás",i=e.dataset.unavailableMessage||"A töltÅállomások adatai most nem érhetÅk el. FrissÃtsd az oldalt.",o={root:e,panel:e.querySelector(".finder-panel"),canvas:document.getElementById("station-map-canvas"),googleCanvas:document.getElementById("station-map-google"),markerLayer:document.getElementById("station-map-markers"),popup:document.getElementById("station-popup"),popupContent:e.querySelector(".station-popup__content"),popupClose:e.querySelector(".station-popup__close"),hint:document.getElementById("station-map-hint"),controls:e.querySelector(".station-map__controls"),searchField:document.getElementById("station-search-field"),searchInput:document.getElementById("station-search-input"),searchClear:document.getElementById("station-search-clear"),filters:document.getElementById("station-filters"),results:document.getElementById("station-results"),resultsStatus:document.getElementById("station-results-status"),error:document.getElementById("station-search-error")};if(!Be(o))return;var s=(window.SPAR_MAP_KEY||"").trim();o.canvas.classList.add("is-loading-google");var a={filters:[],stations:[],visibleStations:[],activeFilter:"",query:"",selectedStation:null,filterButtons:new Map,searchTimer:null},l;ke(window.SPAR_MAP_DATA||e.dataset.source||"/redesign/assets/data/gyujtopontok.json",e.dataset.stationType).then(function(c){if(a.filters=c.filters,a.stations=c.stations,p(),w(),c.warning&&A(c.warning),!s){o.canvas.classList.remove("is-loading-google"),A("A Google térkép használatához hiányzik az API kulcs."),O();return}l=new Pe(o,function(m,h){_(m,h)}),l.setStations(a.stations),b(),E(),k(),u(),l.enableGoogleMaps(s).catch(function(m){o.canvas.classList.remove("is-loading-google"),console.error("A Google Maps nem tölthetÅ be.",m),A(i),O()})}).catch(function(c){o.canvas.classList.remove("is-loading-google"),console.error("A térképes keresÅ adatai nem tölthetÅk be.",c),A(i),O()});function p(){o.filters.replaceChildren();var c=v("",r,!0);o.filters.appendChild(c),a.filters.forEach(function(m){o.filters.appendChild(v(m.key,m.label,!1))})}function v(c,m,h){var y=document.createElement("button"),S=document.createElement("span"),L=document.createElement("span");return y.type="button",y.className="filter-chip"+(h?" filter-chip--all is-active":" filter-chip--"+H(c)),y.dataset.filter=c,y.setAttribute("aria-pressed",h?"true":"false"),S.className="filter-chip__dot",S.setAttribute("aria-hidden","true"),L.className="filter-chip__count",L.textContent="0",y.append(S,document.createTextNode(m)),t&&y.appendChild(L),y.addEventListener("click",function(){a.activeFilter=a.activeFilter===c?"":c,u()}),a.filterButtons.set(c,{button:y,count:L}),y}function w(){var c=document.createDocumentFragment(),m=document.createElement("div");a.stations.forEach(function(h){var y=document.createElement("button"),S=document.createElement("span"),L=document.createElement("span"),N=document.createElement("span");y.type="button",y.className="station-result",S.className="station-result__city",S.textContent=h.city,L.className="station-result__address",L.textContent=h.address,N.className="station-result__tags",h.filters.forEach(function(Y){var G=document.createElement("span");G.className="station-tag station-tag--"+H(Y),G.textContent=I(Y),N.appendChild(G)}),y.append(S,L,N),y.addEventListener("click",function(){_(h,!0)}),h.result=y,c.appendChild(y)}),m.className="station-list__empty",m.hidden=!0,m.innerHTML="<h3>Nincs találat</h3><p>Próbálj kevesebb szűrÅt kijelölni, vagy Ãrj be másik települést.</p>",o.results.replaceChildren(c,m),a.emptyState=m}function b(){o.searchInput.addEventListener("input",function(){o.searchField.classList.toggle("is-filled",o.searchInput.value.length>0),clearTimeout(a.searchTimer),a.searchTimer=setTimeout(function(){a.query=V(o.searchInput.value),u()},140)}),o.searchClear.addEventListener("click",function(){o.searchInput.value="",o.searchField.classList.remove("is-filled"),a.query="",u(),o.searchInput.focus()})}function E(){o.popupClose.addEventListener("click",function(){_(null,!1)})}function k(){var c=o.root.querySelector(".finder-panel__section--filters"),m=c?c.querySelector(".finder-panel__title"):null;if(!(!c||!m)){var h=document.createElement("button");h.type="button",h.className="finder-panel__title",h.setAttribute("aria-expanded","true"),h.setAttribute("aria-controls",o.filters.id),h.textContent=m.textContent,m.replaceWith(h),h.addEventListener("click",function(){var y=c.classList.toggle("is-collapsed");h.setAttribute("aria-expanded",y?"false":"true")})}}function u(){a.visibleStations=a.stations.filter(d),l.setActiveFilter(a.activeFilter),l.setVisibleStations(a.visibleStations),f(),g(),a.selectedStation&&!a.visibleStations.includes(a.selectedStation)&&_(null,!1)}function d(c){var m=!a.activeFilter||c.filters.includes(a.activeFilter),h=V(c.address+" "+c.city);return m&&(!a.query||h.includes(a.query))}function f(){a.filterButtons.forEach(function(c,m){var h=a.activeFilter===m,y=a.stations.filter(function(S){var L=V(S.address+" "+S.city);
1return(!a.query||L.includes(a.query))&&(!m||S.filters.includes(m))}).length;c.button.classList.toggle("is-active",h),c.button.classList.toggle("is-empty",y===0),c.button.setAttribute("aria-pressed",h?"true":"false"),c.count.parentNode&&(c.count.textContent=y)})}function g(){var c=a.visibleStations.length,m=a.activeFilter||a.query?" a "+a.stations.length+"-bÅl":"";o.resultsStatus.textContent=c+" "+n+m,a.stations.forEach(function(h){h.result.hidden=!a.visibleStations.includes(h)}),a.emptyState.hidden=c!==0}function _(c,m){if(c&&a.selectedStation===c&&(c=null),a.selectedStation&&a.selectedStation.result&&a.selectedStation.result.classList.remove("is-selected"),a.selectedStation=c,l.setSelectedStation(c),!c){l.hidePopup();return}c.result.classList.add("is-selected"),l.showPopup(c,M(c)),m&&l.focus(c)}function M(c){var m=c.storeLogo||(c.store.toUpperCase().includes("INTERSPAR")?"interspar":"spar"),h=window.SPAR_MAP_LOGOS||{},y=h[m]||"/img/"+(m==="interspar"?"map-interspar":m==="sparExpress"?"map-spar-expressz":"spar-logo")+".png",S=m==="interspar"?"INTERSPAR":m==="sparExpress"?"SPAR Express":"SPAR",L=h.omv||"/img/map-omv.png",N='<span class="station-popup__logos"><img class="station-popup__logo" src="'+q(y)+'" alt="'+q(S)+'">'+(c.isOmv?'<img class="station-popup__logo station-popup__logo--omv" src="'+q(L)+'" alt="OMV">':"")+"</span>";return c.connectorType?'<div class="station-popup__header station-popup__header--charger"><div class="station-popup__heading"><p class="station-popup__count">'+c.chargerCount+' töltÅpont</p><p class="station-popup__address">'+q(c.address)+"</p></div>"+N+'</div><div class="station-popup__details">'+j("plug","Csatlakozó tÃpus:",c.connectorType)+j("power","TeljesÃtmény:",c.power)+"</div>":'<span class="station-popup__header"><span class="station-popup__city">'+q(c.city)+"</span>"+N+'</span><p class="station-popup__address">'+q(c.address)+'</p><div class="station-popup__tags">'+F(c)+"</div>"}function j(c,m,h){var y=Ge(h);return y.length?'<div class="station-popup__column"><span class="station-popup__column-icon station-popup__column-icon--'+c+'" aria-hidden="true"></span><p class="station-popup__column-title">'+m+'</p><ul class="station-popup__rows">'+y.map(function(S){return"<li>"+q(S)+"</li>"}).join("")+"</ul></div>":""}function F(c){return c.filters.map(function(m){return'<span class="station-tag station-tag--'+H(m)+'">'+q(I(m))+"</span>"}).join("")}function I(c){var m=a.filters.find(function(h){return h.key===c});return m?m.label:c}function A(c){o.error.textContent=c,o.error.hidden=!c}function O(){o.results.innerHTML='<div class="station-list__empty"><h3>Nem sikerült betölteni</h3><p>'+q(i)+"</p></div>"}}function Be(e){return Object.keys(e).every(function(t){return t==="root"||!!e[t]})}function V(e){return String(e||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()}function Ge(e){var t=String(e||""),n=t.match(/\d+\s*x\s*.+?(?=\s+\d+\s*x\s|$)/g);return n?n.map(function(r){return r.trim()}):t?[t]:[]}function q(e){return String(e||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function H(e){return String(e).replace(/[^a-z0-9-]/gi,"")}function We(){var e=document.querySelector(".feed[data-category-feed]");if(!e)return;var t=e.querySelector(".feed__grid"),n=e.querySelector(".feed__pagination");if(!t||!n)return;var r=n.querySelector('a[rel="next"]');if(!r)return;var i=document.createElement("div");i.className="feed__sentinel",i.setAttribute("aria-hidden","true"),n.insertAdjacentElement("afterend",i),n.hidden=!0;var o=!1,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=!s&&"IntersectionObserver"in window?new IntersectionObserver(function(b){b.forEach(function(E){E.isIntersecting&&(E.target.classList.add("is-visible"),a.unobserve(E.target))})},{rootMargin:"0px 0px -80px 0px",threshold:.08}):null;function l(b){b.forEach(function(E){if(E.classList.contains("reveal")){if(a){a.observe(E);return}E.classList.add("is-visible")}})}function p(b){o=b,e.classList.toggle("is-loading-more",b)}function v(){o||!r||(p(!0),fetch(r.href,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(function(b){if(!b.ok)throw new Error("A következÅ cikkoldal nem tölthetÅ be.");return b.text()}).then(function(b){var E=new DOMParser().parseFromString(b,"text/html"),k=E.querySelector(".feed__grid"),u=E.querySelector(".feed__pagination"),d=k?Array.from(k.children):[],f=d.map(function(g){var _=document.importNode(g,!0);return t.appendChild(_),_});l(f),r=u?u.querySelector('a[rel="next"]'):null,r||(e.classList.add("is-complete"),i.remove())}).catch(function(){n.hidden=!1,i.remove()}).finally(function(){p(!1)}))}if(!("IntersectionObserver"in window)){n.hidden=!1,i.remove();return}var w=new IntersectionObserver(function(b){b.forEach(function(E){E.isIntersecting&&v()})},{rootMargin:"450px 0px 450px 0px",threshold:0});w.observe(i)}function Ve(){var e=document.getElementById("cookie");if(!(!e||document.cookie.indexOf("cookie=1")!==-1)){e.classList.add("show");var t=e.querySelector(".button");t&&t.addEventListener("click",function(n){n.preventDefault(),e.classList.remove("show");var r=new Date(Date.now()+30*24*60*60*1e3).toUTCString();document.cookie="cookie=1; expires="+r+"; path=/"})}}function ee(){re(),ce(),ie(),ae(),se(),de(),oe(),le(),fe(),Ve(),we(),De(),We(),K(document.getElementById("featured-track"),document.querySelector('[data-featured="prev"]'),document.querySelector('[data-featured="next"]'),document.querySelectorAll(".featured__dot"),5e3),K(document.getElementById("promo-track"),document.querySelector('[data-promo="prev"]'),document.querySelector('[data-promo="next"]')),Ee()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee();
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.