1var e=Object.defineProperty,t=(t,n,i)=>((t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i)(t,"symbol"!=typeof n?n+"":n,i);let n=0,i=!1,s=null,o=!1;function r(){const e=window.scrollY;e>0?s.classList.add("scrolled"):s.classList.remove("scrolled"),o||(e<=0?s.classList.remove("header-hidden"):e>n&&e>100?s.classList.add("header-hidden"):e<n&&s.classList.remove("header-hidden")),n=e,i=!1}function a(){i||(requestAnimationFrame(r),i=!0)}let l=-1,c=null;function d(){s=document.querySelector("[mastheader]"),s&&(o=s.hasAttribute("data-header-pinned"),n=window.scrollY,r(),window.addEventListener("scroll",a,{passive:!0})),document.querySelectorAll(".mastheader-nav ul > li.menu-item-has-children").forEach(function(e){e.querySelector(".sub-menu .menu-item-has-children")&&!e.classList.contains("mega-menu")&&(e.classList.add("mega-menu"),function(e){const t=e.querySelector(".sub-menu");if(!t)return;const n=Array.from(t.children),i=n.filter(function(e){return e.classList.contains("menu-item-has-children")}),s=n.filter(function(e){return!e.classList.contains("menu-item-has-children")});if(t.innerHTML="",i.forEach(function(e){t.appendChild(e)}),s.length>0){const e=document.createElement("div");e.className="single-items-column",s.forEach(function(t){e.appendChild(t)}),t.appendChild(e)}}(e))}),document.querySelectorAll(".mastheader-nav > ul > li.menu-item-has-children").forEach(function(e,t){const n=e.querySelector(".sub-menu");n&&(e.addEventListener("mouseenter",function(){const i=e.querySelector(".arrow-icon svg");i&&(i.style.transform="rotate(180deg)"),function(e,t,n){c&&(clearTimeout(c),c=null),document.querySelectorAll(".mastheader-nav > ul > li.menu-item-has-children > .sub-menu").forEach(function(e){e.style.opacity="0",e.style.transform="translateX(0)",e.style.transition="none"});let i=document.querySelector(".dropdown-backdrop-mask");const s=!i,o=l;l=n,i||(i=document.createElement("div"),i.className="dropdown-backdrop-mask",e.closest(".mastheader-nav").appendChild(i));const r=e.getBoundingClientRect(),a=document.querySelector(".container").getBoundingClientRect(),d=a.left+a.width/2;r.left>d?(t.style.left="auto",t.style.right="-50px"):(t.style.left="-50px",t.style.right="auto"),function(e,t,n,i){const s=e.left-t.left,o=e.top-t.top;i?(n.style.transition="none",n.style.transform=`translate(${s}px, ${o+10}px) scale(0.95)`,n.style.width=e.width+"px",n.style.height=e.height+"px",n.style.opacity="0",setTimeout(()=>{n.style.transition="all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1)",n.style.transform=`translate(${s}px, ${o}px) scale(1)`,n.style.opacity="1"},10),setTimeout(()=>{n.style.transition="all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)"},250)):(n.style.transform=`translate(${s}px, ${o}px)`,n.style.width=e.width+"px",n.style.height=e.height+"px",n.style.opacity="1")}(t.getBoundingClientRect(),e.closest(".mastheader-nav").getBoundingClientRect(),i,s);const u=s?"slideUp":n>o?"right":"left";c=setTimeout(()=>{!function(e,t){if("slideUp"===t)e.style.transform="translateY(8px) scale(0.98)",e.style.transition="none",e.style.opacity="0",setTimeout(()=>{e.style.transition="all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1)",e.style.transform="translateY(0) scale(1)",e.style.opacity="1"},10);else if("none"===t)e.style.transform="translateX(0)",e.style.transition="none",e.style.opacity="1";else{const n="right"===t?"translateX(8px)":"translateX(-8px)";e.style.transform=n,e.style.transition="none",e.style.opacity="0.6",setTimeout(()=>{e.style.transition="all 0.2s ease-out",e.style.transform="translateX(0)",e.style.opacity="1"},10)}}(t,u)},s?50:150)}(e,n,t)}),e.addEventListener("mouseleave",function(){const t=e.querySelector(".arrow-icon svg");t&&(t.style.transform="rotate(0deg)")}))}),document.querySelectorAll(".mastheader-nav").forEach(function(e){e.addEventListener("mouseleave",function(){const e=document.querySelector(".dropdown-backdrop-mask");e&&(e.style.opacity="0"),document.querySelectorAll(".mastheader-nav > ul > li.menu-item-has-children > .sub-menu").forEach(function(e){e.style.transform="translateX(0)",e.style.transition="none"}),l=-1})})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d();class u{constructor(e={}){this.screenOffset=e.screenOffset||10,this.dropdownOffset=e.dropdownOffset||0,this.transitionTimeout=e.transitionTimeout||250,this.align=e.align||"center",this.menu=e.menu||document.querySelector("[mastheader-floating]")||document.querySelector("[mastheader]"),this.nav=e.nav||document.getElementById("main-nav"),this.menuData=this.getMenuData(),this.activeDropdown=null,this.activeContainerItem=null,this.elementsWithDropdown=[],this.dropdownContainerItems=[],this.isDragging=!1,this.closeDropdownTimeout=null,this.enableTransitionTimeout=null,this.disableTransitionTimeout=null;const t=window.innerWidth;this.lastWindowWidth=t,this.skipMobile=e.skipMobile||!1,this.skipScroll=e.skipScroll||!1,this.mobileMenu=document.getElementById("mobile-menu"),this.mobileToggle=document.getElementById("mobile-menu-toggle"),this.mobileNavContainer=document.getElementById("mobile-nav-items"),this.isMobileMenuOpen=!1,this.root=null,this.linkContainer=null,this.dropdown=null,this.background=null,this.arrow=null,this.dropdownContainer=null,this.nav&&this.menuData.length&&t>=1024&&this.init(),this.menuData.length&&!this.skipMobile&&this.initMobileNav()}getMenuData(){const e=document.getElementById("mega-menu-data"),t=document.getElementById("primary-menu-data"),n=e||t;if(!n)return[];this.isMegaMenu=!!e;try{return JSON.parse(n.textContent)}catch(i){return console.error("Failed to parse menu data:",i),[]}}init(){this.linkContainer=this.nav.querySelector(".vsm-link-container"),this.linkContainer&&(this.dropdownBuilt=!1,this.elementsWithDropdown=Array.from(this.linkContainer.children).filter(e=>e.classList.contains("vsm-has-dropdown")),this.registerDropdownElementsEvents(),this.registerGlobalListeners(),this.skipScroll||this.initScrollBehavior())}ensureDropdownBuilt(){this.dropdownBuilt||(this.dropdownBuilt=!0,this.buildDropdowns(),this.updateDataElements(),this.registerDropdownContainerEvents())}buildDropdowns(){this.dropdown=document.createElement("div"),this.dropdown.className="vsm-dropdown",this.dropdown.innerHTML='\n <div class="vsm-background"></div>\n <div class="vsm-arrow"></div>\n <div class="vsm-dropdown-container"></div>\n ',this.background=this.dropdown.querySelector(".vsm-background"),this.arrow=this.dropdown.querySelector(".vsm-arrow"),this.dropdownContainer=this.dropdown.querySelector(".vsm-dropdown-container"),this.isMegaMenu?this.buildMegaDropdowns():this.buildWpMenuDropdowns(),this.menu.appendChild(this.dropdown),this.menu.classList.add("vsm
1-menu","vsm-no-transition")}buildMegaDropdowns(){this.menuData.forEach(e=>{const t=document.createElement("div");t.className="vsm-dropdown-section",t.setAttribute("data-dropdown",e.id),t.setAttribute("aria-hidden","false");const n=document.createElement("div");n.className="vsm-dropdown-content";const i=e.columns&&e.columns.length||2;switch(e.panel_type){case"grid_sedii":n.innerHTML=this.buildSediiPanel(e),n.style.width="600px";break;case"featured":n.innerHTML=this.buildFeaturedPanel(e),n.style.width="500px";break;case"editura":n.innerHTML=this.buildEdituraPanel(e),n.style.width="500px";break;default:n.innerHTML=this.buildColumnsPanel(e),n.style.width=Math.min(280*i,900)+"px"}t.appendChild(n),this.dropdownContainer.appendChild(t)})}buildColumnsPanel(e){if(!e.columns||0===e.columns.length)return"";let t=`<div class="vsm-columns" style="--vsm-cols: ${e.columns.length}">`;return e.columns.forEach(e=>{const n=e.color||"heket",i=this.hasRealUrl(e.url)?"a":"div",s=this.hasRealUrl(e.url)?` href="${e.url}"`:"",o=e.icon?`<span class="vsm-col-icon vsm-col-icon--${n}">${this.lucideIcon(e.icon)}</span>`:"",r=e.icon||e.title;if(t+=`<div class="vsm-column${r?"":" vsm-column--no-head"}">`,r&&(t+='<div class="vsm-column-head">',t+=o,t+=`<${i}${s} class="vsm-column-header vsm-column-header--${n}">${e.title}</${i}>`,t+="</div>"),e.items&&e.items.length>0)if(e.items.some(e=>e.description))t+='<ul class="vsm-links vsm-links--rich">',e.items.forEach(e=>{const n=e.description?`<span class="vsm-item-desc">${e.description}</span>`:"",i=e.icon?`<span class="vsm-item-icon">${this.lucideIcon(e.icon)}</span>`:"",s=this.hasRealUrl(e.url)?"a":"div",o=this.hasRealUrl(e.url)?` href="${e.url}"`:"";t+=`<li class="vsm-item-rich">\n <${s}${o} class="vsm-rich-link">\n ${i}\n <span class="vsm-rich-label">${e.label}</span>\n ${n}\n </${s}>\n </li>`}),t+="</ul>";else{const n='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="vsm-chevron-link" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>';t+='<ul class="vsm-links">',e.items.forEach(e=>{const i=this.hasRealUrl(e.url)?"a":"span",s=this.hasRealUrl(e.url)?` href="${e.url}"`:"",o=e.icon?`<span class="vsm-item-icon">${this.lucideIcon(e.icon)}</span>`:`<span class="vsm-item-icon">${n}</span>`;t+=`<li><${i}${s}>${o}<span>${e.label}</span></${i}></li>`}),t+="</ul>"}t+="</div>"}),t+="</div>",t+=this.buildPanelFooter(e),t}buildSediiPanel(e){if(!e.sedii||0===e.sedii.length)return"";const t=e.sedii.length;let n='<div style="padding:32px">';return n+='<div class="vsm-sedii-header">',n+='<span class="vsm-sedii-title">ReÈeaua NaÈionalÄ</span>',n+=`<span class="vsm-sedii-count">${t} Centre Active</span>`,n+="</div>",n+='<div class="vsm-sedii-grid">',e.sedii.forEach(e=>{const t=this.hasRealUrl(e.url)?"a":"div",i=this.hasRealUrl(e.url)?` href="${e.url}"`:"";n+=`<${t}${i} class="vsm-sedii-item">\n <span class="vsm-sedii-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/></svg></span>\n <span class="vsm-sedii-name">${e.title}</span>\n </${t}>`}),n+="</div>",n+="</div>",n+=this.buildPanelFooter(e,!0),n}buildFeaturedPanel(e){let t='<div class="vsm-featured-layout">';if(e.columns&&e.columns.length>0){t+='<div class="vsm-featured-columns">';const n=e.columns[0];n&&(t+='<div class="vsm-featured-col">',t+=`<h4 class="vsm-featured-col-title">${n.title||"Categorii"}</h4>`,n.items&&n.items.length>0&&(t+='<ul class="vsm-links">',n.items.forEach(e=>{const n=this.hasRealUrl(e.url)?"a":"span",i=this.hasRealUrl(e.url)?` href="${e.url}"`:"";t+=`<li><${n}${i}>${e.label}<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="vsm-chevron-link" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg></${n}></li>`}),t+="</ul>"),t+="</div>"),t+="</div>"}if(e.featured){const n=e.featured,i=n.thumbnail?`<img src="${n.thumbnail}" alt="" loading="lazy">`:"";t+=`<a href="${n.url||"#"}" class="vsm-featured-card">\n ${i}\n <div class="vsm-featured-overlay">
1\n <span class="vsm-featured-badge">${n.label}</span>\n <h4 class="vsm-featured-title">${n.title}</h4>\n <span class="vsm-featured-date">${n.date}</span>\n </div>\n </a>`}return t+="</div>",t}buildEdituraPanel(e){let t='<div class="vsm-editura-layout">';if(e.columns&&e.columns.length>0){const n=e.columns[0];if(n){if(t+='<div class="vsm-editura-col">',t+=`<h4 class="vsm-editura-col-title">${n.title||"Categorii"}</h4>`,n.items&&n.items.length>0&&(t+='<ul class="vsm-links">',n.items.forEach(e=>{const n=this.hasRealUrl(e.url)?"a":"span",i=this.hasRealUrl(e.url)?` href="${e.url}"`:"";t+=`<li><${n}${i}>${e.label}<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="vsm-chevron-link" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg></${n}></li>`}),t+="</ul>"),e.footer_bar){const n=e.footer_bar,i=this.hasRealUrl(n.url)?"a":"span",s=this.hasRealUrl(n.url)?` href="${n.url}"`:"";t+=`<${i}${s} class="vsm-editura-footer-link">${n.text}</${i}>`}t+="</div>"}}if(e.featured){const n=e.featured,i=n.thumbnail?`<img src="${n.thumbnail}" alt="${n.title||""}" loading="lazy">`:"",s=n.author?`<span class="vsm-book-author">${n.author}</span>`:"",o=this.hasRealUrl(n.url)?"a":"div",r=this.hasRealUrl(n.url)?` href="${n.url}"`:"";t+=`<${o}${r} class="vsm-book-card">\n <div class="vsm-book-cover">${i}</div>\n <span class="vsm-book-badge">${n.label||"Recomandare"}</span>\n <h4 class="vsm-book-title">${n.title}</h4>\n ${s}\n </${o}>`}return t+="</div>",t}buildPanelFooter(e,t=!1){if(!e.footer_bar)return"";const n=e.footer_bar,i=this.hasRealUrl(n.url)?"a":"div";return`<${i}${this.hasRealUrl(n.url)?` href="${n.url}"`:""} class="${t?"vsm-panel-footer vsm-panel-footer--subtle":"vsm-panel-footer"}">\n ${n.icon?this.lucideIcon(n.icon):""}<span>${n.text}</span>\n </${i}>`}hasRealUrl(e){return e&&"#"!==e&&""!==e}lucideIcon(e){return e?`<img src="/wp-content/themes/noua-acropola/assets/images/svg/lucide-icons/${e}.svg" class="vsm-lucide" alt="" width="20" height="20" loading="lazy">`:""}buildWpMenuDropdowns(){this.menuData.forEach(e=>{if(!e.children||0===e.children.length)return;const t=document.createElement("div");t.className="vsm-dropdown-section",t.setAttribute("data-dropdown",e.id),t.setAttribute("aria-hidden","false");const n=document.createElement("div");n.className="vsm-dropdown-content vsm-dropdown-content--wp";const i=e.children.some(e=>e.children&&e.children.length>0);n.innerHTML=i?this.buildWpMegaContent(e.children):this.buildWpSimpleContent(e.children),t.appendChild(n),this.dropdownContainer.appendChild(t)})}buildWpSimpleContent(e){return`\n <ul class="vsm-list">\n ${e.map(e=>`\n <li>\n <a href="${e.url||"#"}" class="vsm-link-item">${e.title}</a>\n </li>\n `).join("")}\n </ul>\n `}buildWpMegaContent(e){const t=e.filter(e=>e.children&&e.children.length>0),n=e.filter(e=>!e.children||0===e.children.length);let i='<div class="vsm-columns">';return t.forEach(e=>{const t=e.url?"a":"div",n=e.url?` href="${e.url}"`:"";i+=`\n <div class="vsm-column">\n <${t}${n} class="vsm-column-header">${e.title}</${t}>\n ${this.buildWpColumnContent(e.children)}\n </div>\n `}),n.length>0&&(i+=`\n <div class="vsm-column">\n <div class="vsm-column-header">Altele</div>\n <ul class="vsm-links">\n ${n.map(e=>`\n <li><a href="${e.url||"#"}">${e.title}</a></li>\n `).join("")}\n </ul>\n </div>\n `),i+="</div>",i}buildWpColumnContent(e){let t="";return e.forEach(e=>{if(e.children&&e.children.length>0){const n=e.url?"a":"div",i=e.url?` href="${e.url}"`:"";t+=`\n <div class="vsm-group">\n <${n}${i} class="vsm-group-title">${e.title}</${n}>\n <ul class="vsm-links">\n ${e.children.map(e=>`\n <li><a href="${e.url||"#"}">${e.title}</a></li>\n `).join("")}\n </ul>\n </div>\n `}else t+=`<a href="${e.url||"#"}" class="vsm-single-link">${e.title}</a>`}),t}updateDataElements(){this.elementsWithDropdown=Array.from(this.linkContainer.children).filter(e=>e.classList.contains("vsm-has-dropdown")),this.dropdownContainerItems=Array.from(this.dropdownContainer.children).map(e=>({el:e,name:e.getAttribute("data-dropdown"),align:e.getAttribute("data-align"),content:e.firstElementChild}))}toggleDropdown(e){this.activeDropdown===e?this.closeDropdown():this.openDropdown(e)}openDropdown(e){if(this.ensureDropdownBuilt(),this.activeDropdown===e)return;const t=!this.activeDropdown;this.activeDropdown=e,this.activeDropdown.setAttribute("aria-expanded","true"),this.elementsWithDropdown.forEach(e
1=>e.classList.remove("vsm-active")),e.classList.add("vsm-active");const n=e.getAttribute("data-dropdown");let i="vsm-left";this.activeContainerItem=null,this.dropdownContainerItems.forEach(e=>{e.el.classList.remove("vsm-active","vsm-left","vsm-right"),e.name===n?(e.el.setAttribute("aria-hidden","false"),e.el.classList.add("vsm-active"),i="vsm-right",this.activeContainerItem=e):(e.el.setAttribute("aria-hidden","true"),e.el.classList.add(i))}),this.activeContainerItem&&(t?(this.menu.classList.add("vsm-no-transition"),this.dropdown.style.visibility="hidden",this.dropdown.style.opacity="1",this.dropdown.style.transform="rotateX(0)",this.dropdown.style.pointerEvents="none",this.dropdownContainer.offsetHeight,this.resizeDropdown(),this.dropdown.style.cssText="",this.dropdownContainer.offsetHeight,requestAnimationFrame(()=>{this.menu.classList.remove("vsm-no-transition"),requestAnimationFrame(()=>{this.menu.classList.add("vsm-dropdown-active","vsm-overlay-active")})})):this.resizeDropdown())}closeDropdown(){this.activeDropdown&&this.activeContainerItem&&(this.elementsWithDropdown.forEach(e=>e.classList.remove("vsm-active")),this.activeContainerItem.el.setAttribute("aria-hidden","true"),this.clearEnableTransitionTimeout(),this.startDisableTransitionTimeout(),this.menu.classList.remove("vsm-overlay-active","vsm-dropdown-active"),this.activeDropdown.setAttribute("aria-expanded","false"),this.activeContainerItem=null,this.activeDropdown=null)}resizeDropdown(){if(!this.activeDropdown||!this.activeContainerItem)return;this.activeContainerItem.content.offsetHeight;const e=this.menu.getBoundingClientRect(),t=this.activeDropdown.getBoundingClientRect(),n=this.menu.querySelector(".container"),i=n?n.getBoundingClientRect():e,s=this.activeContainerItem.content;let o=Math.max(300,s.offsetWidth||s.scrollWidth);const r=s.offsetHeight||s.scrollHeight,a=i.left-e.left+this.screenOffset,l=i.right-e.left-this.screenOffset,c=t.left-e.left+t.width/2;let d=c-o/2;d+o>l&&(d=l-o),d<a&&(d=a),d=Math.round(d),this.clearDisableTransitionTimeout(),this.startEnableTransitionTimeout(),this.dropdownContainer.style.transform=`translate(${d}px, 12px)`,this.dropdownContainer.style.width=`${o}px`,this.dropdownContainer.style.height=`${r}px`,this.arrow.style.transform=`translate(${Math.round(c)}px, 6px) rotate(45deg)`,this.background.style.transform=`translate(${d}px, 12px)`,this.background.style.width=`${o}px`,this.background.style.height=`${r}px`}startCloseDropdownTimeout(){this.closeDropdownTimeout=setTimeout(()=>{this.closeDropdown(),this.closeDropdownTimeout=null},150)}clearCloseDropdownTimeout(){this.closeDropdownTimeout&&(clearTimeout(this.closeDropdownTimeout),this.closeDropdownTimeout=null)}startEnableTransitionTimeout(){this.enableTransitionTimeout=setTimeout(()=>{this.menu.classList.remove("vsm-no-transition")},50)}clearEnableTransitionTimeout(){clearTimeout(this.enableTransitionTimeout)}startDisableTransitionTimeout(){this.disableTransitionTimeout=setTimeout(()=>{this.menu.classList.add("vsm-no-transition")},this.transitionTimeout)}clearDisableTransitionTimeout(){clearTimeout(this.disableTransitionTimeout)}registerDropdownElementsEvents(){this.elementsWithDropdown.forEach(e=>{e.addEventListener("mouseenter",()=>{this.clearCloseDropdownTimeout(),this.openDropdown(e)}),e.addEventListener("click",t=>{"BUTTON"===e.tagName&&(t.preventDefault(),this.toggleDropdown(e))})})}registerDropdownContainerEvents(){let e=!1;document.addEventListener("mousemove",t=>{this.activeDropdown&&!e&&(e=!0,requestAnimationFrame(()=>{if(e=!1,!this.activeDropdown)return;const n=this.nav.getBoundingClientRect(),i=this.background.getBoundingClientRect(),s=t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom,o=t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom,r=t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=n.bottom&&t.clientY<=i.top;s||o||r?this.clearCloseDropdownTimeout():this.closeDropdownTimeout||this.startCloseDropdownTimeout()}))})}registerGlobalListeners(){window.addEventListener("resize",this.handleWindowResize.bind(this)),document.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),document.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),document.body.addEventListener("pointerup",this.handleDocumentPointerUp.bind(this))}handleWindowResize(){if(this.lastWindowWidth!==window.innerWidth){if(this.lastWindowWidth=window.innerWidth,this.activeDropdown)return this.menu.classList.add("vsm
1-no-transition"),void this.resizeDropdown();this.background&&this.background.getAttribute("style")&&(this.menu.classList.add("vsm-no-transition","vsm-no-transition_dropdown"),setTimeout(()=>this.menu.classList.remove("vsm-no-transition_dropdown")),this.closeDropdown(),this.clearAllStyles())}}handleTouchMove(){this.isDragging=!0}handleTouchStart(){this.isDragging=!1}handleDocumentPointerUp(e){this.menu.contains(e.target)||this.isDragging||this.closeDropdown()}clearAllStyles(){this.dropdownContainer.removeAttribute("style"),this.arrow.removeAttribute("style"),this.background.removeAttribute("style")}initScrollBehavior(){let e=window.scrollY,t=!1;const n=()=>{const n=window.scrollY;if(this.isMobileMenuOpen)return this.menu.classList.remove("scroll-down"),e=n,void(t=!1);n>e&&n>100&&this.closeDropdown(),e=n,t=!1};window.addEventListener("scroll",()=>{t||(requestAnimationFrame(n),t=!0)})}initMobileNav(){if(!this.mobileMenu||!this.mobileToggle)return;this.buildMobileMenu(),this.mobileToggle.addEventListener("click",()=>{this.isMobileMenuOpen?this.closeMobileMenu():this.openMobileMenu()});const e=this.mobileMenu.querySelector(".mobile-menu__backdrop");e&&e.addEventListener("click",()=>this.closeMobileMenu());const t=document.getElementById("mobile-menu-close");t&&t.addEventListener("click",()=>this.closeMobileMenu()),document.addEventListener("keydown",e=>{"Escape"===e.key&&this.isMobileMenuOpen&&this.closeMobileMenu()}),window.addEventListener("resize",()=>{window.innerWidth>=1024&&this.isMobileMenuOpen&&this.closeMobileMenu()})}buildMobileMenu(){if(!this.mobileNavContainer||!this.menuData.length)return;let e='<ul class="mobile-nav-list">';this.isMegaMenu?e+=this.buildMobileMegaMenu():e+=this.buildMobileWpMenu(),e+="</ul>",this.mobileNavContainer.innerHTML=e,this.mobileNavContainer.addEventListener("click",e=>{const t=e.target.closest("a[href]");if(!t)return;if(!t.getAttribute("href"))return;const n=new URL(t.href,window.location.href);n.origin===window.location.origin&&n.pathname===window.location.pathname&&n.hash&&this.closeMobileMenu()}),this.mobileNavContainer.querySelectorAll(".mobile-nav-expand").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();const n=e.closest(".mobile-nav-item"),i=n.querySelector(".mobile-nav-submenu");"true"===e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded","false"),i.style.maxHeight="0",n.classList.remove("is-open")):(e.setAttribute("aria-expanded","true"),i.style.maxHeight=i.scrollHeight+"px",n.classList.add("is-open"))})})}buildMobileMegaMenu(){let e="";return this.menuData.forEach(t=>{const n=t.columns&&t.columns.length>0||t.sedii&&t.sedii.length>0,i=this.hasRealUrl(t.url),s=t.label||"";e+='<li class="mobile-nav-item">',n?(e+='<div class="mobile-nav-row">',e+=i?`<a href="${t.url}" class="mobile-nav-link">${s}</a>`:`<span class="mobile-nav-link">${s}</span>`,e+=`<button class="mobile-nav-expand" aria-expanded="false" aria-label="Extinde ${s}">`,e+='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>',e+="</button>",e+="</div>",e+='<div class="mobile-nav-submenu">',e+='<ul class="mobile-nav-sublist">',"grid_sedii"===t.panel_type&&t.sedii?t.sedii.forEach(t=>{this.hasRealUrl(t.url)?e+=`<li class="mobile-nav-subitem"><a href="${t.url}" class="mobile-nav-sublink">${t.title}</a></li>`:e+=`<li class="mobile-nav-subitem"><span class="mobile-nav-sublink">${t.title}</span></li>`}):t.columns&&t.columns.forEach(t=>{e+='<li class="mobile-nav-subitem mobile-nav-subitem--group">',t.title&&(this.hasRealUrl(t.url)?e+=`<a href="${t.url}" class="mobile-nav-group-title">${t.title}</a>`:e+=`<span class="mobile-nav-group-title">${t.title}</span>`),t.items&&t.items.length>0&&(e+='<ul class="mobile-nav-nested">',t.items.forEach(t=>{this.hasRealUrl(t.url)?e+=`<li><a href="${t.url}" class="mobile-nav-nested-link">${t.label}</a></li>`:e+=`<li><span class="mobile-nav-nested-link">${t.label}</span></li>`}),e+="</ul>"),e+="</li>"}),e+="</ul>",e+="</div>"):e+=i?`<a href="${t.url}" class="mobile-nav-link">${s}</a>`:`<span class="mobile-nav-link">${s}</span>`,e+="</li>"}),e}buildMobileWpMenu(){let e="";return this.menuData.forEach(t=>{const n=t.children&&t.children.length>0,i=this.hasRealUrl(t.url);e+='<li class="mobile-nav-item">',n?(e+='<div class="mobile-nav-row">',e+=i?`<a href="${t.url}" class="mobile-nav-link">${t.title}</a>`:`<span class="mobile-nav-link">${t.title}</span>`,e+=`<button class="mobile-nav-expand" aria-expanded="false" aria-label="Extinde ${t.title}">`,e+='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>',e+="</button>",e+="</div>",e+='<div class="mobile-nav-submenu">',e+=this.buildMobileWpSubmenu(t.children),e+="</div>"):e+=`<a href="${t.url||"#"}" class="mobile-nav-link">${t.title}</a>`,e+="</li>"}),e}buildMobileWpSubmenu(e){let t='<ul class="mobile-nav-sublist">';
1return e.forEach(e=>{e.children&&e.children.length>0?(t+='<li class="mobile-nav-subitem mobile-nav-subitem--group">',e.url&&"#"!==e.url?t+=`<a href="${e.url}" class="mobile-nav-group-title">${e.title}</a>`:t+=`<span class="mobile-nav-group-title">${e.title}</span>`,t+='<ul class="mobile-nav-nested">',e.children.forEach(e=>{t+=`<li><a href="${e.url||"#"}" class="mobile-nav-nested-link">${e.title}</a></li>`}),t+="</ul>",t+="</li>"):t+=`<li class="mobile-nav-subitem"><a href="${e.url||"#"}" class="mobile-nav-sublink">${e.title}</a></li>`}),t+="</ul>",t}openMobileMenu(){this.isMobileMenuOpen=!0,this.mobileMenu.setAttribute("aria-hidden","false"),this.mobileMenu.classList.add("is-open"),this.mobileToggle.setAttribute("aria-expanded","true"),this.mobileToggle.setAttribute("aria-label","Ãnchide meniul"),document.body.style.overflow="hidden"}closeMobileMenu(){this.isMobileMenuOpen=!1,this.mobileMenu.setAttribute("aria-hidden","true"),this.mobileMenu.classList.remove("is-open"),this.mobileToggle.setAttribute("aria-expanded","false"),this.mobileToggle.setAttribute("aria-label","Deschide meniul"),document.body.style.overflow=""}}function h(){window.nav=new u;const e=document.querySelector("[mastheader]"),t=document.getElementById("static-nav");e&&t&&(window.navStatic=new u({menu:e,nav:t,skipMobile:!0,skipScroll:!0}))}function p(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h):requestAnimationFrame(h);var f,g,v,y,b,w=(f=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],g=function(){function e(t){var n=t.targetModal,i=t.triggers,s=void 0===i?[]:i,o=t.onShow,r=void 0===o?function(){}:o,a=t.onClose,l=void 0===a?function(){}:a,c=t.openTrigger,d=void 0===c?"data-micromodal-trigger":c,u=t.closeTrigger,h=void 0===u?"data-micromodal-close":u,m=t.openClass,f=void 0===m?"is-open":m,g=t.disableScroll,v=void 0!==g&&g,y=t.disableFocus,b=void 0!==y&&y,w=t.awaitCloseAnimation,E=void 0!==w&&w,k=t.awaitOpenAnimation,x=void 0!==k&&k,S=t.debugMode,L=void 0!==S&&S;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modal=document.getElementById(n),this.config={debugMode:L,disableScroll:v,openTrigger:d,closeTrigger:h,openClass:f,onShow:r,onClose:l,awaitCloseAnimation:E,awaitOpenAnimation:x,disableFocus:b},s.length>0&&this.registerTriggers.apply(this,p(s)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var t;return(t=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.filter(Boolean).forEach(function(t){t.addEventListener("click",function(t){return e.showModal(t)})})}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation?this.modal.addEventListener("animationend",function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()},!1):this.setFocusToFirstNode(),this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var n=this.config.openClass;this.modal.addEventListener("animationend",function e(){t.classList.remove(n),t.removeEventListener("animationend",e,!1)},!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}}
1,{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(f);return Array.apply(void 0,p(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var n=t.filter(function(t){return!t.hasAttribute(e.config.closeTrigger)});n.length>0&&n[0].focus(),0===n.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter(function(e){return null!==e.offsetParent}),this.modal.contains(document.activeElement)){var n=t.indexOf(document.activeElement);e.shiftKey&&0===n&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&n===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}(),v=null,y=function(e){if(!document.getElementById(e))return console.warn("MicroModal: âSeems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},b=function(e,t){if(e.length<=0&&(console.warn("MicroModal: âPlease specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>')),!t)return!0;for(var n in t)y(n);return!0},{init:function(e){var t,n,i,s=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),o=p(document.querySelectorAll("[".concat(s.openTrigger,"]"))),r=(t=o,n=s.openTrigger,i=[],t.forEach(function(e){var t=e.attributes[n].value;void 0===i[t]&&(i[t]=[]),i[t].push(e)}),i);if(!0!==s.debugMode||!1!==b(o,r))for(var a in r){var l=r[a];s.targetModal=a,s.triggers=p(l),v=new g(s)}},show:function(e,t){var n=t||{};n.targetModal=e,!0===n.debugMode&&!1===y(e)||(v&&v.removeEventListeners(),(v=new g(n)).showModal())},close:function(e){e?v.closeModalById(e):v.closeModal()}});function E(e){if(!e)return"";const t=document.createElement("span");return t.appendChild(document.createTextNode(e)),t.innerHTML}"undefined"!=typeof window&&(window.MicroModal=w),w.init({disableScroll:!0,awaitCloseAnimation:!0,disableFocus:!0,onShow:e=>{"search-modal"===e.id&&setTimeout(()=>{var e;null==(e=document.getElementById("search-input"))||e.focus()},50)}});let k=null;async function x(){if(k)return k;const e=await fetch(naSearch.nonceUrl),t=await e.json();return k=t.nonce,k}function S(){const e=document.getElementById("search-input");if(!e||e._searchInit)return;e._searchInit=!0,x();const t=e.closest("form"),n=document.getElementById("search-modal"),i=document.getElementById("search-results"),s=document.getElementById("search-footer"),o=document.getElementById("search-count");let r=null,a=null,l="",c=0,d=0,u=!1,h=-1;t.addEventListener("submit",e=>{e.preventDefault();const t=i.querySelector(".search-item.is-active a")||i.querySelector(".search-item a");t&&t.click()}),e.addEventListener("input",()=>{clearTimeout(r),a&&a.abort();const t=e.value.trim();if(t.length<2)return f(),i.innerHTML="",i.className="",i.removeAttribute("style"),s.classList.add("hidden"),s.classList.remove("flex"),void n.classList.remove("has-results");r=setTimeout(()=>{f(),l=t,a=new AbortController,g(t,0,!1)},300)});let p=!1;function m(e){var t;const n=i.querySelectorAll(".search-item");if(n.length){if(null==(t=n[h])||t.classList.remove("is-active"),-1===h){const e=i.getBoundingClientRect();let t=0;for(let i=0;i<n.length;i++)if(n[i].getBoundingClientRect().top>=e.top-10){t=i;break}h=t}else h+=e;h<0&&(h=n.length-1),h>=n.length&&(h=0),n[h].classList.add("is-active"),p=!0,n[h].scrollIntoView({block:"nearest"}),requestAnimationFrame(()=>{p=!1})}}function f(){l="",c=0,d=0,u=!1,h=-1}async function g(e,t,s){var r,l;const h=await x(),p=`${naSearch.restUrl}?nonce=${h}&q=${encodeURIComponent(e)}&offset=${t}`;s?i.insertAdjacentHTML("beforeend",'<div class="search-loader flex items-center justify-center py-3">\n <div class="w-3.5 h-3.5 border-2 border-gray-200 rounded-full border-t-heket animate-spin"></div>\n </div>'):(i.innerHTML='<div class="flex items-center justify-center gap-2 px-5 py-8">\n <div class="w-4 h-4 border-2 border-gray-200 rounded-full border-t-heket animate-spin"></div>\n <span class="text-sm text-gray-400">Se cautÄ...</span>\n </div>',i.className="px-2 py-3",v(!1),n.classList.add("has-results"));try{const n=await fetch(p,{signal:a.signal}),l=await n.json();
1d=l.total,c=t+l.results.length,u=!1,s?(null==(r=i.querySelector(".search-loader"))||r.remove(),i.insertAdjacentHTML("beforeend",C(l.results,e))):0===l.results.length?(i.innerHTML=A(e),v(!1)):(i.innerHTML=C(l.results,e),i.className="overflow-y-auto max-h-[min(520px,55vh)] px-2.5 py-2 overscroll-contain",v(!0)),function(){const e=i.querySelectorAll(".search-item").length;d>0&&(o.textContent=e<d?`${e} din ${d} rezultate`:`${d} rezultate`)}()}catch(m){u=!1,"AbortError"!==m.name&&(s||(i.innerHTML=A(e),v(!1)),null==(l=i.querySelector(".search-loader"))||l.remove())}}function v(e){s.classList.toggle("hidden",!e),s.classList.toggle("flex",e)}i.addEventListener("scroll",()=>{var e;if(!p&&!u&&h>=0&&(null==(e=i.querySelectorAll(".search-item")[h])||e.classList.remove("is-active"),h=-1),u||c>=d)return;const{scrollTop:t,scrollHeight:n,clientHeight:s}=i;t+s>=n-100&&(u=!0,a=new AbortController,g(l,c,!0))}),e.addEventListener("keydown",e=>{var t;if("ArrowDown"===e.key)e.preventDefault(),m(1);else if("ArrowUp"===e.key)e.preventDefault(),m(-1);else if("Enter"===e.key&&h>=0){e.preventDefault();const n=null==(t=i.querySelectorAll(".search-item")[h])?void 0:t.querySelector("a");n&&n.click()}})}function L(e,t){const n={a:"[aÄâ]",i:"[iî]",s:"[sÈÅ]",t:"[tÈÅ£]"},i={"Ä":"[aÄâ]","â":"[aÄâ]","î":"[iî]","È":"[sÈÅ]","Å":"[sÈÅ]","È":"[tÈÅ£]","Å£":"[tÈÅ£]"},s=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").split("").map(e=>{const t=e.toLowerCase();return n[t]||i[t]||e}).join("");return e.replace(new RegExp(`(${s})`,"gi"),'<mark class="bg-amon/15 text-charcoal font-semibold rounded-sm px-0.5 ring-1 ring-amon/10">$1</mark>')}function C(e,t){return e.map(e=>{const n=e.thumbnail?`<img src="${E(e.thumbnail)}" alt="" class="w-14 h-14 rounded-xl object-cover shrink-0 ring-1 ring-black/5" loading="lazy">`:'<div class="flex items-center justify-center w-14 h-14 rounded-xl bg-gradient-to-br from-gray-50 to-gray-100 shrink-0 ring-1 ring-black/5">\n <svg class="w-5 h-5 text-gray-300" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"/></svg>\n </div>',i=e.excerpt?`<p class="text-[13px] sm:text-[14px] leading-[1.5] text-gray-500 mt-1 line-clamp-2 group-[.is-active]:text-white/70">${L(E(e.excerpt),t)}</p>`:"",s=function(e,t){try{const n=new URL(e,window.location.origin);return n.searchParams.set("search",t),n.toString()}catch{return e}}(e.url,t);return`<div class="search-item group border-b border-gray-100/80 last:border-b-0">\n <a href="${E(s)}" class="flex items-center gap-4 px-4 py-4 rounded-xl transition-colors duration-100 group-[.is-active]:bg-heket group-[.is-active]:shadow-sm hover:bg-gray-50 group-[.is-active]:hover:bg-heket">\n <div class="hidden sm:block shrink-0 transition-transform duration-150 group-[.is-active]:scale-105">\n ${n}\n </div>\n <div class="min-w-0 flex-1">\n <div class="flex items-center gap-2.5">\n <span class="text-[14px] sm:text-[16px] font-semibold text-charcoal group-[.is-active]:text-white leading-snug">${L(E(e.title),t)}</span>\n <span class="shrink-0 text-[10px] sm:text-[11px] font-semibold tracking-wide uppercase text-heket/60 bg-heket/6 px-2 py-0.5 rounded-md group-[.is-active]:text-white/70 group-[.is-active]:bg-white/15">${E(e.type)}</span>\n </div>\n <div class="group-[.is-active]:opacity-80">${i}</div>\n </div>\n <svg class="hidden sm:block w-4 h-4 text-gray-200 shrink-0 opacity-0 group-[.is-active]:opacity-100 group-[.is-active]:text-white/50 transition-opacity" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/></svg>\n </a>\n </div>`}).join("")}function A(e){return`<div class="px-5 py-12 text-center">\n <div class="inline-flex items-center justify-center w-12 h-12 mb-3 rounded-full bg-gray-50">\n <svg class="w-6 h-6 text-gray-300" fill="none" stroke="currentColor" stroke-width="1.5" viewB
1ox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"/></svg>\n </div>\n <p class="text-sm text-gray-500">Niciun rezultat pentru â<span class="font-medium text-charcoal">${E(e)}</span>"</p>\n <p class="mt-1 text-xs text-gray-400">ÃncearcÄ alte cuvinte cheie</p>\n </div>`}document.addEventListener("click",function e(t){t.target.closest('[data-micromodal-trigger="search-modal"]')&&(document.removeEventListener("click",e),requestAnimationFrame(S))});const O=new Set(["SCRIPT","STYLE","NOSCRIPT","IFRAME","SVG","FORM","INPUT","BUTTON","TEXTAREA","SELECT","OPTION","CODE","PRE","KBD","MARK"]);function T(e){return!!O.has(e.tagName)||!!e.isContentEditable}function I(){const e=function(){const e=(new URLSearchParams(window.location.search).get("search")||"").trim();return e.length>=2?e:null}();if(!e)return;const t=document.querySelector("main");if(!t)return;const n=function(e){const t={a:"[aÄâ]",i:"[iî]",s:"[sÈÅ]",t:"[tÈÅ£]"},n={"Ä":"[aÄâ]","â":"[aÄâ]","î":"[iî]","È":"[sÈÅ]","Å":"[sÈÅ]","È":"[tÈÅ£]","Å£":"[tÈÅ£]"},i=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").split("").map(e=>{const i=e.toLowerCase();return t[i]||n[i]||e}).join("");return new RegExp(`(${i})`,"gi")}(e);!function(e,t){const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(n){if(!n.nodeValue||!n.nodeValue.trim())return NodeFilter.FILTER_REJECT;let i=n.parentNode;for(;i&&i!==e;){if(1===i.nodeType&&T(i))return NodeFilter.FILTER_REJECT;i=i.parentNode}return t.test(n.nodeValue)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i=[];let s;for(;s=n.nextNode();)i.push(s);for(const o of i){const e=o.nodeValue;t.lastIndex=0;const n=document.createDocumentFragment();let i,s=0;for(;null!==(i=t.exec(e));){i.index>s&&n.appendChild(document.createTextNode(e.slice(s,i.index)));const o=document.createElement("mark");o.className="na-search-hl",o.textContent=i[0],n.appendChild(o),s=i.index+i[0].length,0===i[0].length&&t.lastIndex++}s<e.length&&n.appendChild(document.createTextNode(e.slice(s))),o.parentNode.replaceChild(n,o)}}(t,n),requestAnimationFrame(()=>function(e){const t=e.querySelector(".na-search-hl");t&&t.scrollIntoView({behavior:"smooth",block:"center"})}(t))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",I):I(),document.querySelectorAll("img.na-lazy-blur").forEach(e=>{e.complete?e.classList.add("na-loaded"):e.addEventListener("load",()=>e.classList.add("na-loaded"),{once:!0})});class M{constructor(e){this.container=e,this.items=e.querySelectorAll("[data-accordion-item]"),this.style=e.dataset.accordionStyle||"default",this.init()}init(){this.items.forEach((e,t)=>{const n=e.querySelector("[data-accordion-trigger]"),i=e.querySelector("[data-accordion-content]");n&&i&&(0!==t||e.hasAttribute("data-open")?e.hasAttribute("data-open")&&(i.style.maxHeight=i.scrollHeight+"px"):this.open(e),n.addEventListener("click",()=>this.toggle(e)))})}open(e){const t=e.querySelector("[data-accordion-content]"),n=e.querySelector("[data-accordion-icon]"),i=e.querySelector("[data-accordion-trigger]"),s=e.querySelector("[data-accordion-title]");t.style.maxHeight=t.scrollHeight+"px",t.classList.remove("opacity-0"),t.classList.add("opacity-100"),e.setAttribute("data-open",""),i&&i.setAttribute("aria-expanded","true"),"faq"===this.style?(e.classList.add("shadow-lg","ring-1","ring-heket/20"),e.classList.remove("shadow-sm"),s&&(s.classList.remove("text-gray-800"),s.classList.add("text-heket")),n&&(n.classList.remove("bg-gray-100","text-gray-500"),n.classList.add("bg-heket","text-white"),n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"></path></svg>')):n&&(n.style.transform="rotate(45deg)")}close(e){const t=e.querySelector("[data-accordion-content]"),n=e.querySelector("[data-accordion-icon]"),i=e.querySelector("[data-accordion-trigger]"),s=e.querySelector("[data-accordion-title]");t.style.maxHeight="0",t.classList.add("opacity-0"),t.classList.remove("opacity-100"),e.removeAttribute("data-open"),i&&i.setAttribute("aria-expanded","fal
1se"),"faq"===this.style?(e.classList.remove("shadow-lg","ring-1","ring-heket/20"),e.classList.add("shadow-sm"),s&&(s.classList.remove("text-heket"),s.classList.add("text-gray-800")),n&&(n.classList.remove("bg-heket","text-white"),n.classList.add("bg-gray-100","text-gray-500"),n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg>')):n&&(n.style.transform="")}toggle(e){e.hasAttribute("data-open")?this.close(e):this.open(e)}}function _(){document.querySelectorAll("[data-accordion]").forEach(e=>{e._accordionInit||(e._accordionInit=!0,new M(e))})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",_):requestAnimationFrame(_);var $="(prefers-reduced-motion: reduce)";function D(e){e.length=0}function P(e,t,n){return Array.prototype.slice.call(e,t,n)}function F(e){return e.bind.apply(e,[null].concat(P(arguments,1)))}var q=setTimeout,R=function(){};function B(e){return requestAnimationFrame(e)}function N(e,t){return typeof t===e}function H(e){return!W(e)&&N("object",e)}var j=Array.isArray,z=F(N,"function"),V=F(N,"string"),U=F(N,"undefined");function W(e){return null===e}function Y(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function G(e){return j(e)?e:[e]}function X(e,t){G(e).forEach(t)}function K(e,t){return e.indexOf(t)>-1}function Q(e,t){return e.push.apply(e,G(t)),e}function Z(e,t,n){e&&X(t,function(t){t&&e.classList[n?"add":"remove"](t)})}function J(e,t){Z(e,V(t)?t.split(" "):t,!0)}function ee(e,t){X(t,e.appendChild.bind(e))}function te(e,t){X(e,function(e){var n=(t||e).parentNode;n&&n.insertBefore(e,t)})}function ne(e,t){return Y(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ie(e,t){var n=e?P(e.children):[];return t?n.filter(function(e){return ne(e,t)}):n}function se(e,t){return t?ie(e,t)[0]:e.firstElementChild}var oe=Object.keys;function re(e,t,n){return e&&(n?oe(e).reverse():oe(e)).forEach(function(n){"__proto__"!==n&&t(e[n],n)}),e}function ae(e){return P(arguments,1).forEach(function(t){re(t,function(n,i){e[i]=t[i]})}),e}function le(e){return P(arguments,1).forEach(function(t){re(t,function(t,n){j(t)?e[n]=t.slice():H(t)?e[n]=le({},H(e[n])?e[n]:{},t):e[n]=t})}),e}function ce(e,t){X(t||oe(e),function(t){delete e[t]})}function de(e,t){X(e,function(e){X(t,function(t){e&&e.removeAttribute(t)})})}function ue(e,t,n){H(t)?re(t,function(t,n){ue(e,n,t)}):X(e,function(e){W(n)||""===n?de(e,t):e.setAttribute(t,String(n))})}function he(e,t,n){var i=document.createElement(e);return t&&(V(t)?J(i,t):ue(i,t)),n&&ee(n,i),i}function pe(e,t,n){if(U(n))return getComputedStyle(e)[t];W(n)||(e.style[t]=""+n)}function me(e,t){pe(e,"display",t)}function fe(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ge(e,t){return e.getAttribute(t)}function ve(e,t){return e&&e.classList.contains(t)}function ye(e){return e.getBoundingClientRect()}function be(e){X(e,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function we(e){return se((new DOMParser).parseFromString(e,"text/html").body)}function Ee(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ke(e,t){return e&&e.querySelector(t)}function xe(e,t){return t?P(e.querySelectorAll(t)):[]}function Se(e,t){Z(e,t,!1)}function Le(e){return e.timeStamp}function Ce(e){return V(e)?e:e?e+"px":""}var Ae="splide",Oe="data-"+Ae;function Te(e,t){if(!e)throw new Error("["+Ae+"] "+(t||""))}var Ie=Math.min,Me=Math.max,_e=Math.floor,$e=Math.ceil,De=Math.abs;function Pe(e,t,n){return De(e-t)<n}function Fe(e,t,n,i){var s=Ie(t,n),o=Me(t,n);return i?s<e&&e<o:s<=e&&e<=o}function qe(e,t,n){var i=Ie(t,n),s=Me(t,n);return Ie(Me(i,e),s)}function Re(e){return+(e>0)-+(e<0)}function Be(e,t){return X(t,function(t){e=e.replace("%s",""+t)}),e}function Ne(e){return e<10?"0"+e:""+e}var He={};function je(){var e=[];function t(e,t,n){X(e,function(e){e&&X(t,function(t){t.split(" ").forEach(function(t){var i=t.split(".");n(e,i[0],i[1])})})})}return{bind:function(n,i,s,o){t(n,i,function(t,n,i){var r="addEventListener"in t,a=r?t.removeEventListener.bind(t,n,s,o):t.removeListener.bind(t,s);r?t.addEventListener(n,s,o):t.addListener(s),e.push([t,n,i,s,a])})},unbind:function(n,i,s){t(n,i,function(t,n,i){e=e.filter(function(e){return!!(e[0]!==t||e[1]!==n||e[2]!==i||s&&e[3]!==s)||(e[4](),!1)})})},dispatch:function(e,t,n){var i,s=!0;return"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:s,detail:n}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,s,!1,n),e.dispatchEvent(i),i},destroy:function(){e.forEach(function(e){e[4]()}),D(e)}}}var ze="mounted",Ve="ready",Ue="move",We="moved",Ye="click",Ge="refresh",Xe="updated",Ke="resize",Qe="resized",Ze="scroll",Je="scrolled",et="destroy",tt="navigation:mounted",nt="autoplay:play",it="autoplay:pause",st="lazyload:loaded",ot="ei";function rt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=je();return e&&e.event.on(et,n.destroy),ae(n,{bus:t,on:function(e,i){n.bind(t,G(e).join(" "),function(e){i.apply(i,j(e.detail)?e.detail
vendor: 22,130 bytes, line 1
1:[])})},off:F(n.unbind,t),emit:function(e){n.dispatch(t,e,P(arguments,1))}})}function at(e,t,n,i){var s,o,r=Date.now,a=0,l=!0,c=0;function d(){if(!l){if(a=e?Ie((r()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=r(),i&&++c>=i))return u();o=B(d)}}function u(){l=!0}function h(){o&&cancelAnimationFrame(o),a=0,o=0,l=!0}return{start:function(t){t||h(),s=r()-(t?a*e:0),l=!1,o=B(d)},rewind:function(){s=r(),a=0,n&&n(a)},pause:u,cancel:h,set:function(t){e=t},isPaused:function(){return l}}}var lt="Arrow",ct=lt+"Left",dt=lt+"Right",ut=lt+"Up",ht=lt+"Down",pt="ttb",mt={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ut,dt],ArrowRight:[ht,ct]},ft="role",gt="tabindex",vt="aria-",yt=vt+"controls",bt=vt+"current",wt=vt+"selected",Et=vt+"label",kt=vt+"labelledby",xt=vt+"hidden",St=vt+"orientation",Lt=vt+"roledescription",Ct=vt+"live",At=vt+"busy",Ot=vt+"atomic",Tt=[ft,gt,"disabled",yt,bt,Et,kt,xt,St,Lt],It=Ae+"__",Mt="is-",_t=Ae,$t=It+"track",Dt=It+"list",Pt=It+"slide",Ft=Pt+"--clone",qt=Pt+"__container",Rt=It+"arrows",Bt=It+"arrow",Nt=Bt+"--prev",Ht=Bt+"--next",jt=It+"pagination",zt=jt+"__page",Vt=It+"progress__bar",Ut=It+"toggle",Wt=It+"sr",Yt=Mt+"initialized",Gt=Mt+"active",Xt=Mt+"prev",Kt=Mt+"next",Qt=Mt+"visible",Zt=Mt+"loading",Jt=Mt+"focus-in",en=Mt+"overflow",tn=[Gt,Qt,Xt,Kt,Zt,Jt,en],nn={slide:Pt,clone:Ft,arrows:Rt,arrow:Bt,prev:Nt,next:Ht,pagination:jt,page:zt,spinner:It+"spinner"},sn="touchstart mousedown",on="touchmove mousemove",rn="touchend touchcancel mouseup click",an="slide",ln="loop",cn="fade";var dn=Oe+"-interval",un={passive:!1,capture:!0},hn={Spacebar:" ",Right:dt,Left:ct,Up:ut,Down:ht};function pn(e){return e=V(e)?e:e.key,hn[e]||e}var mn="keydown",fn=Oe+"-lazy",gn=fn+"-srcset",vn="["+fn+"], ["+gn+"]",yn=[" ","Enter"],bn=Object.freeze({__proto__:null,Media:function(e,t,n){var i=e.state,s=n.breakpoints||{},o=n.reducedMotion||{},r=je(),a=[];function l(e){e&&r.destroy()}function c(e,t){var n=matchMedia(t);r.bind(n,"change",d),a.push([e,n])}function d(){var t=i.is(7),s=n.direction,o=a.reduce(function(e,t){return le(e,t[1].matches?t[0]:{})},{});ce(n),u(o),n.destroy?e.destroy("completely"===n.destroy):t?(l(!0),e.mount()):s!==n.direction&&e.refresh()}function u(t,s,o){le(n,t),s&&le(Object.getPrototypeOf(n),t),!o&&i.is(1)||e.emit(Xe,n)}return{setup:function(){var e="min"===n.mediaQuery;oe(s).sort(function(t,n){return e?+t-+n:+n-+t}).forEach(function(t){c(s[t],"("+(e?"min":"max")+"-width:"+t+"px)")}),c(o,$),d()},destroy:l,reduce:function(e){matchMedia($).matches&&(e?le(n,o):ce(n,oe(o)))},set:u}},Direction:function(e,t,n){return{resolve:function(e,t,i){var s="rtl"!==(i=i||n.direction)||t?i===pt?0:-1:1;return mt[e]&&mt[e][s]||e.replace(/width|left|right/i,function(e,t){var n=mt[e.toLowerCase()][s]||e;return t>0?n.charAt(0).toUpperCase()+n.slice(1):n})},orient:function(e){return e*("rtl"===n.direction?1:-1)}}},Elements:function(e,t,n){var i,s,o,r=rt(e),a=r.on,l=r.bind,c=e.root,d=n.i18n,u={},h=[],p=[],m=[];function f(){var e,t,o;i=y("."+$t),s=se(i,"."+Dt),Te(i&&s,"A track/list element is missing."),Q(h,ie(s,"."+Pt+":not(."+Ft+")")),re({arrows:Rt,pagination:jt,prev:Nt,next:Ht,bar:Vt,toggle:Ut},function(e,t){u[t]=y("."+e)}),ae(u,{root:c,track:i,list:s,slides:h}),t=c.id||""+(e=Ae)+Ne(He[e]=(He[e]||0)+1),o=n.role,c.id=t,i.id=i.id||t+"-track",s.id=s.id||t+"-list",!ge(c,ft)&&"SECTION"!==c.tagName&&o&&ue(c,ft,o),ue(c,Lt,d.carousel),ue(s,ft,"presentation"),v()}function g(e){var t=Tt.concat("style");D(h),Se(c,p),Se(i,m),de([i,s],t),de(c,e?t:["style",Lt])}function v(){Se(c,p),Se(i,m),p=b(_t),m=b($t),J(c,p),J(i,m),ue(c,Et,n.label),ue(c,kt,n.labelledby)}function y(e){var t=ke(c,e);return t&&function(e,t){if(z(e.closest))return e.closest(t);for(var n=e;n&&1===n.nodeType&&!ne(n,t);)n=n.parentElement;return n}(t,"."+_t)===c?t:void 0}function b(e){return[e+"--"+n.type,e+"--"+n.direction,n.drag&&e+"--draggable",n.isNavigation&&e+"--nav",e===_t&&Gt]}return ae(u,{setup:f,mount:function(){a(Ge,g),a(Ge,f),a(Xe,v),l(document,sn+" keydown",function(e){o="keydown"===e.type},{capture:!0}),l(c,"focusin",function(){Z(c,Jt,!!o)})},destroy:g})},Slides:function(e,t,n){var i=rt(e),s=i.on,o=i.emit,r=i.bind,a=t.Elements,l=a.slides,c=a.list,d=[];function u(){l.forEach(function(e,t){p(e,t,-1)})}function h(){f(function(e){e.destroy()}),D(d)}function p(t,n,i){var s=function(e,t,n,i){var s,o=rt(e),r=o.on,a=o.emit,l=o.bind,c=e.Components,d=e.root,u=e.options,h=u.isNavigation,p=u.updateOnMove,m=u.i18n,f=u.pagination,g=u.slideFocus,v=c.Direction.resolve,y=ge(i,"style"),b=ge(i,Et),w=n>-1,E=se(i,"."+qt);function k(){var s=e.splides.map(function(e){var n=e.splide.Components.Slides.getAt(t);return n?n.slide.id:""}).join(" ");ue(i,Et,Be(m.slideX,(w?n:t)+1)),ue(i,yt,s),ue(i,ft,g?"button":""),g&&de(i,Lt)}function x(){s||S()}function S(){if(!s){var n=e.index;(o=L())!==ve(i,Gt)&&(Z(i,Gt,o),ue(i,bt,h&&o||""),a(o?"active":"inactive",C)),function(){var t=function(){if(e.is(cn))return L();var t=ye(c.Elements.track),n=ye(i),s=v("left",!0),o=v("right",!0);return _e(t[s])<=$e(n[s])&&_e(n[o])<=$e(t[o])}(),n=!t&&(!L()||w);if(e.state.is([4,5])||ue(i,xt,n||""),ue(xe(i,u.focusableNodes||""),gt,n?-1:""),g&&ue(i,gt,n?-1:0),t!==ve(i,Qt)&&(Z(i,Qt,t),a(t?"visible":"hidden",C)),!t&&document.activeElement===i){var s=c.Slides.getAt(e.index);s&&fe(s.slide)}}(),Z(i,Xt,t===n-1),Z(i,Kt,t===n+1)}var o}function L(){var i=e.index;return i===t||u.cloneStatus&&i===n}var C={index:t,slideIndex:n,slide:i,container:E,isClone:w,mount:function(){w||(i.id=d.id+"-slide"+Ne(t+1),ue(i,ft,f?"tabpanel":"group"),ue(i,Lt,m.slide),ue(i,Et,b||Be(m.slideLabel,[t+1,e.length]))),l(i,"click",F(a,Ye,C)),l(i,"keydown",F(a,"sk",C)),r([We,"sh",Je],S),r(tt,k),p&&r(Ue,x)},destroy:function(){s=!0,o.destroy(),Se(i,tn),de(i,Tt),ue(i,"style",y),ue(i,Et,b||"")},update:S,style:function(e,t,n){pe(n&&E||i,e,t)},isWithin:function(n,i){var s=De(n-t);return w||!u.rewind&&!e.is(ln)||(s=Ie(s,e.length-s)),s<=i}};return C}(e,n,i,t);s.mount(),d.push(s),d.sort(function(e,t){return e.index-t.index})}function m(e){return e?g(function(e){return!e.isClone}):d}function f(e,t){m(t).forEach(e)}function g(e){return d.filter(z(e)?e:function(t){return V(e)?ne(t.slide,e):K(G(e),t.index)})}return{mount:function(){u(),s(Ge,h),s(Ge,u)},destroy:h,update:function(){f(function(e){e.update()})},register:p,get:m,getIn:function(e){var i=t.Controller,s=i.toIndex(e),o=i.hasFocus()?1:n.perPage;return g(function(e){return Fe(e.index,s,s+o-1)})},getAt:function(e){return g(e)[0]},add:function(e,t){X(e,function(e){if(V(e)&&(e=we(e)),Y(e)){var i=l[t];i?te(e,i):ee(c,e),J(e,n.classes.slide),s=e,a=F(o,Ke),d=xe(s,"img"),(u=d.length)?d.forEach(function(e){r(e,"load error",function(){--u||a()})}):a()}var s,a,d,u}),o(Ge)},remove:function(e){be(g(e).map(function(e){return e.slide})),o(Ge)},forEach:f,filter:g,style:function(e,t,n){f(function(i){i.style(e,t,n)})},getLength:function(e){return e?l.length:d.length},isEnough:function(){return d.length>n.perPage}}},Layout:function(e,t,n){var i,s,o,r=rt(e),a=r.on,l=r.bind,c=r.emit,d=t.Slides,u=t.Direction.resolve,h=t.Elements,p=h.root,m=h.track,f=h.list,g=d.getAt,v=d.style;function y(){i=n.direction===pt,pe(p,"maxWidth",Ce(n.width)),pe(m,u("paddingLeft"),w(!1)),pe(m,u("paddingRight"),w(!0)),b(!0)}function b(e){var t,r=ye(p);(e||s.width!==r.width||s.height!==r.height)&&(pe(m,"height",(t="",i&&(Te(t=E(),"height or heightRatio is missing."),t="calc("+t+" - "+w(!1)+" - "+w(!0)+")"),t)),v(u("marginRight"),Ce(n.gap)),v("width",n.autoWidth?null:Ce(n.fixedWidth)||(i?"":k())),v("height",Ce(n.fixedHeight)||(i?n.autoHeight?null:k():E()),!0),s=r,c(Qe),o!==(o=O())&&(Z(p,en,o),c("overflow",o)))}function w(e){var t=n.padding,i=u(e?"right":"left");return t&&Ce(t[i]||(H(t)?0:t))||"0px"}function E(){return Ce(n.height||ye(f).width*n.heightRatio)}function k(){var e=Ce(n.gap);return"calc((100%"+(e&&" + "+e)+")/"+(n.perPage||1)+(e&&" - "+e)+")"}function x(){return ye(f)[u("width")]}function S(e,t){var n=g(e||0);return n?ye(n.slide)[u("width")]+(t?0:A()):0}function L(e,t){var n=g(e);if(n){var i=ye(n.slide)[u("right")],s=ye(f)[u("left")];return De(i-s)+(t?0:A())}return 0}function C(t){return L(e.length-1)-L(0)+S(0,t)}function A(){var e=g(0);return e&&parseFloat(pe(e.slide,u("marginRight")))||0}function O(){return e.is(cn)||C(!0)>x()}return{mount:function(){var e,t;y(),l(window,"resize load",(e=F(c,Ke),t=at(0,e,null,1),function(){t.isPaused()&&t.start()})),a([Xe,Ge],y),a(Ke,b)},resize:b,listSize:x,slideSize:S,sliderSize:C,totalSize:L,getPadding:function(e){return parseFloat(pe(m,u("padding"+(e?"Right":"Left"))))||0},isOverflow:O}},Clones:function(e,t,n){var i,s=rt(e),o=s.on,r=t.Elements,a=t.Slides,l=t.Direction.resolve,c=[];function d(){o(Ge,u),o([Xe,Ke],p),(i=m())&&(function(t){var i=a.get().slice(),s=i.length;if(s){for(;i.length<t;)Q(i,i);Q(i.slice(-t),i.slice(0,t)).forEach(function(o,l){var d=l<t,u=function(t,i){var s=t.cloneNode(!0);return J(s,n.classes.clone),s.id=e.root.id+"-clone"+Ne(i+1),s}(o.slide,l);d?te(u,i[0].slide):ee(r.list,u),Q(c,u),a.register(u,l-t+(d?0:s),o.index)})}}(i),t.Layout.resize(!0))}function u(){h(),d()}function h(){be(c),D(c),s.destroy()}function p(){var e=m();i!==e&&(i<e||!e)&&s.emit(Ge)}function m(){var i=n.clones;if(e.is(ln)){if(U(i)){var s=n[l("fixedWidth")]&&t.Layout.slideSize(0);i=s&&$e(ye(r.track)[l("width")]/s)||n[l("autoWidth")]&&e.length||2*n.perPage}}else i=0;return i}return{mount:d,destroy:h}},Move:function(e,t,n){var i,s=rt(e),o=s.on,r=s.emit,a=e.state.set,l=t.Layout,c=l.slideSize,d=l.getPadding,u=l.totalSize,h=l.listSize,p=l.sliderSize,m=t.Direction,f=m.resolve,g=m.orient,v=t.Elements,y=v.list,b=v.track;function w(){t.Controller.isBusy()||(t.Scroll.cancel(),E(e.index),t.Slides.update())}function E(e){k(C(e,!0))}function k(n,i){if(!e.is(cn)){var s=i?n:function(n){if(e.is(ln)){var i=L(n),s=i>t.Controller.getEnd();(i<0||s)&&(n=x(n,s))}return n}(n);pe(y,"transform","translate"+f("X")+"("+s+"px)"),n!==s&&r("sh")}}function x(e,t){var n=e-O(t),i=p();return e-g(i*($e(De(n)/i)||1))*(t?1:-1)}function S(){k(A(),!0),i.cancel()}function L(e){for(var n=t.Slides.get(),i=0,s=1/0,o=0;o<n.length;o++){var r=n[o].index,a=De(C(r,!0)-e);if(!(a<=s))break;s=a,i=r}return i}function C(t,i){var s=g(u(t-1)-function(e){var t=n.focus;return"center"===t?(h()-c(e,!0))/2:+t*c(e)||0}(t));return i?function(t){return n.trimSpace&&e.is(an)&&(t=qe(t,0,g(p(!0)-h()))),t}(s):s}function A(){var e=f("left");return ye(y)[e]-ye(b)[e]+g(d(!1))}function O(e){return C(e?t.Controller.getEnd():0,!!n.trimSpace)}return{mount:function(){i=t.Transition,o([ze,Qe,Xe,Ge],w)},move:function(e,t,n,s){var o,l;e!==t&&(o=e>n,l=g(x(A(),o)),o?l>=0:l<=y[f("scrollWidth")]-ye(b)[f("width")])&&(S(),k(x(A(),e>n),!0)),a(4),r(Ue,t,n,e),i.start(t,function(){a(3),r(We,t,n,e),s&&s()})},jump:E,translate:k,shift:x,cancel:S,toIndex:L,toPosition:C,getPosition:A,getLimit:O,exceededLimit:function(e,t){t=U(t)?A():t;var n=!0!==e&&g(t)<g(O(!1)),i=!1!==e&&g(t)>g(O(!0));return n||i},reposition:w}},Controller:function(e,t,n){var i,s,o,r,a=rt(e),l=a.on,c=a.emit,d=t.Move,u=d.getPosition,h=d.getLimit,p=d.toPosition,m=t.Slides,f=m.isEnough,g=m.getLength,v=n.omitEnd,y=e.is(ln),b=e.is(an),w=F(C,!1),E=F(C,!0),k=n.start||0,x=k;function S(){s=g(!0),o=n.perMove,r=n.perPage,i=T();var e=qe(k,0,v?i:s-1);e!==k&&(k=e,d.reposition())}function L(){i!==T()&&c(ot)}function C(e,t){var n=o||($()?1:r),s=A(k+n*(e?-1:1),k,!(o||$()));return-1===s&&b&&!Pe(u(),h(!e),1)?e?0:i:t?s:O(s)}function A(t,a,l){if(f()||$()){var c=function(t){if(b&&"move"===n.trimSpace&&t!==k)for(var i=u();i===p(t,!0)&&Fe(t,0,e.length-1,!n.rewind);)t<k?--t:++t;return t}(t);c!==t&&(a=t,t=c,l=!1),t<0||t>i?t=o||!Fe(0,t,a,!0)&&!Fe(i,a,t,!0)?y?l?t<0?-(s%r||r):s:t:n.rewind?t<0?i:0:-1:I(M(t)):l&&t!==a&&(t=I(M(a)+(t<a?-1:1)))}else t=-1;return t}function O(e){return y?(e+s)%s||0:e}function T(){for(var e=s-($()||y&&o?1:r);v&&e-- >0;)if(p(s-1,!0)!==p(e,!0)){e++;break}return qe(e,0,s-1)}function I(e){return qe($()?e:r*e,0,i)}function M(e){return $()?Ie(e,i):_e((e>=i?s-1:e)/r)}function _(e){e!==k&&(x=k,k=e)}function $(){return!U(n.focus)||n.isNavigation}function D(){return e.state.is([4,5])&&!!n.waitForTransition}return{mount:function(){S(),l([Xe,Ge,ot],S),l(Qe,L)},go:function(e,t,n){if(!D()){var s=function(e){var t=k;if(V(e)){var n=e.match(/([+\-<>])(\d+)?/)||[],s=n[1],o=n[2];"+"===s||"-"===s?t=A(k+ +(""+s+(+o||1)),k):">"===s?t=o?I(+o):w(!0):"<"===s&&(t=E(!0))}else t=y?e:qe(e,0,i);return t}(e),o=O(s);o>-1&&(t||o!==k)&&(_(o),d.move(s,o,x,n))}},scroll:function(e,n,s,o){t.Scroll.scroll(e,n,s,function(){var e=O(d.toIndex(u()));_(v?Ie(e,i):e),o&&o()})},getNext:w,getPrev:E,getAdjacent:C,getEnd:T,setIndex:_,getIndex:function(e){return e?x:k},toIndex:I,toPage:M,toDest:function(e){var t=d.toIndex(e);return b?qe(t,0,i):t},hasFocus:$,isBusy:D}},Arrows:function(e,t,n){var i,s,o=rt(e),r=o.on,a=o.bind,l=o.emit,c=n.classes,d=n.i18n,u=t.Elements,h=t.Controller,p=u.arrows,m=u.track,f=p,g=u.prev,v=u.next,y={};function b(){var e;!(e=n.arrows)||g&&v||(f=p||he("div",c.arrows),g=x(!0),v=x(!1),i=!0,ee(f,[g,v]),!p&&te(f,m)),g&&v&&(ae(y,{prev:g,next:v}),me(f,e?"":"none"),J(f,s=Rt+"--"+n.direction),e&&(r([ze,We,Ge,Je,ot],S),a(v,"click",F(k,">")),a(g,"click",F(k,"<")),S(),ue([g,v],yt,m.id),l("arrows:mounted",g,v))),r(Xe,w)}function w(){E(),b()}function E(){o.destroy(),Se(f,s),i?(be(p?[g,v]:f),g=v=null):de([g,v],Tt)}function k(e){h.go(e,!0)}function x(e){return we('<button class="'+c.arrow+" "+(e?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(n.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function S(){if(g&&v){var t=e.index,n=h.getPrev(),i=h.getNext(),s=n>-1&&t<n?d.last:d.prev,o=i>-1&&t>i?d.first:d.next;g.disabled=n<0,v.disabled=i<0,ue(g,Et,s),ue(v,Et,o),l("arrows:updated",g,v,n,i)}}return{arrows:y,mount:b,destroy:E,update:S}},Autoplay:function(e,t,n){var i,s,o=rt(e),r=o.on,a=o.bind,l=o.emit,c=at(n.interval,e.go.bind(e,">"),function(e){var t=u.bar;t&&pe(t,"width",100*e+"%"),l("autoplay:playing",e)}),d=c.isPaused,u=t.Elements,h=t.Elements,p=h.root,m=h.toggle,f=n.autoplay,g="pause"===f;function v(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),s=i=g=!1,w(),l(nt))}function y(e){void 0===e&&(e=!0),g=!!e,w(),d()||(c.pause(),l(it))}function b(){g||(i||s?y(!1):v())}function w(){m&&(Z(m,Gt,!g),ue(m,Et,n.i18n[g?"play":"pause"]))}function E(e){var i=t.Slides.getAt(e);c.set(i&&+ge(i.slide,dn)||n.interval)}return{mount:function(){f&&(n.pauseOnHover&&a(p,"mouseenter mouseleave",function(e){i="mouseenter"===e.type,b()}),n.pauseOnFocus&&a(p,"focusin focusout",function(e){s="focusin"===e.type,b()}),m&&a(m,"click",function(){g?v():y(!0)}),r([Ue,Ze,Ge],c.rewind),r(Ue,E),m&&ue(m,yt,u.track.id),g||v(),w())},destroy:c.cancel,play:v,pause:y,isPaused:d}},Cover:function(e,t,n){var i=rt(e).on;function s(e){t.Slides.forEach(function(t){var n=se(t.container||t.slide,"img");n&&n.src&&o(e,n,t)})}function o(e,t,n){n.style("background",e?'center/cover no-repeat url("'+t.src+'")':"",!0),me(t,e?"none":"")}return{mount:function(){n.cover&&(i(st,F(o,!0)),i([ze,Xe,Ge],F(s,!0)))},destroy:F(s,!1)}},Scroll:function(e,t,n){var i,s,o=rt(e),r=o.on,a=o.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,h=c.exceededLimit,p=c.translate,m=e.is(an),f=1;function g(e,n,o,r,u){var p=d();if(b(),o&&(!m||!h())){var g=t.Layout.sliderSize(),w=Re(e)*g*_e(De(e)/g)||0;e=c.toPosition(t.Controller.toDest(e%g))+w}var E=Pe(p,e,1);f=1,n=E?0:n||Me(De(e-p)/1.5,800),s=r,i=at(n,v,F(y,p,e,u),1),l(5),a(Ze),i.start()}function v(){l(3),s&&s(),a(Je)}function y(e,t,i,o){var r,a,l=d(),c=(e+(t-e)*(r=o,(a=n.easingFunc)?a(r):1-Math.pow(1-r,4))-l)*f;p(l+c),m&&!i&&h()&&(f*=.6,De(c)<10&&g(u(h(!0)),600,!1,s,!0))}function b(){i&&i.cancel()}function w(){i&&!i.isPaused()&&(b(),v())}return{mount:function(){r(Ue,b),r([Xe,Ge],w)},destroy:b,scroll:g,cancel:w}},Drag:function(e,t,n){var i,s,o,r,a,l,c,d,u=rt(e),h=u.on,p=u.emit,m=u.bind,f=u.unbind,g=e.state,v=t.Move,y=t.Scroll,b=t.Controller,w=t.Elements.track,E=t.Media.reduce,k=t.Direction,x=k.resolve,S=k.orient,L=v.getPosition,C=v.exceededLimit,A=!1;function O(){var e=n.drag;N(!e),r="free"===e}function T(e){if(l=!1,!c){var t=B(e);i=e.target,s=n.noDrag,ne(i,"."+zt+", ."+Bt)||s&&ne(i,s)||!t&&e.button||(b.isBusy()?Ee(e,!0):(d=t?w:window,a=g.is([4,5]),o=null,m(d,on,I,un),m(d,rn,M,un),v.cancel(),y.cancel(),$(e)))}var i,s}function I(t){if(g.is(6)||(g.set(6),p("drag")),t.cancelable)if(a){v.translate(i+D(t)/(A&&e.is(an)?5:1));var s=P(t)>200,o=A!==(A=C());(s||o)&&$(t),l=!0,p("dragging"),Ee(t)}else(function(e){return De(D(e))>De(D(e,!0))})(t)&&(a=function(e){var t=n.dragMinThreshold,i=H(t),s=i&&t.mouse||0,o=(i?t.touch:+t)||10;return De(D(e))>(B(e)?o:s)}(t),Ee(t))}function M(i){g.is(6)&&(g.set(3),p("dragged")),a&&(function(i){var s=function(t){if(e.is(ln)||!A){var n=P(t);if(n&&n<200)return D(t)/n}return 0}(i),o=function(e){return L()+Re(e)*Ie(De(e)*(n.flickPower||600),r?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}(s),a=n.rewind&&n.rewindByDrag;E(!1),r?b.scroll(o,0,n.snap):e.is(cn)?b.go(S(Re(s))<0?a?"<":"-":a?">":"+"):e.is(an)&&A&&a?b.go(C(!0)?">":"<"):b.go(b.toDest(o),!0),E(!0)}(i),Ee(i)),f(d,on,I),f(d,rn,M),a=!1}function _(e){!c&&l&&Ee(e,!0)}function $(e){o=s,s=e,i=L()}function D(e,t){return q(e,t)-q(F(e),t)}function P(e){return Le(e)-Le(F(e))}function F(e){return s===e&&o||s}function q(e,t){return(B(e)?e.changedTouches[0]:e)["page"+x(t?"Y":"X")]}function B(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}function N(e){c=e}return{mount:function(){m(w,on,R,un),m(w,rn,R,un),m(w,sn,T,un),m(w,"click",_,{capture:!0}),m(w,"dragstart",Ee),h([ze,Xe],O)},disable:N,isDragging:function(){return a}}},Keyboard:function(e,t,n){var i,s,o=rt(e),r=o.on,a=o.bind,l=o.unbind,c=e.root,d=t.Direction.resolve;function u(){var e=n.keyboard;e&&(i="global"===e?window:c,a(i,mn,m))}function h(){l(i,mn)}function p(){var e=s;s=!0,q(function(){s=e})}function m(t){if(!s){var n=pn(t);n===d(ct)?e.go("<"):n===d(dt)&&e.go(">")}}return{mount:function(){u(),r(Xe,h),r(Xe,u),r(Ue,p)},destroy:h,disable:function(e){s=e}}},LazyLoad:function(e,t,n){var i=rt(e),s=i.on,o=i.off,r=i.bind,a=i.emit,l="sequential"===n.lazyLoad,c=[We,Je],d=[];function u(){D(d),t.Slides.forEach(function(e){xe(e.slide,vn).forEach(function(t){var i=ge(t,fn),s=ge(t,gn);if(i!==t.src||s!==t.srcset){var o=n.classes.spinner,r=t.parentElement,a=se(r,"."+o)||he("span",o,r);d.push([t,e,a]),t.src||me(t,"none")}})}),l?f():(o(c),s(c,h),h())}function h(){(d=d.filter(function(t){var i=n.perPage*((n.preloadPages||1)+1)-1;return!t[1].isWithin(e.index,i)||p(t)})).length||o(c)}function p(e){var t=e[0];J(e[1].slide,Zt),r(t,"load error",F(m,e)),ue(t,"src",ge(t,fn)),ue(t,"srcset",ge(t,gn)),de(t,fn),de(t,gn)}function m(e,t){var n=e[0],i=e[1];Se(i.slide,Zt),"error"!==t.type&&(be(e[2]),me(n,""),a(st,n,i),a(Ke)),l&&f()}function f(){d.length&&p(d.shift())}return{mount:function(){n.lazyLoad&&(u(),s(Ge,u))},destroy:F(D,d),check:h}},Pagination:function(e,t,n){var i,s,o=rt(e),r=o.on,a=o.emit,l=o.bind,c=t.Slides,d=t.Elements,u=t.Controller,h=u.hasFocus,p=u.getIndex,m=u.go,f=t.Direction.resolve,g=d.pagination,v=[];function y(){i&&(be(g?P(i.children):i),Se(i,s),D(v),i=null),o.destroy()}function b(e){m(">"+e,!0)}function w(e,t){var n=v.length,i=pn(t),s=E(),o=-1;i===f(dt,!1,s)?o=++e%n:i===f(ct,!1,s)?o=(--e+n)%n:"Home"===i?o=0:"End"===i&&(o=n-1);var r=v[o];r&&(fe(r.button),m(">"+o),Ee(t,!0))}function E(){return n.paginationDirection||n.direction}function k(e){return v[u.toPage(e)]}function x(){var e=k(p(!0)),t=k(p());if(e){var n=e.button;Se(n,Gt),de(n,wt),ue(n,gt,-1)}if(t){var s=t.button;J(s,Gt),ue(s,wt,!0),ue(s,gt,"")}a("pagination:updated",{list:i,items:v},e,t)}return{items:v,mount:function t(){y(),r([Xe,Ge,ot],t);var o=n.pagination;g&&me(g,o?"":"none"),o&&(r([Ue,Ze,Je],x),function(){var t=e.length,o=n.classes,r=n.i18n,a=n.perPage,p=h()?u.getEnd()+1:$e(t/a);J(i=g||he("ul",o.pagination,d.track.parentElement),s=jt+"--"+E()),ue(i,ft,"tablist"),ue(i,Et,r.select),ue(i,St,E()===pt?"vertical":"");for(var m=0;m<p;m++){var f=he("li",null,i),y=he("button",{class:o.page,type:"button"},f),k=c.getIn(m).map(function(e){return e.slide.id}),x=!h()&&a>1?r.pageX:r.slideX;l(y,"click",F(b,m)),n.paginationKeyboard&&l(y,"keydown",F(w,m)),ue(f,ft,"presentation"),ue(y,ft,"tab"),ue(y,yt,k.join(" ")),ue(y,Et,Be(x,m+1)),ue(y,gt,-1),v.push({li:f,button:y,page:m})}}(),x(),a("pagination:mounted",{list:i,items:v},k(e.index)))},destroy:y,getAt:k,update:x}},Sync:function(e,t,n){var i=n.isNavigation,s=n.slideFocus,o=[];function r(){var t,n;e.splides.forEach(function(t){t.isParent||(l(e,t.splide),l(t.splide,e))}),i&&((n=(t=rt(e)).on)(Ye,d),n("sk",u),n([ze,Xe],c),o.push(t),t.emit(tt,e.splides))}function a(){o.forEach(function(e){e.destroy()}),D(o)}function l(e,t){var n=rt(e);n.on(Ue,function(e,n,i){t.go(t.is(ln)?i:e)}),o.push(n)}function c(){ue(t.Elements.list,St,n.direction===pt?"vertical":"")}function d(t){e.go(t.index)}function u(e,t){K(yn,pn(t))&&(d(e),Ee(t))}return{setup:F(t.Media.set,{slideFocus:U(s)?i:s},!0),mount:r,destroy:a,remount:function(){a(),r()}}},Wheel:function(e,t,n){var i=rt(e).bind,s=0;function o(i){if(i.cancelable){var o=i.deltaY,r=o<0,a=Le(i),l=n.wheelMinThreshold||0,c=n.wheelSleep||0;De(o)>l&&a-s>c&&(e.go(r?"<":">"),s=a),function(i){return!n.releaseWheel||e.state.is(4)||-1!==t.Controller.getAdjacent(i)}(r)&&Ee(i)}}return{mount:function(){n.wheel&&i(t.Elements.track,"wheel",o,un)}}},Live:function(e,t,n){var i=rt(e).on,s=t.Elements.track,o=n.live&&!n.isNavigation,r=he("span",Wt),a=at(90,F(l,!1));function l(e){ue(s,At,e),e?(ee(s,r),a.start()):(be(r),a.cancel())}function c(e){o&&ue(s,Ct,e?"off":"polite")}return{mount:function(){o&&(c(!t.Autoplay.isPaused()),ue(s,Ot,!0),r.textContent="â¦",i(nt,F(c,!0)),i(it,F(c,!1)),i([We,Je],F(l,!0)))},disable:c,destroy:function(){de(s,[Ct,Ot,At]),be(r)}}}}),wn={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace
1:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:nn,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function En(e,t,n){var i=t.Slides;function s(){i.forEach(function(e){e.style("transform","translateX(-"+100*e.index+"%)")})}return{mount:function(){rt(e).on([ze,Ge],s)},start:function(e,t){i.style("transition","opacity "+n.speed+"ms "+n.easing),q(t)},cancel:R}}function kn(e,t,n){var i,s=t.Move,o=t.Controller,r=t.Scroll,a=t.Elements.list,l=F(pe,a,"transition");function c(){l(""),r.cancel()}return{mount:function(){rt(e).bind(a,"transitionend",function(e){e.target===a&&i&&(c(),i())})},start:function(t,a){var c=s.toPosition(t,!0),d=s.getPosition(),u=function(t){var i=n.rewindSpeed;if(e.is(an)&&i){var s=o.getIndex(!0),r=o.getEnd();if(0===s&&t>=r||s>=r&&0===t)return i}return n.speed}(t);De(c-d)>=1&&u>=1?n.useScroll?r.scroll(c,u,!1,a):(l("transform "+u+"ms "+n.easing),s.translate(c,!0),i=a):(s.jump(t),a())},cancel:c}}var xn=function(){function e(t,n){var i;this.event=rt(),this.Components={},this.state=(i=1,{set:function(e){i=e},is:function(e){return K(G(e),i)}}),this.splides=[],this._o={},this._E={};var s=V(t)?ke(document,t):t;Te(s,s+" is invalid."),this.root=s,n=le({label:ge(s,Et)||"",labelledby:ge(s,kt)||""},wn,e.defaults,n||{});try{le(n,JSON.parse(ge(s,Oe)))}catch(o){Te(!1,"Invalid JSON")}this._o=Object.create(le({},n))}var t,n,i=e.prototype;return i.mount=function(e,t){var n=this,i=this.state,s=this.Components;return Te(i.is([1,7]),"Already mounted!"),i.set(1),this._C=s,this._T=t||this._T||(this.is(cn)?En:kn),this._E=e||this._E,re(ae({},bn,this._E,{Transition:this._T}),function(e,t){var i=e(n,s,n._o);s[t]=i,i.setup&&i.setup()}),re(s,function(e){e.mount&&e.mount()}),this.emit(ze),J(this.root,Yt),i.set(3),this.emit(Ve),this},i.sync=function(e){return this.splides.push({splide:e}),e.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),e.Components.Sync.remount()),this},i.go=function(e){return this._C.Controller.go(e),this},i.on=function(e,t){return this.event.on(e,t),this},i.off=function(e){return this.event.off(e),this},i.emit=function(e){var t;return(t=this.event).emit.apply(t,[e].concat(P(arguments,1))),this},i.add=function(e,t){return this._C.Slides.add(e,t),this},i.remove=function(e){return this._C.Slides.remove(e),this},i.is=function(e){return this._o.type===e},i.refresh=function(){return this.emit(Ge),this},i.destroy=function(e){void 0===e&&(e=!0);var t=this.event,n=this.state;return n.is(1)?rt(this).on(Ve,this.destroy.bind(this,e)):(re(this._C,function(t){t.destroy&&t.destroy(e)},!0),t.emit(et),t.destroy(),e&&D(this.splides),n.set(7)),this},t=e,(n=[{key:"options",get:function(){return this._o},set:function(e){this._C.Media.set(e,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();xn.defaults={},xn.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};class Sn{constructor(e){this.element=e,this.init()}init(){var e,t,n,i;const s={type:this.element.dataset.sliderType||"slide",perPage:parseInt(this.element.dataset.sliderPerPage)||1,perMove:parseInt(this.element.dataset.sliderPerMove)||1,gap:this.element.dataset.sliderGap||"1rem",pagination:"false"!==this.element.dataset.sliderPagination,arrows:"false"!==this.element.dataset.sliderArrows,autoplay:"true"===this.element.dataset.sliderAutoplay,interval:parseInt(this.element.dataset.sliderInterval)||5e3,pauseOnHover:!0,rewind:!0,speed:400,easing:"ease",breakpoints:{768:{perPage:parseInt(this.element.dataset.sliderPerPageMobile)||1}}},o=new xn(this.element,s).mount(),r=this.element.dataset.sliderPrev,a=this.element.dataset.sliderNext;
1r&&(null==(e=document.querySelector(r))||e.addEventListener("click",()=>o.go("<"))),a&&(null==(t=document.querySelector(a))||t.addEventListener("click",()=>o.go(">")));const l=this.element.closest("div"),c=null==(n=null==l?void 0:l.parentElement)?void 0:n.querySelector(".testimonial-prev, .slider-prev"),d=null==(i=null==l?void 0:l.parentElement)?void 0:i.querySelector(".testimonial-next, .slider-next");c&&c.addEventListener("click",()=>o.go("<")),d&&d.addEventListener("click",()=>o.go(">"))}}document.querySelectorAll("[data-slider]").forEach(e=>{e._sliderInit||(e._sliderInit=!0,new Sn(e))});class Ln{constructor(e){this.container=e,this.items=e.querySelectorAll("[data-hover-item]"),0===this.items.length&&(this.items=Array.from(e.children)),this.highlight=null,this.currentItem=null,this.init()}init(){this.highlight=document.createElement("div"),this.highlight.className="absolute bg-heket rounded-2xl transition-all duration-300 ease-out opacity-0 pointer-events-none",this.highlight.style.zIndex="0",this.container.style.position="relative",this.container.insertBefore(this.highlight,this.container.firstChild),Array.from(this.items).forEach(e=>{e.addEventListener("mouseenter",()=>this.showHighlight(e))}),this.container.addEventListener("mouseleave",()=>this.hideHighlight())}showHighlight(e){this.currentItem&&this.currentItem!==e&&this.currentItem.removeAttribute("data-highlight-active");const t=this.container.getBoundingClientRect(),n=e.getBoundingClientRect();this.highlight.style.top=n.top-t.top+"px",this.highlight.style.left=n.left-t.left+"px",this.highlight.style.width=n.width+"px",this.highlight.style.height=n.height+"px",this.highlight.style.opacity="1",e.setAttribute("data-highlight-active",""),this.currentItem=e}hideHighlight(){this.highlight.style.opacity="0",this.currentItem&&(this.currentItem.removeAttribute("data-highlight-active"),this.currentItem=null)}}document.querySelectorAll("[data-hover-highlight]").forEach(e=>{e._hoverInit||(e._hoverInit=!0,new Ln(e))});class Cn{constructor(e){this.container=e,this.linksWrap=e.querySelector(".toc-links"),this.links=[...e.querySelectorAll("[data-toc-link]")],this.bar=e.querySelector(".toc-bar"),this.sections=[],this.activeIndex=-1,this.collectSections(),this.sections.length&&(this.setActive(0),window.addEventListener("scroll",()=>this.onScroll(),{passive:!0}),this.links.forEach((e,t)=>{e.addEventListener("click",n=>{var i;n.preventDefault();const s=e.getAttribute("href"),o=null==(i=this.sections[t])?void 0:i.el;o&&(history.pushState(null,"",s),o.scrollIntoView({behavior:"instant",block:"start"}))})}),this.handleInitialHash())}getTopOffset(e){let t=0;for(;e;)t+=e.offsetTop,e=e.offsetParent;return t}collectSections(){this.links.forEach(e=>{const t=e.getAttribute("href");if(!t||!t.startsWith("#"))return;const n=document.getElementById(t.substring(1));n&&this.sections.push({el:n,link:e})})}handleInitialHash(){var e;const t=null==(e=window.location.hash)?void 0:e.substring(1);if(!t)return;const n=this.sections.findIndex(e=>e.el.id===t);n>-1&&requestAnimationFrame(()=>{this.sections[n].el.scrollIntoView({behavior:"instant",block:"start"}),this.setActive(n)})}onScroll(){const e=window.scrollY||document.documentElement.scrollTop;let t=0;for(let n=0;n<this.sections.length;n++)e>=this.getTopOffset(this.sections[n].el)-160&&(t=n);t!==this.activeIndex&&this.setActive(t)}setActive(e){this.activeIndex=e,this.links.forEach((t,n)=>{t.classList.toggle("text-gray-900",n===e),t.classList.toggle("font-semibold",n===e),t.classList.toggle("text-gray-400",n!==e)}),this.moveBar(e)}moveBar(e){if(!this.bar||!this.links[e])return;const t=this.links[e];this.bar.style.height=t.offsetHeight+"px",this.bar.style.transform=`translateY(${t.offsetTop}px)`}}function An(e,t){e.split(/\s+/).forEach(e=>{t(e)})}document.querySelectorAll("[data-toc-spy]").forEach(e=>{e._tocInit||(e._tocInit=!0,new Cn(e))});class On{constructor(){this._events={}}on(e,t){An(e,e=>{const n=this._events[e]||[];n.push(t),this._events[e]=n})}off(e,t){var n=arguments.length;0!==n?An(e,e=>{if(1===n)return void delete this._events[e];const i=this._events[e];void 0!==i&&(i.splice(i.indexOf(t),1),this._events[e]=i)}):this._events={}}trigger(e,...t){var n=this;An(e,e=>{const i=n._events[e];
vendor: 40,973 bytes, line 1
1void 0!==i&&i.forEach(e=>{e.apply(n,t)})})}}const Tn=e=>(e=e.filter(Boolean)).length<2?e[0]||"":1==Dn(e)?"["+e.join("")+"]":"(?:"+e.join("|")+")",In=e=>{if(!_n(e))return e.join("");let t="",n=0;const i=()=>{n>1&&(t+="{"+n+"}")};return e.forEach((s,o)=>{s!==e[o-1]?(i(),t+=s,n=1):n++}),i(),t},Mn=e=>{let t=Array.from(e);return Tn(t)},_n=e=>new Set(e).size!==e.length,$n=e=>(e+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),Dn=e=>e.reduce((e,t)=>Math.max(e,Pn(t)),0),Pn=e=>Array.from(e).length,Fn=e=>{if(1===e.length)return[[e]];let t=[];const n=e.substring(1);return Fn(n).forEach(function(n){let i=n.slice(0);i[0]=e.charAt(0)+i[0],t.push(i),i=n.slice(0),i.unshift(e.charAt(0)),t.push(i)}),t},qn=[[0,65535]];let Rn,Bn;const Nn={},Hn={"/":"ââ",0:"ß",a:"â±¥ÉÉ",aa:"ê³",ae:"æǽǣ",ao:"êµ",au:"ê·",av:"ê¹ê»",ay:"ê½",b:"ÆÉÆ",c:"ê¿ÆÈ¼â",d:"ÄÉÉá´
Æê®·Ôɦ",e:"ÉÇá´É",f:"ê¼Æ",g:"Ç¥É ê¡áµ¹ê¿É¢",h:"ħⱨⱶɥ",i:"ɨı",j:"ÉÈ·",k:"Æâ±ªêêê
ê£",l:"ÅÆÉ«â±¡êêêÉ",m:"ɱɯϻ",n:"ê¥ÆÉ²êá´Ð»Ô",o:"øǿÉɵêêá´",oe:"Å",oi:"Æ£",oo:"ê",ou:"È£",p:"ƥᵽêêêÏ",q:"êêÉ",r:"Éɽêê§ê",s:"ÃÈ¿ê©ê
Ê",t:"ŧÆÊⱦê",th:"þ",tz:"ê©",u:"Ê",v:"ÊêÊ",vy:"ê¡",w:"â±³",y:"Æ´Éỿ",z:"ƶȥÉⱬê£",hv:"Æ"};for(let Ls in Hn){let e=Hn[Ls]||"";for(let t=0;t<e.length;t++){let n=e.substring(t,t+1);Nn[n]=Ls}}const jn=new RegExp(Object.keys(Nn).join("|")+"|[Ì-ͯ·ʾʼ]","gu"),zn=(e,t="NFKD")=>e.normalize(t),Vn=e=>Array.from(e).reduce((e,t)=>e+Un(t),""),Un=e=>(e=zn(e).toLowerCase().replace(jn,e=>Nn[e]||""),zn(e,"NFC")),Wn=e=>{const t=(e=>{const t={},n=(e,n)=>{const i=t[e]||new Set,s=new RegExp("^"+Mn(i)+"$","iu");n.match(s)||(i.add($n(n)),t[e]=i)};for(let i of function*(e){for(const[t,n]of e)for(let e=t;e<=n;e++){let t=String.fromCharCode(e),n=Vn(t);n!=t.toLowerCase()&&(n.length>3||0!=n.length&&(yield{folded:n,composed:t,code_point:e}))}}(e))n(i.folded,i.folded),n(i.folded,i.composed);return t})(e),n={};let i=[];for(let o in t){let e=t[o];e&&(n[o]=Mn(e)),o.length>1&&i.push($n(o))}i.sort((e,t)=>t.length-e.length);const s=Tn(i);return Bn=new RegExp("^"+s,"u"),n},Yn=(e,t=1)=>(t=Math.max(t,e.length-1),Tn(Fn(e).map(e=>((e,t=1)=>{let n=0;return e=e.map(e=>(Rn[e]&&(n+=e.length),Rn[e]||e)),n>=t?In(e):""})(e,t)))),Gn=(e,t=!0)=>{let n=e.length>1?1:0;return Tn(e.map(e=>{let i=[];const s=t?e.length():e.length()-1;for(let t=0;t<s;t++)i.push(Yn(e.substrs[t]||"",n));return In(i)}))},Xn=(e,t)=>{for(const n of t){if(n.start!=e.start||n.end!=e.end)continue;if(n.substrs.join("")!==e.substrs.join(""))continue;let t=e.parts;const i=e=>{for(const n of t){if(n.start===e.start&&n.substr===e.substr)return!1;if(1!=e.length&&1!=n.length){if(e.start<n.start&&e.end>n.start)return!0;if(n.start<e.start&&n.end>e.start)return!0}}return!1};if(!(n.parts.filter(i).length>0))return!0}return!1};class Kn{constructor(){t(this,"parts"),t(this,"substrs"),t(this,"start"),t(this,"end"),this.parts=[],this.substrs=[],this.start=0,this.end=0}add(e){e&&(this.parts.push(e),this.substrs.push(e.substr),this.start=Math.min(e.start,this.start),this.end=Math.max(e.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(e,t){let n=new Kn,i=JSON.parse(JSON.stringify(this.parts)),s=i.pop();for(const a of i)n.add(a);let o=t.substr.substring(0,e-s.start),r=o.length;return n.add({start:s.start,end:s.start+r,length:r,substr:o}),n}}const Qn=(e,t)=>{if(e)return e[t]},Zn=(e,t)=>{if(e){for(var n,i=t.split(".");(n=i.shift())&&(e=e[n]););return e}},Jn=(e,t,n)=>{var i,s;return e?(e+="",null==t.regex||-1===(s=e.search(t.regex))?0:(i=t.string.length/e.length,0===s&&(i+=.5),i*n)):0},ei=(e,t)=>{var n=e[t];if("function"==typeof n)return n;n&&!Array.isArray(n)&&(e[t]=[n])},ti=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},ni=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=Vn(e+"").toLowerCase())>(t=Vn(t+"").toLowerCase())?1:t>e?-1:0;class ii{constructor(e,n){t(this,"items"),t(this,"settings"),this.items=e,this.settings=n||{diacritics:!0}}tokenize(e,t,n){if(!e||!e.length)return[];const i=[],s=e.split(/\s+/);var o;return n&&(o=new RegExp("^("+Object.keys(n).map($n).join("|")+"):(.*)$")),s.forEach(e=>{let n,s=null,r=null;o&&(n=e.match(o))&&(s=n[1],e=n[2]),e.length>0&&(r=this.settings.diacritics?(e=>{void 0===Rn&&(Rn=Wn(qn)),e=Vn(e);let t="",n=[new Kn];for(let i=0;i<e.length;i++){let s=e.substring(i).match(Bn);const o=e.substring(i,i+1),r=s?s[0]:null;let a=[],l=new Set;for(const e of n){const t=e.last();if(!t||1==t.length||t.end<=i)if(r){const t=r.length;e.add({start:i,end:i+t,length:t,substr:r}),l.add("1")}else e.add({start:i,end:i+1,length:1,substr:o}),l.add("2");else if(r){let n=e.clone(i,t);const s=r.length;n.add({start:i,end:i+s,length:s,substr:r}),a.push(n)}else l.add("3")}if(a.length>0){a=a.sort((e,t)=>e.length()-t.length());for(let e of a)Xn(e,n)||n.push(e)}else if(i>0&&1==l.size&&!l.has("3")){t+=Gn(n,!1);let e=new Kn;const i=n[0];i&&e.add(i.last()),n=[e]}}return t+=Gn(n,!0),t})(e)||null:$n(e),r&&t&&(r="\\b"+r)),i.push({string:e,regex:r?new RegExp(r,"iu"):null,field:s})}),i}getScoreFunction(e,t){var n=this.prepareSearch(e,t);return this._getScoreFunction(n)}_getScoreFunction(e){const t=e.tokens,n=t.length;if(!n)return function(){return 0};const i=e.options.fields,s=e.weights,o=i.length,r=e.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(e,t){const n=i[0].field;return Jn(r(t,n),e,s[n]||1)}:function(e,t){var n=0;if(e.field){const i=r(t,e.field);!e.regex&&i?n+=1/o:n+=Jn(i,e,1)}else ti(s,(i,s)=>{n+=Jn(r(t,s),e,i)});return n/o};return 1===n?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){var i,s=0;for(let n of t){if((i=a(n,e))<=0)return 0;s+=i}return s/n}:function(e){var i=0;return ti(t,t=>{i+=a(t,e)}),i/n}}getSortFunction(e,t){var n=this.prepareSearch(e,t);return this._getSortFunction(n)}_getSortFunction(e){var t,n=[];const i=this,s=e.options,o=!e.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(t,n){return"$score"===t?n.score:e.getAttrFn(i.items[n.id],t)};if(o)for(let a of o)(e.query||"$score"!==a.field)&&n.push(a);if(e.query){t=!0;for(let e of n)if("$score"===e.field){t=!1;break}t&&n.unshift({field:"$score",direction:"desc"})}else n=n.filter(e=>"$score"!==e.field);return n.length?function(e,t){var i,s;for(let o of n)if(s=o.field,i=("desc"===o.direction?-1:1)*ni(r(s,e),r(s,t)))return i;return 0}:null}prepareSearch(e,t){const n={};var i=Object.assign({},t);if(ei(i,"sort"),ei(i,"sort_empty"),i.fields){ei(i,"fields");const e=[];i.fields.forEach(t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),n[t.field]="weight"in t?t.weight:1}),i.fields=e}return{options:i,query:e.toLowerCase().trim(),tokens:this.tokenize(e,i.respect_word_boundaries,n),total:0,items:[],weights:n,getAttrFn:i.nesting?Zn:Qn}}search(e,t){var n,i,s=this;i=this.prepareSearch(e,t),t=i.options,e=i.query;const o=t.score||s._getScoreFunction(i);e.length?ti(s.items,(e,s)=>{n=o(e),(!1===t.filter||n>0)&&i.items.push({score:n,id:s})}):ti(s.items,(e,t)=>{i.items.push({score:1,id:t})});const r=s._getSortFunction(i);return r&&i.items.sort(r),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i}}const si=e=>null==e?null:oi(e),oi=e=>"boolean"==typeof e?e?"1":"0":e+"",ri=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),ai=(e,t)=>{var n;return function(i,s){var o=this;n&&(o.loading=Math.max(o.loading-1,0),clearTimeout(n)),n=setTimeout(function(){n=null,o.loadedSearches[i]=!0,e.call(o,i,s)},t)}},li=(e,t,n)=>{var i,s=e.trigger,o={};for(i of(e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return s.apply(e,arguments);o[n]=arguments},n.apply(e,[]),e.trigger=s,t))i in o&&s.apply(e,o[i])},ci=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},di=(e,t,n,i)=>{e.addEventListener(t,n,i)},ui=(e,t)=>!!t&&!!t[e]&&1==(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0),hi=(e,t)=>e.getAttribute("id")||(e.setAttribute("id",t),t),pi=e=>e.replace(/[\\"']/g,"\\$&"),mi=(e,t)=>{t&&e.append(t)},fi=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},gi=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(vi(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},vi=e=>"string"==typeof e&&e.indexOf("<")>-1,yi=(e,t)=>{var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)},bi=(e,t)=>{Object.assign(e.style,t)},wi=(e,...t)=>{var n=ki(t);(e=xi(e)).map(e=>{n.map(t=>{e.classList.add(t)})})},Ei=(e,...t)=>{var n=ki(t);(e=xi(e)).map(e=>{n.map(t=>{e.classList.remove(t)})})},ki=e=>{var t=[];return fi(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)},xi=e=>(Array.isArray(e)||(e=[e]),e),Si=(e,t,n)=>{if(!n||n.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},Li=(e,t=0)=>t>0?e[e.length-1]:e[0],Ci=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n},Ai=(e,t)=>{fi(t,(t,n)=>{null==t?e.removeAttribute(n):e.setAttribute(n,""+t)})},Oi=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},Ti="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey",Ii={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,clearAfterSelect:!1,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}};function Mi(e,t){var n=Object.assign({},Ii,t),i=n.dataAttr,s=n.labelField,o=n.valueField,r=n.disabledField,a=n.optgroupField,l=n.optgroupLabelField,c=n.optgroupValueField,d=e.tagName.toLowerCase(),u=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!u&&!n.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(u=t.textContent)}var h={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(()=>{var t,d=h.options,u={},p=1;let m=0;var f=e=>{var t=Object.assign({},e.dataset),n=i&&t[i];return"string"==typeof n&&n.length&&(t=Object.assign(t,JSON.parse(n))),t},g=(e,t)=>{var i=si(e.value);if(null!=i&&(i||n.allowEmptyOption)){if(u.hasOwnProperty(i)){if(t){var l=u[i][a];l?Array.isArray(l)?l.push(t):u[i][a]=[l,t]:u[i][a]=t}}else{var c=f(e);c[s]=c[s]||e.textContent,c[o]=c[o]||i,c[r]=c[r]||e.disabled,c[a]=c[a]||t,c.$option=e,c.$order=c.$order||++m,u[i]=c,d.push(c)}e.selected&&h.items.push(i)}};h.maxItems=e.hasAttribute("multiple")?null:1,fi(e.children,e=>{var n,i,s;"optgroup"===(t=e.tagName.toLowerCase())?((s=f(n=e))[l]=s[l]||n.getAttribute("label")||"",s[c]=s[c]||p++,s[r]=s[r]||n.disabled,s.$order=s.$order||++m,h.optgroups.push(s),i=s[c],fi(n.children,e=>{g(e,i)})):"option"===t&&g(e)})})():(()=>{const t=e.getAttribute(i);if(t)h.options=JSON.parse(t),fi(h.options,e=>{h.items.push(e[o])});else{var r=e.value.trim()||"";if(!n.allowEmptyOption&&!r.length)return;const t=r.split(n.delimiter);fi(t,e=>{const t={};t[s]=e,t[o]=e,h.options.push(t)}),h.items=t}})(),Object.assign({},Ii,h,t)}var _i=0;class $i extends(function(e){return e.plugins={},class extends e{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,n){e.plugins[t]={name:t,fn:n}}initializePlugins(e){var t,n;const i=this,s=[];if(Array.isArray(e))e.forEach(e=>{"string"==typeof e?s.push(e):(i.plugins.settings[e.name]=e.options,s.push(e.name))});else if(e)for(t in e)e.hasOwnProperty(t)&&(i.plugins.settings[t]=e[t],s.push(t));for(;n=s.shift();)i.require(n)}loadPlugin(t){var n=this,i=n.plugins,s=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=s.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)}require(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]}}}(On)){constructor(e,t){var n;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,_i++;var i=gi(e);if(i.tomselect)throw new Error("Tom Select already initialized on this element");i.tomselect=this,n=(window.getComputedStyle&&window.getComputedStyle(i,null)).getPropertyValue("direction");const s=Mi(i,t);this.settings=s,this.input=i,this.tabIndex=i.tabIndex||0,this.is_select_tag="select"===i.tagName.toLowerCase(),this.rtl=/rtl/i.test(n),this.inputId=hi(i,"tomselect-"+_i),this.isRequired=i.required,this.sifter=new ii(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=e=>o.test(e):s.createFilter=e=>this.settings.duplicates||!this.options[e]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=gi("<div>"),a=gi("<div>"),l=this._render("dropdown"),c=gi('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",u=s.mode;var h;wi(r,s.wrapperClass,d,u),wi(a,s.controlClass),mi(r,a),wi(l,s.dropdownClass,u),s.copyClassesToDropdown&&wi(l,d),wi(c,s.dropdownContentClass),mi(l,c),gi(s.dropdownParent||r).appendChild(l),vi(s.controlInput)?(h=gi(s.controlInput),fi(["autocorrect","autocapitalize","autocomplete","spellcheck","aria-label"],e=>{i.getAttribute(e)&&Ai(h,{[e]:i.getAttribute(e)})}),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=gi(s.controlInput),this.focus_node=h):(h=gi("<input/>"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const e=this,t=e.settings,n=e.control_input,i=e.dropdown,s=e.dropdown_content,o=e.wrapper,r=e.control,a=e.input,l=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown";Ai(s,{id:d}),Ai(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d});const u=hi(l,e.inputId+"-ts-control"),h="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",p=document.querySelector(h),m=e.focus.bind(e);if(p){di(p,"click",m),Ai(p,{for:u});const t=hi(p,e.inputId+"-ts-label");Ai(l,{"aria-labelledby":t}),Ai(s,{"aria-labelledby":t})}if(o.style.width=a.style.width,o.style.minWidth=a.style.minWidth,o.style.maxWidth=a.style.maxWidth,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");wi([o,i],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&Ai(a,{multiple:"multiple"}),t.placeholder&&Ai(n,{placeholder:t.placeholder}),!t.splitOn&&t.delimiter&&(t.splitOn=new RegExp("\\s*"+$n(t.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=ai(t.load,t.loadThrottle)),di(i,"mousemove",()=>{e.ignoreHover=!1}),di(i,"mouseenter",t=>{var n=Si(t.target,"[data-selectable]",i);n&&e.onOptionHover(t,n)},{capture:!0}),di(i,"click",t=>{const n=Si(t.target,"[data-selectable]");n&&(e.onOptionSelect(t,n),ci(t,!0))}),di(r,"click",t=>{var i=Si(t.target,"[data-ts-item]",r);i&&e.onItemSelect(t,i)?ci(t,!0):""==n.value&&(e.onClick(),ci(t,!0))}),di(l,"keydown",t=>e.onKeyDown(t)),di(n,"keypress",t=>e.onKeyPress(t)),di(n,"input",t=>e.onInput(t)),di(l,"blur",t=>e.onBlur(t)),di(l,"focus",t=>e.onFocus(t)),di(n,"paste",t=>e.onPaste(t));const f=t=>{const s=t.composedPath()[0];if(!o.contains(s)&&!i.contains(s))return e.isFocused&&e.blur(),void e.inputState();s==n&&e.isOpen?t.stopPropagation():ci(t,!0)},g=()=>{e.isOpen&&e.positionDropdown()},v=()=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())};di(a,"invalid",v),di(document,"mousedown",f),di(window,"scroll",g,c),di(window,"resize",g,c),this._destroy=()=>{a.removeEventListener("invalid",v),document.removeEventListener("mousedown",f),window.removeEventListener("scroll",g),window.removeEventListener("resize",g),p&&p.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,a.disabled?e.disable():a.readOnly?e.setReadOnly(!0):e.enable(),e.on("change",this.onChange),wi(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),fi(t,e=>{this.registerOptionGroup(e)})}setupTemplates(){var e=this,t=e.settings.labelField,n=e.settings.optgroupLabelField,i={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[n])+"</div>",option:(e,n)=>"<div>"+n(e[t])+"</div>",item:(e,n)=>"<div>"+n(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};e.settings.render=Object.assign({},i,e.settings.render)}setupCallbacks(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)(t=this.settings[n[e]])&&this.on(e,t)}sync(e=!0){const t=this,n=e?Mi(t.input,{delimiter:t.settings.delimiter,allowEmptyOption:t.settings.allowEmptyOption}):t.settings;t.setupOptions(n.options,n.optgroups),t.setValue(n.items||[],!0),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){yi(this.input,"input"),yi(this.input,"change")}onPaste(e){var t=this;t.isInputHidden||t.isLocked?ci(e):t.settings.splitOn&&setTimeout(()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var n=e.trim().split(t.settings.splitOn);fi(n,e=>{si(e)&&(this.options[e]?t.addItem(e):t.createItem(e))})}},0)}onKeyPress(e){var t=this;if(!t.isLocked){var n=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&n===t.settings.delimiter?(t.createItem(),void ci(e)):void 0}ci(e)}onKeyDown(e){var t=this;if(t.ignoreHover=!0,t.isLocked)9!==e.keyCode&&ci(e);else{switch(e.keyCode){case 65:if(ui(Ti,e)&&""==t.control_input.value)return ci(e),void t.selectAll();break;case 27:return t.isOpen&&(ci(e,!0),t.close()),void t.clearActiveItems();case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void ci(e);case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void ci(e);case 13:return void(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),ci(e)):(t.settings.create&&t.createItem()||document.activeElement==t.control_input&&t.isOpen)&&ci(e));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&(t.canSelect(t.activeOption)?(t.onOptionSelect(e,t.activeOption),ci(e)):t.settings.create&&t.createItem()&&ci(e)));case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!ui(Ti,e)&&ci(e)}}onInput(e){if(this.isLocked)return;const t=this.inputValue();var n,i;this.lastValue!==t&&(this.lastValue=t,""!=t?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=(n=()=>{this.refreshTimeout=null,this._onInput()},(i=this.settings.refreshThrottle)>0?window.setTimeout(n,i):(n.call(null),null))):this._onInput())}_onInput(){const e=this.lastValue;this.settings.shouldLoad.call(this,e)&&this.load(e),this.refreshOptions(),this.trigger("type",e)}onOptionHover(e,t){this.ignoreHover||this.setActiveOption(t,!1)}onFocus(e){var t=this,n=t.isFocused;if(t.isDisabled||t.isReadOnly)return t.blur(),void ci(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),n||t.trigger("focus"),t.activeItems.length||(t.inputState(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var n=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,n):n()}}}onOptionSelect(e,t){var n,i=this;t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?i.createItem(null,()=>{i.settings.closeAfterSelect?i.close():i.settings.clearAfterSelect&&i.setTextboxValue()}):void 0!==(n=t.dataset.value)&&(i.lastQuery=null,i.addItem(n),i.settings.closeAfterSelect?i.close():i.settings.clearAfterSelect&&i.setTextboxValue(),!i.settings.hideSelected&&e.type&&/click/.test(e.type)&&i.setActiveOption(t)))}canSelect(e){return!!(this.isOpen&&e&&this.dropdown_content.contains(e))}onItemSelect(e,t){var n=this;return!n.isLocked&&"multi"===n.settings.mode&&(ci(e),n.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;wi(t.wrapper,t.settings.loadingClass),t.loading++;const n=t.loadCallback.bind(t);t.settings.load.call(t,e,n)}loadCallback(e,t){const n=this;n.loading=Math.max(n.loading-1,0),n.lastQuery=null,n.clearActiveOption(),n.setupOptions(e,t),n.refreshOptions(n.isFocused&&!n.isInputHidden),n.loading||Ei(n.wrapper,n.settings.loadingClass),n.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,yi(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){li(this,t?[]:["change"],()=>{this.clear(t),this.addItems(e,t)})}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var n,i,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(n=t&&t.type.toLowerCase())&&ui("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,e))&&(r=s,s=o,o=r),i=s;i<=o;i++)e=l.control.children[i],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);ci(t)}else"click"===n&&ui(Ti,t)||"keydown"===n&&ui("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,n=t.control.querySelector(".last-active");n&&Ei(n,"last-active"),wi(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),Ei(e,"active")}clearActiveItems(){Ei(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e,t=!0){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,Ai(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),Ai(e,{"aria-selected":"true"}),wi(e,"active"),t&&this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const n=this.dropdown_content,i=n.clientHeight,s=n.scrollTop||0,o=e.offsetHeight,r=e.getBoundingClientRect().top-n.getBoundingClientRect().top+s;r+o>i+s?this.scroll(r-i+o,t):r<s&&this.scroll(r,t)}scroll(e,t){const n=this.dropdown_content;t&&(n.style.scrollBehavior=t),n.scrollTop=e,n.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(Ei(this.activeOption,"active"),Ai(this.activeOption,{"aria-selected":null})),this.activeOption=null,Ai(this.focus_node,{"aria-activedescendant":null})}selectAll(){const e=this;if("single"===e.settings.mode)return;const t=e.controlChildren();t.length&&(e.inputState(),e.close(),e.activeItems=t,fi(t,t=>{e.setActiveItemClass(t)}))}inputState(){var e=this;e.control.contains(e.control_input)&&(Ai(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&Ai(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var e=this;e.isDisabled||e.isReadOnly||(e.ignoreFocus=!0,e.control_input.offsetWidth?e.control_input.focus():e.focus_node.focus(),setTimeout(()=>{e.ignoreFocus=!1,e.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,n,i=this,s=this.getSearchOptions();if(i.settings.score&&"function"!=typeof(n=i.settings.score.call(i,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');return e!==i.lastQuery?(i.lastQuery=e,/(.)\1{15,}/.test(e)&&(e=""),t=i.sifter.search(e,Object.assign(s,{score:n})),i.currentResults=t):t=Object.assign({},i.currentResults),i.settings.hideSelected&&(t.items=t.items.filter(e=>{let t=si(e.id);return!(null!==t&&-1!==i.items.indexOf(t))})),t}refreshOptions(e=!0){var t,n,i,s,o,r,a,l,c,d;const u={},h=[];var p=this,m=p.inputValue();const f=m===p.lastQuery||""==m&&null==p.lastQuery;var g=p.search(m),v=null,y=p.settings.shouldOpen||!1,b=p.dropdown_content;f&&(v=p.activeOption)&&(c=v.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(y=!0);const w=(e,t)=>{let n=u[e];if(void 0!==n){let e=h[n];if(void 0!==e)return[n,e.fragment]}let i=document.createDocumentFragment();return n=h.length,h.push({fragment:i,order:t,optgroup:e}),[n,i]};for(t=0;t<s;t++){let e=g.items[t];if(!e)continue;let s=e.id,a=p.options[s];if(void 0===a)continue;let l=oi(s),d=p.getOption(l,!0);for(p.settings.hideSelected||d.classList.toggle("selected",p.items.includes(l)),o=a[p.settings.optgroupField]||"",n=0,i=(r=Array.isArray(o)?o:[o])&&r.length;n<i;n++){o=r[n];let e=a.$order,t=p.optgroups[o];var E;void 0===t&&"function"==typeof p.settings.optionGroupRegister&&(E=p.settings.optionGroupRegister.apply(p,[o]))&&p.registerOptionGroup(E),t=p.optgroups[o],void 0===t?o="":e=t.$order;const[i,l]=w(o,e);n>0&&(d=d.cloneNode(!0),Ai(d,{id:a.$id+"-clone-"+n,"aria-selected":null}),d.classList.add("ts-cloned"),Ei(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(v=d)),l.appendChild(d),""!=o&&(u[o]=i)}}var k;p.settings.lockOptgroupOrder&&h.sort((e,t)=>e.order-t.order),a=document.createDocumentFragment(),fi(h,e=>{let t=e.fragment,n=e.optgroup;if(!t||!t.children.length)return;let i=p.optgroups[n];if(void 0!==i){let e=document.createDocumentFragment(),n=p.render("optgroup_header",i);mi(e,n),mi(e,t);let s=p.render("optgroup",{group:i,options:e});mi(a,s)}else mi(a,t)}),b.innerHTML="",mi(b,a),p.settings.highlight&&(k=b.querySelectorAll("span.highlight"),Array.prototype.forEach.call(k,function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()}),g.query.length&&g.tokens.length&&fi(g.tokens,e=>{((e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const n=e=>3===e.nodeType?(e=>{var n=e.data.match(t);if(n&&e.data.length>0){var i=document.createElement("span");i.className="highlight";var s=e.splitText(n.index);s.splitText(n[0].length);var o=s.cloneNode(!0);return i.appendChild(o),Oi(s,i),1}return 0})(e):((e=>{1!==e.nodeType||!e.childNodes||/(script|style)/i.test(e.tagName)||"highlight"===e.className&&"SPAN"===e.tagName||Array.from(e.childNodes).forEach(e=>{n(e)})})(e),0);n(e)})(b,e.regex)}));var x=e=>{let t=p.render(e,{input:m});return t&&(y=!0,b.insertBefore(t,b.firstChild)),t};if(p.loading?x("loading"):p.settings.shouldLoad.call(p,m)?0===g.items.length&&x("no_results"):x("not_loading"),(l=p.canCreate(m))&&(d=x("option_create")),p.hasOptions=g.items.length>0||l,y){if(g.items.length>0){if(v||"single"!==p.settings.mode||null==p.items[0]||(v=p.getOption(p.items[0])),!b.contains(v)){let e=0;d&&!p.settings.addPrecedence&&(e=1),v=p.selectable()[e]}}else d&&(v=d);e&&!p.isOpen&&(p.open(),p.scrollToOption(v,"auto")),p.setActiveOption(v)}else p.clearActiveOption(),e&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const n=this;if(Array.isArray(e))return n.addOptions(e,t),!1;const i=si(e[n.settings.valueField]);return null!==i&&!n.options.hasOwnProperty(i)&&(e.$order=e.$order||++n.order,e.$id=n.inputId+"-opt-"+e.$order,n.options[i]=e,n.lastQuery=null,t&&(n.userOptions[i]=t,n.trigger("option_add",i,e)),i)}addOptions(e,t=!1){fi(e,e=>{this.addOption(e,t)})}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=si(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var n;t[this.settings.optgroupValueField]=e,(n=this.registerOptionGroup(t))&&this.trigger("optgroup_add",n,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const n=this;var i,s;const o=si(e),r=si(t[n.settings.valueField]);if(null===o)return;const a=n.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=n.getOption(o),c=n.getItem(o);if(t.$order=t.$order||a.$order,delete n.options[o],n.uncacheValue(r),n.options[r]=t,l){if(n.dropdown_content.contains(l)){const e=n._render("option",t);Oi(l,e),n.activeOption===l&&n.setActiveOption(e)}l.remove()}c&&(-1!==(s=n.items.indexOf(o))&&n.items.splice(s,1,r),i=n._render("item",t),c.classList.contains("active")&&wi(i,"active"),Oi(c,i)),n.lastQuery=null}removeOption(e,t){const n=this;e=oi(e),n.uncacheValue(e),delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)}clearOptions(e){const t=(e||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const n={};fi(this.options,(e,i)=>{t(e,i)&&(n[i]=e)}),this.options=this.sifter.items=n,this.lastQuery=null,this.trigger("option_clear")}clearFilter(e,t){return this.items.indexOf(t)>=0}getOption(e,t=!1){const n=si(e);if(null===n)return null;const i=this.options[n];if(null!=i){if(i.$div)return i.$div;if(t)return this._render("option",i)}return null}getAdjacent(e,t,n="option"){var i;if(!e)return null;i="item"==n?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let s=0;s<i.length;s++)if(i[s]==e)return t>0?i[s+1]:i[s-1];return null}getItem(e){if("object"==typeof e)return e;var t=si(e);return null!==t?this.control.querySelector(`[data-value="${pi(t)}"]`):null}addItems(e,t){var n=this,i=Array.isArray(e)?e:[e];const s=(i=i.filter(e=>-1===n.items.indexOf(e)))[i.length-1];i.forEach(e=>{n.isPending=e!==s,n.addItem(e,t)})}addItem(e,t){li(this,t?[]:["change","dropdown_close"],()=>{var n,i;const s=this,o=s.settings.mode,r=si(e);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(t),"multi"!==o||!s.isFull())){if(n=s._render("item",s.options[r]),s.control.contains(n)&&(n=n.cloneNode(!0)),i=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(n),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let e=s.getOption(r),t=s.getAdjacent(e,1);t&&s.setActiveOption(t)}s.settings.clearAfterSelect&&s.setTextboxValue(),s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,n),s.isPending||s.updateOriginalInput({silent:t})}(!s.isPending||!i&&s.isFull())&&(s.inputState(),s.refreshState())}})}removeItem(e=null,t){const n=this;if(!(e=n.getItem(e)))return;var i,s;const o=e.dataset.value;i=Ci(e),e.remove(),e.classList.contains("active")&&(s=n.activeItems.indexOf(e),n.activeItems.splice(s,1),Ei(e,"active")),n.items.splice(i,1),n.lastQuery=null,!n.settings.persist&&n.userOptions.hasOwnProperty(o)&&n.removeOption(o,t),i<n.caretPos&&n.setCaret(n.caretPos-1),n.updateOriginalInput({silent:t}),n.refreshState(),n.positionDropdown(),n.trigger("item_remove",o,e)}createItem(e=null,t=()=>{}){3===arguments.length&&(t=arguments[2]),"function"!=typeof t&&(t=()=>{});var n,i=this,s=i.caretPos;if(e=e||i.inputValue(),!i.canCreate(e))return si(e)&&this.options[e]&&i.addItem(e),t(),!1;i.lock();var o=!1,r=e=>{if(i.unlock(),!e||"object"!=typeof e)return t();var n=si(e[i.settings.valueField]);if("string"!=typeof n)return t();i.setTextboxValue(),i.addOption(e,!0),i.setCaret(s),i.addItem(n),t(e),o=!0};return n="function"==typeof i.settings.create?i.settings.create.call(this,e,r):{[i.settings.labelField]:e,[i.settings.valueField]:e},o||r(n),!0}refreshItems(){var e=this;e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),n=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const i=e.wrapper.classList;var s;i.toggle("focus",e.isFocused),i.toggle("disabled",e.isDisabled),i.toggle("readonly",e.isReadOnly),i.toggle("required",e.isRequired),i.toggle("invalid",!e.isValid),i.toggle("locked",n),i.toggle("full",t),i.toggle("input-active",e.isFocused&&!e.isInputHidden),i.toggle("dropdown-active",e.isOpen),i.toggle("has-options",(s=e.options,0===Object.keys(s).length)),i.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.validity&&(e.isValid=e.input.validity.valid,e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var n,i;const s=t.input.querySelector('option[value=""]');if(t.is_select_tag){let e=function(e,n,i){return e||(e=gi('<option value="'+ri(n)+'">'+ri(i)+"</option>")),e!=s&&t.input.append(e),o.push(e),(e!=s||r>0)&&(e.selected=!0),e};const o=[],r=t.input.querySelectorAll("option:checked").length;t.input.querySelectorAll("option:checked").forEach(e=>{e.selected=!1}),0==t.items.length&&"single"==t.settings.mode?e(s,"",""):t.items.forEach(s=>{if(n=t.options[s],i=n[t.settings.labelField]||"",o.includes(n.$option)){const n=t.input.querySelector(`option[value="${pi(s)}"]:not(:checked)`);e(n,s,i)}else n.$option=e(n.$option,s,i)})}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,Ai(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),bi(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),bi(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,n=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.inputState()),t.isOpen=!1,Ai(t.focus_node,{"aria-expanded":"false"}),bi(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),n&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),n=e.offsetHeight+t.top+window.scrollY,i=t.left+window.scrollX;bi(this.dropdown,{width:t.width+"px",top:n+"px",left:i+"px"})}}clear(e){var t=this;if(t.items.length){var n=t.controlChildren();fi(n,e=>{t.removeItem(e,!0)}),t.inputState(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,n=t.caretPos,i=t.control;i.insertBefore(e,i.children[n]||null),t.setCaret(n+1)}deleteSelection(e){var t,n,i,s,o,r=this;t=e&&8===e.keyCode?-1:1,n={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=Li(r.activeItems,t),i=Ci(s),t>0&&i++,fi(r.activeItems,e=>a.push(e));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren();let i;t<0&&0===n.start&&0===n.length?i=e[r.caretPos-1]:t>0&&n.start===r.inputValue().length&&(i=e[r.caretPos]),void 0!==i&&a.push(i)}if(!r.shouldDelete(a,e))return!1;for(ci(e,!0),void 0!==i&&r.setCaret(i);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(e,t){const n=e.map(e=>e.dataset.value);return!(!n.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.call(this,n,t))}advanceSelection(e,t){var n,i,s=this;s.rtl&&(e*=-1),s.inputValue().length||(ui(Ti,t)||ui("shiftKey",t)?(i=(n=s.getLastActive(e))?n.classList.contains("active")?s.getAdjacent(n,e,"item"):n:e>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(i.classList.contains("active")&&s.removeActiveItem(n),s.setActiveItemClass(i)):s.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var n=this.control.querySelectorAll(".active");return n?Li(n,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(e=this.isReadOnly||this.isDisabled){this.isLocked=e,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(e){this.focus_node.tabIndex=e?-1:this.tabIndex,this.isDisabled=e,this.input.disabled=e,this.control_input.disabled=e,this.setLocked()}setReadOnly(e){this.isReadOnly=e,this.input.readOnly=e,this.control_input.readOnly=e,this.setLocked()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,Ei(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){var n,i;const s=this;if("function"!=typeof this.settings.render[e])return null;if(!(i=s.settings.render[e].call(this,t,ri)))return null;if(i=gi(i),"option"===e||"option_create"===e?t[s.settings.disabledField]?Ai(i,{"aria-disabled":"true"}):Ai(i,{"data-selectable":""}):"optgroup"===e&&(n=t.group[s.settings.optgroupValueField],Ai(i,{"data-group":n}),t.group[s.settings.disabledField]&&Ai(i,{"data-disabled":""})),"option"===e||"item"===e){const n=oi(t[s.settings.valueField]);Ai(i,{"data-value":n}),"item"===e?(wi(i,s.settings.itemClass),Ai(i,{"data-ts-item":""})):(wi(i,s.settings.optionClass),Ai(i,{role:"option",id:t.$id}),t.$div=i,s.options[n]=t)}return i}_render(e,t){const n=this.render(e,t);if(null==n)throw"HTMLElement expected";return n}clearCache(){fi(this.options,e=>{e.$div&&(e.$div.remove(),delete e.$div)})}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,n){var i=this,s=i[t];i[t]=function(){var t,o;return"after"===e&&(t=s.apply(i,arguments)),o=n.apply(i,arguments),"instead"===e?o:("before"===e&&(t=s.apply(i,arguments)),t)}}}const Di=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Pi=(e,t,n,i)=>{e.addEventListener(t,n,i)}
1,Fi=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(qi(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},qi=e=>"string"==typeof e&&e.indexOf("<")>-1,Ri=(e,t,n,i)=>{e.addEventListener(t,n,i)},Bi=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},Ni=(e,t,n,i)=>{e.addEventListener(t,n,i)},Hi=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(ji(e)){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}return document.querySelector(e)},ji=e=>"string"==typeof e&&e.indexOf("<")>-1;$i.define("change_listener",function(){var e;e=()=>{this.sync()},this.input.addEventListener("change",e,void 0)}),$i.define("checkbox_options",function(e){var t=this,n=t.onOptionSelect;t.settings.hideSelected=!1;const i=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},e);var s=function(e,t){t?(e.checked=!0,i.uncheckedClassNames&&e.classList.remove(...i.uncheckedClassNames),i.checkedClassNames&&e.classList.add(...i.checkedClassNames)):(e.checked=!1,i.checkedClassNames&&e.classList.remove(...i.checkedClassNames),i.uncheckedClassNames&&e.classList.add(...i.uncheckedClassNames))},o=function(e){setTimeout(()=>{var t=e.querySelector("input."+i.className);t instanceof HTMLInputElement&&s(t,e.classList.contains("selected"))},1)};t.hook("after","setupTemplates",()=>{var e=t.settings.render.option;t.settings.render.option=(n,o)=>{var r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(n=e)&&n.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var n;return document.querySelector(e)})(e.call(t,n,o)),a=document.createElement("input");i.className&&a.classList.add(i.className),a.addEventListener("click",function(e){Di(e)}),a.type="checkbox";const l=null==(c=n[t.settings.valueField])?null:(e=>"boolean"==typeof e?e?"1":"0":e+"")(c);var c;return s(a,!!(l&&t.items.indexOf(l)>-1)),r.prepend(a),r}}),t.on("item_remove",e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),o(n))}),t.on("item_add",e=>{var n=t.getOption(e);n&&o(n)}),t.hook("instead","onOptionSelect",(e,i)=>{if(i.classList.contains("selected"))return i.classList.remove("selected"),t.removeItem(i.dataset.value),t.refreshOptions(),void Di(e,!0);n.call(t,e,i),o(i)})}),$i.define("clear_button",function(e){const t=this,n=Object.assign({className:"clear-button",title:"Clear All",role:"button",tabindex:0,html:e=>`<div class="${e.className}" title="${e.title}" role="${e.role}" tabindex="${e.tabindex}">×</div>`},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(n=e)&&n.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var n;return document.querySelector(e)})(n.html(n));e.addEventListener("click",e=>{t.isLocked||(t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),t.refreshOptions(!1),e.preventDefault(),e.stopPropagation())}),t.control.appendChild(e)})}),$i.define("drag_drop",function(){var e=this;if("multi"!==e.settings.mode)return;var t=e.lock,n=e.unlock;let i,s=!0;e.hook("after","setupTemplates",()=>{var t=e.settings.render.item;e.settings.render.item=(n,o)=>{const r=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(n=e)&&n.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var n;return document.querySelector(e)})(t.call(e,n,o));var a;a=r,((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)})({draggable:"true"},(e,t)=>{null==e?a.removeAttribute(t):a.setAttribute(t,""+e)});const l=e=>{e.preventDefault(),r.classList.add("ts-drag-over"),c(r,i)},c=(e,t)=>{var n,i,s;void 0!==t&&(((e,t)=>{do{var n;if(e==(t=null==(n=t)?void 0:n.previousElementSibling))return!0}while(t&&t.previousElementSibling);return!1})(t,r)?(i=t,null==(s=(n=e).parentNode)||s.insertBefore(i,n.nextSibling)):((e,t)=>{var n;null==(n=e.parentNode)||n.insertBefore(t,e)})(e,t))};return Pi(r,"mousedown",e=>{s||((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e),e.stopPropagation()}),Pi(r,"dragstart",e=>{i=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),Pi(r,"dragenter",l),Pi(r,"dragover",l),Pi(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),Pi(r,"dragend",()=>{var t;
1document.querySelectorAll(".ts-drag-over").forEach(e=>e.classList.remove("ts-drag-over")),null==(t=i)||t.classList.remove("ts-dragging"),i=void 0;var n=[];e.control.querySelectorAll("[data-value]").forEach(e=>{if(e.dataset.value){let t=e.dataset.value;t&&n.push(t)}}),e.setValue(n)}),r}}),e.hook("instead","lock",()=>(s=!1,t.call(e))),e.hook("instead","unlock",()=>(s=!0,n.call(e)))}),$i.define("dropdown_header",function(e){const t=this,n=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">×</a></div></div>'},e);t.on("initialize",()=>{var e=(e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if("string"==typeof(n=e)&&n.indexOf("<")>-1){var t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstChild}var n;return document.querySelector(e)})(n.html(n)),i=e.querySelector("."+n.closeClass);i&&i.addEventListener("click",e=>{((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(e,!0),t.close()}),t.dropdown.insertBefore(e,t.dropdown.firstChild)})}),$i.define("caret_position",function(){var e=this;e.hook("instead","setCaret",t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEac
1h((n,i)=>{i<t?e.control_input.insertAdjacentElement("beforebegin",n):e.control.appendChild(n)}):t=e.items.length,e.caretPos=t}),e.hook("instead","moveCaret",t=>{if(!e.isFocused)return;const n=e.getLastActive(t);if(n){const a=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n})(n);e.setCaret(t>0?a+1:a),e.setActiveItem(),s=n,i=[],((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n])})(["last-active"],e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(i=i.concat(e))}),r=i.filter(Boolean),(o=s,Array.isArray(o)||(o=[o]),s=o).map(e=>{r.map(t=>{e.classList.remove(t)})})}else e.setCaret(e.caretPos+t);var i,s,o,r})}),$i.define("dropdown_input",function(){const e=this;e.settings.shouldOpen=!0,e.hook("before","setup",()=>{var t;e.focus_node=e.control,((e,...t)=>{var n,i=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(n=e,Array.isArray(n)||(n=[n]),e=n).map(e=>{i.map(t=>{e.classList.add(t)})})})(e.control_input,"dropdown-input");const n=Fi('<div class="dropdown-input-wrap">');n.append(e.control_input),e.dropdown.insertBefore(n,e.dropdown.firstChild);const i=Fi('<input class="items-placeholder" tabindex="-1" />');i.placeholder=e.settings.placeholder||"",e.control.append(i);const s=null==(t=e.input)?void 0:t.getAttribute("aria-label");s&&i.setAttribute("aria-label",s)}),e.on("initialize",()=>{e.control_input.addEventListener("keydown",t=>{switch(t.keyCode){case 27:return e.isOpen&&(((e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())})(t,!0),e.close()),void e.clearActiveItems();case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)}),e.on("blur",()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex}),e.on("dropdown_open",()=>{e.control_input.focus()});const t=e.onBlur;var n;e.hook("instead","onBlur",n=>{if(!n||n.relatedTarget!=e.control_input)return t.call(e)}),n=()=>e.onBlur(),e.control_input.addEventListener("blur",n,void 0),e.hook("before","close",()=>{e.isOpen&&e.focus_node.focus({preventScroll:!0})})})}),$i.define("input_autogrow",function(){var e=this;e.on("initialize",()=>{var t=document.createElement("span"),n=e.control_input;t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t);for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=n.style[e];var i=()=>{t.textContent=n.value,n.style.width=t.clientWidth+"px"};i(),e.on("update item_add item_remove",i),Ri(n,"input",i),Ri(n,"keyup",i),Ri(n,"blur",i),Ri(n,"update",i)})}),$i.define("no_backspace_delete",function(){var e=this,t=e.deleteSelection;this.hook("instead","deleteSelection",n=>!!e.activeItems.length&&t.call(e,n))}),$i.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),$i.define("optgroup_columns",function(){var e=this,t=e.onKeyDown;e.hook("instead","onKeyDown",n=>{var i,s,o,r;if(!e.isOpen||37!==n.keyCode&&39!==n.keyCode)return t.call(e,n);e.ignoreHover=!0,r=(e=>{for(;e&&e.matches;){if(e.matches("[data-group]"))return e;e=e.parentNode}})(e.activeOption),i=((e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var n=0;e=e.previousElementSibling;)e.matches(t)&&n++;return n})(e.activeOption,"[data-selectable]"),r&&(r=37===n.keyCode?r.previousSibling:r.nextSibling)&&(s=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,i)])&&e.setActiveOption(s)})}),$i.define("remove_button",function(e){const t=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},e);var n=this;if(t.append){var i='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+(t.title+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")+'">'+t.label+"</a>";n.hook("after","setupTemplates",()=>{var e=n.settings.render.item;n.settings.render.item=(t,s)=>{var o=Hi(e.call(n,t,s)),r=Hi(i);return o.appendChild(r),Ni(r,"mousedown",e=>{Bi(e,!0)}),Ni(r,"click",e=>{n.isLocked||(Bi(e,!0),n.isLocked||n.shouldDelete([o],e)&&(n.removeItem(o),n.refreshOptions(!1),n.inputState()))}),o}})}}),$i.define("restore_on_backspace",function(e){const t=this,n=Object.assign({text:e=>e[t.settings.labelField]},e);t.on("item_remove",function(e){if(t.isFocused&&""===t.control_input.value.trim()){var i=t.o
1ptions[e];i&&t.setTextboxValue(n.text.call(t,i))}})}),$i.define("virtual_scroll",function(){const e=this,t=e.canLoad,n=e.clearActiveOption,i=e.loadCallback;var s,o,r={},a=!1,l=[];if(e.settings.shouldLoadMore||(e.settings.shouldLoadMore=()=>{if(s.clientHeight/(s.scrollHeight-s.scrollTop)>.9)return!0;if(e.activeOption){var t=e.selectable();if(Array.from(t).indexOf(e.activeOption)>=t.length-2)return!0}return!1}),!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";e.settings.sortField=[{field:"$order"},{field:"$score"}];const c=t=>!("number"==typeof e.settings.maxOptions&&s.children.length>=e.settings.maxOptions||!(t in r)||!r[t]),d=(t,n)=>e.items.indexOf(n)>=0||l.indexOf(n)>=0;e.setNextUrl=(e,t)=>{r[e]=t},e.getUrl=t=>{if(t in r){const e=r[t];return r[t]=!1,e}return e.clearPagination(),e.settings.firstUrl.call(e,t)},e.clearPagination=()=>{r={}},e.hook("instead","clearActiveOption",()=>{if(!a)return n.call(e)}),e.hook("instead","canLoad",n=>n in r?c(n):t.call(e,n)),e.hook("instead","loadCallback",(t,n)=>{if(a){if(o){const n=t[0];void 0!==n&&(o.dataset.value=n[e.settings.valueField])}}else e.clearOptions(d);i.call(e,t,n),a=!1}),e.hook("after","refreshOptions",()=>{const t=e.lastValue;var n;c(t)?(n=e.render("loading_more",{query:t}))&&(n.setAttribute("data-selectable",""),o=n):t in r&&!s.querySelector(".no-results")&&(n=e.render("no_more_results",{query:t})),n&&(((e,...t)=>{var n,i=(e=>{var t=[];return((e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var n in e)e.hasOwnProperty(n)&&t(e[n])})(e,e=>{"string"==typeof e&&(e=e.trim().split(/[\t\n\f\r\s]/)),Array.isArray(e)&&(t=t.concat(e))}),t.filter(Boolean)})(t);(n=e,Array.isArray(n)||(n=[n]),e=n).map(e=>{i.map(t=>{e.classList.add(t)})})})(n,e.settings.optionClass),s.append(n))}),e.on("initialize",()=>{l=Object.keys(e.options),s=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},e.settings.render),s.addEventListener("scroll",()=>{e.settings.shouldLoadMore.call(e)&&c(e.lastValue)&&(a||(a=!0,e.load.call(e,e.lastValue)))})})}),document.querySelectorAll("[data-na-filters]").forEach(e=>{e._filterInit||(e._filterInit=!0,e.querySelectorAll("select[data-filter]").forEach(t=>{const n=t.dataset.filter,i=t.dataset.placeholder||"CautÄ...";new $i(t,{controlInput:null,placeholder:i,allowEmptyOption:!0,render:{no_results:()=>'<div class="no-results">Niciun rezultat</div>'},onItemAdd(i){if(function(){let e=document.getElementById("na-filter-loader");e||(e=document.createElement("div"),e.id="na-filter-loader",e.innerHTML='<div class="na-filter-spinner"></div>',document.body.appendChild(e)),e.classList.add("active")}(),"url"===n)if(i)window.location.href=i;else{const n=t.dataset.baseUrl||window.location.pathname,i=new URL(n,window.location.origin);e.querySelectorAll('select[data-filter="param"]').forEach(e=>{const t=e.dataset.param,n=new URL(window.location.href).searchParams.get(t);n&&i.searchParams.set(t,n)}),window.location.href=i.toString()}else if("param"===n){const e=t.dataset.param,n=new URL(window.location.href);n.pathname=n.pathname.replace(/\/page\/\d+\/?/,"/"),i?n.searchParams.set(e,i):n.searchParams.delete(e),window.location.href=n.toString()}}})}),e.style.opacity="1")});class zi{constructor(e){this.element=e,this.parent=e.parentElement,this.lastScrollY=window.scrollY,this.topOffset=112,this.bottomOffset=32,this.currentTop=this.topOffset,this.isSticky=!1,this.init()}init(){this.element.style.position="sticky",this.element.style.top=this.topOffset+"px",window.addEventListener("scroll",()=>this.onScroll(),{passive:!0}),window.addEventListener("resize",()=>this.onScroll(),{passive:!0})}onScroll(){const e=window.scrollY,t=e>this.lastScrollY?"down":"up",n=this.element.offsetHeight,i=window.innerHeight;if(n<=i-this.topOffset-this.bottomOffset)return this.element.style.top=this.topOffset+"px",void(this.lastScrollY=e);const s=this.topOffset,o=i-n-this.bottomOffset;this.currentTop="down"===t?Math.max(o,this.currentTop-(e-this.lastScrollY)):Math.min(s,this.currentTop+(this.lastScrollY-e)),this.element.style.top=this.currentTop+"px",this.lastScrollY=e}}
1document.querySelectorAll("[data-sticky-scroll]").forEach(e=>{e._stickyInit||(e._stickyInit=!0,new zi(e))});const Vi=[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#223f3b"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#d8efe9"},{visibility:"on"}]},{featureType:"landscape.man_made",elementType:"all",stylers:[{color:"#c1e5dc"},{visibility:"on"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f3faf8"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#295c55"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#82c6b7"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#3e8e80"},{visibility:"on"}]}],Ui={url:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='%23065f46'%3E%3Cpath d='M12 0c-4.198 0-8 3.403-8 7.602 0 4.198 3.469 9.21 8 16.398 4.531-7.188 8-12.2 8-16.398 0-4.199-3.801-7.602-8-7.602zm0 11c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z'/%3E%3C/svg%3E",scaledSize:null},Wi={strokeColor:"#065f46",strokeOpacity:.5,strokeWeight:1,fillColor:"#065f46",fillOpacity:.05},Yi=console.warn;console.warn=function(...e){var t,n;(null==(n=null==(t=e[0])?void 0:t.includes)?void 0:n.call(t,"google.maps.Marker is deprecated"))||Yi.apply(console,e)};class Gi{constructor(){this.map=null,this.markers=[],this.mapElement=document.getElementById("map"),this.citiesDataElement=document.getElementById("cities-data"),this.isLoaded=!1,this.mapElement&&this.citiesDataElement&&(this.cities=JSON.parse(this.citiesDataElement.textContent),this.API_KEY="AIzaSyCwDyUuVvQ61zp6dZfHrCI8bG8b-ZBwuzE",this.setupIntersectionObserver(),this.setupDynamicGridHeight(),this.setupResizeHandler())}setupIntersectionObserver(){const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&!this.isLoaded&&(this.isLoaded=!0,this.loadGoogleMaps(),e.unobserve(this.mapElement))})},{rootMargin:"100px"});e.observe(this.mapElement)}loadGoogleMaps(){var e;if(null==(e=window.google)?void 0:e.maps)return this.initMap(),void this.attachGlobalFunctions();const t="initGoogleMap_"+Date.now();window[t]=()=>{this.initMap(),this.attachGlobalFunctions(),delete window[t]};const n=document.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?key=${this.API_KEY}&callback=${t}&loading=async`,n.async=!0,n.defer=!0,document.head.appendChild(n)}initMap(){this.romaniaBounds={north:48.3,south:43.5,west:20.2,east:29.8},this.romaniaFitBounds={north:48,south:43.8,west:20.5,east:29.5},this.map=new google.maps.Map(this.mapElement,{center:{lat:46,lng:25},minZoom:5,maxZoom:15,restriction:{latLngBounds:this.romaniaBounds,strictBounds:!1},disableDefaultUI:!0,gestureHandling:"greedy",mapTypeId:"roadmap",styles:Vi}),this.fitRomania(),this.cities.forEach(e=>{const t=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:this.map,title:e.name,icon:{...Ui,scaledSize:new google.maps.Size(40,40)}});t.addListener("click",()=>{this.focusCity(e.lat,e.lng)}),new google.maps.Circle({...Wi,map:this.map,center:{lat:e.lat,lng:e.lng},radius:15e3}),this.markers.push(t)})}focusCity(e,t){if(!this.map)return void console.warn("Map not initialized yet");this.map.setZoom(17),this.map.setCenter({lat:e,lng:t});const n=document.getElementById("reset-map-button");n&&n.classList.remove("hidden")}fitRomania(){if(!this.map)return;const e=new google.maps.LatLngBounds({lat:this.romaniaFitBounds.south,lng:this.romaniaFitBounds.west},{lat:this.romaniaFitBounds.north,lng:this.romaniaFitBounds.east});this.map.fitBounds(e,0),google.maps.event.addListenerOnce(this.map,"bounds_changed",()=>{this.map.getZoom()<6.5&&this.map.setZoom(6.5)})}resetMap(){if(!this.map)return;this.fitRomania();const e=document.getElementById("reset-map-button");e&&e.classList.add("hidden")}setupResizeHandler(){let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{const e=document.getElementById("reset-map-button");(null==e?void 0:e.classList.contains("hidden"))&&this.fitRomania()},150)})}setupDynamicGridHeight(){const e=()=>{const e=document.getElementById("cities-grid"),t=document.querySelectorAll(".city-card");if(t.length>=6){const n=3*t[0].offsetHeight+48;e.style.maxHeight=n+36+"px"}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),window.addEventListener("resize",e)}attachGlobalFunctions(){window.focusCity=(e,t)=>this.focusCity(e,t),window.resetMap=()=>this.resetMap()}}!function(){const e=document.getElementById("map");e&&!e._mapInit&&(e._mapInit=!0,new Gi)}();class Xi{constructor(){var e;this.blob=document.getElementById("mouse-blob"),this.hero=null==(e=this.blob)?void 0:e.closest("section"),this.blob&&this.hero&&(this.currentX=window.innerWidth/2,this.currentY=window.innerHeight/2,this.targetX=this.currentX,this.targetY=this.currentY,this.ease=.03,this.isInHero=!1,this.init())}init(){this.heroRect=this.hero.getBoundingClientRect(),this.pendingOpacity=null;const e=()=>{this.heroRect=this.hero.getBoundingClientRect()};window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e,{passive:!0}),document.addEventListener("mousemove",e=>{const t=this.heroRect;this.isInHero=e.clientY>
1=t.top&&e.clientY<=t.bottom&&e.clientX>=t.left&&e.clientX<=t.right,this.isInHero?(this.targetX=e.clientX-t.left,this.targetY=e.clientY-t.top,this.pendingOpacity="1"):this.pendingOpacity="0"},{passive:!0}),this.hero.addEventListener("mouseleave",()=>{this.isInHero=!1,this.pendingOpacity="0"}),this.animate()}animate(){this.currentX+=(this.targetX-this.currentX)*this.ease,this.currentY+=(this.targetY-this.currentY)*this.ease,this.blob.style.left=`${this.currentX}px`,this.blob.style.top=`${this.currentY}px`,null!==this.pendingOpacity&&(this.blob.style.opacity=this.pendingOpacity,this.pendingOpacity=null),requestAnimationFrame(()=>this.animate())}}!function(){if(window.innerWidth<1024||!window.matchMedia("(pointer: fine)").matches)return;const e=document.getElementById("mouse-blob");e&&!e._blobInit&&(e._blobInit=!0,new Xi)}();const Ki=[{featureType:"all",elementType:"geometry.fill",stylers:[{color:"#0a4a40"}]},{featureType:"all",elementType:"geometry.stroke",stylers:[{color:"#0d5c50"},{weight:"0.4"}]},{featureType:"all",elementType:"labels.text.fill",stylers:[{color:"#2a8a7a"}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{color:"#063a32"},{weight:3}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#0d6858"},{weight:"0.8"},{visibility:"on"}]},{featureType:"administrative.province",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative.locality",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"administrative.neighborhood",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#0a4a40"}]},{featureType:"landscape",elementType:"geometry.stroke",stylers:[{color:"#0d5c50"},{weight:"0.3"}]},{featureType:"landscape.man_made",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape.natural",elementType:"geometry.fill",stylers:[{color:"#0a4a40"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#063a32"}]},{featureType:"water",elementType:"geometry.stroke",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#0d6858"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#063a32"}]}],Qi=window.innerWidth<768,Zi={path:"M 0,0 m -1,0 a 1,1 0 1,0 2,0 a 1,1 0 1,0 -2,0",fillColor:"#5ee8d0",fillOpacity:.85,strokeColor:"#7ff0dd",strokeWeight:.5,scale:Qi?3:4},Ji={path:"M 0,0 m -1,0 a 1,1 0 1,0 2,0 a 1,1 0 1,0 -2,0",fillColor:"#F39300",fillOpacity:1,strokeColor:"#F39300",strokeWeight:1.5,scale:Qi?4:6};class es{constructor(){this.map=null,this.markers=[],this.mapElement=document.getElementById("world-map-canvas"),this.dataElement=document.getElementById("na-world-map-data"),this.tooltip=document.getElementById("wm-tooltip"),this.isLoaded=!1,this.mapElement&&this.dataElement&&(this.countries=JSON.parse(this.dataElement.textContent),this.API_KEY="AIzaSyCwDyUuVvQ61zp6dZfHrCI8bG8b-ZBwuzE",this.setupIntersectionObserver())}setupIntersectionObserver(){const e=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting&&!this.isLoaded&&(this.isLoaded=!0,this.loadGoogleMaps(),e.unobserve(this.mapElement))})},{rootMargin:"200px"});e.observe(this.mapElement)}loadGoogleMaps(){var e;if(null==(e=window.google)?void 0:e.maps)return void this.initMap();const t="initWorldMap_"+Date.now();window[t]=()=>{this.initMap(),delete window[t]};const n=document.createElement("script");n.src=`https://maps.googleapis.com/maps/api/js?key=${this.API_KEY}&callback=${t}&loading=async`,n.async=!0,n.defer=!0,document.head.appendChild(n)}initMap(){this.map=new google.maps.Map(this.mapElement,{center:{lat:20,lng:15},zoom:2,disableDefaultUI:!0,zoomControl:!1,scrollwheel:!1,disableDoubleClickZoom:!0,draggable:!1,gestureHandling:"greedy",keyboardShortcuts:!1,clickableIcons:!1,mapTypeId:"roadmap",styles:Ki,backgroundColor:"#063a32"}),this.map.overlayMapTypes.insertAt(0,new google.maps.ImageMapType({getTileUrl:(e,t)=>
1{const n=1<<t;return e.x>=0&&e.x<n?null:`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><rect width='256' height='256' fill='${encodeURIComponent("#063a32")}'/></svg>`},tileSize:new google.maps.Size(256,256),opacity:1,name:"no-repeat"}));const e=new google.maps.LatLngBounds;this.countries.forEach(t=>e.extend({lat:t.lat,lng:t.lng}));const t=window.innerWidth<768?{top:10,right:10,bottom:10,left:10}:{top:40,right:40,bottom:40,left:40};this.map.fitBounds(e,t),google.maps.event.addListenerOnce(this.map,"idle",()=>{const e=this.map.getZoom(),t=this.map.getCenter();this.map.setOptions({minZoom:e,maxZoom:e}),this.map.addListener("center_changed",()=>{this.map.setCenter(t)}),function(){const e=document.querySelector("[data-country-scroll]");if(!e)return;let t=!1;setInterval(()=>{t||(e.scrollLeft+=1)},30),e.addEventListener("touchstart",()=>{t=!0},{passive:!0}),e.addEventListener("touchend",()=>{setTimeout(()=>{t=!1},2e3)})}()}),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=()=>{},this.overlayView.setMap(this.map),this.hideTimer=null;let n=null;this.countries.forEach(e=>{const t="România"===e.nume,i=new google.maps.Marker({position:{lat:e.lat,lng:e.lng},map:this.map,title:"",icon:t?{...Ji}:{...Zi},zIndex:t?999:1,clickable:!0,optimized:!1});t&&(n=i),i.addListener("mouseover",()=>{clearTimeout(this.hideTimer),t||i.setIcon({...Zi,scale:6,fillOpacity:1,fillColor:"#ffffff",strokeColor:"#ffffff",strokeWeight:1}),this.showTooltip(e,i)}),i.addListener("mouseout",()=>{t||i.setIcon({...Zi}),this.scheduleHide()}),i.addListener("click",()=>{e.link&&window.open(e.link,"_blank","noopener,noreferrer")}),this.markers.push(i)}),this.tooltip&&(this.tooltip.addEventListener("mouseenter",()=>{clearTimeout(this.hideTimer)}),this.tooltip.addEventListener("mouseleave",()=>{this.scheduleHide()})),n&&this.pulseRomania(n);const i=this.mapElement.parentElement.querySelector(".wm-loading");i&&i.remove()}showTooltip(e,t){if(!this.tooltip||!this.overlayView)return;const n="România"===e.nume;this.tooltip.querySelector("[data-name]").textContent=e.nume,this.tooltip.querySelector("[data-addr]").textContent=e.adresa;const i=this.tooltip.querySelector("[data-link]");e.link&&!n?(i.href=e.link,i.classList.remove("hidden")):i.classList.add("hidden"),this.tooltip.style.pointerEvents="auto",this.tooltip.style.visibility="hidden",this.tooltip.classList.remove("opacity-0","invisible","translate-y-2");const s=this.overlayView.getProjection();if(!s)return;const o=s.fromLatLngToContainerPixel(t.getPosition()),r=this.mapElement.getBoundingClientRect(),a=this.tooltip.getBoundingClientRect();let l=o.x-a.width/2,c=o.y-a.height-18;l<10&&(l=10),l+a.width>r.width-10&&(l=r.width-a.width-10),c<10&&(c=o.y+20),this.tooltip.style.left=l+"px",this.tooltip.style.top=c+"px",this.tooltip.style.visibility="visible"}scheduleHide(){this.hideTimer=setTimeout(()=>this.hideTooltip(),150)}hideTooltip(){this.tooltip&&(this.tooltip.style.pointerEvents="none",this.tooltip.classList.add("opacity-0","invisible","translate-y-2"))}pulseRomania(e){let t=!0,n=6;this.pulseTimer=setInterval(()=>{!document.hidden&&this.mapInView&&(t?(n+=.15,n>=8&&(t=!1)):(n-=.15,n<=5&&(t=!0)),e.setIcon({...Ji,scale:n,fillOpacity:.6+(n-5)/3*.4,strokeWeight:1+(n-5)/3*1.5}))},50),this.mapInView=!0,"IntersectionObserver"in window&&this.mapElement&&new IntersectionObserver(e=>{var t;this.mapInView=(null==(t=e[0])?void 0:t.isIntersecting)??!0}).observe(this.mapElement)}}!function(){const e=document.getElementById("world-map-canvas");e&&!e._worldMapInit&&(e._worldMapInit=!0,new es)}();const ts=console.warn;console.warn=function(...e){var t,n;(null==(n=null==(t=e[0])?void 0:t.includes)?void 0:n.call(t,"google.maps.Marker is deprecated"))||ts.apply(console,e)};class ns{constructor(){this.map=null,this.mapElement=document.getElementById("author-map"),this.dataElement=document.getElementById("author-map-data"),this.API_KEY="AIzaSyCwDyUuVvQ61zp6dZfHrCI8bG8b-ZBwuzE",this.mapElement&&this.dataElement&&(this.data=JSON.parse(this.dataElement.textContent),this.loadGoogleMaps())}loadGoogleMaps(){var e;if(null==(e=window.google)?void 0:e.maps)return void this.initMap();const t="initAuthorMap_"+Date.now();window[t]=()=>{this.initMap(),delete window[t]};const n=document.createElement("script");
1n.src=`https://maps.googleapis.com/maps/api/js?key=${this.API_KEY}&callback=${t}&loading=async`,n.async=!0,n.defer=!0,document.head.appendChild(n)}initMap(){const e={lat:this.data.lat,lng:this.data.lng};this.map=new google.maps.Map(this.mapElement,{zoom:15,center:e,minZoom:10,maxZoom:18,disableDefaultUI:!0,gestureHandling:"greedy",mapTypeId:"roadmap",styles:Vi}),new google.maps.Marker({position:e,map:this.map,title:this.data.name,icon:{...Ui,scaledSize:new google.maps.Size(40,40)}}),new google.maps.Circle({...Wi,map:this.map,center:e,radius:15e3})}}!function(){const e=document.getElementById("author-map");e&&!e._authorMapInit&&(e._authorMapInit=!0,new ns)}();const is="na_cookie_consent";function ss(){var e,t;const n=document.querySelector("[data-cookie-consent]");if(!n)return;if(localStorage.getItem(is))return;n.style.display="",requestAnimationFrame(()=>{requestAnimationFrame(()=>{n.classList.remove("translate-y-full"),n.classList.add("translate-y-0")})});const i=e=>{localStorage.setItem(is,e),n.classList.remove("translate-y-0"),n.classList.add("translate-y-full"),setTimeout(()=>n.remove(),500)};null==(e=n.querySelector("[data-cookie-accept]"))||e.addEventListener("click",()=>i("accepted")),null==(t=n.querySelector("[data-cookie-reject]"))||t.addEventListener("click",()=>i("rejected"))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",ss):ss();let os=null;async function rs(e){var t;if(e._pdfInit)return;e._pdfInit=!0;const n=e.dataset.pdfUrl;if(!n)return;const i=(await(os||(os=import("https://cdn.jsdelivr.net/npm/@embedpdf/snippet@2/dist/embedpdf.js").then(e=>e.default||e)),os)).init({type:"container",target:e,src:n,theme:{preference:"light"},zoom:{defaultZoomLevel:"fit-width"},disabledCategories:["annotation","annotation-shape","annotation-insert","annotation-form","annotation-redact","insert","form","redaction","panel-search","panel-comment","document","page-settings","security"]});try{const n=null==(t=(await i.registry).getPlugin("ui"))?void 0:t.provides();n&&window.matchMedia("(min-width: 768px)").matches&&n.setActiveSidebar("left","main","sidebar-panel",void 0,"thumbnails");const s=()=>{const t=document.querySelector("[mastheader]"),n=t?t.getBoundingClientRect().height:0;e.style.height=`${Math.max(360,Math.round(window.innerHeight-n))}px`};s(),window.addEventListener("resize",s)}catch(s){}}function as(){const e=document.querySelectorAll("[data-pdf-embed]");if(e.length)if("IntersectionObserver"in window){const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(t.unobserve(e.target),rs(e.target))})},{rootMargin:"300px"});e.forEach(e=>t.observe(e))}else e.forEach(rs)}function ls(e,t,n){e&&(e.textContent=t,e.classList.remove("hidden"),e.classList.toggle("text-green-600",n),e.classList.toggle("text-red-600",!n))}function cs(){const e=document.getElementById("newsletter-form");if(!e||e._nlInit)return;e._nlInit=!0;const t=document.getElementById("nl-message");e.addEventListener("submit",n=>async function(e,t,n){var i,s,o,r;if(e.preventDefault(),""!==((null==(i=t.querySelector("#nl-website"))?void 0:i.value)||"").trim())return ls(n,"Te-ai abonat cu succes! MulÈumim.",!0),void t.reset();const a=((null==(s=t.querySelector("#nl-email"))?void 0:s.value)||"").trim(),l=((null==(o=t.querySelector("#nl-name"))?void 0:o.value)||"").trim(),c=((null==(r=t.querySelector("#nl-sediu"))?void 0:r.value)||"").trim();if(!c)return void ls(n,"Te rugÄm sÄ alegi un sediu.",!1);if(!a)return void ls(n,"Te rugÄm sÄ introduci adresa de email.",!1);const d=function(t){try{const e=new URL(t),n=e.hostname.split(".")[1],i=e.searchParams.get("u"),s=e.searchParams.get("id");return n&&i&&s?{dc:n,u:i,id:s}:null}catch(e){return null}}(c);if(!d)return void ls(n,"Configurare newsletter invalidÄ pentru acest sediu.",!1);const u=t.querySelector('button[type="submit"], button');u&&(u.disabled=!0),t.classList.add("is-submitting"),ls(n,"Se trimite...",!0);const h=new URLSearchParams({u:d.u,id:d.id,EMAIL:a,FNAME:l,["b_"+d.u+"_"+d.id]:""}),p=`https://${d.dc}.list-manage.com/subscribe/post-json?${h.toString()}&c=?`;try{const e=await function(e){return new Promise((t,n)=>{const i="na_mc_cb_"+Math.floor(performance.now()).toString(36)+Math.round(performance.now()%1e3),s=document.createElement("script"),o=()=>{delete window[i],s.remove()};window[i]=e=>{o(),t(e)},s.onerror=()=>{o(),n(new Error("network"))},s.src=e.replace("c=?","c="+i),document.body.appendChild(s)})}(p),i=e&&e.msg?String(e.msg):"";if(e&&"success"===e.result){const e=/already subscribed/i.test(i);ls(n,e?"EÈti deja abonat(Ä). MulÈumim!":"Te-ai abonat cu succes! MulÈumim.",!0),e||t.reset()}else ls(n,function(e){const t=String(e||"").replace(/<[^>]*>/g,"").trim();if(!t)return"A apÄrut o eroare. ÃncearcÄ din nou.";const n=t.toLowerCase();return n.includes("invalid email")||n.includes("looks fake or invalid")?"Adresa de email pare invalidÄ. Verific-o Èi încearcÄ din nou.":n.includes("too many")||n.includes("many recent")?"Prea multe
1încercÄri. Te rugÄm sÄ Ã®ncerci din nou mai târziu.":n.includes("enter a value")||n.includes("required")?"Te rugÄm sÄ completezi adresa de email.":n.includes("cannot be added")||n.includes("compliance")?"AceastÄ adresÄ nu poate fi abonatÄ. Te rugÄm sÄ foloseÈti alta.":"A apÄrut o eroare. ÃncearcÄ din nou."}(i),!1)}catch(m){ls(n,"Conexiune eÈuatÄ. ÃncearcÄ din nou.",!1)}finally{u&&(u.disabled=!1),t.classList.remove("is-submitting")}}(n,e,t))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",as):as(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",cs):cs();let ds=null;function us(e){e.classList.add("hidden"),e.setAttribute("aria-hidden","true"),document.body.style.overflow=""}function hs(){const e=document.getElementById("gallery-lightbox");e&&!e._lightboxInit&&(e._lightboxInit=!0,document.querySelectorAll("[data-lightbox-open]").forEach(t=>{t.addEventListener("click",()=>{!function(e,t){e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),document.body.style.overflow="hidden";const n=document.getElementById("gallery-splide");ds&&(ds.destroy(!0),ds=null,function(e){e.className="splide",e.style.cssText="position:absolute;inset:0;top:56px;bottom:0;";const t=e.querySelector(".splide__track");t&&(t.removeAttribute("style"),t.setAttribute("style","height:100%"),t.id="",t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic"),t.removeAttribute("role"));const n=e.querySelector(".splide__list");n&&(n.removeAttribute("style"),n.setAttribute("style","height:100%"),n.id="",n.removeAttribute("role"),n.removeAttribute("aria-orientation")),e.querySelectorAll(".splide__slide").forEach(e=>{e.removeAttribute("style"),e.style.cssText="display:flex;align-items:center;justify-content:center;height:100%;padding:0 12px;",e.removeAttribute("role"),e.removeAttribute("aria-roledescription"),e.removeAttribute("aria-label"),e.id="",e.className="splide__slide"}),e.querySelectorAll(".splide__arrows, .splide__sr").forEach(e=>e.remove())}(n)),ds=new xn(n,{type:"slide",perPage:1,arrows:!0,pagination:!1,speed:300,rewind:!0,keyboard:"global",start:t}).mount(),ds.on("moved",t=>{const n=e.querySelector("[data-lightbox-current]");n&&(n.textContent=t+1)});const i=e.querySelector("[data-lightbox-current]");i&&(i.textContent=t+1)}(e,parseInt(t.dataset.lightboxOpen)||0)})}),e.querySelectorAll("[data-lightbox-close]").forEach(t=>{t.addEventListener("click",()=>us(e))}),e.addEventListener("click",t=>{t.target===e&&us(e)}),document.addEventListener("keydown",t=>{"Escape"!==t.key||e.classList.contains("hidden")||us(e)}))}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ms(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ps(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ps(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function fs(e,t,n,i){var s,o,r={headers:{accept:"*/*"}};return t||(r.mode="no-cors"),n&&(r.credentials="include"),r.priority=i?"high":"low",window.fetch?fetch(e,r):(s=e,o=n,new Promise(function(e,t,n){(n=new XMLHttpRequest).open("GET",s,n.withCredentials=o),n.setRequestHeader("Accept","*/*"),n.onload=function(){200===n.status?e():t()},n.send()}))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",hs):hs();var gs,vs=(gs=document.createElement("link")).relList&&gs.relList.supports&&gs.relList.supports("prefetch")?function(e,t){return new Promise(function(n,i,s){(s=document.createElement("link")).rel="prefetch",s.href=e,t&&s.setAttribute("crossorigin","anonymous"),s.onload=n,s.onerror=i,document.head.appendChild(s)})}:fs,ys=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},bs=new Set,ws=new Set,Es=!1;function ks(e,t){return Array.isArray(t)?t.some(function(t){return ks(e,t)}):(t.test||t).call(t,e.href,e)}function xs(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function Ss(e,t,n,i,s){var o=xs(navigator.connection);return o instanceof Error?Promise.reject(new Error("Cannot prefetch, "+o.message)):(ws.size>0&&!Es&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].
1concat(e).map(function(e){return bs.has(e)?[]:(bs.add(e),function(e,t,n){var i=[].slice.call(arguments,3);if(!n)return e.apply(void 0,[t].concat(i));for(var s,o=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===t}),r=new Map,a=function(){var n=s.value,o=function(s){var l=setTimeout(function(){return n.removeEventListener("mouseenter",o),n.removeEventListener("mouseleave",a),e.apply(void 0,[t].concat(i))},200);r.set(n,l)},a=function(e){var t=r.get(n);t&&(clearTimeout(t),r.delete(n))};n.addEventListener("mouseenter",o),n.addEventListener("mouseleave",a)},l=ms(o);!(s=l()).done;)a()}(t?fs:vs,new URL(e,location.href).toString(),s,n,i,t))})))}if(window.innerWidth>=1024&&window.matchMedia("(pointer: fine)").matches&&(function(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var t=function(e){e=e||1;var t=[],n=0;function i(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||i()},function(){n--,i()}]}(e.throttle||1/0),n=t[0],i=t[1],s=e.limit||1/0,o=e.origins||[location.hostname],r=e.ignores||[],a=e.delay||0,l=[],c=e.timeoutFn||ys,d="function"==typeof e.hrefFn&&e.hrefFn,u=e.prerender||!1;Es=e.prerenderAndPrefetch||!1;var h=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting)l.push((t=t.target).href),r=function(){l.includes(t.href)&&(h.unobserve(t),(Es||u)&&ws.size<s?function(e,t){void 0===t&&(t="immediate");var n=xs(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return Ss(e,!0,!1,!1,"moderate"===t||"conservative"===t),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var i,s=ms([].concat(e));!(i=s()).done;)ws.add(i.value);bs.size>0&&!Es&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var o=function(e,t){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+t+'"}]}';try{document.head.appendChild(n)}catch(i){return i}return!0}(ws,t);return!0===o?Promise.resolve():Promise.reject(o)}(d?d(t):t.href,e.eagerness).catch(function(t){if(!e.onError)throw t;e.onError(t)}):bs.size<s&&!u&&n(function(){Ss(d?d(t):t.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(i).catch(function(t){i(),e.onError&&e.onError(t)})}))},(c=a)?setTimeout(r,c):r();else{var o=l.indexOf((t=t.target).href);o>-1&&l.splice(o)}var r,c})},{threshold:e.threshold||0});c(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){o.length&&!o.includes(e.hostname)||ks(e,r)||h.observe(e)})},{timeout:e.timeout||2e3})}}({timeout:2e3,throttle:2,ignores:[/\/wp-admin/,/\/wp-login/,/logout/,/#/,e=>!1],onError:e=>{404!==e.status&&console.error("Quicklink error:",e)}}),HTMLScriptElement.supports&&HTMLScriptElement.supports("speculationrules"))){const e=new Set;document.addEventListener("pointerenter",t=>{if(!t.target||!t.target.closest)return;const n=t.target.closest("a[href]");if(!n)return;const i=n.href;try{const t=new URL(i);if(t.origin!==location.origin)return;if(t.pathname.match(/\/wp-(admin|login)|logout/))return;if(t.pathname===location.pathname)return;if(e.has(t.pathname))return;e.add(t.pathname);const n=document.createElement("script");n.type="speculationrules",n.textContent=JSON.stringify({prerender:[{urls:[t.pathname]}]}),document.head.appendChild(n)}catch{}},{capture:!0,passive:!0})}console.log("%c ÎÎΩÎΠΣÎΥΤÎÎ ","font-size: 50px; font-weight: bold; color: #3e8e80; background: #d8efe9; padding: 10px 20px;");
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.