1function hasConsentFor(category){if(!window.CookieScript||!window.CookieScript.instance){return!1} 2var state=window.CookieScript.instance.currentState();return!!state&&Array.isArray(state.categories)&&state.categories.indexOf(category)!==-1} 3var RETARGETING_PIXEL_ID='42932137';var retargetingPixelLoaded=!1;function loadRetargetingPixel(){if(retargetingPixelLoaded){return} 4retargetingPixelLoaded=!0;if(!window.pixie){var pixie=window.pixie=function(action,actionValue,params){pixie.actionQueue.push({action:action,actionValue:actionValue,params:params})};pixie.actionQueue=[];var script=document.createElement('script');script.async=!0;script.src='https://acdn.adnxs.com/dmp/up/pixie.js';var head=document.getElementsByTagName('head')[0];head.insertBefore(script,head.firstChild)} 5window.pixie('consent','default',{ad_storage:'granted',wait_for_update:1000});window.pixie('init',RETARGETING_PIXEL_ID);window.pixie('event','PageView')} 6window.addEventListener('CookieScriptAccept',function(e){console.log(e.detail.categories)});window.addEventListener('CookieScriptAcceptAll',function(){});window.addEventListener('CookieScriptReject',function(){});window.addEventListener('CookieScriptCategory-targeting',function(){loadRetargetingPixel()});window.addEventListener('CookieScriptCategory-performance',function(){});window.addEventListener('CookieScriptCategory-functionality',function(){});if(hasConsentFor('targeting')){loadRetargetingPixel()};window.addEventListener('load',function(){setTimeout(function(){faqEvents();determineFAQHeight()},300)});window.addEventListener('resize',function(){determineFAQHeight()});window.addEventListener('orientationchange',function(){determineFAQHeight()});function determineFAQHeight(){var faqItem=document.querySelectorAll('[data-role="faq-item"]');if(faqItem.length!=0){for(var i=0;i<faqItem.length;i++){var subelements=faqItem[i].children;var originalHeight=0;var originalHeightTitle=0;if(subelements.length!=0){for(var i2=0;i2<subelements.length;i2++){if(!subelements[i2].hasAttribute('data-faq-size')){originalHeight=originalHeight+subelements[i2].offsetHeight;var style=getComputedStyle(subelements[i2]);originalHeight+=parseInt(style.marginTop)+parseInt(style.marginBottom)}}} 7var h2elem=faqItem[i].querySelector('h2');if(h2elem!=null){originalHeightTitle=originalHeightTitle+h2elem.offsetHeight;var style=getComputedStyle(h2elem);originalHeightTitle+=parseInt(style.marginTop)+parseInt(style.marginBottom)} 8faqItem[i].setAttribute('data-original-height',originalHeight);faqItem[i].setAttribute('data-original-title-height',originalHeightTitle);if(faqItem[i].classList.contains('faq-overview__item--active')){faqItem[i].style.height=originalHeight+'px'}else{faqItem[i].style.height=originalHeightTitle+'px'}}}} 9function faqEvents(){var faqItem=document.querySelectorAll('[data-role="faq-item"]');if(faqItem.length!=0){for(var i=0;i<faqItem.length;i++){faqItem[i].addEventListener('click',function(e){if(this.classList.contains('faq-overview__item--active')){this.style.height=this.getAttribute('data-original-title-height')+'px'}else{this.style.height=this.getAttribute('data-original-height')+'px'} 10this.classList.toggle('faq-overview__item--active');determineFAQHeight()})}}};window.addEventListener("load",function(){equal();lazyLoading();openMenuMobile();closeMenuMobile();closeMenu();uploadfields();initTabmenu();lazyVideo();otherInputField();CloseNotification();checkAppointment();checkProductOnWishlist();initShare();initStorelocator();initSearchPageCategoriesSwiper();checkDivVisibility(".sidebar__inner");dialogBehaviours();if("objectFit" in document.documentElement.style===!1){swapImgCover()} 11var notificationElm=document.getElementById("notification");if(notificationElm!=null&¬ificationElm!=undefined){scrollElmView("#notification",80)}else{var notificationElm=document.querySelectorAll(".mark-error");if(notificationElm.length!=0){scrollElmView(".mark-error",80)}} 12var FooterItem=document.querySelectorAll('[data-role="footer-item"] > .h3',);if(FooterItem.length!=0){for(var i=0;i<FooterItem.length;i++){FooterItem[i].addEventListener("click",function(){if(this.parentNode.classList.contains("active")){this.parentNode.style.height=this.parentNode.getAttribute("data-original-title-height",)+"px"}else{this.parentNode.style.height=this.parentNode.getAttribute("data-original-height")+"px"} 13this.parentNode.classList.toggle("active")})}} 14if(window.innerWidth>=980){var sidebarExists=document.querySelectorAll("#sidebar");
14if(sidebarExists.length!=0){setTimeout(function(){sidebar=new StickySidebar("#sidebar",{containerSelector:".main",innerWrapperSelector:".sidebar__inner",topSpacing:0,bottomSpacing:120,})},100)}} 15if(document.getElementsByClassName("img-zoom")!==null&&document.getElementsByClassName("img-zoom").length!=0){zoomables={imgzoom:new ImageZoom(".img-zoom > img",{maxZoom:2}),}} 16var navSub=document.querySelectorAll(".mobile-menu nav.mainmenu > ul > li > span",);if(navSub.length!=0){for(var i=0;i<navSub.length;i++){navSub[i].addEventListener("click",function(){this.classList.toggle("open");this.nextElementSibling.classList.toggle("d-bl")})}} 17var dropdown=document.querySelectorAll(".dropdown");if(dropdown.length!=0){for(var i=0;i<dropdown.length;i++){var listElements=dropdown[i].querySelectorAll("ul[data-attribute-items] li",);if(listElements.length!=0){for(var sub=0;sub<listElements.length;sub++){listElements[sub].addEventListener("click",function(){var parentElm=this.parentNode;parentElm.previousElementSibling.innerHTML=this.innerHTML;var prevActive=parentElm.querySelector(".isactive");prevActive.classList.remove("isactive");prevActive.classList.remove("d-n");this.classList.add("isactive");this.classList.add("d-n")})}} 18dropdown[i].addEventListener("click",function(){this.classList.toggle("open");document.querySelector("body").classList.toggle("dropdown-open")});document.querySelector("body").addEventListener("click",function(event){if(!event.target.classList.contains("dropdown-trigger")){if(!event.target.classList.contains("open")){if(document.querySelector(".dropdown.open")){document.querySelector(".dropdown.open").classList.remove("open");document.querySelector("body").classList.remove("dropdown-open")}}}})}} 19const stickyElm=document.querySelector("#nav-container-top");if(stickyElm){var observer=new IntersectionObserver(function(entries){let sticky=document.querySelector(".sticky");if(entries[0].intersectionRatio===0&&sticky) 20sticky.classList.add("isSticky");else if(entries[0].intersectionRatio===1&&sticky) 21sticky.classList.remove("isSticky");},{threshold:[0,1]},);observer.observe(stickyElm)} 22wishlist();var datepickerRanges={past:function(){return{minDate:new Date(1900,0,1),maxDate:new Date()}},future:function(){var t=new Date();return{minDate:t,maxDate:new Date(t.getFullYear()+10,11,31),}},any:function(){return{minDate:new Date(1900,0,1),maxDate:new Date(9999,11,31),}},};document.querySelectorAll(".form__datetime input").forEach(function(input){var form=input.closest("form");var kind=(form&&form.dataset.datepickerKind)||"past";var range=(datepickerRanges[kind]||datepickerRanges.past)();input.DatePickerX.init({mondayFirst:!0,minDate:range.minDate,maxDate:range.maxDate,})});payTerms();detectSearch();initRequiredFieldsTouchTracking()});window.addEventListener("resize",function(){equal();lazyLoading();closeMenuMobile();checkDivVisibility(".sidebar__inner");dialogBehaviours()});window.addEventListener("orientationchange",function(){equal();lazyLoading();checkDivVisibility(".sidebar__inner");dialogBehaviours()});window.addEventListener("scroll",function(){lazyLoading();var requiredFields=document.querySelectorAll(".field-required");var contactForm=document.querySelectorAll('[data-role="contact-form"]');if(requiredFields.length!=0&&contactForm.length!=0){requiredFieldsBar()} 23setAppointmentAboveCookieBanner();checkDivVisibility(".sidebar__inner")});if(!("remove" in Element.prototype)){Element.prototype.remove=function(){if(this.parentNode){this.parentNode.removeChild(this)}}} 24function CloseNotification(){if(document.querySelector(".notificationbar")){if(document.cookie.indexOf("removeNotification=")>0){document.querySelector(".notificationbar").remove()}else{document.querySelector(".notificationbar").classList.add("d-bl");var menuBtn=document.querySelectorAll(".notificationbar i");if(menuBtn.length>0){for(var i=0;i<menuBtn.length;i++){menuBtn[i].addEventListener("click",function(e){document.querySelector(".notificationbar").remove();var now=new Date();now.setTime(now.getTime()+1*3600*1000);document.cookie="removeNotification=remove; expires="+now.toUTCString()+"; path=/"})}}}}} 25function scrollToProductoverview(){var productsVisible=[];
25var productsOption=document.querySelectorAll('[data-slider-name="products-filters"] .swiper-slide.active',);if(productsOption.length!=0){productsVisible=document.querySelectorAll('.pos-r[data-role="products-list"]',)} 26if(productsVisible.length!=0||window.location.search.indexOf("sort")==1||window.location.search.indexOf("page")==1){var mq=window.matchMedia("(max-width: 1310px)");if(mq.matches){scrollElmView('[data-slider-name="products-filters"]',200)}else{scrollElmView('[data-slider-name="products-filters"]',48)}}} 27function equal(){var containerElements=document.querySelectorAll("[data-equal-key]");if(containerElements.length!=0){for(var i=0;i<containerElements.length;i++){var equalKey=containerElements[i].getAttribute("data-equal-key");equalizeContainers('[data-equal-key="'+equalKey+'"]','[data-equal="'+equalKey+'"]',)}}} 28function equalizeContainers(containerSel,targetSel){if(typeof containerSel=="object"){var containerElements=[containerSel]}else{var containerElements=document.querySelectorAll(containerSel)} 29for(var i=0;i<containerElements.length;i++){var highestElement=0;var targetElements=containerElements[i].querySelectorAll(targetSel);for(var j=0;j<targetElements.length;j++){targetElements[j].style.height="0px"} 30for(var j=0;j<targetElements.length;j++){var currentTargetElement=targetElements[j];currentTargetElement.style.height="auto";if(currentTargetElement.classList.contains("eq-set")){var currentElementHeight=0}else{var currentElementHeight=currentTargetElement.offsetHeight} 31if(currentElementHeight>highestElement){highestElement=currentElementHeight}} 32for(var j=0;j<targetElements.length;j++){targetElements[j].style.height=highestElement+"px"}}} 33function isElementInViewport(el){if(typeof jQuery==="function"&&el instanceof jQuery){el=el[0]} 34var rect=el.getBoundingClientRect();return((rect.top>=0&&rect.top<=(window.innerHeight||document.documentElement.clientHeight))||(rect.bottom>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)))} 35function lazyLoading(){var lazyImages=document.querySelectorAll("img.lazy");if(lazyImages.length>0){for(var i=0;i<lazyImages.length;i++){var b=lazyImages[i].getAttribute("data-src");var element=lazyImages[i];if(isElementInViewport(element)){if(element.parentNode.querySelector("source")==undefined||element.currentSrc!=element.parentNode.querySelector("source").srcset){element.setAttribute("src",b)} 36element.classList.remove("lazy")}}} 37var lazyBg=document.querySelectorAll(".lazy-background");if(lazyBg.length>0){for(var i=0;i<lazyBg.length;i++){var b=lazyBg[i].getAttribute("data-src");var imageFromTop=lazyBg[i].offsetTop;var scrollFromTopElm=document.scrollingElement||document.documentElement;var scrollFromTop=scrollFromTopElm.scrollTop;var browserHeight=document.documentElement.clientHeight;var bottomOfScreen=scrollFromTop+browserHeight;if(imageFromTop<bottomOfScreen){lazyBg[i].classList.add("visible")}}}} 38function swapImgCover(){var imgCovers=document.querySelectorAll(".img-cover");if(imgCovers.length!=0){for(var i=0;i<imgCovers.length;i++){var img=imgCovers[i].getAttribute("data-src");if(img==""||img==null){var img=imgCovers[i].getAttribute("src")} 39var parentimg=imgCovers[i].parentNode;parentimg.classList.add("bg-img");parentimg.style.backgroundImage="url('"+img+"')";parentimg.style.backgroundSize="cover";imgCovers[i].style.display="none"}}} 40function scrollElmView(selector,minus){if(minus>0){var e=document.querySelectorAll(selector)[0];tempDiv=document.createElement("div");tempDiv.id="tempDiv";tempDiv.style.background="transparent";tempDiv.style.width="10px";tempDiv.style.height="10px";tempDiv.style.position="absolute";tempDiv.style.top=0-minus+"px";e.appendChild(tempDiv);tempDiv.scrollIntoView({behavior:"smooth",block:"start"});tempDiv.remove()}else{var e=document.querySelectorAll(selector)[0];e.scrollIntoView({behavior:"smooth",block:"start"})}} 41function findPos(obj){var curtop=0;if(obj.offsetParent){do{curtop+=obj.offsetTop}while((obj=obj.offsetParent));return[curtop]}} 42function appendHtml(el,str){var div=document.createElement("div");div.innerHTML=str;while(div.children.length>0){el.appendChild(div.children[0])}} 43function openMenuMobile(){var menuBtn=document.querySelectorAll("#menu-trigger");if(menuBtn.length>0){for(var i=0;i<menuBtn.length;i++){menuBtn[i].addEventListener("click",function(e){document.querySelector("html").classList.toggle("mobile-open");var menuBtn=document.querySelectorAll(".mobile-open main");if(menuBtn.length>0){for(var i=0;i<menuBtn.length;i++){menuBtn[i].addEventListener("click",function(e){document.querySelector("html").classList.remove("mobile-open")})}} 44var menuBtn2=document.querySelectorAll(".mobile-open footer");if(menuBtn2.length>0){for(var i=0;i<menuBtn2.length;i++){menuBtn2[i].addEventListener("click",function(e){document.querySelector("html").classList.remove("mobile-open")})}}})}}} 45function closeMenuMobile(){var menuBtn=document.querySelectorAll("#overlay");if(menuBtn.length>0){for(var i=0;i<menuBtn.length;i++){menuBtn[i].addEventListener("click",function(e){document.querySelector("html").classList.remove("mobile-open")})}} 46var closeBtn=document.querySelectorAll("#close-menu");if(closeBtn.length>0){for(var i=0;i<closeBtn.length;i++){closeBtn[i].addEventListener("click",function(e){document.querySelector("html").classList.remove("mobile-open")})}} 47var mq=window.matchMedia("(min-width: 1025px)");if(mq.matches){document.querySelector("html").classList.remove("mobile-open")}} 48function loadMorePosts(type,page){if(type=="reference"){postAjax("/calls/MReference/loadmore.php",{pReference:pReference,},function(data){if(data){data=JSON.parse(data);if(data.cHTML.length!=0){appendHtml(document.querySelectorAll('[data-role="reference-overview-blocks"]',)[0],data.cHTML,);pReference=data.pLoadMorePointer;if(data.bShowLoadMore==!1){document.querySelectorAll(".loadMoreBtn")[0].remove()} 49equal()}}else{document.querySelectorAll(".loadMoreBtn")[0].remove()}},)}else if(type=="vacancy"){var query=window.location.href.split("?");postAjax("/calls/MVacancy/loadmore.php",{vacancyOffset:vacancyOffset,pPage:page,cQueryString:query[1]!=un
49defined?query[1]:"",},function(data){if(data){data=JSON.parse(data);if(data.cHTML.length!=0){appendHtml(document.querySelectorAll('[data-role="vacancy-overview"] > .grid',)[0],data.cHTML,);vacancyOffset=data.newOffset;if(data.bShowLoadMore==!1){document.querySelectorAll(".loadMoreBtn")[0].remove()}}}else{document.querySelectorAll(".loadMoreBtn")[0].remove()}},)}} 50function uploadfields(){var inputs=document.querySelectorAll(".inputfile");if(inputs.length>0){Array.prototype.forEach.call(inputs,function(input){if(input.closest("[data-form-upload]")){return} 51var label=input.nextElementSibling;let originalLabel=label.querySelector("span").innerHTML;input.addEventListener("change",function(e){if(!input.files||input.files.length===0){label.querySelector("span").innerHTML=originalLabel;label.classList.remove("active");return} 52var MIMEtypes=input.accept.split(",").map(function(MIMEtype){return new RegExp(MIMEtype.replace("*","[^\\/,]+"))});passes=Array.prototype.every.call(input.files,function passesAcceptedFormat(file){return MIMEtypes.some(function(MIMEtype){return MIMEtype.test(file.type)})},);if(passes==!1){e.preventDefault();window.alert("Selecteer a.u.b. een bestand met een van de volgende extensies:"+input.accept.replaceAll("."," "),);return} 53if(input.files[0].size>12000000){e.preventDefault();window.alert("Selecteer a.u.b. een bestand dat niet groter is dan 12MB",);return} 54var fileName="";if(this.files.length>1){for(var i=0;i<this.files.length;i++){if(fileName!=""){fileName+=", "} 55fileName+=this.files[i].name}}else{fileName=this.files[0].name} 56label.querySelector("span").innerHTML=fileName;label.classList.add("active")})})}} 57function changeImage(url,e){if(document.getElementsByClassName("img-zoom")!=null&&document.getElementsByClassName("img-zoom").length!=0){var activeImg=document.querySelectorAll('[data-slider-name="product-images"] .swiper-slide.active',);if(activeImg.length!=0){if(activeImg[0]!=e){activeImg[0].classList.remove("active")}} 58e.classList.add("active");let title=e.getAttribute("data-title");document.getElementById("img-master").src=url;document.getElementById("img-lightbox").href=url;document.getElementById("img-master").alt=title;$(".zoomableInPlace").remove();zoomables={imgzoom:new ImageZoom(".img-zoom > img",{maxZoom:2}),}}} 59function initTabmenu(){tabmenus=document.querySelectorAll(".tab-menu");tabmenus=Array.prototype.slice.call(tabmenus);tabmenus.forEach(function(tabmenu){links=tabmenu.querySelectorAll("li:not(.active_item) span");links=Array.prototype.slice.call(links);links.forEach(function(link){link.addEventListener("click",function(e){e.preventDefault();e.stopPropagation();if(this.parentNode.classList.contains("active_item")){var actives=this.parentNode.parentNode.querySelectorAll("li.active_item",);clearActiveStates(actives)}else{var actives=this.parentNode.parentNode.querySelectorAll("li.active_item",);clearActiveStates(actives);if(window.innerWidth>940){document.body.classList.add("open")} 60var parent=this.parentNode;parent.classList.add("active_item");document.querySelector("body").classList.add("subnavopen");var navCheck=parent.parentNode.parentNode.nodeName;if(navCheck==="NAV"){var firstChildMenu=parent.parentNode.parentNode.querySelector("li.active_item > ul > li.first > ul",);if(firstChildMenu){firstChildMenu.parentNode.classList.add("active_item",)}} 61if(window.innerWidth<=940){var liList=this.parentNode.parentNode.querySelectorAll("li.active_item > ul > li.active_item > ul > li",);if(liList.length===0){liList=this.parentNode.parentNode.querySelectorAll("li.active_item > ul > li",)} 62setTimeout(function(){setUlHeight(liList)},500);window.addEventListener("resize",function(){if(window.innerWidth<=940){setUlHeight(liList)}})}} 63if(document.body.classList.contains("open")&&document.querySelectorAll(".tab-menu .activeSub.active_item",).length==0){document.body.classList.remove("open")}})})})} 64function setUlHeight(liList){var height=0;liList=Array.prototype.slice.call(liList);liList.forEach(function(li){var style=getComputedStyle(li);height+=parseInt(li.offsetHeight)+parseInt(style.marginBottom)});var target=document.querySelector(".bottomNavbar nav.inline-menu > ul li.active_item ul",);target.style.height=height+"px"} 65function clearActiveStates(nodeList){if(nodeList.length>0){nodeList=Array.prototype.slice.call(nodeList);nodeList.forEach(function(item){item.classList.remove("active_item");document.querySelector("body").classList.remove("subnavopen");var ulsize=document.querySelector(".bottomNavbar ul[style]");if(ulsize){ulsize.removeAttribute("style")}})}} 66function closeMenu(){var menuBtn=document.querySelectorAll("#overlay");if(menuBtn.length>0){for(var i=0;i<menuBtn.length;i++){menuBtn[i].addEventListener("click",function(e){document.querySelector("body").classList.remove("open");var actives=document.querySelectorAll("li.active_item");clearActiveStates(actives)})}}} 67function lazyVideo(){var videos=document.querySelectorAll(".play-video");if(videos){for(var i=0;i<videos.length;i++){videos[i].addEventListener("click",function(){var src=this.getAttribute("data-src");var parent=this.parentNode;parent.classList.toggle("added-video");var iframe=document.createElement("iframe");
67iframe.setAttribute("modestbranding","0");iframe.setAttribute("frameborder","0");iframe.setAttribute("allowfullscreen","");iframe.setAttribute("allow","autoplay");iframe.setAttribute("referrerpolicy","no-referrer-when-downgrade",);iframe.setAttribute("src",src);parent.innerHTML="";parent.appendChild(iframe)})}}} 68function wishlist(){setWishlistSet();sendWishlist();checkProductOnWishlist()} 69function setWishlistSet(){var setTo=document.querySelectorAll("[data-wishlist-set][data-wishlist-type]",);if(setTo.length!=0){for(var i=0;i<setTo.length;i++){setTo[i].addEventListener("click",function(e){var productId=this.getAttribute("data-wishlist-set");var setType=this.getAttribute("data-wishlist-type");var rowAction="";if(this.hasAttribute("data-wishlist-action")){var rowAction=this.getAttribute("data-wishlist-action")} 70if(setType=="add"){postAjax("/api/wishlist/add_item/"+productId,{},function(data){if(data){data=JSON.parse(data);if(data.productCount>=0){var elm=document.querySelectorAll('[data-wishlist-set="'+productId+'"][data-wishlist-type="add"]',);if(elm!=null){elm=Array.prototype.slice.call(elm);elm.forEach(function(el){el.setAttribute("data-wishlist-type","added",)})} 71updateWishlistAmount(data.productCount)}}},)}else if(setType=="added"){postAjax("/api/wishlist/remove_item/"+productId,{productId:productId,},function(data){if(data){data=JSON.parse(data);if(data.productCount>=0){var elm=document.querySelectorAll('[data-wishlist-set="'+productId+'"][data-wishlist-type="added"]',);if(elm!=null){elm=Array.prototype.slice.call(elm);elm.forEach(function(el){el.setAttribute("data-wishlist-type","add",)})} 72updateWishlistAmount(data.productCount)}}},)}else if(setType=="remove"){postAjax("/api/wishlist/remove_item/"+productId,{productId:productId,},function(data){if(data){data=JSON.parse(data);if(data.productCount>=0){updateWishlistAmount(data.productCount);if(rowAction=="remove-row"){var elm=document.querySelector('[data-wishlist-set="'+productId+'"][data-wishlist-type="remove"][data-wishlist-action="'+rowAction+'"]',);if(elm!=null){elm.parentNode.parentNode.parentNode.parentNode.remove()}} 73window.location=forwardWishlist}}},)}})}}} 74function updateWishlistAmount(productCount){var amountElm=document.querySelector("[data-wishlist-amount]");if(amountElm!=null){amountElm.setAttribute("data-wishlist-amount",productCount);amountElm.innerHTML=productCount}} 75function sendWishlist(){var sendTrigger=document.querySelector('[data-role="send-wishlist"] button[type="submit"]',);if(sendTrigger!=null&&sendTrigger!=undefined){sendTrigger.addEventListener("click",function(e){var errorReturn=!0;var emailElm=document.querySelector('[data-role="send-wishlist"] [type="email"]',);var termsElm=document.querySelector('[data-role="send-wishlist"] [type="checkbox"]',);var messageElm=document.querySelector('[data-role="send-wishlist"] .message',);if(emailElm!=null&&emailElm!=undefined&&termsElm!=null&&termsElm!=undefined){if(emailIsValid(emailElm.value)&&termsElm.checked){errorReturn=!1;messageElm.innerHTML="";messageElm.classList.remove("error");postAjax("/api/wishlist/mail",{email:emailElm.value,},function(data){if(data){data=JSON.parse(data);if(data.success==!0){window.history.pushState({},"",window.location.href.split("?")[0]+"?success",);messageElm.innerHTML="<span>Jouw verlanglijst wordt z.s.m. verzonden!</span>";messageElm.classList.add("success")}else{messageElm.innerHTML="<span>Niet alle benodigde gegevens zijn juist ingevuld.</span>";messageElm.classList.add("error")}}},)}} 76if(errorReturn){messageElm.innerHTML="Niet alle benodigde gegevens zijn juist ingevuld.";messageElm.classList.add("error")}})}} 77function emailIsValid(email){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)} 78function otherInputField(){var checkField=document.querySelectorAll("#klacht_meubels_Display ul li:last-child input",);var descriptionFurnitureField=document.querySelectorAll("#description_furniture",);if(checkField.length!=0){for(var i=0;i<checkField.length;i++){if(this.checked==!0){descriptionFurnitureField[0].disabled=!1}else{descriptionFurnitureField[0].disabled=!0} 79checkField[i].addEventListener("change",function(){if(this.checked==!0){descriptionFurnitureField[0].disabled=!1}else{descriptionFurnitureField[0].disabled=!0}})}} 80var purchaseAgreementNrCheck=document.querySelectorAll("#purchase_agreement_nr_check_Display ul li:last-child input",);var purchaseAgreementNrField=document.querySelectorAll("#purchase_agreement_nr_field",);if(purchaseAgreementNrCheck.length!=0){for(var i=0;i<purchaseAgreementNrCheck.length;i++){if(this.checked==!0){purchaseAgreementNrField[0].disabled=!0}else{purchaseAgreementNrField[0].disabled=!1} 81purchaseAgreementNrCheck[i].addEventListener("change",function(){if(this.checked==!0){purchaseAgreementNrField[0].disabled=!0}else{purchaseAgreementNrField[0].disabled=!1}})}}} 82function initStorelocator(){var pageContainsStorelocator=document.querySelector('[data-role="store-locator"]',);if(pageContainsStorelocator){var input=document.querySelector('[name="locations"]');var button=document.querySelector(".search-box button.submit");input.addEventListener("keyup",function(event){var searchstring=input.value;if(event.keyCode===13){event.preventDefault();getLocations(searchstring)}});button.addEventListener("click",function(){var searchstring=input.value;getLocations(searchstring)})}} 83function getLocations(search){postAjax("/calls/find_closest_stores.php",{address:search,},function(data){if(data){data=JSON.parse(data);if(data.success==!0){buildLocationList(data.addresses);var storeLocatorSearchBox=document.querySelector('[data-role="store-locator"] .search-box.storelocator',);searchboxHeight=storeLocatorSearchBox.parentNode.offsetHeight;parentHeigth=storeLocatorSearchBox.parentNode.parentNode.offsetHeight;var placeholder=document.querySelector('[data-role="location-list"]',);placeholder.style.height=parentHeigth-searchboxHeight+"px"}}},)} 84function buildLocationList(addresses){var placeholder=document.querySelector('[data-role="location-list"]');placeholder.innerHTML=addresses} 85function focusSearch(){document.querySelector("input.searchFieldMain").focus()} 86function initShare(){var shareButton=document.querySelector(".share-button");if(shareButton){var closeButton=document.querySelector(".close-button");var shareDialog=document.querySelector(".share-dialog");getShareURL();closeButton.addEventListener("click",function event(){shareDialog.classList.remove("is-open")})}} 87function getShareURL(){setShareAction(document.querySelector(".wishlist-url").value)} 88function setShareAction(resultURL){var shareButton=document.querySelector(".share-button");var shareDialog=document.querySelector(".share-dialog");shareButton.addEventListener("click",function event(e){e.preventDefault();e.stopImmediatePropagation();
88if(navigator.share){navigator.share({title:"Woonsquare verlanglijst",url:resultURL,}).then(function(){}).catch(console.error)}else{shareDialog.classList.add("is-open")}})} 89function copyValue(){var copyText=document.querySelector(".wishlist-url");var copybtn=document.querySelector(".copy-link");copyText.select();copyText.setSelectionRange(0,99999);document.execCommand("copy");copybtn.classList.add("copied");setTimeout(function(){copybtn.classList.remove("copied")},2000)} 90var requiredFieldsFormTouched=!1;function markRequiredFieldsFormAsTouched(){requiredFieldsFormTouched=!0} 91function initRequiredFieldsTouchTracking(){var requiredFields=document.querySelectorAll(".field-required");for(var i=0;i<requiredFields.length;i++){requiredFields[i].addEventListener("blur",markRequiredFieldsFormAsTouched,);requiredFields[i].addEventListener("change",markRequiredFieldsFormAsTouched,);requiredFields[i].addEventListener("input",markRequiredFieldsFormAsTouched,)}} 92function requiredFieldsBar(){if(requiredFieldsFormTouched===!1){return} 93var requiredFields=document.querySelectorAll(".field-required");var contactForm=document.querySelectorAll('[data-role="contact-form"]');if(requiredFields.length!=0&&contactForm.length!=0){var scrollFromTop=window.pageYOffset||document.documentElement.scrollTop;var formFromTop=window.pageYOffset+document.querySelector('[data-role="contact-form"]').getBoundingClientRect().top;for(var i=0;i<requiredFields.length;i++){var elementValue="";var elementFromTop=window.pageYOffset+requiredFields[i].getBoundingClientRect().top;elementValue=requiredFields[i].value;if(scrollFromTop>elementFromTop&&elementValue==""){requiredFields[i].classList.add("isEmpty")}else if(elementValue!=""){requiredFields[i].classList.remove("isEmpty")} 94var requiredFieldsEmpty=document.querySelectorAll(".field-required.isEmpty",);if(requiredFieldsEmpty.length!=0&&formFromTop<scrollFromTop){document.body.classList.add("required-in-form")}else{document.body.classList.remove("required-in-form")}}}} 95function checkAppointment(){if(window.location.hash&&window.location.hash=="#afspraak-maken"){openAppointment()}} 96function openAppointment(){document.getElementById("appointment-holder").classList.add("active");document.body.style.overflow="hidden";document.body.style.height="100vh";changeAppointmentType()} 97function closeAppointment(){document.getElementById("appointment-holder").classList.remove("active");document.body.style.overflow="inherit";document.body.style.height="inherit"} 98function setAppointmentAboveCookieBanner(){praivacyCookieNotice=document.querySelector("#praivacy-cookie-notice");if(praivacyCookieNotice!==null&&praivacyCookieNotice.style.display=="block"){document.body.classList.add("praivacy-notice-displayed")}}(function(){"use strict";if(typeof window!=="object"){return} 99if("IntersectionObserver" in window&&"IntersectionObserverEntry" in window&&"intersectionRatio" in window.IntersectionObserverEntry.prototype){if(!("isIntersecting" in window.IntersectionObserverEntry.prototype)){Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0},},)} 100return} 101function getFrameElement(doc){try{return(doc.defaultView&&doc.defaultView.frameElement)||null}catch(e){return null}} 102var document=(function(startDoc){var doc=startDoc;var frame=getFrameElement(doc);while(frame){doc=frame.ownerDocument;frame=getFrameElement(doc)} 103return doc})(window.document);var registry=[];var crossOriginUpdater=null;var crossOriginRect=null;function IntersectionObserverEntry(entry){this.time=entry.time;this.target=entry.target;this.rootBounds=ensureDOMRect(entry.rootBounds);this.boundingClientRect=ensureDOMRect(entry.boundingClientRect);this.intersectionRect=ensureDOMRect(entry.intersectionRect||getEmptyRect(),);this.isIntersecting=!!entry.intersectionRect;var targetRect=this.boundingClientRect;var targetArea=targetRect.width*targetRect.height;var intersectionRect=this.intersectionRect;var intersectionArea=intersectionRect.width*intersectionRect.height;if(targetArea){this.intersectionRatio=Number((intersectionArea/targetArea).toFixed(4),)}else{this.intersectionRatio=this.isIntersecting?1:0}} 104function IntersectionObserver(callback,opt_options){var options=opt_options||{};if(typeof callback!="function"){throw new Error("callback must be a function")} 105if(options.root&&options.root.nodeType!=1){throw new Error("root must be an Element")} 106this._checkForIntersections=throttle(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT,);this._callback=callback;this._observationTargets=[];this._queuedEntries=[];this._rootMarginValues=this._parseRootMargin(options.rootMargin);this.thresholds=this._initThresholds(options.threshold);this.root=options.root||null;this.rootMargin=this._rootMarginValues.map(function(margin){return margin.value+margin.unit}).join(" ");this._monitoringDocuments=[];this._monitoringUnsubscribes=[]} 107IntersectionObserver.prototype.THROTTLE_TIMEOUT=100;IntersectionObserver.prototype.POLL_INTERVAL=null;IntersectionObserver.prototype.USE_MUTATION_OBSERVER=!0;IntersectionObserver._setupCrossOriginUpdater=function(){if(!crossOriginUpdater){crossOriginUpdater=function(bou
107ndingClientRect,intersectionRect,){if(!boundingClientRect||!intersectionRect){crossOriginRect=getEmptyRect()}else{crossOriginRect=convertFromParentRect(boundingClientRect,intersectionRect,)} 108registry.forEach(function(observer){observer._checkForIntersections()})}} 109return crossOriginUpdater};IntersectionObserver._resetCrossOriginUpdater=function(){crossOriginUpdater=null;crossOriginRect=null};IntersectionObserver.prototype.observe=function(target){var isTargetAlreadyObserved=this._observationTargets.some(function(item){return item.element==target},);if(isTargetAlreadyObserved){return} 110if(!(target&&target.nodeType==1)){throw new Error("target must be an Element")} 111this._registerInstance();this._observationTargets.push({element:target,entry:null});this._monitorIntersections(target.ownerDocument);this._checkForIntersections()};IntersectionObserver.prototype.unobserve=function(target){this._observationTargets=this._observationTargets.filter(function(item){return item.element!=target},);this._unmonitorIntersections(target.ownerDocument);if(this._observationTargets.length==0){this._unregisterInstance()}};IntersectionObserver.prototype.disconnect=function(){this._observationTargets=[];this._unmonitorAllIntersections();this._unregisterInstance()};IntersectionObserver.prototype.takeRecords=function(){var records=this._queuedEntries.slice();this._queuedEntries=[];return records};IntersectionObserver.prototype._initThresholds=function(opt_threshold){var threshold=opt_threshold||[0];if(!Array.isArray(threshold))threshold=[threshold];return threshold.sort().filter(function(t,i,a){if(typeof t!="number"||isNaN(t)||t<0||t>1){throw new Error("threshold must be a number between 0 and 1 inclusively",)} 112return t!==a[i-1]})};IntersectionObserver.prototype._parseRootMargin=function(opt_rootMargin,){var marginString=opt_rootMargin||"0px";var margins=marginString.split(/\s+/).map(function(margin){var parts=/^(-?\d*\.?\d+)(px|%)$/.exec(margin);if(!parts){throw new Error("rootMargin must be specified in pixels or percent",)} 113return{value:parseFloat(parts[1]),unit:parts[2]}});margins[1]=margins[1]||margins[0];margins[2]=margins[2]||margins[0];margins[3]=margins[3]||margins[1];return margins};IntersectionObserver.prototype._monitorIntersections=function(doc){var win=doc.defaultView;if(!win){return} 114if(this._monitoringDocuments.indexOf(doc)!=-1){return} 115var callback=this._checkForIntersections;var monitoringInterval=null;var domObserver=null;if(this.POLL_INTERVAL){monitoringInterval=win.setInterval(callback,this.POLL_INTERVAL)}else{addEvent(win,"resize",callback,!0);addEvent(doc,"scroll",callback,!0);if(this.USE_MUTATION_OBSERVER&&"MutationObserver" in win){domObserver=new win.MutationObserver(callback);domObserver.observe(doc,{attributes:!0,childList:!0,characterData:!0,subtree:!0,})}} 116this._monitoringDocuments.push(doc);this._monitoringUnsubscribes.push(function(){var win=doc.defaultView;if(win){if(monitoringInterval){win.clearInterval(monitoringInterval)} 117removeEvent(win,"resize",callback,!0)} 118removeEvent(doc,"scroll",callback,!0);if(domObserver){domObserver.disconnect()}});if(doc!=((this.root&&this.root.ownerDocument)||document)){var frame=getFrameElement(doc);if(frame){this._monitorIntersections(frame.ownerDocument)}}};IntersectionObserver.prototype._unmonitorIntersections=function(doc){var index=this._monitoringDocuments.indexOf(doc);if(index==-1){return} 119var rootDoc=(this.root&&this.root.ownerDocument)||document;var hasDependentTargets=this._observationTargets.some(function(item){var itemDoc=item.element.ownerDocument;if(itemDoc==doc){return!0} 120while(itemDoc&&itemDoc!=rootDoc){var frame=getFrameElement(itemDoc);itemDoc=frame&&frame.ownerDocument;if(itemDoc==doc){return!0}} 121return!1},);if(hasDependentTargets){return} 122var unsubscribe=this._monitoringUnsubscribes[index];this._monitoringDocuments.splice(index,1);this._monitoringUnsubscribes.splice(index,1);unsubscribe();if(doc!=rootDoc){var frame=getFrameElement(doc);if(frame){this._unmonitorIntersections(frame.ownerDocument)}}};IntersectionObserver.prototype._unmonitorAllIntersections=function(){var unsubscribes=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0;this._monitoringUnsubscribes.length=0;for(var i=0;i<unsubscribes.length;i++){unsubscribes[i]()}};IntersectionObserver.prototype._checkForIntersections=function(){if(!this.root&&crossOriginUpdater&&!crossOriginRect){return} 123var rootIsInDom=this._rootIsInDom();var rootRect=rootIsInDom?this._getRootRect():getEmptyRect();
123this._observationTargets.forEach(function(item){var target=item.element;var targetRect=getBoundingClientRect(target);var rootContainsTarget=this._rootContainsTarget(target);var oldEntry=item.entry;var intersectionRect=rootIsInDom&&rootContainsTarget&&this._computeTargetAndRootIntersection(target,targetRect,rootRect,);var newEntry=(item.entry=new IntersectionObserverEntry({time:now(),target:target,boundingClientRect:targetRect,rootBounds:crossOriginUpdater&&!this.root?null:rootRect,intersectionRect:intersectionRect,}));if(!oldEntry){this._queuedEntries.push(newEntry)}else if(rootIsInDom&&rootContainsTarget){if(this._hasCrossedThreshold(oldEntry,newEntry)){this._queuedEntries.push(newEntry)}}else{if(oldEntry&&oldEntry.isIntersecting){this._queuedEntries.push(newEntry)}}},this);if(this._queuedEntries.length){this._callback(this.takeRecords(),this)}};IntersectionObserver.prototype._computeTargetAndRootIntersection=function(target,targetRect,rootRect){if(window.getComputedStyle(target).display=="none")return;var intersectionRect=targetRect;var parent=getParentNode(target);var atRoot=!1;while(!atRoot&&parent){var parentRect=null;var parentComputedStyle=parent.nodeType==1?window.getComputedStyle(parent):{};if(parentComputedStyle.display=="none")return null;if(parent==this.root||parent.nodeType==9){atRoot=!0;if(parent==this.root||parent==document){if(crossOriginUpdater&&!this.root){if(!crossOriginRect||(crossOriginRect.width==0&&crossOriginRect.height==0)){parent=null;parentRect=null;intersectionRect=null}else{parentRect=crossOriginRect}}else{parentRect=rootRect}}else{var frame=getParentNode(parent);var frameRect=frame&&getBoundingClientRect(frame);var frameIntersect=frame&&this._computeTargetAndRootIntersection(frame,frameRect,rootRect,);if(frameRect&&frameIntersect){parent=frame;parentRect=convertFromParentRect(frameRect,frameIntersect,)}else{parent=null;intersectionRect=null}}}else{var doc=parent.ownerDocument;if(parent!=doc.body&&parent!=doc.documentElement&&parentComputedStyle.overflow!="visible"){parentRect=getBoundingClientRect(parent)}} 124if(parentRect){intersectionRect=computeRectIntersection(parentRect,intersectionRect,)} 125if(!intersectionRect)break;parent=parent&&getParentNode(parent)} 126return intersectionRect};IntersectionObserver.prototype._getRootRect=function(){var rootRect;if(this.root){rootRect=getBoundingClientRect(this.root)}else{var html=document.documentElement;var body=document.body;rootRect={top:0,left:0,right:html.clientWidth||body.clientWidth,width:html.clientWidth||body.clientWidth,bottom:html.clientHeight||body.clientHeight,height:html.clientHeight||body.clientHeight,}} 127return this._expandRectByRootMargin(rootRect)};IntersectionObserver.prototype._expandRectByRootMargin=function(rect){var margins=this._rootMarginValues.map(function(margin,i){return margin.unit=="px"?margin.value:(margin.value*(i%2?rect.width:rect.height))/100});var newRect={top:rect.top-margins[0],right:rect.right+margins[1],bottom:rect.bottom+margins[2],left:rect.left-margins[3],};newRect.width=newRect.right-newRect.left;newRect.height=newRect.bottom-newRect.top;return newRect};IntersectionObserver.prototype._hasCrossedThreshold=function(oldEntry,newEntry,){var oldRatio=oldEntry&&oldEntry.isIntersecting?oldEntry.intersectionRatio||0:-1;var newRatio=newEntry.isIntersecting?newEntry.intersectionRatio||0:-1;if(oldRatio===newRatio)return;for(var i=0;i<this.thresholds.length;i++){var threshold=this.thresholds[i];if(threshold==oldRatio||threshold==newRatio||threshold<oldRatio!==threshold<newRatio){return!0}}};IntersectionObserver.prototype._rootIsInDom=function(){return!this.root||containsDeep(document,this.root)};IntersectionObserver.prototype._rootContainsTarget=function(target){return(containsDeep(this.root||document,target)&&(!this.root||this.root.ownerDocument==target.ownerDocument))};IntersectionObserver.prototype._registerInstance=function(){if(registry.indexOf(this)<0){registry.push(this)}};IntersectionObserver.prototype._unregisterInstance=function(){var index=registry.indexOf(this);if(index!=-1)registry.splice(index,1);};function now(){return window.performance&&performance.now&&performance.now()} 128function throttle(fn,timeout){var timer=null;return function(){if(!timer){timer=setTimeout(function(){fn();timer=null},timeout)}}} 129function addEvent(node,event,fn,opt_useCapture){if(typeof node.addEventListener=="function"){node.addEventListener(event,fn,opt_useCapture||!1)}else if(typeof node.attachEvent=="function"){node.attachEvent("on"+event,fn)}} 130function removeEvent(node,event,fn,opt_useCapture){if(typeof node.removeEventListener=="function"){node.removeEventListener(event,fn,opt_useCapture||!1)}else if(typeof node.detatchEvent=="function"){node.detatchEvent("on"+event,fn)}} 131function computeRectIntersection(rect1,rect2){var top=Math.max(rect1.top,rect2.top);var bottom=Math.min(rect1.bottom,rect2.bottom);var left=Math.max(rect1.left,rect2.left);var right=Math.min(rect1.right,rect2.right);var width=right-left;var height=bottom-top;return((width>=0&&height>=0&&{top:top,bottom:bottom,left:left,right:right,width:width,height:height,})||null)} 132function getBoundingClientRect(el){var rect;try{rect=el.getBoundingClientRect()}catch(err){} 133if(!rect)return getEmptyRect();if(!(rect.width&&rect.height)){rect={top:rect.top,right:rect.right,bottom:rect.bottom,left:rect.left,width:rect.right-rect.left,height:rect.bottom-rect.top,}} 134return rect} 135function getEmptyRect(){return{top:0,bottom:0,left:0,right:0,width:0,height:0,}} 136function ensureDOMRect(rect){if(!rect||"x" in rect){return rect} 137return{top:rect.top,y:rect.top,bottom:rect.bottom,left:rect.left,x:rect.left,right:rect.right,width:rect.width,height:rect.height,}} 138function convertFromParentRect(parentBoundingRect,parentIntersectionRect){var top=parentIntersectionRect.top-parentBoundingRect.top;var left=parentIntersectionRect.left-parentBoundingRect.left;return{top:top,left:left,height:parentIntersectionRect.height,width:parentIntersectionRect.width,bottom:top+parentIntersectionRect.height,right:left+parentIntersectionRect.width,}} 139function containsDeep(parent,child){var node=child;while(node){if(node==parent)return!0;node=getParentNode(node)} 140return!1} 141function getParentNode(node){var parent=node.parentNode;if(node.nodeType==9&&node!=document){return getFrameElement(node)} 142if(parent&&parent.nodeType==11&&parent.host){return parent.host} 143if(parent&&parent.assignedSlot){return parent.assignedSlot.parentNode} 144return parent} 145window.IntersectionObserver=IntersectionObserver;window.IntersectionObserverEntry=IntersectionObserverEntry})();var autoExpand=function(field){field.style.height="inherit";var computed=window.getComputedStyle(field);var height=parseInt(computed.getPropertyValue("border-top-width"),10)+parseInt(computed.getPropertyValue("padding-top"),10)+field.scrollHeight+parseInt(computed.getPropertyValue("padding-bottom"),10)+parseInt(computed.getPropertyValue("border-bottom-width"),10);field.style.height=height+"px"};document.addEventListener("input",function(event){if(event.target.tagName.toLowerCase()!=="textarea")return;autoExpand(event.target)},!1,);function changeAppointmentType(){setTimeout(function(){select=document.querySelector("#oa_widget #widget-select-filters .form-row + .form-row > select",);select.addEventListener("change",function(elem){if(this.value=="289775"){if(!document.querySelector("#widget-custom-rb-text")){document.querySelector("#widget-select-datetime").insertAdjacentHTML("beforebegin",'<div id="widget-custom-rb-text" style="text-align: center; line-height:normal;">Wilt u een afspraak bij uw thuis?<br>Vul dan het formulier in op de volgende pagina:<br><br><a href="https://www.woonsquare.nl/thuis-afspraak-maken">Thuis afspraak maken</a><br><br>Kies ook voor professioneel advies aan huis!</div>',)}else{document.querySelector("#widget-custom-rb-text",).style.display="block"} 146document.querySelector("#widget-select-datetime",).style.display="none"}else{document.querySelector("#widget-select-datetime",).style.display="block";document.querySelector("#widget-custom-rb-text").style.display="none"}})},500)} 147function closePopup(){postAjax("/calls/popup_close.php",{},function(data){document.getElementById("popupoverlay").remove()})} 148function payTerms(){var elms=document.querySelectorAll(".payTerms[data-id]");if(elms.length!=0){for(var i=0;i<elms.length;i++){elms[i].addEventListener("click",function(){postAjax("/calls/Santander/requestForm.php",{product:this.getAttribute("data-id"),},function(data){if(data){data=JSON.parse(data);if(data.html.length!=0){document.querySelector("body").classList.add("scrollOff");appendHtml(document.querySelector("body"),data.html,);var buttonSubmit=document.querySelector(".santander-popup button[data-submit]",);if(buttonSubmit!=undefined){formNode=buttonSubmit.parentNode.parentNode;formNode.setAttribute("onsubmit",buttonSubmit.getAttribute("data-submit",),);formNode.setAttribute("method","");formNode.addEventListener("submit",function(e){e.preventDefault();e.stopPropagation()},)} 149var santCloseElms=document.querySelectorAll(".santander-popup .fa-times",);if(santCloseElms.length!=0){for(var i2=0;i2<santCloseElms.length;i2++){santCloseElms[i2].addEventListener("click",function(){document.querySelector(".santander-popup",).remove();document.querySelector("body").classList.remove("scrollOff",)},)}}}}},)})}}} 150function submitSantander(buttonElm){buttonElm.classList.add("loader");formNode=buttonElm.parentNode.parentNode;productValue=formNode.querySelector('input[type="hidden"][name="product"]',).value;
150storeValue=formNode.querySelector("#store_Display select").value;initialsValue=formNode.querySelector("#initials_Display input").value;lastnameValue=formNode.querySelector("#lastname_Display input").value;emailValue=formNode.querySelector("#email_Display input").value;phoneValue=formNode.querySelector("#phone_Display input").value;loanValue=formNode.querySelector("#loan_Display input").value;privacyConsentValue=formNode.querySelector("#privacy_consent_Display input",).value;postAjax("/calls/Santander/submitForm.php",{product:productValue,store:storeValue,initials:initialsValue,lastname:lastnameValue,email:emailValue,phone:phoneValue,loan:loanValue,privacy_consent:privacyConsentValue,},function(data){data=JSON.parse(data);if(data.url.length!=0){window.location.href=data.url} 151buttonElm.classList.remove("loader")},);return!1} 152function searchbarVisible(e){e.parentNode.classList.toggle("visible");document.getElementById("header-searchfield").focus()} 153function toggleSearchBar(){document.querySelector("body").classList.toggle("search-bar-open")} 154function checkDivVisibility(elm){const div=document.querySelector(elm);if(div){const rect=div.getBoundingClientRect();if(rect.bottom<0||rect.top>window.innerHeight){document.querySelector("body").classList.add("product-bar-visible");document.querySelector(".sticky-product-bar").classList.add("visible")}else{document.querySelector("body").classList.remove("product-bar-visible");document.querySelector(".sticky-product-bar").classList.remove("visible")}}} 155function toggleAvailabilityFilter(checkbox){var sign="?";if(window.location.href.indexOf("?")!=-1){sign="&"} 156var url=window.location.href;if(checkbox.checked){url=window.location.href+sign+"beschikbaarheid=direct"}else{if(window.location.href.indexOf("?beschikbaarheid=direct&")!=-1){url=window.location.href.replace("?beschikbaarheid=direct&","?")}else if(window.location.href.indexOf("?beschikbaarheid=direct")!=-1){url=window.location.href.replace("?beschikbaarheid=direct","")}else if(window.location.href.indexOf("&beschikbaarheid=direct")!=-1){url=window.location.href.replace("&beschikbaarheid=direct","")}} 157window.location.replace(url)} 158function dialogBehaviours(){const dialogButton=document.querySelectorAll('[data-id="dialog__button"]',);if(typeof HTMLDialogElement!=="undefined"&&dialogButton){for(var i=0;i<dialogButton.length;i++){let dialog=dialogButton[i].nextElementSibling;if(dialog instanceof HTMLDialogElement){dialogButton[i].addEventListener("click",function(){if(this.getAttribute("data-wishlist-type")){if(this.getAttribute("data-wishlist-type")=="add"){showDialog(dialog)}}else{showDialog(dialog)}});dialog.addEventListener("click",function(e){closeDialog(dialog)});document.addEventListener("click",function(e){removeDialogClasses(dialog)})}}} 159document.addEventListener("keydown",function(event){if(event.key==="Escape"||event.key==="Esc"||event.keyCode===27){if(document.body.classList.contains("dialog--active")){document.body.classList.remove("dialog--active")}}})} 160function showDialog(dialog){dialog.showModal();document.querySelector("body").classList.add("dialog--active")} 161function closeDialog(dialog){if(event.target===dialog){dialog.close()}else if(event.target==dialog.querySelector('[data-id="dialog__closer"]')){dialog.close()}else if(event.target==dialog.querySelector('[data-id="dialog__closer--button"]')){dialog.close()}} 162function removeDialogClasses(dialog){if(dialog&&dialog.open==!1&&document.querySelector("body.dialog--active")){document.querySelector("body").classList.remove("dialog--active")}} 163function closeDialogOnResize(){var mq=window.matchMedia("(min-width: 769px)");if(mq.matches&&document.querySelector("body.dialog--active")){document.querySelector("body.dialog--active").classList.remove("dialog--active");document.querySelector("dialog[open]").close()}} 164const checkProductOnWishlist=()=>{var checkElms=document.querySelectorAll("[data-wishlist-set][data-check]",);if(checkElms.length==0){return} 165getAjax("/api/wishlist",{},(data)=>{if(data){data=JSON.parse(data);var productIds=(data.products||[]).map((product)=>String(product.id),);
165Array.prototype.slice.call(checkElms).forEach((el)=>{var productId=el.getAttribute("data-wishlist-set");if(productIds.indexOf(productId)!=-1&&el.getAttribute("data-wishlist-type")=="add"){el.setAttribute("data-wishlist-type","added")} 166el.removeAttribute("data-check")});if(data.productCount>=0){updateWishlistAmount(data.productCount)}}})};function hasJsonStructure(str){if(typeof str!=="string"){return!1} 167try{var result=JSON.parse(str);var type=Object.prototype.toString.call(result);return type==="[object Object]"||type==="[object Array]"}catch(err){return!1}} 168function toggleSearchInert(makeInert){["body > *:not(header):not(.nav__mobile-menu)","header > *:not(.nav__bottom)",".nav__container > *:not(.search-block__block)",].forEach(function(selector){document.querySelectorAll(selector).forEach(function(el){if(makeInert){el.setAttribute("inert","")}else{el.removeAttribute("inert")}})})} 169function detectSearch(){const searchToggles=document.querySelectorAll("[data-id='search-block-toggle']",);const searchBlock=document.querySelector(".search-block__inner");if(searchToggles.length>0){searchToggles.forEach((searchToggle)=>{searchToggle.addEventListener("click",function(e){if(this.getAttribute("aria-expanded")=="true"){this.setAttribute("aria-expanded","false")}else{document.querySelector("body").classList.toggle("search--open");toggleSearchInert(!0);e.stopPropagation();this.setAttribute("aria-expanded","true");setTimeout(()=>{searchBlock.querySelector(".search__input").focus()},200)}});searchBlock.addEventListener("click",function(e){e.stopPropagation()})});document.addEventListener("keydown",function(e){if(e.key==="Escape"){removeSearchOverlay()}});document.addEventListener("click",function(e){removeSearchOverlay()});const mq=window.matchMedia("(min-width: 1177px)");if(mq.matches){removeSearchOverlay()}} 170const searchInput=document.querySelector(".search__input");if(searchInput){let searchDebounce;searchInput.addEventListener("input",function(){const searchbar=this;clearTimeout(searchDebounce);searchDebounce=setTimeout(function(){searchOverlay(searchbar)},500)})} 171const searchClose=document.querySelector("[data-id='search-block-close']",);if(searchClose){searchClose.addEventListener("click",function(){removeSearchOverlay();const visibleToggle=Array.from(searchToggles).find((searchToggle)=>searchToggle.offsetParent!==null,);if(visibleToggle){visibleToggle.focus()}})} 172const searchReset=document.querySelector(".search__reset");if(searchReset&&searchInput){searchReset.addEventListener("click",function(){searchInput.focus()})}} 173function removeSearchOverlay(){document.querySelector("body").classList.remove("search--open");toggleSearchInert(!1);const searchBlockTriggers=document.querySelectorAll("[data-id='search-block-toggle']",);if(searchBlockTriggers&&searchBlockTriggers.length>0){searchBlockTriggers.forEach((searchToggle)=>{searchToggle.setAttribute("aria-expanded","false")})}} 174function detectNotificationClose(){var notificationClose=document.querySelector("[data-id='notification-close']",);if(notificationClose){notificationClose.addEventListener("click",function(){document.querySelector(".notification").remove();var now=new Date();now.setTime(now.getTime()+1*3600*1000);document.cookie="removeNotification=true; expires="+now.toUTCString()+"; path=/";getFixedMobileHeaderHeight()})}} 175function escapeRegExp(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")} 176var searchCategoriesSwiper=null;
176function initSearchCategoriesSwiper(){if(searchCategoriesSwiper){searchCategoriesSwiper.destroy(!0,!0);searchCategoriesSwiper=null} 177if(typeof Swiper==="undefined"){return} 178const wrapper=document.querySelector("#search_results .search-block__categories",);if(!wrapper){return} 179searchCategoriesSwiper=new Swiper(wrapper.querySelector(".swiper-container"),{slidesPerView:"auto",spaceBetween:10,freeMode:!0,watchOverflow:!0,scrollbar:{el:wrapper.querySelector(".swiper-scrollbar"),draggable:!0,},},)} 180function initSearchPageCategoriesSwiper(){if(typeof Swiper==="undefined"){return} 181var wrappers=document.querySelectorAll(".search-block__categories");for(var i=0;i<wrappers.length;i++){var wrapper=wrappers[i];if(wrapper.closest("#search_results")){continue} 182var container=wrapper.querySelector(".swiper-container");if(!container){continue} 183new Swiper(container,{slidesPerView:"auto",spaceBetween:10,freeMode:!0,watchOverflow:!0,scrollbar:{el:wrapper.querySelector(".swiper-scrollbar"),draggable:!0,},})}} 184function searchOverlay(searchbar){const keywords=searchbar.value;const resultsContainer=document.getElementById("search_results");const noResultsText=resultsContainer.dataset.textNoResults;const availabilityNowText=resultsContainer.dataset.textAvailabilityNow;const viewAllResultsText=resultsContainer.dataset.textViewAllResults;resultsContainer.innerHTML='<div class="search-block__info loader"><i class="fas fa-spinner fa-spin"></i></div>';if(keywords.length<4||!resultsContainer){getAjax("/api/suggestions?keywords="+keywords,{keywords:keywords},function(response){if(response){if(hasJsonStructure(response)){var data=JSON.parse(response);var suggestions=data.suggestions||[];var html="";if(suggestions.length>0){html+='<div class="search-block__suggestions-only">';if(data.message){html+='<span class="search-block__title">'+data.message+"</span>"} 185suggestions.slice(0,5).forEach(function(suggestion){var title=keywords?suggestion.replace(new RegExp(escapeRegExp(keywords),"gi",),"<strong>$&</strong>",):suggestion;html+='<a href="/zoeken?keyword='+encodeURIComponent(suggestion)+'" class="search-block__result">'+title+"</a>"});html+="</div>"}else{html+='<div class="search-block__info">'+noResultsText+"</div>"} 186resultsContainer.innerHTML=html;resultsContainer.classList.add("active");initSearchCategoriesSwiper()}}else{resultsContainer.innerHTML="";resultsContainer.classList.remove("active")}},)}else{getAjax("/api/quick-search?keywords="+keywords,{keywords:keywords},function(response){if(response){if(hasJsonStructure(response)){var data=JSON.parse(response);var html="";if(data){var html="";var categories=(data.results&&data.results.categories)||[];if(categories.length>0){html+='<div class="search-block__categories">'+'<div class="swiper-container slider-active" data-slider-max-width="999999">'+'<div class="swiper-wrapper">';categories.forEach(function(item){html+='<a href="'+item.url+'" class="swiper-slide search-block__category">'+item.title+"</a>"});html+="</div></div>"+'<div class="swiper-scrollbar"></div>'+"</div>"} 187var products=(data.results&&data.results.products)||[];if(products.length>0){html+='<div class="search-block__products">';products.slice(0,6).forEach(function(item){var title=item.title.replace(new RegExp(escapeRegExp(keywords),"gi",),"<strong>$&</strong>",);var imageHtml="";if(item.image&&item.image.srcset&&item.image.srcset.length){var srcset=item.image.srcset;var webp=srcset.find(function(s){return s.type==="image/webp"});var fallback=srcset.find(function(s){return s.type!=="image/webp"})||srcset[0];imageHtml="<picture>"+(webp?'<source srcset="'+webp.src+'" type="image/webp" />':"")+'<img src="'+fallback.src+'" alt="" width="90" height="60" loading="lazy" />'+"</picture>"} 188var priceHtml=item.sales_price?'<span class="search-block__product-price">'+item.sales_price+',<span class="search-block__product-decimals">00</span></span>':"";var stockHtml=item.is_stock_sale?'<span class="search-block__product-stock"><i class="far fa-check-circle" aria-hidden="true"></i> '+availabilityNowText+"</span>":"";html+='<a href="'+item.url+'" class="search-block__product">'+'<figure class="search-block__product-image">'+imageHtml+"</figure>"+'<div class="search-block__product-info">'+'<span class="search-block__product-title">'+title+"</span>"+'<span class="search-block__product-meta">'+priceHtml+stockHtml+"</span>"+"</div>"+"</a>"});html+="</div>"} 189var suggestions=data.suggestions||[];if(suggestions.length>0){html+='<div class="search-block__suggestions-only">';
189if(data.message){html+='<span class="search-block__title">'+data.message+"</span>"} 190suggestions.slice(0,3).forEach(function(suggestion){var title=keywords?suggestion.replace(new RegExp(escapeRegExp(keywords),"gi",),"<strong>$&</strong>",):suggestion;html+='<a href="/zoeken?keyword='+encodeURIComponent(suggestion)+'" class="search-block__result">'+title+"</a>"});html+='<a href="/zoeken?keyword='+keywords+'" class="search-block__result search-block__result--more">'+viewAllResultsText+" '"+keywords+"'</a>";html+="</div>"}}else{html='<div class="search-block__info">'+noResultsText+"</div>"} 191resultsContainer.innerHTML=html;resultsContainer.classList.add("active");initSearchCategoriesSwiper()}}else{resultsContainer.innerHTML="";resultsContainer.classList.remove("active")}},)}};var doNotMakeMenuFixed=!1;window.addEventListener('load',function(){fixedMenu()});window.addEventListener('scroll',function(){fixedMenu()});function fixedMenu(){let topNavbar=document.querySelector(".nav__top");let bottomNavbar=document.querySelector(".nav__bottom");if(topNavbar?.offsetHeight!=null&&bottomNavbar?.offsetTop!=null){let topNavbarOffsetHeight=topNavbar.offsetHeight;let bottomNavbarOffsetTop=bottomNavbar.offsetTop;let cumulativeNavBarHeight=topNavbar.offsetHeight+bottomNavbar.offsetHeight;let totalScrollableDistance=document.body.scrollHeight-window.innerHeight;if(totalScrollableDistance-cumulativeNavBarHeight<cumulativeNavBarHeight){doNotMakeMenuFixed=!0}else{doNotMakeMenuFixed=!1} 192if(doNotMakeMenuFixed==!1){if(window.pageYOffset>=bottomNavbarOffsetTop&&bottomNavbarOffsetTop!=0){document.body.classList.add("nav--fixed")}else if(window.pageYOffset-topNavbarOffsetHeight<bottomNavbarOffsetTop){document.body.classList.remove("nav--fixed")}}}};function postAjax(url,data,success){var params=typeof data=='string'?data:Object.keys(data).map(function(k){return encodeURIComponent(k)+'='+encodeURIComponent(data[k])}).join('&');var xhr=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");xhr.open('POST',url);xhr.onreadystatechange=function(){if(xhr.readyState>3&&xhr.status==200){success(xhr.responseText)}};xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);return xhr} 193function getAjax(url,data,success){var params=typeof data=='string'?data:Object.keys(data).map(function(k){return encodeURIComponent(k)+'='+encodeURIComponent(data[k])}).join('&');var xhr=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");xhr.open('GET',url);xhr.onreadystatechange=function(){if(xhr.readyState>3&&xhr.status==200){success(xhr.responseText)}};xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);return xhr};var sliders=[];var slidernames=[];var slidercount=0;window.addEventListener('load',function(){var swiper=document.querySelectorAll('.swiper-container');if(swiper.length>0){for(var i=0;i<swiper.length;i++){swiper[i].classList.add('lazy')}} 194initSliders()});window.addEventListener('resize',function(){scrollForSliders();initSliders()});window.addEventListener('orientationchange',function(){initSliders()});window.addEventListener('scroll',function(){scrollForSliders();initSliders()});function scrollForSliders(){var lazySwiper=document.querySelectorAll('.swiper-container:not(.lazy)');if(lazySwiper.length>0){for(var i=0;i<lazySwiper.length;i++){var maxWidth=lazySwiper[i].getAttribute("data-slider-max-width");var sliderName=lazySwiper[i].getAttribute("data-slider-name");if(maxWidth<window.innerWidth){lazySwiper[i].classList.add('lazy');var keyslider=slidernames.indexOf(sliderName);if(keyslider>-1&&sliders[keyslider].length!=0){sliders[keyslider].destroy(!0,!1);delete sliders[keyslider];delete slidernames[keyslider];lazySwiper[i].classList.remove('slider-active');equal()}}}}} 195function initSliders(){var swiper=document.querySelectorAll('.swiper-container.lazy');if(swiper.length>0){for(var i=0;i<swiper.length;i++){var wrapperElm=swiper[i].querySelector('.swiper-wrapper');if(isElementInViewport(swiper[i])){if(wrapperElm!=null&&wrapperElm!=undefined){var maxWidth=swiper[i].getAttribute("data-sli
195der-max-width");var sliderName=swiper[i].getAttribute("data-slider-name");if(maxWidth>=window.innerWidth){var keyslider=slidernames.indexOf(sliderName);if(keyslider==-1){var swiper2=swiper[i].querySelectorAll('.swiper-slide[filter-nr]');var n=!1;for(var i2=0;i2<swiper2.length;i2++){if(swiper2[i2].classList.contains("active-slide")){var n=swiper2[i2].getAttribute("filter-nr")}} 196var useVerticalSlider='horizontal';if(swiper[i].classList.contains("active-vertical")){useVerticalSlider='vertical'} 197var useLoop=!1;if(swiper[i].classList.contains("active-loop")){useLoop=!0} 198var useAutoPlay=!1;if(swiper[i].classList.contains("active-autoplay")){useAutoPlay=!0} 199var numberOfColumns=1;var customSlidersPerView='auto';if(swiper[i].classList.contains("swiper-two-rows")){numberOfColumns=2;customSlidersPerView=2.3} 200if(n==!1){if(swiper[i].classList.contains('slider-left')==!0){slidernames[slidercount]=sliderName;sliders[slidercount]=new Swiper(swiper[i],{speed:400,slidesPerView:customSlidersPerView,scrollbarHide:!1,initialSlide:0,loop:useLoop,direction:useVerticalSlider,autoplay:useAutoPlay,observer:!0,slidesPerColumn:numberOfColumns,pagination:{el:'[data-slider-name="'+sliderName+'"] .swiper-pagination',type:'bullets',clickable:!0},navigation:{nextEl:'.swiper-button-next',prevEl:'.swiper-button-prev',},})}else{slidernames[slidercount]=sliderName;sliders[slidercount]=new Swiper(swiper[i],{speed:400,slidesPerView:customSlidersPerView,scrollbarHide:!1,initialSlide:0,loop:useLoop,direction:useVerticalSlider,autoplay:useAutoPlay,observer:!0,slidesPerColumn:numberOfColumns,pagination:{el:'[data-slider-name="'+sliderName+'"] .swiper-pagination',type:'bullets',clickable:!0},navigation:{nextEl:'.swiper-button-next',prevEl:'.swiper-button-prev',},})}}else{slidernames[slidercount]=sliderName;sliders[slidercount]=new Swiper(swiper[i],{speed:400,slidesPerView:customSlidersPerView,scrollbarHide:!1,initialSlide:n,centeredSlides:!1,loop:useLoop,direction:useVerticalSlider,autoplay:useAutoPlay,observer:!0,slidesPerColumn:numberOfColumns,pagination:{el:'[data-slider-name="'+sliderName+'"] .swiper-pagination',type:'bullets',clickable:!0},navigation:{nextEl:'.swiper-button-next',prevEl:'.swiper-button-prev',},})} 201slidercount=slidercount+1;swiper[i].classList.add('slider-active');swiper[i].classList.remove('lazy');equal()}}else{var keyslider=slidernames.indexOf(sliderName);if(keyslider>-1&&sliders[keyslider].length!=0){sliders[keyslider].destroy(!0,!1);delete sliders[keyslider];delete slidernames[keyslider];swiper[i].classList.remove('slider-active');equal()}}}}}}} 202!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";function e(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}function i(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function s(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach(function(a){void 0===e[a]?e[a]=t[a]:i(t[a])&&i(e[a])&&Object.keys(t[a]).length>0&&s(e[a],t[a])})}var a={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function n(){var e="undefined"!=typeof document?document:{};return s(e,a),e}var r={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){var e="undefined"!=typeof window?window:{};return s(e,r),e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
202function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,i){return(h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,i){var s=[null];s.push.apply(s,t);var a=new(Function.bind.apply(e,s));return i&&d(a,i.prototype),a}).apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,s)}function s(){return h(e,arguments,l(this).constructor)}return s.prototype=Object.create(e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),d(s,e)})(e)}var u=function(e){var t,i;function s(t){var i,s,a;return i=e.call.apply(e,[this].concat(t))||this,s=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i),a=s.__proto__,Object.defineProperty(s,"__proto__",{get:function(){return a}
202,set:function(e){a.__proto__=e}}),i}return i=e,(t=s).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,s}(p(Array));function c(e){void 0===e&&(e=[]);var t=[];return e.forEach(function(e){Array.isArray(e)?t.push.apply(t,c(e)):t.push(e)}),t}function v(e,t){return Array.prototype.filter.call(e,t)}function f(e,t){var i=o(),s=n(),a=[];if(!t&&e instanceof u)return e;if(!e)return new u(a);if("string"==typeof e){var r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){var l="div";0===r.indexOf("<li")&&(l="ul"),0===r.indexOf("<tr")&&(l="tbody"),0!==r.indexOf("<td")&&0!==r.indexOf("<th")||(l="tr"),0===r.indexOf("<tbody")&&(l="table"),0===r.indexOf("<option")&&(l="select");var d=s.createElement(l);d.innerHTML=r;for(var h=0;h<d.childNodes.length;h+=1)a.push(d.childNodes[h])}else a=function(e,t){if("string"!=typeof e)return[e];for(var i=[],s=t.querySelectorAll(e),a=0;a<s.length;a+=1)i.push(s[a]);return i}(e.trim(),t||s)}else if(e.nodeType||e===i||e===s)a.push(e);else if(Array.isArray(e)){if(e instanceof u)return e;a=e}return new u(function(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}(a))}f.fn=u.prototype;var m,g,b,y={addClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=c(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).add.apply(t,s)}),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=c(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).remove.apply(t,s)}),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=c(t.map(function(e){return e.split(" ")}));return v(this,function(e){return s.filter(function(t){return e.classList.contains(t)}).length>0}).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=c(t.map(function(e){return e.split(" ")}));this.forEach(function(e){s.forEach(function(t){e.classList.toggle(t)})})},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===arguments.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transition="string"!=typeof e?e+"ms":e;return this},on:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=t[0],a=t[1],n=t[2],r=t[3];function o(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),f(t).is(a))n.apply(t,i);else for(var s=f(t).parents(),r=0;r<s.length;r+=1)f(s[r]).is(a)&&n.apply(s[r],i)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(s=t[0],n=t[1],r=t[2],a=void 0),r||(r=!1);for(var d,h=s.split(" "),p=0;p<this.length;p+=1){var u=this[p];if(a)for(d=0;d<h.length;d+=1){var c=h[d];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[c]||(u.dom7LiveListeners[c]=[]),u.dom7LiveListeners[c].push({listener:n,proxyListener:o}),u.addEventListener(c,o,r)}else for(d=0;d<h.length;d+=1){var v=h[d];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[v]||(u.dom7Listeners[v]=[]),u.dom7Listeners[v].push({listener:n,proxyListener:l}),u.addEventListener(v,l,r)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var s=t[0],a=t[1],n=t[2],r=t[3];"function"==typeof t[1]&&(s=t[0],n=t[1],r=t[2],a=void 0),r||(r=!1);for(var o=s.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],h=0;h<this.length;h+=1){var p=this[h],u=void 0;if(!a&&p.dom7Listeners?u=p.dom7Listeners[d]:a&&p.dom7LiveListeners&&(u=p.dom7LiveListeners[d]),u&&u.length)for(var c=u.length-1;c>=0;c-=1){var v=u[c];n&&v.listener===n?(p.removeEventListener(d,v.proxyListener,r),u.splice(c,1)):n&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===n?(p.removeEventListener(d,v.proxyListener,r),u.splice(c,1)):n||(p.removeEventListener(d,v.proxyListener,r),u.splice(c,1))}}return this},trigger:function(){for(var e=o(),t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];for(var a=i[0].split(" "),n=i[1],r=0;r<a.length;r+=1)for(var l=a[r],d=0;d<this.length;d+=1){var h=this[d];if(e.CustomEvent){var p=new e.CustomEvent(l,{detail:n,bubbles:!0,cancelable:!0});h.dom7EventData=i.filter(function(e,t){return t>0}),h.dispatchEvent(p),h.dom7EventData=[],delete h.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",function i(s){s.target===this&&(e.call(this,s),t.off("transitionend",i))}),this},outerWidth:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+
vendor: 5,154 bytes, line 202
202parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var e=o();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=o(),t=n(),i=this[0],s=i.getBoundingClientRect(),a=t.body,r=i.clientTop||a.clientTop||0,l=i.clientLeft||a.clientLeft||0,d=i===e?e.scrollY:i.scrollTop,h=i===e?e.scrollX:i.scrollLeft;return{top:s.top+d-r,left:s.left+h-l}}return null},css:function(e,t){var i,s=o();if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var a in e)this[i].style[a]=e[a];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this},each:function(e){return e?(this.forEach(function(t,i){e.apply(t,[t,i])}),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,i,s=o(),a=n(),r=this[0];if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(t=f(e),i=0;i<t.length;i+=1)if(t[i]===r)return!0;return!1}if(e===a)return r===a;if(e===s)return r===s;if(e.nodeType||e instanceof u){for(t=e.nodeType?[e]:e,i=0;i<t.length;i+=1)if(t[i]===r)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t=this.length;if(e>t-1)return f([]);if(e<0){var i=t+e;return f(i<0?[]:[this[i]])}return f([this[e]])},append:function(){for(var e,t=n(),i=0;i<arguments.length;i+=1){e=i<0||arguments.length<=i?void 0:arguments[i];for(var s=0;s<this.length;s+=1)if("string"==typeof e){var a=t.createElement("div");for(a.innerHTML=e;a.firstChild;)this[s].appendChild(a.firstChild)}else if(e instanceof u)for(var r=0;r<e.length;r+=1)this[s].appendChild(e[r]);else this[s].appendChild(e)}return this},prepend:function(e){var t,i,s=n();for(t=0;t<this.length;t+=1)if("string"==typeof e){var a=s.createElement("div");for(a.innerHTML=e,i=a.childNodes.length-1;i>=0;i-=1)this[t].insertBefore(a.childNodes[i],this[t].childNodes[0])}else if(e instanceof u)for(i=0;i<e.length;i+=1)this[t].insertBefore(e[i],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&f(this[0].nextElementSibling).is(e)?f([this[0].nextElementSibling]):f([]):this[0].nextElementSibling?f([this[0].nextElementSibling]):f([]):f([])},nextAll:function(e){var t=[],i=this[0];if(!i)return f([]);for(;i.nextElementSibling;){var s=i.nextElementSibling;e?f(s).is(e)&&t.push(s):t.push(s),i=s}return f(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&f(t.previousElementSibling).is(e)?f([t.previousElementSibling]):f([]):t.previousElementSibling?f([t.previousElementSibling]):f([])}return f([])},prevAll:function(e){var t=[],i=this[0];if(!i)return f([]);for(;i.previousElementSibling;){var s=i.previousElementSibling;e?f(s).is(e)&&t.push(s):t.push(s),i=s}return f(t)},parent:function(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?f(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return f(t)},parents:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].parentNode;s;)e?f(s).is(e)&&t.push(s):t.push(s),s=s.parentNode;return f(t)},closest:function(e){var t=this;return void 0===e?f([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].querySelectorAll(e),a=0;a<s.length;a+=1)t.push(s[a]);return f(t)},children:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].children,a=0;a<s.length;a+=1)e&&!f(s[a]).is(e)||t.push(s[a]);return f(t)},filter:function(e){return f(v(this,e))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function w(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function T(){return Date.now()}function E(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object}function C(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=1;t<arguments.length;t+=1){var i=t<0||arguments.length<=t?void 0:arguments[t];if(null!=i)for(var s=Object.keys(Object(i)),a=0,n=s.length;a<n;a+=1){var r=s[a],o=Object.getOwnPropertyDescriptor(i,r);void 0!==o&&o.enumerable&&(E(e[r])&&E(i[r])?C(e[r],i[r]):!E(e[r])&&E(i[r])?(e[r]={},C(e[r],i[r])):e[r]=i[r])}}return e}function S(e,t){Object.keys(t).forEach(function(i){E(t[i])&&Object.keys(t[i]).forEac
202h(function(s){"function"==typeof t[i][s]&&(t[i][s]=t[i][s].bind(e))}),e[i]=t[i]})}function x(){var e,t;return m||(e=o(),t=n(),m={touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),pointerEvents:!!e.PointerEvent&&"maxTouchPoints"in e.navigator&&e.navigator.maxTouchPoints>=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}),m}function M(e){return void 0===e&&(e={}),g||(g=function(e){var t=(void 0===e?{}:e).userAgent,i=x(),s=o(),a=s.navigator.platform,n=t||s.navigator.userAgent,r={ios:!1,android:!1},l=s.screen.width,d=s.screen.height,h=n.match(/(Android);?[\s\/]+([\d.]+)?/),p=n.match(/(iPad).*OS\s([\d_]+)/),u=n.match(/(iPod)(.*OS\s([\d_]+))?/),c=!p&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),v="Win32"===a,f="MacIntel"===a;return!p&&f&&i.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768"].indexOf(l+"x"+d)>=0&&((p=n.match(/(Version)\/([\d.]+)/))||(p=[0,1,"13_0_0"]),f=!1),h&&!v&&(r.os="android",r.android=!0),(p||c||u)&&(r.os="ios",r.ios=!0),r}(e)),g}function k(){var e,t;return b||(t=o(),b={isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}),b}function P(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.isBeginning&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}Object.keys(y).forEach(function(e){f.fn[e]=y[e]});var L=!1;function O(){}var z={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1},D={modular:{useParams:function(e){var t=this;
202t.modules&&Object.keys(t.modules).forEach(function(i){var s=t.modules[i];s.params&&C(e,s.params)})},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var s=t.modules[i],a=e[i]||{};s.on&&t.on&&Object.keys(s.on).forEach(function(e){t.on(e,s.on[e])}),s.create&&s.create.bind(t)(a)})}},eventsEmitter:{on:function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach(function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)}),s},once:function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){s.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];t.apply(s,n)}return a.__emitterProxy=t,s.on(e,a,i)},onAny:function(e,t){if("function"!=typeof e)return this;var i=t?"unshift":"push";return this.eventsAnyListeners.indexOf(e)<0&&this.eventsAnyListeners[i](e),this},offAny:function(e){if(!this.eventsAnyListeners)return this;var t=this.eventsAnyListeners.indexOf(e);return t>=0&&this.eventsAnyListeners.splice(t,1),this},off:function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach(function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach(function(s,a){(s===t||s.__emitterProxy&&s.__emitterProxy===t)&&i.eventsListeners[e].splice(a,1)})}),i):i},emit:function(){var e,t,i,s=this;if(!s.eventsListeners)return s;for(var a=arguments.length,n=new Array(a),r=0;r<a;r++)n[r]=arguments[r];return"string"==typeof n[0]||Array.isArray(n[0])?(e=n[0],t=n.slice(1,n.length),i=s):(e=n[0].events,t=n[0].data,i=n[0].context||s),t.unshift(i),(Array.isArray(e)?e:e.split(" ")).forEach(function(e){if(s.eventsListeners&&s.eventsListeners[e]){var a=[];s.eventsListeners[e].forEach(function(e){a.push(e)}),a.forEach(function(e){e.apply(i,t)})}}),s}},update:{updateSize:function(){var e,t,i=this.$el;e=void 0!==this.params.width&&null!==this.params.width?this.params.width:i[0].clientWidth,t=void 0!==this.params.height&&null!==this.params.width?this.params.height:i[0].clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left")||0,10)-parseInt(i.css("padding-right")||0,10),t=t-parseInt(i.css("padding-top")||0,10)-parseInt(i.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),C(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){var e=o(),t=this.params,i=this.$wrapperEl,s=this.size,a=this.rtlTranslate,n=this.wrongRTL,r=this.virtual&&t.virtual.enabled,l=r?this.virtual.slides.length:this.slides.length,d=i.children("."+this.params.slideClass),h=r?this.virtual.slides.length:d.length,p=[],u=[],c=[];function v(e,i){return!t.cssMode||i!==d.length-1}var f=t.slidesOffsetBefore;"function"==typeof f&&(f=t.slidesOffsetBefore.call(this));var m=t.slidesOffsetAfter;"function"==typeof m&&(m=t.slidesOffsetAfter.call(this));var g=this.snapGrid.length,b=this.snapGrid.length,y=t.spaceBetween,w=-f,T=0,E=0;if(void 0!==s){var S,x;"string"==typeof y&&y.indexOf("%")>=0&&(y=parseFloat(y.replace("%",""))/100*s),this.virtualSize=-y,a?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),t.slidesPerColumn>1&&(S=Math.floor(h/t.slidesPerColumn)===h/this.params.slidesPerColumn?h:Math.ceil(h/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(S=Math.max(S,t.slidesPerView*t.slidesPerColumn)));for(var M,k=t.slidesPerColumn,P=S/k,L=Math.floor(h/t.slidesPerColumn),O=0;O<h;O+=1){x=0;var z=d.eq(O);if(t.slidesPerColumn>1){var D=void 0,A=void 0,I=void 0;if("row"===t.slidesPerColumnFill&&t.slidesPerGroup>1){var $=Math.floor(O/(t.slidesPerGroup*t.slidesPerColumn)),B=O-t.slidesPerColumn*t.slidesPerGroup*$,N=0===$?t.slidesPerGroup:Math.min(Math.ceil((h-$*k*t.slidesPerGroup)/k),t.slidesPerGroup);D=(A=B-(I=Math.floor(B/N))*N+$*t.slidesPerGroup)+I*S/k,z.css({"-webkit-box-ordinal-group":D,"-moz-box-ordinal-group":D,"-ms-flex-order":D,"-webkit-order":D,order:D})}else"column"===t.slidesPerColumnFill?(I=O-(A=Math.floor(O/k))*k,(A>L||A===L&&I===k-1)&&(I+=1)>=k&&(I=0,A+=1)):A=O-(I=Math.floor(O/P))*P;z.css("margin-"+(this.isHorizontal()?"top":"left"),0!==I&&t.spaceBetween&&t.spaceBetween+"px")}if("none"!==z.css("display")){if("auto"===t.slidesPerView){var G=e.getComputedStyle(z[0],null),F=z[0].style.transform,H=z[0].style.webkitTransform;if(F&&(z[0].style.transform="none"),H&&(z[0].style.webkitTransform="none"),t.roundLengths)x=this.isHorizontal()?z.outerWidth(!0):z.outerHeight(!0);
202else if(this.isHorizontal()){var V=parseFloat(G.getPropertyValue("width")||0),R=parseFloat(G.getPropertyValue("padding-left")||0),j=parseFloat(G.getPropertyValue("padding-right")||0),W=parseFloat(G.getPropertyValue("margin-left")||0),_=parseFloat(G.getPropertyValue("margin-right")||0),X=G.getPropertyValue("box-sizing");x=X&&"border-box"===X?V+W+_:V+R+j+W+_}else{var Y=parseFloat(G.getPropertyValue("height")||0),q=parseFloat(G.getPropertyValue("padding-top")||0),K=parseFloat(G.getPropertyValue("padding-bottom")||0),U=parseFloat(G.getPropertyValue("margin-top")||0),Z=parseFloat(G.getPropertyValue("margin-bottom")||0),J=G.getPropertyValue("box-sizing");x=J&&"border-box"===J?Y+U+Z:Y+q+K+U+Z}F&&(z[0].style.transform=F),H&&(z[0].style.webkitTransform=H),t.roundLengths&&(x=Math.floor(x))}else x=(s-(t.slidesPerView-1)*y)/t.slidesPerView,t.roundLengths&&(x=Math.floor(x)),d[O]&&(this.isHorizontal()?d[O].style.width=x+"px":d[O].style.height=x+"px");d[O]&&(d[O].swiperSlideSize=x),c.push(x),t.centeredSlides?(w=w+x/2+T/2+y,0===T&&0!==O&&(w=w-s/2-y),0===O&&(w=w-s/2-y),Math.abs(w)<.001&&(w=0),t.roundLengths&&(w=Math.floor(w)),E%t.slidesPerGroup==0&&p.push(w),u.push(w)):(t.roundLengths&&(w=Math.floor(w)),(E-Math.min(this.params.slidesPerGroupSkip,E))%this.params.slidesPerGroup==0&&p.push(w),u.push(w),w=w+x+y),this.virtualSize+=x+y,T=x,E+=1}}if(this.virtualSize=Math.max(this.virtualSize,s)+m,a&&n&&("slide"===t.effect||"coverflow"===t.effect)&&i.css({width:this.virtualSize+t.spaceBetween+"px"}),t.setWrapperSize&&(this.isHorizontal()?i.css({width:this.virtualSize+t.spaceBetween+"px"}):i.css({height:this.virtualSize+t.spaceBetween+"px"})),t.slidesPerColumn>1&&(this.virtualSize=(x+t.spaceBetween)*S,this.virtualSize=Math.ceil(this.virtualSize/t.slidesPerColumn)-t.spaceBetween,this.isHorizontal()?i.css({width:this.virtualSize+t.spaceBetween+"px"}):i.css({height:this.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){M=[];for(var Q=0;Q<p.length;Q+=1){var ee=p[Q];t.roundLengths&&(ee=Math.floor(ee)),p[Q]<this.virtualSize+p[0]&&M.push(ee)}p=M}if(!t.centeredSlides){M=[];for(var te=0;te<p.length;te+=1){var ie=p[te];t.roundLengths&&(ie=Math.floor(ie)),p[te]<=this.virtualSize-s&&M.push(ie)}p=M,Math.floor(this.virtualSize-s)-Math.floor(p[p.length-1])>1&&p.push(this.virtualSize-s)}if(0===p.length&&(p=[0]),0!==t.spaceBetween&&(this.isHorizontal()?a?d.filter(v).css({marginLeft:y+"px"}):d.filter(v).css({marginRight:y+"px"}):d.filter(v).css({marginBottom:y+"px"})),t.centeredSlides&&t.centeredSlidesBounds){var se=0;c.forEach(function(e){se+=e+(t.spaceBetween?t.spaceBetween:0)});var ae=(se-=t.spaceBetween)-s;p=p.map(function(e){return e<0?-f:e>ae?ae+m:e})}if(t.centerInsufficientSlides){var ne=0;if(c.forEach(function(e){ne+=e+(t.spaceBetween?t.spaceBetween:0)}),(ne-=t.spaceBetween)<s){var re=(s-ne)/2;p.forEach(function(e,t){p[t]=e-re}),u.forEach(function(e,t){u[t]=e+re})}}C(this,{slides:d,snapGrid:p,slidesGrid:u,slidesSizesGrid:c}),h!==l&&this.emit("slidesLengthChange"),p.length!==g&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),u.length!==b&&this.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(e){var t,i=[],s=0;if("number"==typeof e?this.setTransition(e):!0===e&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)if(this.params.centeredSlides)this.visibleSlides.each(function(e){i.push(e)});else for(t=0;t<Math.ceil(this.params.slidesPerView);t+=1){var a=this.activeIndex+t;if(a>this.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var n=i[t].offsetHeight;s=n>s?n:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.slides,s=this.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&this.updateSlidesOffset();var a=-e;s&&(a=e),i.removeClass(t.slideVisibleClass),this.visibleSlidesIndexes=[],this.visibleSlides=[];for(var n=0;n<i.length;n+=1){var r=i[n],o=(a+(t.centeredSlides?this.minTranslate():0)-r.swiperSlideOffset)/(r.swiperSlideSize+t.spaceBetween);if(t.watchSlidesVisibility||t.centeredSlides&&t.autoHeight){var l=-(a-r.swiperSlideOffset),d=l+this.slidesSizesGrid[n];(l>=0&&l<this.size-1||d>1&&d<=this.size||l<=0&&d>=this.size)&&(this.visibleSlides.push(r),this.visibleSlidesIndexes.push(n),i.eq(n).addClass(t.slideVisibleClass))}r.progress=s?-o:o}this.visibleSlides=f(this.visibleSlides)}},updateProgress:function(e){if(void 0===e){var t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxTranslate()-this.minTranslate(),a=this.progress,n=this.isBeg
202inning,r=this.isEnd,o=n,l=r;0===s?(a=0,n=!0,r=!0):(n=(a=(e-this.minTranslate())/s)<=0,r=a>=1),C(this,{progress:a,isBeginning:n,isEnd:r}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&this.updateSlidesProgress(e),n&&!o&&this.emit("reachBeginning toEdge"),r&&!l&&this.emit("reachEnd toEdge"),(o&&!n||l&&!r)&&this.emit("fromEdge"),this.emit("progress",a)},updateSlidesClasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,n=this.realIndex,r=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=r?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);
202i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass)),this.emitSlidesClasses()},updateActiveIndex:function(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,n=this.params,r=this.activeIndex,o=this.realIndex,l=this.snapIndex,d=e;if(void 0===d){for(var h=0;h<s.length;h+=1)void 0!==s[h+1]?i>=s[h]&&i<s[h+1]-(s[h+1]-s[h])/2?d=h:i>=s[h]&&i<s[h+1]&&(d=h+1):i>=s[h]&&(d=h);n.normalizeSlideIndex&&(d<0||void 0===d)&&(d=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var p=Math.min(n.slidesPerGroupSkip,d);t=p+Math.floor((d-p)/n.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),d!==r){var u=parseInt(this.slides.eq(d).attr("data-swiper-slide-index")||d,10);C(this,{snapIndex:t,realIndex:u,previousIndex:r,activeIndex:d}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==u&&this.emit("realIndexChange"),(this.initialized||this.params.runCallbacksOnInit)&&this.emit("slideChange")}else t!==l&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=f(e.target).closest("."+t.slideClass)[0],s=!1;if(i)for(var a=0;a<this.slides.length;a+=1)this.slides[a]===i&&(s=!0);if(!i||!s)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=i,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt(f(i).attr("data-swiper-slide-index"),10):this.clickedIndex=f(i).index(),t.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}},translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,i=this.rtlTranslate,s=this.translate,a=this.$wrapperEl;if(t.virtualTranslate)return i?-s:s;if(t.cssMode)return s;var n=function(e,t){void 0===t&&(t="x");var i,s,a,n=o(),r=n.getComputedStyle(e,null);return n.WebKitCSSMatrix?((s=r.transform||r.webkitTransform).split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),a=new n.WebKitCSSMatrix("none"===s?"":s)):i=(a=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(s=n.WebKitCSSMatrix?a.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(s=n.WebKitCSSMatrix?a.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0}(a[0],e);return i&&(n=-n),n||0},setTranslate:function(e,t){var i=this.rtlTranslate,s=this.params,a=this.$wrapperEl,n=this.wrapperEl,r=this.progress,o=0,l=0;this.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.cssMode?n[this.isHorizontal()?"scrollLeft":"scrollTop"]=this.isHorizontal()?-o:-l:s.virtualTranslate||a.transform("translate3d("+o+"px, "+l+"px, 0px)"),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?o:l;var d=this.maxTranslate()-this.minTranslate();(0===d?0:(e-this.minTranslate())/d)!==r&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,i,s,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===s&&(s=!0);var n=this,r=n.params,o=n.wrapperEl;if(n.animating&&r.preventInteractionOnTransition)return!1;var l,d=n.minTranslate(),h=n.maxTranslate();if(l=s&&e>d?d:s&&e<h?h:e,n.updateProgress(l),r.cssMode){var p,u=n.isHorizontal();return 0===t?o[u?"scrollLeft":"scrollTop"]=-l:o.scrollTo?o.scrollTo(((p={})[u?"left":"top"]=-l,p.behavior="smooth",p)):o[u?"scrollLeft":"scrollTop"]=-l,!0}return 0===t?(n.setTransition(0),n.setTranslate(l),i&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionEnd"))):(n.setTransition(t),n.setTranslate(l),i&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionStart")),n.animating||(n.animating=!0,n.onTranslateToWrapperTransitionEnd||(n.onTranslateToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd),n.onTranslateToWrapperTransitionEnd=null,delete n.onTranslateToWrapperTransitionEnd,i&&n.emit("transitionEnd"))}),n.$wrapperEl[0].addEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){this.params.cssMode||this.$wrapperEl.transition(e),this.emit
202("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.params,a=this.previousIndex;if(!s.cssMode){s.autoHeight&&this.updateAutoHeight();var n=t;if(n||(n=i>a?"next":i<a?"prev":"reset"),this.emit("transitionStart"),e&&i!==a){if("reset"===n)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===n?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}}},transitionEnd:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.previousIndex,a=this.params;if(this.animating=!1,!a.cssMode){this.setTransition(0);var n=t;if(n||(n=i>s?"next":i<s?"prev":"reset"),this.emit("transitionEnd"),e&&i!==s){if("reset"===n)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===n?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}}},slide:{slideTo:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=this,n=e;n<0&&(n=0);var r=a.params,o=a.snapGrid,l=a.slidesGrid,d=a.previousIndex,h=a.activeIndex,p=a.rtlTranslate,u=a.wrapperEl;if(a.animating&&r.preventInteractionOnTransition)return!1;var c=Math.min(a.params.slidesPerGroupSkip,n),v=c+Math.floor((n-c)/a.params.slidesPerGroup);v>=o.length&&(v=o.length-1),(h||r.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var f,m=-o[v];if(a.updateProgress(m),r.normalizeSlideIndex)for(var g=0;g<l.length;g+=1)-Math.floor(100*m)>=Math.floor(100*l[g])&&(n=g);if(a.initialized&&n!==h){if(!a.allowSlideNext&&m<a.translate&&m<a.minTranslate())return!1;if(!a.allowSlidePrev&&m>a.translate&&m>a.maxTranslate()&&(h||0)!==n)return!1}if(f=n>h?"next":n<h?"prev":"reset",p&&-m===a.translate||!p&&m===a.translate)return a.updateActiveIndex(n),r.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==r.effect&&a.setTranslate(m),"reset"!==f&&(a.transitionStart(i,f),a.transitionEnd(i,f)),!1;if(r.cssMode){var b,y=a.isHorizontal(),w=-m;return p&&(w=u.scrollWidth-u.offsetWidth-w),0===t?u[y?"scrollLeft":"scrollTop"]=w:u.scrollTo?u.scrollTo(((b={})[y?"left":"top"]=w,b.behavior="smooth",b)):u[y?"scrollLeft":"scrollTop"]=w,!0}return 0===t?(a.setTransition(0),a.setTranslate(m),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,f),a.transitionEnd(i,f)):(a.setTransition(t),a.setTranslate(m),a.updateActiveIndex(n),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,f),a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.onSlideToWrapperTransitionEnd=null,delete a.onSlideToWrapperTransitionEnd,a.transitionEnd(i,f))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=e;return this.params.loop&&(a+=this.loopedSlides),this.slideTo(a,t,i,s)},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating,n=this.activeIndex<s.slidesPerGroupSkip?1:s.slidesPerGroup;if(s.loop){if(a&&s.loopPreventsSlide)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}return this.slideTo(this.activeIndex+n,e,t,i)},slidePrev:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating,n=this.snapGrid,r=this.slidesGrid,o=this.rtlTranslate;if(s.loop){if(a&&s.loopPreventsSlide)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function l(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var d,h=l(o?this.translate:-this.translate),p=n.map(function(e){return l(e)}),u=(n[p.indexOf(h)],n[p.indexOf(h)-1]);
202return void 0===u&&s.cssMode&&n.forEach(function(e){!u&&h>=e&&(u=e)}),void 0!==u&&(d=r.indexOf(u))<0&&(d=this.activeIndex-1),this.slideTo(d,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeIndex,n=Math.min(this.params.slidesPerGroupSkip,a),r=n+Math.floor((a-n)/this.params.slidesPerGroup),o=this.rtlTranslate?this.translate:-this.translate;if(o>=this.snapGrid[r]){var l=this.snapGrid[r];o-l>(this.snapGrid[r+1]-l)*s&&(a+=this.params.slidesPerGroup)}else{var d=this.snapGrid[r-1];o-d<=(this.snapGrid[r]-d)*s&&(a-=this.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,this.slidesGrid.length-1),this.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,s=t.$wrapperEl,a="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,n=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(f(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?n<t.loopedSlides-a/2||n>t.slides.length-t.loopedSlides+a/2?(t.loopFix(),n=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),w(function(){t.slideTo(n)})):t.slideTo(n):n>t.slides.length-a?(t.loopFix(),n=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),w(function(){t.slideTo(n)})):t.slideTo(n)}else t.slideTo(n)}},loop:{loopCreate:function(){var e=this,t=n(),i=e.params,s=e.$wrapperEl;s.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var a=s.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var r=i.slidesPerGroup-a.length%i.slidesPerGroup;if(r!==i.slidesPerGroup){for(var o=0;o<r;o+=1){var l=f(t.createElement("div")).addClass(i.slideClass+" "+i.slideBlankClass);s.append(l)}a=s.children("."+i.slideClass)}}"auto"!==i.slidesPerView||i.loopedSlides||(i.loopedSlides=a.length),e.loopedSlides=Math.ceil(parseFloat(i.loopedSlides||i.slidesPerView,10)),e.loopedSlides+=i.loopAdditionalSlides,e.loopedSlides>a.length&&(e.loopedSlides=a.length);var d=[],h=[];a.each(function(t,i){var s=f(t);i<e.loopedSlides&&h.push(t),i<a.length&&i>=a.length-e.loopedSlides&&d.push(t),s.attr("data-swiper-slide-index",i)});for(var p=0;p<h.length;p+=1)s.append(f(h[p].cloneNode(!0)).addClass(i.slideDuplicateClass));for(var u=d.length-1;u>=0;u-=1)s.prepend(f(d[u].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var e,t=this.activeIndex,i=this.slides,s=this.loopedSlides,a=this.allowSlidePrev,n=this.allowSlideNext,r=this.snapGrid,o=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var l=-r[t]-this.getTranslate();t<s?(e=i.length-3*s+t,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l)):t>=i.length-s&&(e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l));this.allowSlidePrev=a,this.allowSlideNext=n,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){if(!(this.support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){this.support.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&t.append(e[s]);else t.append(e);i.loop&&this.loopCreate(),i.observer&&this.support.observer||this.update()},prependSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&this.loopDestroy();var a=s+1;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)e[n]&&i.prepend(e[n]);a=s+e.length}else i.prepend(e);t.loop&&this.loopCreate(),t.observer&&this.support.observer||this.update(),this.slideTo(a,0,!1)},addSlide:function(e,t){var i=this.$wrapperEl,s=this.params,a=this.activeIndex;s.loop&&(a-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+s.slideClass));var n=this.slides.length;if(e<=0)this.prependSlide(t);else if(e>=n)this.appendSlide(t);else{for(var r=a>e?a+1:a,o=[],l=n-1;l>=e;l-=1){var d=this.slides.eq(l);d.remove(),o.unshift(d)}if("object"==typeof t&&"length"in t){for(var h=0;h<t.length;h+=1)t[h]&&i.append(t[h]);r=a>e?a+t.length:a}else i.append(t);for(var p=0;p<o.length;p+=1)i.append(o[p]);s.loop&&this.loopCreate(),s.observer&&this.support.observer||this.update(),s.loop?this.slideTo(r+this.loopedSlides,0,!1):this.slideTo(r,0,!1)}},removeSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&(s-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+t.slideClass));var a,n=s;if("object"==typeof e&&"length"in e){for(var r=0;r<e.length;r+=1)a=e[r],this.slides[a]&&this.slides.eq(a).remove(),a<n&&(n-=1);n=Math.max(n,0)}else a=e,this.slides[a]&&this.slides.eq(a).remove(),a<n&&(n-=1),n=Math.max(n,0);t.loop&&this.loopCreate(),t.observer&&this.support.observer||this.update(),t.loop?this.slideTo(n+this.loopedSlides,0,!1):this.slideTo(n,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},events:{attachEvents:function(){var e=n(),t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r=this.device,l=this.support;this.onTouchStart=function(e){var t=n(),i=o(),s=this.touchEventsData,a=this.params,r=this.touches;if(!this.animating||!a.preventInteractionOnTransition){var l=e;l.originalEvent&&(l=l.originalEvent);var d=f(l.target);if(("wrapper"!==a.touchEventsTarget||d.closest(this.wrapperEl).length)&&(s.isTouchEvent="touchstart"===l.type,(s.isTouchEvent||!("which"in l)||3!==l.which)&&!(!s.isTouchEvent&&"button"in l&&l.button>0||s.isTouched&&s.isMoved)))if(a.noSwiping&&d.closest(a.noSwipingSelector?a.noSwipingSelector:"."+a.noSwipingClass)[0])this.allowClick=!0;else if(!a.swipeHandler||d.closest(a.swipeHandler)[0]){r.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,r.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var h=r.currentX,p=r.currentY,u=a.edgeSwipeDetection||a.iOSEdgeSwipeDetection,c=a.edgeSwipeThreshold||a.iOSEdgeSwipeThreshold;if(!u||!(h<=c||h>=i.screen.width-c)){if(C(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),r.startX=h,r.startY=p,s.touchStartTime=T(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,a.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==l.type){var v=!0;d.is(s.formElements)&&(v=!1),t.activeElement&&f(t.activeElement).is(s.formElements)&&t.activeElement!==d[0]&&t.activeElement.blur();var m=v&&this.allowTouchMove&&a.touchStartPreventDefault;(a.touchStartForcePreventDefault||m)&&l.preventDefault()}
202this.emit("touchStart",l)}}}}.bind(this),this.onTouchMove=function(e){var t=n(),i=this.touchEventsData,s=this.params,a=this.touches,r=this.rtlTranslate,o=e;if(o.originalEvent&&(o=o.originalEvent),i.isTouched){if(!i.isTouchEvent||"touchmove"===o.type){var l="touchmove"===o.type&&o.targetTouches&&(o.targetTouches[0]||o.changedTouches[0]),d="touchmove"===o.type?l.pageX:o.pageX,h="touchmove"===o.type?l.pageY:o.pageY;if(o.preventedByNestedSwiper)return a.startX=d,void(a.startY=h);if(!this.allowTouchMove)return this.allowClick=!1,void(i.isTouched&&(C(a,{startX:d,startY:h,currentX:d,currentY:h}),i.touchStartTime=T()));if(i.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(this.isVertical()){if(h<a.startY&&this.translate<=this.maxTranslate()||h>a.startY&&this.translate>=this.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(d<a.startX&&this.translate<=this.maxTranslate()||d>a.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&o.target===t.activeElement&&f(o.target).is(i.formElements))return i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){a.currentX=d,a.currentY=h;var p,u=a.currentX-a.startX,c=a.currentY-a.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(u,2)+Math.pow(c,2))<this.params.threshold))if(void 0===i.isScrolling&&(this.isHorizontal()&&a.currentY===a.startY||this.isVertical()&&a.currentX===a.startX?i.isScrolling=!1:u*u+c*c>=25&&(p=180*Math.atan2(Math.abs(c),Math.abs(u))/Math.PI,i.isScrolling=this.isHorizontal()?p>s.touchAngle:90-p>s.touchAngle)),i.isScrolling&&this.emit("touchMoveOpposite",o),void 0===i.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){this.allowClick=!1,!s.cssMode&&o.cancelable&&o.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&o.stopPropagation(),i.isMoved||(s.loop&&this.loopFix(),i.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!s.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",o)),this.emit("sliderMove",o),i.isMoved=!0;var v=this.isHorizontal()?u:c;a.diff=v,v*=s.touchRatio,r&&(v=-v),this.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;var m=!0,g=s.resistanceRatio;if(s.touchReleaseOnEdges&&(g=0),v>0&&i.currentTranslate>this.minTranslate()?(m=!1,s.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+v,g))):v<0&&i.currentTranslate<this.maxTranslate()&&(m=!1,s.resistance&&(i.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-i.startTranslate-v,g))),m&&(o.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(v)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);
202if(!i.allowThresholdMove)return i.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,i.currentTranslate=i.startTranslate,void(a.diff=this.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),s.freeMode&&(0===i.velocities.length&&i.velocities.push({position:a[this.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:a[this.isHorizontal()?"currentX":"currentY"],time:T()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}else i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",o)}.bind(this),this.onTouchEnd=function(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,n=t.rtlTranslate,r=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var h,p=T(),u=p-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),u<300&&p-i.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),i.lastClickTime=T(),w(function(){t.destroyed||(t.allowClick=!0)}),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,h=s.followFinger?n?t.translate:-t.translate:-i.currentTranslate,!s.cssMode)if(s.freeMode){if(h<-t.minTranslate())return void t.slideTo(t.activeIndex);if(h>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(s.freeModeMomentum){if(i.velocities.length>1){var c=i.velocities.pop(),v=i.velocities.pop(),f=c.position-v.position,m=c.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)<s.freeModeMinimumVelocity&&(t.velocity=0),(m>150||T()-c.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;
202var g=1e3*s.freeModeMomentumRatio,b=t.velocity*g,y=t.translate+b;n&&(y=-y);var E,C,S=!1,x=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(y<t.maxTranslate())s.freeModeMomentumBounce?(y+t.maxTranslate()<-x&&(y=t.maxTranslate()-x),E=t.maxTranslate(),S=!0,i.allowMomentumBounce=!0):y=t.maxTranslate(),s.loop&&s.centeredSlides&&(C=!0);else if(y>t.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>x&&(y=t.minTranslate()+x),E=t.minTranslate(),S=!0,i.allowMomentumBounce=!0):y=t.minTranslate(),s.loop&&s.centeredSlides&&(C=!0);else if(s.freeModeSticky){for(var M,k=0;k<l.length;k+=1)if(l[k]>-y){M=k;break}y=-(y=Math.abs(l[M]-y)<Math.abs(l[M-1]-y)||"next"===t.swipeDirection?l[M]:l[M-1])}if(C&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity){if(g=n?Math.abs((-y-t.translate)/t.velocity):Math.abs((y-t.translate)/t.velocity),s.freeModeSticky){var P=Math.abs((n?-y:y)-t.translate),L=t.slidesSizesGrid[t.activeIndex];g=P<L?s.speed:P<2*L?1.5*s.speed:2.5*s.speed}}else if(s.freeModeSticky)return void t.slideToClosest();s.freeModeMomentumBounce&&S?(t.updateProgress(E),t.setTransition(g),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating=!0,r.transitionEnd(function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(s.speed),setTimeout(function(){t.setTranslate(E),r.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()})},0))})):t.velocity?(t.updateProgress(y),t.setTransition(g),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,r.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(y),t.updateActiveIndex(),t.updateSlidesClasses()}else if(s.freeModeSticky)return void t.slideToClosest();(!s.freeModeMomentum||u>=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var O=0,z=t.slidesSizesGrid[0],D=0;D<o.length;D+=D<s.slidesPerGroupSkip?1:s.slidesPerGroup){var A=D<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;void 0!==o[D+A]?h>=o[D]&&h<o[D+A]&&(O=D,z=o[D+A]-o[D]):h>=o[D]&&(O=D,z=o[o.length-1]-o[o.length-2])}var I=(h-o[O])/z,$=O<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(I>=s.longSwipesRatio?t.slideTo(O+$):t.slideTo(O)),"prev"===t.swipeDirection&&(I>1-s.longSwipesRatio?t.slideTo(O+$):t.slideTo(O))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||d.target!==t.navigation.nextEl&&d.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(O+$),"prev"===t.swipeDirection&&t.slideTo(O)):d.target===t.navigation.nextEl?t.slideTo(O+$):t.slideTo(O)}}}.bind(this),t.cssMode&&(this.onScroll=function(){var e=this.wrapperEl,t=this.rtlTranslate;this.previousTranslate=this.translate,this.isHorizontal()?this.translate=t?e.scrollWidth-e.offsetWidth-e.scrollLeft:-e.scrollLeft:this.translate=-e.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var i=this.maxTranslate()-this.minTranslate();(0===i?0:(this.translate-this.minTranslate())/i)!==this.progress&&this.updateProgress(t?-this.translate:this.translate),this.emit("setTranslate",this.translate,!1)}.bind(this)),this.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(this);var d=!!t.nested;if(!l.touch&&l.pointerEvents)s.addEventListener(i.start,this.onTouchStart,!1),e.addEventListener(i.move,this.onTouchMove,d),e.addEventListener(i.end,this.onTouchEnd,!1);else{if(l.touch){var h=!("touchstart"!==i.start||!l.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(i.start,this.onTouchStart,h),s.addEventListener(i.move,this.onTouchMove,l.passiveListener?{passive:!1,capture:d}:d),s.addEventListener(i.end,this.onTouchEnd,h),i.cancel&&s.addEventListener(i.cancel,this.onTouchEnd,h),L||(e.addEventListener("touchstart",O),L=!0)}(t.simulateTouch&&!r.ios&&!r.android||t.simulateTouch&&!l.touch&&r.ios)&&(s.addEventListener("mousedown",this.onTouchStart,!1),e.addEventListener("mousemove",this.onTouchMove,d),e.addEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.addEventListener("click",this.onClick,!0),t.cssMode&&a.addEventListener("scroll",this.onScroll),t.updateOnWindowResize?this.on(r.ios||r.android?"resize orientationchange observerUpdate":"resize observerUpdate",P,!0):this.on("observerUpdate",P,!0)},detachEvents:function(){var e=n(),t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r=this.device,o=this.support,l=!!t.nested;
202if(!o.touch&&o.pointerEvents)s.removeEventListener(i.start,this.onTouchStart,!1),e.removeEventListener(i.move,this.onTouchMove,l),e.removeEventListener(i.end,this.onTouchEnd,!1);else{if(o.touch){var d=!("onTouchStart"!==i.start||!o.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(i.start,this.onTouchStart,d),s.removeEventListener(i.move,this.onTouchMove,l),s.removeEventListener(i.end,this.onTouchEnd,d),i.cancel&&s.removeEventListener(i.cancel,this.onTouchEnd,d)}(t.simulateTouch&&!r.ios&&!r.android||t.simulateTouch&&!o.touch&&r.ios)&&(s.removeEventListener("mousedown",this.onTouchStart,!1),e.removeEventListener("mousemove",this.onTouchMove,l),e.removeEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.removeEventListener("click",this.onClick,!0),t.cssMode&&a.removeEventListener("scroll",this.onScroll),this.off(r.ios||r.android?"resize orientationchange observerUpdate":"resize observerUpdate",P)}},breakpoints:{setBreakpoint:function(){var e=this.activeIndex,t=this.initialized,i=this.loopedSlides,s=void 0===i?0:i,a=this.params,n=this.$el,r=a.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=this.getBreakpoint(r);if(o&&this.currentBreakpoint!==o){var l=o in r?r[o]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach(function(e){var t=l[e];void 0!==t&&(l[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var d=l||this.originalParams,h=a.slidesPerColumn>1,p=d.slidesPerColumn>1;h&&!p?(n.removeClass(a.containerModifierClass+"multirow "+a.containerModifierClass+"multirow-column"),this.emitContainerClasses()):!h&&p&&(n.addClass(a.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&n.addClass(a.containerModifierClass+"multirow-column"),this.emitContainerClasses());var u=d.direction&&d.direction!==a.direction,c=a.loop&&(d.slidesPerView!==a.slidesPerView||u);u&&t&&this.changeDirection(),C(this.params,d),C(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=o,c&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-s+this.loopedSlides,0,!1)),this.emit("breakpoint",d)}}},getBreakpoint:function(e){var t=o();if(e){var i=!1,s=Object.keys(e).map(function(e){if("string"==typeof e&&0===e.indexOf("@")){var i=parseFloat(e.substr(1));return{value:t.innerHeight*i,point:e}}return{value:e,point:e}});s.sort(function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)});for(var a=0;a<s.length;a+=1){var n=s[a],r=n.point;n.value<=t.innerWidth&&(i=r)}return i||"max"}}},checkOverflow:{checkOverflow:function(){var e=this.params,t=this.isLocked,i=this.slides.length>0&&e.slidesOffsetBefore+e.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&i?this.isLocked=i<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,t!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),t&&t!==this.isLocked&&(this.isEnd=!1,this.navigation&&this.navigation.update())}},classes:{addClasses:function(){var e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=this.device,n=[];n.push("initialized"),n.push(t.direction),t.freeMode&&n.push("free-mode"),t.autoHeight&&n.push("autoheight"),i&&n.push("rtl"),t.slidesPerColumn>1&&(n.push("multirow"),"column"===t.slidesPerColumnFill&&n.push("multirow-column")),a.android&&n.push("android"),a.ios&&n.push("ios"),t.cssMode&&n.push("css-mode"),n.forEach(function(i){e.push(t.containerModifierClass+i)}),s.addClass(e.join(" ")),this.emitContainerClasses()},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(e,t,i,s,a,n){var r,l=o();function d(){n&&n()}f(e).parent("picture")[0]||e.complete&&a?d():t?((r=new l.Image).onload=d,r.onerror=d,s&&(r.sizes=s),i&&(r.srcset=i),t&&(r.src=t)):d()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(
202),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i<e.imagesToLoad.length;i+=1){var s=e.imagesToLoad[i];e.loadImage(s,s.currentSrc||s.getAttribute("src"),s.srcset||s.getAttribute("srcset"),s.sizes||s.getAttribute("sizes"),!0,t)}}}},A={},I=function(){function t(){for(var e,i,s=arguments.length,a=new Array(s),n=0;n<s;n++)a[n]=arguments[n];1===a.length&&a[0].constructor&&a[0].constructor===Object?i=a[0]:(e=a[0],i=a[1]),i||(i={}),i=C({},i),e&&!i.el&&(i.el=e);var r=this;r.support=x(),r.device=M({userAgent:i.userAgent}),r.browser=k(),r.eventsListeners={},r.eventsAnyListeners=[],Object.keys(D).forEach(function(e){Object.keys(D[e]).forEach(function(i){t.prototype[i]||(t.prototype[i]=D[e][i])})}),void 0===r.modules&&(r.modules={}),Object.keys(r.modules).forEach(function(e){var t=r.modules[e];if(t.params){var s=Object.keys(t.params)[0],a=t.params[s];if("object"!=typeof a||null===a)return;if(!(s in i&&"enabled"in a))return;!0===i[s]&&(i[s]={enabled:!0}),"object"!=typeof i[s]||"enabled"in i[s]||(i[s].enabled=!0),i[s]||(i[s]={enabled:!1})}});var o=C({},z);r.useParams(o),r.params=C({},o,A,i),r.originalParams=C({},r.params),r.passedParams=C({}
202,i),r.params&&r.params.on&&Object.keys(r.params.on).forEach(function(e){r.on(e,r.params.on[e])}),r.$=f;var l=f(r.params.el);if(e=l[0]){if(l.length>1){var d=[];return l.each(function(e){var s=C({},i,{el:e});d.push(new t(s))}),d}var h,p,u;return e.swiper=r,e&&e.shadowRoot&&e.shadowRoot.querySelector?(h=f(e.shadowRoot.querySelector("."+r.params.wrapperClass))).children=function(e){return l.children(e)}:h=l.children("."+r.params.wrapperClass),C(r,{$el:l,el:e,$wrapperEl:h,wrapperEl:h[0],classNames:[],slides:f(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===r.params.direction},isVertical:function(){return"vertical"===r.params.direction},rtl:"rtl"===e.dir.toLowerCase()||"rtl"===l.css("direction"),rtlTranslate:"horizontal"===r.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===l.css("direction")),wrongRTL:"-webkit-box"===h.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:(p=["touchstart","touchmove","touchend","touchcancel"],u=["mousedown","mousemove","mouseup"],r.support.pointerEvents&&(u=["pointerdown","pointermove","pointerup"]),r.touchEventsTouch={start:p[0],move:p[1],end:p[2],cancel:p[3]},r.touchEventsDesktop={start:u[0],move:u[1],end:u[2]},r.support.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:T(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.useModules(),r.emit("_swiper"),r.params.init&&r.init(),r}}var i,s,a,n=t.prototype;return n.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter(function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)});e.emit("_containerClasses",t.join(" "))}},n.emitSlidesClasses=function(){var e=this;e.params._emitClasses&&e.el&&e.slides.each(function(t){var i=t.className.split(" ").filter(function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)});e.emit("_slideClass",t,i.join(" "))})},n.slidesPerViewDynamic=function(){var e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,n=1;if(e.centeredSlides){for(var r,o=t[a].swiperSlideSize,l=a+1;l<t.length;l+=1)t[l]&&!r&&(n+=1,(o+=t[l].swiperSlideSize)>s&&(r=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!r&&(n+=1,(o+=t[d].swiperSlideSize)>s&&(r=!0))}else for(var h=a+1;h<t.length;h+=1)i[h]-i[a]<s&&(n+=1);return n},n.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,i=e.params;i.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(s(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||s(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},n.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e?this:(this.$el.removeClass(""+this.params.containerModifierClass+i).addClass(""+this.params.containerModifierClass+e),this.emitContainerClasses(),this.params.direction=e,this.slides.each(function(t){"vertical"===e?t.style.width="":t.style.height=""}),this.emit("changeDirection"),t&&this.update(),this)}
202,n.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},n.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i,s=this,a=s.params,n=s.$el,r=s.$wrapperEl,o=s.slides;return void 0===s.params||s.destroyed?null:(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),n.removeAttr("style"),r.removeAttr("style"),o&&o.length&&o.removeClass([a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(function(e){s.off(e)}
202),!1!==e&&(s.$el[0].swiper=null,i=s,Object.keys(i).forEach(function(e){try{i[e]=null}catch(e){}try{delete i[e]}catch(e){}})),s.destroyed=!0,null)},t.extendDefaults=function(e){C(A,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var i=e.name||Object.keys(t.prototype.modules).length+"_"+T();t.prototype.modules[i]=e},t.use=function(e){return Array.isArray(e)?(e.forEach(function(e){return t.installModule(e)}),t):(t.installModule(e),t)},i=t,a=[{key:"extendedDefaults",get:function(){return A}},{key:"defaults",get:function(){return z}}],(s=null)&&e(i.prototype,s),a&&e(i,a),t}(),$={name:"resize",create:function(){var e=this;C(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(e){var t=o();t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler)},destroy:function(e){var t=o();t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},B={attach:function(e,t){void 0===t&&(t={});var i=o(),s=this,a=new(i.MutationObserver||i.WebkitMutationObserver)(function(e){if(1!==e.length){var t=function(){s.emit("observerUpdate",e[0])};i.requestAnimationFrame?i.requestAnimationFrame(t):i.setTimeout(t,0)}else s.emit("observerUpdate",e[0])});a.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),s.observer.observers.push(a)},init:function(){if(this.support.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;t<e.length;t+=1)this.observer.attach(e[t]);this.observer.attach(this.$el[0],{childList:this.params.observeSlideChildren}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},N={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){S(this,{observer:t(t({},B),{},{observers:[]})})},on:{init:function(e){e.observer.init()},destroy:function(e){e.observer.destroy()}}},G={handle:function(e){var t=o(),i=n(),s=this.rtlTranslate,a=e;a.originalEvent&&(a=a.originalEvent);var r=a.keyCode||a.charCode,l=this.params.keyboard.pageUpDown,d=l&&33===r,h=l&&34===r,p=37===r,u=39===r,c=38===r,v=40===r;if(!this.allowSlideNext&&(this.isHorizontal()&&u||this.isVertical()&&v||h))return!1;if(!this.allowSlidePrev&&(this.isHorizontal()&&p||this.isVertical()&&c||d))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(this.params.keyboard.onlyInViewport&&(d||h||p||u||c||v)){var f=!1;if(this.$el.parents("."+this.params.slideClass).length>0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var m=t.innerWidth,g=t.innerHeight,b=this.$el.offset();s&&(b.left-=this.$el[0].scrollLeft);for(var y=[[b.left,b.top],[b.left+this.width,b.top],[b.left,b.top+this.height],[b.left+this.width,b.top+this.height]],w=0;w<y.length;w+=1){var T=y[w];T[0]>=0&&T[0]<=m&&T[1]>=0&&T[1]<=g&&(f=!0)}if(!f)return}this.isHorizontal()?((d||h||p||u)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((h||u)&&!s||(d||p)&&s)&&this.slideNext(),((d||p)&&!s||(h||u)&&s)&&this.slidePrev()):((d||h||c||v)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(h||v)&&this.slideNext(),(d||c)&&this.slidePrev()),this.emit("keyPress",r)}},enable:function(){var e=n();this.keyboard.enabled||(f(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){var e=n();this.keyboard.enabled&&(f(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},F={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){S(this,{keyboard:t({enabled:!1},G)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}};var H={lastScrollTime:T(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return o().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=n(),t="onwheel"in e;if(!t){var i=e.createElement("div");i.setAttribute("onwheel","return;"),t="function"==typeof i.onwheel}return!t&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(t=e.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120
202),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=a,a=0),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,s=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var a=i.$el;if("container"!==i.params.mousewheel.eventsTarget&&(a=f(i.params.mousewheel.eventsTarget)),!i.mouseEntered&&!a[0].contains(t.target)&&!s.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var n=0,r=i.rtlTranslate?-1:1,o=H.normalize(t);if(s.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(o.pixelX)>Math.abs(o.pixelY)))return!0;n=-o.pixelX*r}else{if(!(Math.abs(o.pixelY)>Math.abs(o.pixelX)))return!0;n=-o.pixelY}else n=Math.abs(o.pixelX)>Math.abs(o.pixelY)?-o.pixelX*r:-o.pixelY;if(0===n)return!0;if(s.invert&&(n=-n),i.params.freeMode){var l={time:T(),delta:Math.abs(n),direction:Math.sign(n)},d=i.mousewheel.lastEventBeforeSnap,h=d&&l.time<d.time+500&&l.delta<=d.delta&&l.direction===d.direction;if(!h){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var p=i.getTranslate()+n*s.sensitivity,u=i.isBeginning,c=i.isEnd;if(p>=i.minTranslate()&&(p=i.minTranslate()),p<=i.maxTranslate()&&(p=i.maxTranslate()),i.setTransition(0),i.setTranslate(p),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!u&&i.isBeginning||!c&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var v=i.mousewheel.recentWheelEvents;v.length>=15&&v.shift();var m=v.length?v[v.length-1]:void 0,g=v[0];if(v.push(l),m&&(l.delta>m.delta||l.direction!==m.direction))v.splice(0);else if(v.length>=15&&l.time-g.time<500&&g.delta-l.delta>=1&&l.delta<=6){var b=n>0?.8:.2;i.mousewheel.lastEventBeforeSnap=l,v.splice(0),i.mousewheel.timeout=w(function(){i.slideToClosest(i.params.speed,!0,void 0,b)},0)}i.mousewheel.timeout||(i.mousewheel.timeout=w(function(){i.mousewheel.lastEventBeforeSnap=l,v.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)},500))}if(h||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),p===i.minTranslate()||p===i.maxTranslate())return!0}}else{var y={time:T(),delta:Math.abs(n),direction:Math.sign(n),raw:e},E=i.mousewheel.recentWheelEvents;E.length>=2&&E.shift();var C=E.length?E[E.length-1]:void 0;if(E.push(y),C?(y.direction!==C.direction||y.delta>C.delta||y.time>C.time+150)&&i.mousewheel.animateSlider(y):i.mousewheel.animateSlider(y),i.mousewheel.releaseScroll(y))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){var t=o();return e.delta>=6&&T()-this.mousewheel.lastScrollTime<60||(e.direction<0?this.isEnd&&!this.params.loop||this.animating||(this.slideNext(),this.emit("scroll",e.raw)):this.isBeginning&&!this.params.loop||this.animating||(this.slidePrev(),this.emit("scroll",e.raw)),this.mousewheel.lastScrollTime=(new t.Date).getTime(),!1)},releaseScroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isEnd&&!this.params.loop&&t.releaseOnEdges)return!0}else if(this.isBeginning&&!this.params.loop&&t.releaseOnEdges)return!0;return!1},enable:function(){var e=H.event();if(this.params.cssMode)return this.wrapperEl.removeEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarget&&(t=f(this.params.mousewheel.eventsTarget)),t.on("mouseenter",this.mousewheel.handleMouseEnter),t.on("mouseleave",this.mousewheel.handleMouseLeave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=H.event();if(this.params.cssMode)return this.wrapperEl.addEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarget&&(t=f(this.params.mousewheel.eventsTarget)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},V={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>
2020&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,i=this.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=f(i.nextEl),this.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===this.$el.find(i.nextEl).length&&(e=this.$el.find(i.nextEl))),i.prevEl&&(t=f(i.prevEl),this.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===this.$el.find(i.prevEl).length&&(t=this.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",this.navigation.onNextClick),t&&t.length>0&&t.on("click",this.navigation.onPrevClick),C(this.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click",this.navigation.onNextClick),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click",this.navigation.onPrevClick),i.removeClass(this.params.navigation.disabledClass))}},R={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,s=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,a=this.pagination.$el,n=this.params.loop?Math.ceil((s-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>s-1-2*this.loopedSlides&&(i-=s-2*this.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==this.params.paginationType&&(i=n+i)):i=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var r,o,l,d=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=d.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),r=i-this.pagination.dynamicBulletIndex,l=((o=r+(Math.min(d.length,t.dynamicMainBullets)-1))+r)/2),d.removeClass(t.bulletActiveClass+" "+t.bulletActiveClass+"-next "+t.bulletActiveClass+"-next-next "+t.bulletActiveClass+"-prev "+t.bulletActiveClass+"-prev-prev "+t.bulletActiveClass+"-main"),a.length>1)d.each(function(e){var s=f(e),a=s.index();a===i&&s.addClass(t.bulletActiveClass),t.dynamicBullets&&(a>=r&&a<=o&&s.addClass(t.bulletActiveClass+"-main"),a===r&&s.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),a===o&&s.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))});else{var h=d.eq(i),p=h.index();if(h.addClass(t.bulletActiveClass),t.dynamicBullets){for(var u=d.eq(r),c=d.eq(o),v=r;v<=o;v+=1)d.eq(v).addClass(t.bulletActiveClass+"-main");if(this.params.loop)if(p>=d.length-t.dynamicMainBullets){for(var m=t.dynamicMainBullets;m>=0;m-=1)d.eq(d.length-m).addClass(t.bulletActiveClass+"-main");d.eq(d.length-t.dynamicMainBullets-1).addClass(t.bulletActiveClass+"-prev")}else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next");else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}}if(t.dynamicBullets){var g=Math.min(d.length,t.dynamicMainBullets+4),b=(this.pagination.bulletSize*g-this.pagination.bulletSize)/2-l*this.pagination.bulletSize,y=e?"right":"left";d.css(this.isHorizontal()?y:"top",b+"px")}}if("fraction"===t.type&&(a.find("."+t.currentClass).text(t.formatFractionCurrent(i+1)),a.find("."+t.totalClass).text(t.formatFractionTotal(n))),"progressbar"===t.type){var w;w=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var T=(i+1)/n,E=1,C=1;"horizontal"===w?E=T:C=T,a.find("."+t.progressbarFillClass).transform("translate3d(0,
2020,0) scaleX("+E+") scaleY("+C+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(a.html(t.renderCustom(this,i+1,n)),this.emit("paginationRender",a[0])):this.emit("paginationUpdate",a[0]),a[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,n=0;n<a;n+=1)e.renderBullet?s+=e.renderBullet.call(this,n,e.bulletClass):s+="<"+e.bulletElement+' class="'+e.bulletClass+'"></'+e.bulletElement+">";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):'<span class="'+e.currentClass+'"></span> / <span class="'+e.totalClass+'"></span>',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'<span class="'+e.progressbarFillClass+'"></span>',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=f(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,function(t){t.preventDefault();var i=f(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)}),C(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},j={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,n=e.$dragEl,r=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>
202a&&(l=a-d),this.isHorizontal()?(n.transform("translate3d("+d+"px, 0, 0)"),n[0].style.width=l+"px"):(n.transform("translate3d(0px, "+d+"px, 0)"),n[0].style.height=l+"px"),o.hide&&(clearTimeout(this.scrollbar.timeout),r[0].style.opacity=1,this.scrollbar.timeout=setTimeout(function(){r[0].style.opacity=0,r.transition(400)},1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=this.size/this.virtualSize,r=n*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*n:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=n>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),C(e,{trackSize:a,divider:n,moveDivider:r,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,n=i.dragSize,r=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-a.offset()[this.isHorizontal()?"left":"top"]-(null!==o?o:n/2))/(r-n),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,n=i.$dragEl;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===n[0]||e.target===n?i.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssMode&&this.$wrapperEl.css("scroll-snap-type","none"),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,this.params.cssMode&&(this.$wrapperEl.css("scroll-snap-type",""),s.transition("")),t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=w(function(){a.css("opacity",0),a.transition(400)},1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var e=n(),t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=this.support,o=t.$el[0],l=!(!r.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},d=!(!r.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};r.touch?(o.addEventListener(i.start,this.scrollbar.onDragStart,l),o.addEventListener(i.move,this.scrollbar.onDragMove,l),o.addEventListener(i.end,this.scrollbar.onDragEnd,d)):(o.addEventListener(s.start,this.scrollbar.onDragStart,l),e.addEventListener(s.move,this.scrollbar.onDragMove,l),e.addEventListener(s.end,this.scrollbar.onDragEnd,d))}},disableDraggable:function(){if(this.params.scrollbar.el){var e=n(),t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=this.support,o=t.$el[0],l=!(!r.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},d=!(!r.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};r.touch?(o.removeEventListener(i.start,this.scrollbar.onDragStart,l),o.removeEventListener(i.move,this.scrollbar.onDragMove,l),o.removeEventListener(i.end,this.scrollbar.onDragEnd,d)):(o.removeEventListener(s.start,this.scrollbar.onDragStart,l),e.removeEventListener(s.move,this.scrollbar.onDragMove,l),e.removeEventListener(s.end,this.scrollbar.onDragEnd,d))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,s=f(i.el);this.params.uniqueNavElements&&"string"==typeof i.el&&s.length>1&&1===t.find(i.el).length&&(s=t.find(i.el));var a=s.find("."+this.params.scrollbar.dragClass);0===a.length&&(a=f('<div class="'+this.params.scrollbar.dragClass+'"></div>'),s.append(a)),C(e,{$el:s,el:s[0],$dragEl:a,dragEl:a[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},W={LinearSpline:function(e,t){var i,s,a,n,r,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>
2021]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(r=o(this.x,e),n=r-1,(e-this.x[n])*(this.y[r]-this.y[n])/(this.x[r]-this.x[n])+this.y[n]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new W.LinearSpline(this.slidesGrid,e.slidesGrid):new W.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,s,a=this,n=a.controller.control,r=a.constructor;function o(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(n))for(var l=0;l<n.length;l+=1)n[l]!==t&&n[l]instanceof r&&o(n[l]);else n instanceof r&&t!==n&&o(n)},setTransition:function(e,t){var i,s=this,a=s.constructor,n=s.controller.control;function r(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.params.autoHeight&&w(function(){t.updateAutoHeight()}),t.$wrapperEl.transitionEnd(function(){n&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(n))for(i=0;i<n.length;i+=1)n[i]!==t&&n[i]instanceof a&&r(n[i]);else n instanceof a&&t!==n&&r(n)}},_={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this.params.a11y;if(13===e.keyCode){var i=f(e.target);this.navigation&&this.navigation.$nextEl&&i.is(this.navigation.$nextEl)&&(this.isEnd&&!this.params.loop||this.slideNext(),this.isEnd?this.a11y.notify(t.lastSlideMessage):this.a11y.notify(t.nextSlideMessage)),this.navigation&&this.navigation.$prevEl&&i.is(this.navigation.$prevEl)&&(this.isBeginning&&!this.params.loop||this.slidePrev(),this.isBeginning?this.a11y.notify(t.firstSlideMessage):this.a11y.notify(t.prevSlideMessage)),this.pagination&&i.is("."+this.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){if(!this.params.loop&&this.navigation){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;i&&i.length>0&&(this.isBeginning?(this.a11y.disableEl(i),this.a11y.makeElNotFocusable(i)):(this.a11y.enableEl(i),this.a11y.makeElFocusable(i))),t&&t.length>0&&(this.isEnd?(this.a11y.disableEl(t),this.a11y.makeElNotFocusable(t)):(this.a11y.enableEl(t),this.a11y.makeElFocusable(t)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each(function(i){var s=f(i);e.a11y.makeElFocusable(s),e.a11y.addElRole(s,"button"),e.a11y.addElLabel(s,t.paginationBulletMessage.replace(/\{\{index\}\}/,s.index()+1))})},init:function(){this.$el.append(this.a11y.liveRegion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},X={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=w(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,
202!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),e.params.cssMode&&e.autoplay.running&&e.autoplay.run()},i)},start:function(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop:function(){return!!this.autoplay.running&&(void 0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void 0),this.autoplay.running=!1,this.emit("autoplayStop"),!0))},pause:function(e){this.autoplay.running&&(this.autoplay.paused||(this.autoplay.timeout&&clearTimeout(this.autoplay.timeout),this.autoplay.paused=!0,0!==e&&this.params.autoplay.waitForTransition?(this.$wrapperEl[0].addEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].addEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd)):(this.autoplay.paused=!1,this.autoplay.run())))},onVisibilityChange:function(){var e=n();"hidden"===e.visibilityState&&this.autoplay.running&&this.autoplay.pause(),"visible"===e.visibilityState&&this.autoplay.paused&&(this.autoplay.run(),this.autoplay.paused=!1)},onTransitionEnd:function(e){this&&!this.destroyed&&this.$wrapperEl&&e.target===this.$wrapperEl[0]&&(this.$wrapperEl[0].removeEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].removeEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd),this.autoplay.paused=!1,this.autoplay.running?this.autoplay.run():this.autoplay.stop())}},Y=[$,N,F,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container"}},create:function(){S(this,{mousewheel:{enabled:!1,lastScrollTime:T(),lastEventBeforeSnap:void 0,recentWheelEvents:[],enable:H.enable,disable:H.disable,handle:H.handle,handleMouseEnter:H.handleMouseEnter,handleMouseLeave:H.handleMouseLeave,animateSlider:H.animateSlider,releaseScroll:H.releaseScroll}})},on:{init:function(e){!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(e){e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){S(this,{navigation:t({},V)})},on:{init:function(e){e.navigation.init(),e.navigation.update()},toEdge:function(e){e.navigation.update()},fromEdge:function(e){e.navigation.update()},destroy:function(e){e.navigation.destroy()},click:function(e,t){var i,s=e.navigation,a=s.$nextEl,n=s.$prevEl;!e.params.navigation.hideOnClick||f(t.target).is(n)||f(t.target).is(a)||(a?i=a.hasClass(e.params.navigation.hiddenClass):n&&(i=n.hasClass(e.params.navigation.hiddenClass)),!0===i?e.emit("navigationShow"):e.emit("navigationHide"),a&&a.toggleClass(e.params.navigation.hiddenClass),n&&n.toggleClass(e.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){S(this,{pagination:t({dynamicBulletIndex:0},R)})},on:{init:function(e){e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(e){e.params.loop?e.pagination.update():void 0===e.snapIndex&&e.pagination.update()},snapIndexChange:function(e){e.params.loop||e.pagination.update()},slidesLengthChange:function(e){e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(e){e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(e){e.pagination.destroy()},click:function(e,t){e.params.pagination.el&&e.params.pagination.hideOnClick&&e.pagination.$el.length>0&&!f(t.target).hasClass(e.params.pagination.bulletClass)&&(!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){S(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},j)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},destroy:function(e){e.scrollbar.destroy()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){S(this,{controller:t({control:this.params.controller.control},W)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,i){e.controller.control&&e.controller.setTranslate(t,i)},setTransition:function(e,t,i){e.controller.control&&e.controller.setTransition(t,i)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){S(this,{a11y:t(t({},_),{},{liveRegion:f('<span class="'+this.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')})})},on:{init:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){S(this,{autoplay:t(t({},X),{},{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),n().addEventListener("visibilitychange",e.auto
202play.onVisibilityChange))},beforeTransitionStart:function(e,t,i){e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.running&&e.autoplay.stop(),n().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}}];return I.use(Y),I});
vendor: 16,875 bytes, line 202
202!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).imageCompression=t()}(this,(function(){"use strict";function _mergeNamespaces(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise((function(r,i){let o;return getApp1Segment(e).then((function(e){try{return o=e,r(new Blob([t.slice(0,2),o,t.slice(2)],{type:"image/jpeg"}))}catch(e){return i(e)}}),i)}))}const getApp1Segment=e=>new Promise(((t,r)=>{const i=new FileReader;i.addEventListener("load",(({target:{result:e}})=>{const i=new DataView(e);let o=0;if(65496!==i.getUint16(o))return r("not a valid JPEG");for(o+=2;;){const a=i.getUint16(o);if(65498===a)break;const s=i.getUint16(o+2);if(65505===a&&1165519206===i.getUint32(o+4)){const a=o+10;let f;switch(i.getUint16(a)){case 18761:f=!0;break;case 19789:f=!1;break;default:return r("TIFF header contains invalid endian")}if(42!==i.getUint16(a+2,f))return r("TIFF header contains invalid version");const l=i.getUint32(a+4,f),c=a+l+2+12*i.getUint16(a+l,f);for(let e=a+l+2;e<c;e+=12){if(274==i.getUint16(e,f)){if(3!==i.getUint16(e+2,f))return r("Orientation data type is invalid");if(1!==i.getUint32(e+4,f))return r("Orientation data count is invalid");i.setUint16(e+8,1,f);break}}return t(e.slice(o,o+2+s))}o+=2+s}return t(new Blob)})),i.readAsArrayBuffer(e)}));var e={};!function(e){var t,r,UZIP={};e.exports=UZIP,UZIP.parse=function(e,t){for(var r=UZIP.bin.readUshort,i=UZIP.bin.readUint,o=0,a={},s=new Uint8Array(e),f=s.length-4;101010256!=i(s,f);)f--;o=f;o+=4;var l=r(s,o+=4);r(s,o+=2);var c=i(s,o+=2),u=i(s,o+=4);o+=4,o=u;for(var h=0;h<l;h++){i(s,o),o+=4,o+=4,o+=4,i(s,o+=4);c=i(s,o+=4);var d=i(s,o+=4),A=r(s,o+=4),g=r(s,o+2),p=r(s,o+4);o+=6;var m=i(s,o+=8);o+=4,o+=A+g+p,UZIP._readLocal(s,m,a,c,d,t)}return a},UZIP._readLocal=function(e,t,r,i,o,a){var s=UZIP.bin.readUshort,f=UZIP.bin.readUint;f(e,t),s(e,t+=4),s(e,t+=2);var l=s(e,t+=2);f(e,t+=2),f(e,t+=4),t+=4;var c=s(e,t+=8),u=s(e,t+=2);t+=2;var h=UZIP.bin.readUTF8(e,t,c);if(t+=c,t+=u,a)r[h]={size:o,csize:i};else{var d=new Uint8Array(e.buffer,t);if(0==l)r[h]=new Uint8Array(d.buffer.slice(t,t+i));else{if(8!=l)throw"unknown compression method: "+l;var A=new Uint8Array(o);UZIP.inflateRaw(d,A),r[h]=A}}},UZIP.inflateRaw=function(e,t){return UZIP.F.inflate(e,t)},UZIP.inflate=function(e,t){return e[0],e[1],UZIP.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP.deflate=function(e,t){null==t&&(t={level:6});var r=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[r]=120,i[r+1]=156,r+=2,r=UZIP.F.deflateRaw(e,i,r,t.level);var o=UZIP.adler(e,0,e.length);return i[r+0]=o>>>24&255,i[r+1]=o>>>16&255,i[r+2]=o>>>8&255,i[r+3]=o>>>0&255,new Uint8Array(i.buffer,0,r+4)},UZIP.deflateRaw=function(e,t){null==t&&(t={level:6});var r=new Uint8Array(50+Math.floor(1.1*e.length)),i=UZIP.F.deflateRaw(e,r,i,t.level);return new Uint8Array(r.buffer,0,i)},UZIP.encode=function(e,t){null==t&&(t=!1);var r=0,i=UZIP.bin.writeUint,o=UZIP.bin.writeUshort,a={};for(var s in e){var f=!UZIP._noNeed(s)&&!t,l=e[s],c=UZIP.crc.crc(l,0,l.length);a[s]={cpr:f,usize:l.length,crc:c,file:f?UZIP.deflateRaw(l):l}}for(var s in a)r+=a[s].file.length+30+46+2*UZIP.bin.sizeUTF8(s);r+=22;var u=new Uint8Array(r),h=0,d=[];for(var s in a){var A=a[s];d.push(h),h=UZIP._writeHeader(u,h,s,A,0)}var g=0,p=h;for(var s in a){A=a[s];d.push(h),h=UZIP._writeHeader(u,h,s,A,1,d[g++])}var m=h-p;return i(u,h,101010256),h+=4,o(u,h+=4,g),o(u,h+=2,g),i(u,h+=2,m),i(u,h+=4,p),h+=4,h+=2,u.buffer},UZIP._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP._writeHeader=function(e,t,r,i,o,a){var s=UZIP.bin.writeUint,f=UZIP.bin.writeUshort,l=i.file;return s(e,t,0==o?67324752:33639248),t+=4,1==o&&(t+=2),f(e,t,20),f(e,t+=2,0),f(e,t+=2,i.cpr?8:0),s(e,t+=2,0),s(e,t+=4,i.crc),s(e,t+=4,l.length),s(e,t+=4,i.usize),f(e,t+=4,UZIP.bin.sizeUTF8(r)),f(e,t+=2,0),t+=2,1==o&&(t+=2,t+=2,s(e,t+=6,a),t+=4),t+=UZIP.bin.writeUTF8(e,t,r),0==o&&(e.set(l,t),t+=l.length),t},UZIP.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var r=t,i=0;i<8;i++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update:function(e,t,r,i){for(var o=0;o<i;o++)e=UZIP.crc.table[255&(e^t[r+o])]^e>>>8;return e},crc:function(e,t,r){return 4294967295^UZIP.crc.update(4294967295,e,t,r)}},UZIP.adler=function(e,t,r){for(var i=1,o=0,a=t,s=t+r;a<s;){for(var f=Math.min(a+5552,s);a<f;)o+=i+=e[a++];i%=65521,o%=65521}return o<<16|i},UZIP.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255,e[t+2]=r>>16&255,e[t+3]=r>>24&255},readASCII:function(e,t,r){for(var i="",o=0;o<r;o++)i+=String.fromCharCode(e[t+o]);return i},writeASCII:function(e,t,r){for(var i=0;i<r.length;i++)e[t+i]=r.charCodeAt(i)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,r){for(var i,o="",a=0;a<r;a++)o+="%"+UZIP.bin.pad(e[t+a].toString(16));try{i=decodeURIComponent(o)}catch(i){return UZIP.bin.readASCII(e,t,r)}return i},writeUTF8:function(e,t,r){for(var i=r.length,o=0,a=0;a<i;a++){var s=r.charCodeAt(a);if(0==(4294967168&s))e[t+o]=s,o++;else if(0==(4294965248&s))e[t+o]=192|s>>6,e[t+o+1]=128|s>>0&63,o+=2;else if(0==(4294901760&s))e[t+o]=224|s>>12,e[t+o+1]=128|s>>6&63,e[t+o+2]=128|s>>0&63,o+=3;else{if(0!=(4292870144&s))throw"e";e[t+o]=240|s>>18,e[t+o+1]=128|s>>12&63,e[t+o+2]=128|s>>6&63,e[t+o+3]=128|s>>0&63,o+=4}}return o},sizeUTF8:function(e){for(var t=e.length,r=0,i=0;i<t;i++){var o=e.charCodeAt(i);if(0==(4294967168&o))r++;else if(0==(4294965248&o))r+=2;else if(0==(4294901760&o))r+=3;else{if(0!=(4292870144&o))throw"e";r+=4}}return r}},UZIP.F={},UZIP.F.deflateRaw=function(e,t,r,i){var o=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],a=UZIP.F.U,s=UZIP.F._goodIndex;UZIP.F._hash;var f=UZIP.F._putsE,l=0,c=r<<3,u=0,h=e.length;if(0==i){for(;l<h;){f(t,c,l+(_=Math.min(65535,h-l))==h?1:0),c=UZIP.F._copyExact(e,l,_,t,c+8),l+=_}return c>>>3}var d=a.lits,A=a.strt,g=a.prev,p=0,m=0,w=0,v=0,b=0,y=0;for(h>2&&(A[y=UZIP.F._hash(e,0)]=0),l=0;l<h;l++){if(b=y,l+1<h-2){y=UZIP.F._hash(e,l+1);var E=l+1&32767;g[E]=A[y],A[y]=E}if(u<=l){(p>14e3||m>26697)&&h-l>100&&(u<l&&(d[p]=l-u,p+=2,u=l),c=UZIP.F._writeBlock(l==h-1||u==h?1:0,d,p,v,e,w,l-w,t,c),p=m=v=0,w=l);var F=0;l<h-2&&(F=UZIP.F._bestMatch(e,l,g,b,Math.min(o[2],h-l),o[3]));var _=F>>>16,B=65535&F;if(0!=F){B=65535&F;var U=s(_=F>>>16,a.of0);a.lhst[257+U]++;var C=s(B,a.df0);a.dhst[C]++,v+=a.exb[U]+a.dxb[C],d[p]=_<<23|l-u,d[p+1]=B<<16|U<<8|C,p+=2,u=l+_}else a.lhst[e[l]]++;m++}}for(w==l&&0!=e.length||(u<l&&(d[p]=l-u,p+=2,u=l),c=UZIP.F._writeBlock(1,d,p,v,e,w,l-w,t,c),p=0,m=0,p=m=v=0,w=l);0!=(7&c);)c++;return c>>>3},UZIP.F._bestMatch=function(e,t,r,i,o,a){var s=32767&t,f=r[s],l=s-f+32768&32767;if(f==s||i!=UZIP.F._hash(e,t-l))return 0;for(var c=0,u=0,h=Math.min(32767,t);l<=h&&0!=--a&&f!=s;){if(0==c||e[t+c]==e[t+c-l]){var d=UZIP.F._howLong(e,t,l);if(d>c){if(u=l,(c=d)>=o)break;l+2<d&&(d=l+2);for(var A=0,g=0;g<d-2;g++){var p=t-l+g+32768&32767,m=p-r[p]+32768&32767;m>A&&(A=m,f=p)}}}l+=(s=f)-(f=r[s])+32768&32767}return c<<16|u},UZIP.F._howLong=function(e,t,r){if(e[t]!=e[t-r]||e[t+1]!=e[t+1-r]||e[t+2]!=e[t+2-r])return 0;var i=t,o=Math.min(e.length,t+258);for(t+=3;t<o&&e[t]==e[t-r];)t++;return t-i},UZIP.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP.saved=0,UZIP.F._writeBlock=function(e,t,r,i,o,a,s,f,l){var c,u,h,d,A,g,p,m,w,v=UZIP.F.U,b=UZIP.F._putsF,y=UZIP.F._putsE;v.lhst[256]++,u=(c=UZIP.F.getTrees())[0],h=c[1],d=c[2],A=c[3],g=c[4],p=c[5],m=c[6],w=c[7];var E=32+(0==(l+3&7)?0:8-(l+3&7))+(s<<3),F=i+UZIP.F.contSize(v.fltree,v.lhst)+UZIP.F.contSize(v.fdtree,v.dhst),_=i+UZIP.F.contSize(v.ltree,v.lhst)+UZIP.F.contSize(v.dtree,v.dhst);_+=14+3*p+UZIP.F.contSize(v.itree,v.ihst)+(2*v.ihst[16]+3*v.ihst[17]+7*v.ihst[18]);for(var B=0;B<286;B++)v.lhst[B]=0;for(B=0;B<30;B++)v.dhst[B]=0;for(B=0;B<19;B++)v.ihst[B]=0;var U=E<F&&E<_?0:F<_?1:2;if(b(f,l,e),b(f,l+1,U),l+=3,0==U){for(;0!=(7&l);)l++;l=UZIP.F._copyExact(o,a,s,f,l)}else{var C,I;if(1==U&&(C=v.fltree,I=v.fdtree),2==U){UZIP.F.makeCodes(v.ltree,u),UZIP.F.revCodes(v.ltree,u),UZIP.F.makeCodes(v.dtree,h),UZIP.F.revCodes(v.dtree,h),UZIP.F.makeCodes(v.itree,d),UZIP.F.revCodes(v.itree,d),C=v.ltree,I=v.dtree,y(f,l,A-257),y(f,l+=5,g-1),y(f,l+=5,p-4),l+=4;for(var Q=0;Q<p;Q++)y(f,l+3*Q,v.itree[1+(v.ordr[Q]<<1)]);l+=3*p,l=UZIP.F._codeTiny(m,v.itree,f,l),l=UZIP.F._codeTiny(w,v.itree,f,l)}for(var M=a,x=0;x<r;x+=2){for(var T=t[x],S=T>>>23,R=M+(8388607&T);M<R;)l=UZIP.F._writeLit(o[M++],C,f,l);if(0!=S){var O=t[x+1],P=O>>16,H=O>>8&255,L=255&O;y(f,l=UZIP.F._writeLit(257+H,C,f,l),S-v.of0[H]),l+=v.exb[H],b(f,l=UZIP.F._writeLit(L,I,f,l),P-v.df0[L]),l+=v.dxb[L],M+=S}}l=UZIP.F._writeLit(256,C,f,l)}return l},UZIP.F._copyExact=function(e,t,r,i,o){var a=o>>>3;return i[a]=r,i[a+1]=r>>>8,i[a+2]=255-i[a],i[a+3]=255-i[a+1],a+=4,i.set(new Uint8Array(e.buffer,t,r),a),o+(r+4<<3)},UZIP.F.getTrees=function(){for(var e=UZIP.F.U,t=UZIP.F._hufTree(e.lhst,e.ltree,15),r=UZIP.F._hufTree(e.dhst,e.dtree,15),i=[],o=UZIP.F._lenCodes(e.ltree,i),a=[],s=UZIP.F._lenCodes(e.dtree,a),f=0;f<i.length;f+=2)e.ihst[i[f]]++;for(f=0;f<a.length;f+=2)e.ihst[a[f]]++;for(var l=UZIP.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,r,l,o,s,c,i,a]},UZIP.F.getSecond=function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(e[r+1]);return t},UZIP.F.nonZero=function(e){for(var t="",r=0;r<e.length;r+=2)0!=e[r+1]&&(t+=(r>>1)+",");return t},UZIP.F.contSize=function(e,t){for(var r=0,i=0;i<t.length;i++)r+=t[i]*e[1+(i<<1)];return r},UZIP.F._codeTiny=function(e,t,r,i){for(var o=0;o<e.length;o+=2){var a=e[o],s=e[o+1];i=UZIP.F._writeLit(a,t,r,i);var f=16==a?2:17==a?3:7;a>15&&(UZIP.F._putsE(r,i,s,f),i+=f)}return i},UZIP.F._lenCodes=function(e,t){for(var r=e.length;2!=r&&0==e[r-1];)r-=2;for(var i=0;i<r;i+=2){var o=e[i+1],a=i+3<r?e[i+3]:-1,s=i+5<r?e[i+5]:-1,f=0==i?-1:e[i-1];if(0==o&&a==o&&s==o){for(var l=i+5;l+2<r&&e[l+2]==o;)l+=2;(c=Math.min(l+1-i>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),i+=2*c-2}else if(o==f&&a==o&&s==o){for(l=i+5;l+2<r&&e[l+2]==o;)l+=2;var c=Math.min(l+1-i>>>1,6);t.push(16,c-3),i+=2*c-2}else t.push(o,0)}return r>>>1},UZIP.F._hufTree=function(e,t,r){var i=[],o=e.length,a=t.length,s=0;for(s=0;s<a;s+=2)t[s]=0,t[s+1]=0;for(s=0;s<o;s++)0!=e[s]&&i.push({lit:s,f:e[s]});var f=i.length,l=i.slice(0);if(0==f)return 0;if(1==f){var c=i[0].lit;l=0==c?1:0;return t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}i.sort((function(e,t){return e.f-t.f}));var u=i[0],h=i[1],d=0,A=1,g=2;for(i[0]={lit:-1,f:u.f+h.f,l:u,r:h,d:0};A!=f-1;)u=d!=A&&(g==f||i[d].f<i[g].f)?i[d++]:i[g++],h=d!=A&&(g==f||i[d].f<i[g].f)?i[d++]:i[g++],i[A++]={lit:-1,f:u.f+h.f,l:u,r:h};var p=UZIP.F.setDepth(i[A-1],0);for(p>r&&(UZIP.F.restrictDepth(l,r,p),p=r),s=0;s<f;s++)t[1+(l[s].lit<<1)]=l[s].d;return p},UZIP.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP.F.setDepth(e.l,t+1),UZIP.F.setDepth(e.r,t+1))},UZIP.F.restrictDepth=function(e,t,r){var i=0,o=1<<r-t,a=0;for(e.sort((function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d})),i=0;i<e.length&&e[i].d>t;i++){var s=e[i].d;e[i].d=t,a+=o-(1<<r-s)}for(a>>>=r-t;a>0;){(s=e[i].d)<t?(e[i].d++,a-=1<<t-s-1):i++}for(;i>=0;i--)e[i].d==t&&a<0&&(e[i].d--,a++);0!=a&&console.log("debt left")},UZIP.F._goodIndex=function(e,t){var r=0;return t[16|r]<=e&&(r|=16),t[8|r]<=e&&(r|=8),t[4|r]<=e&&(r|=4),t[2|r]<=e&&(r|=2),t[1|r]<=e&&(r|=1),r},UZIP.F._writeLit=function(e,t,r,i){return UZIP.F._putsF(r,i,t[e<<1]),i+t[1+(e<<1)]},UZIP.F.inflate=function(e,t){var r=Uint8Array;if(3==e[0]&&0==e[1])return t||new r(0);var i=UZIP.F,o=i._bitsF,a=i._bitsE,s=i._decodeTiny,f=i.makeCodes,l=i.codes2map,c=i._get17,u=i.U,h=null==t;h&&(t=new r(e.length>>>2<<3));for(var d,A,g=0,p=0,m=0,w=0,v=0,b=0,y=0,E=0,F=0;0==g;)if(g=o(e,F,1),p=o(e,F+1,2),F+=3,0!=p){if(h&&(t=UZIP.F._check(t,E+(1<<17))),1==p&&(d=u.flmap,A=u.fdmap,b=511,y=31),2==p){m=a(e,F,5)+257,w=a(e,F+5,5)+1,v=a(e,F+10,4)+4,F+=14;for(var _=0;_<38;_+=2)u.itree[_]=0,u.itree[_+1]=0;var B=1;for(_=0;_<v;_++){var U=a(e,F+3*_,3);u.itree[1+(u.ordr[_]<<1)]=U,U>B&&(B=U)}F+=3*v,f(u.itree,B),l(u.itree,B,u.imap),d=u.lmap,A=u.dmap,F=s(u.imap,(1<<B)-1,m+w,e,F,u.ttree);var C=i._copyOut(u.ttree,0,m,u.ltree);b=(1<<C)-1;var I=i._copyOut(u.ttree,m,w,u.dtree);y=(1<<I)-1,f(u.ltree,C),l(u.ltree,C,d),f(u.dtree,I),l(u.dtree,I,A)}for(;;){var Q=d[c(e,F)&b];F+=15&Q;var M=Q>>>4;if(M>>>8==0)t[E++]=M;else{if(256==M)break;var x=E+M-254;if(M>264){var T=u.ldef[M-257];x=E+(T>>>3)+a(e,F,7&T),F+=7&T}var S=A[c(e,F)&y];F+=15&S;var R=S>>>4,O=u.ddef[R],P=(O>>>4)+o(e,F,15&O);for(F+=15&O,h&&(t=UZIP.F._check(t,E+(1<<17)));E<x;)t[E]=t[E++-P],t[E]=t[E++-P],t[E]=t[E++-P],t[E]=t[E++-P];E=x}}}else{0!=(7&F)&&(F+=8-(7&F));var H=4+(F>>>3),L=e[H-4]|e[H-3]<<8;h&&(t=UZIP.F._check(t,E+L)),t.set(new r(e.buffer,e.byteOffset+H,L),E),F=H+L<<3,E+=L}return t.length==E?t:t.slice(0,E)},UZIP.F._check=function(e,t){var r=e.length;if(t<=r)return e;var i=new Uint8Array(Math.max(r<<1,t));return i.set(e,0),i},UZIP.F._decodeTiny=function(e,t,r,i,o,a){for(var s=UZIP.F._bitsE,f=UZIP.F._get17,l=0;l<r;){var c=e[f(i,o)&t];o+=15&c;var u=c>>>4;if(u<=15)a[l]=u,l++;else{var h=0,d=0;16==u?(d=3+s(i,o,2),o+=2,h=a[l-1]):17==u?(d=3+s(i,o,3),o+=3):18==u&&(d=11+s(i,o,7),o+=7);for(var A=l+d;l<A;)a[l]=h,l++}}return o},UZIP.F._copyOut=function(e,t,r,i){for(var o=0,a=0,s=i.length>>>1;a<r;){var f=e[a+t];i[a<<1]=0,i[1+(a<<1)]=f,f>o&&(o=f),a++}for(;a<s;)i[a<<1]=0,i[1+(a<<1)]=0,a++;return o},UZIP.F.makeCodes=function(e,t){for(var r,i,o,a,s=UZIP.F.U,f=e.length,l=s.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<f;c+=2)l[e[c]]++;var u=s.next_code;for(r=0,l[0]=0,i=1;i<=t;i++)r=r+l[i-1]<<1,u[i]=r;for(o=0;o<f;o+=2)0!=(a=e[o+1])&&(e[o]=u[a],u[a]++)},UZIP.F.codes2map=function(e,t,r){for(var i=e.length,o=UZIP.F.U.rev15,a=0;a<i;a+=2)if(0!=e[a+1])for(var s=a>>1,f=e[a+1],l=s<<4|f,c=t-f,u=e[a]<<c,h=u+(1<<c);u!=h;){r[o[u]>>>15-t]=l,u++}},UZIP.F.revCodes=function(e,t){for(var r=UZIP.F.U.rev15,i=15-t,o=0;o<e.length;o+=2){var a=e[o]<<t-e[o+1];e[o]=r[a]>>>i}},UZIP.F._putsE=function(e,t,r){r<<=7&t;var i=t>>>3;e[i]|=r,e[i+1]|=r>>>8},UZIP.F._putsF=function(e,t,r){r<<=7&t;var i=t>>>3;e[i]|=r,e[i+1]|=r>>>8,e[i+2]|=r>>>16},UZIP.F._bitsE=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},UZIP.F._bitsF=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},UZIP.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP.F.U=(t=Uint16Array,r=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new r(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new r(286),dhst:new r(30),ihst:new r(19),lits:new r(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var e=UZIP.F.U,t=0;t<32768;t++){var r=t;r=(4278255360&(r=(4042322160&(r=(3435973836&(r=(2863311530&r)>>>1|(1431655765&r)<<1))>>>2|(858993459&r)<<2))>>>4|(252645135&r)<<4))>>>8|(16711935&r)<<8,e.rev15[t]=(r>>>16|r<<16)>>>17}function pushV(e,t,r){for(;0!=t--;)e.push(0,r)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];pushV(e.fltree,144,8),pushV(e.fltree,112,9),pushV(e.fltree,24,7),pushV(e.fltree,8,8),UZIP.F.makeCodes(e.fltree,9),UZIP.F.codes2map(e.fltree,9,e.flmap),UZIP.F.revCodes(e.fltree,9),pushV(e.fdtree,32,5),UZIP.F.makeCodes(e.fdtree,5),UZIP.F.codes2map(e.fdtree,5,e.fdmap),UZIP.F.revCodes(e.fdtree,5),pushV(e.itree,19,0),pushV(e.ltree,286,0),pushV(e.dtree,30,0),pushV(e.ttree,320,0)}()}({get exports(){return e},set exports(t){e=t}});var UZIP=_mergeNamespaces({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},readUint:(e,t)=>
vendor: 5,352 bytes, line 202
20216777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},readASCII(e,t,r){let i="";for(let o=0;o<r;o++)i+=String.fromCharCode(e[t+o]);return i},writeASCII(e,t,r){for(let i=0;i<r.length;i++)e[t+i]=r.charCodeAt(i)},readBytes(e,t,r){const i=[];for(let o=0;o<r;o++)i.push(e[t+o]);return i},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,r,i){let o,a="";for(let o=0;o<i;o++)a+=`%${e.pad(t[r+o].toString(16))}`;try{o=decodeURIComponent(a)}catch(o){return e.readASCII(t,r,i)}return o}};function decodeImage(t,r,i,o){const a=r*i,s=_getBPP(o),f=Math.ceil(r*s/8),l=new Uint8Array(4*a),c=new Uint32Array(l.buffer),{ctype:u}=o,{depth:h}=o,d=e.readUshort;if(6==u){const e=a<<2;if(8==h)for(var A=0;A<e;A+=4)l[A]=t[A],l[A+1]=t[A+1],l[A+2]=t[A+2],l[A+3]=t[A+3];if(16==h)for(A=0;A<e;A++)l[A]=t[A<<1]}else if(2==u){const e=o.tabs.tRNS;if(null==e){if(8==h)for(A=0;A<a;A++){var g=3*A;c[A]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==h)for(A=0;A<a;A++){g=6*A;c[A]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}}else{var p=e[0];const r=e[1],i=e[2];if(8==h)for(A=0;A<a;A++){var m=A<<2;g=3*A;c[A]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==p&&t[g+1]==r&&t[g+2]==i&&(l[m+3]=0)}if(16==h)for(A=0;A<a;A++){m=A<<2,g=6*A;c[A]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],d(t,g)==p&&d(t,g+2)==r&&d(t,g+4)==i&&(l[m+3]=0)}}}else if(3==u){const e=o.tabs.PLTE,s=o.tabs.tRNS,c=s?s.length:0;if(1==h)for(var w=0;w<i;w++){var v=w*f,b=w*r;for(A=0;A<r;A++){m=b+A<<2;var y=3*(E=t[v+(A>>3)]>>7-((7&A)<<0)&1);l[m]=e[y],l[m+1]=e[y+1],l[m+2]=e[y+2],l[m+3]=E<c?s[E]:255}}if(2==h)for(w=0;w<i;w++)for(v=w*f,b=w*r,A=0;A<r;A++){m=b+A<<2,y=3*(E=t[v+(A>>2)]>>6-((3&A)<<1)&3);l[m]=e[y],l[m+1]=e[y+1],l[m+2]=e[y+2],l[m+3]=E<c?s[E]:255}if(4==h)for(w=0;w<i;w++)for(v=w*f,b=w*r,A=0;A<r;A++){m=b+A<<2,y=3*(E=t[v+(A>>1)]>>4-((1&A)<<2)&15);l[m]=e[y],l[m+1]=e[y+1],l[m+2]=e[y+2],l[m+3]=E<c?s[E]:255}if(8==h)for(A=0;A<a;A++){var E;m=A<<2,y=3*(E=t[A]);l[m]=e[y],l[m+1]=e[y+1],l[m+2]=e[y+2],l[m+3]=E<c?s[E]:255}}else if(4==u){if(8==h)for(A=0;A<a;A++){m=A<<2;var F=t[_=A<<1];l[m]=F,l[m+1]=F,l[m+2]=F,l[m+3]=t[_+1]}if(16==h)for(A=0;A<a;A++){var _;m=A<<2,F=t[_=A<<2];l[m]=F,l[m+1]=F,l[m+2]=F,l[m+3]=t[_+2]}}else if(0==u)for(p=o.tabs.tRNS?o.tabs.tRNS:-1,w=0;w<i;w++){const e=w*f,i=w*r;if(1==h)for(var B=0;B<r;B++){var U=(F=255*(t[e+(B>>>3)]>>>7-(7&B)&1))==255*p?0:255;c[i+B]=U<<24|F<<16|F<<8|F}else if(2==h)for(B=0;B<r;B++){U=(F=85*(t[e+(B>>>2)]>>>6-((3&B)<<1)&3))==85*p?0:255;c[i+B]=U<<24|F<<16|F<<8|F}else if(4==h)for(B=0;B<r;B++){U=(F=17*(t[e+(B>>>1)]>>>4-((1&B)<<2)&15))==17*p?0:255;c[i+B]=U<<24|F<<16|F<<8|F}else if(8==h)for(B=0;B<r;B++){U=(F=t[e+B])==p?0:255;c[i+B]=U<<24|F<<16|F<<8|F}else if(16==h)for(B=0;B<r;B++){F=t[e+(B<<1)],U=d(t,e+(B<<1))==p?0:255;c[i+B]=U<<24|F<<16|F<<8|F}}return l}function _decompress(e,r,i,o){const a=_getBPP(e),s=Math.ceil(i*a/8),f=new Uint8Array((s+1+e.interlace)*o);return r=e.tabs.CgBI?t(r,f):_inflate(r,f),0==e.interlace?r=_filterZero(r,e,0,i,o):1==e.interlace&&(r=function _readInterlace(e,t){const r=t.width,i=t.height,o=_getBPP(t),a=o>>3,s=Math.ceil(r*o/8),f=new Uint8Array(i*s);let l=0;const c=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],d=[8,8,4,4,2,2,1];let A=0;for(;A<7;){const p=h[A],m=d[A];let w=0,v=0,b=c[A];for(;b<i;)b+=p,v++;let y=u[A];for(;y<r;)y+=m,w++;const E=Math.ceil(w*o/8);_filterZero(e,t,l,w,v);let F=0,_=c[A];for(;_<i;){let t=u[A],i=l+F*E<<3;for(;t<r;){var g;if(1==o)g=(g=e[i>>3])>>7-(7&i)&1,f[_*s+(t>>3)]|=g<<7-((7&t)<<0);if(2==o)g=(g=e[i>>3])>>6-(7&i)&3,f[_*s+(t>>2)]|=g<<6-((3&t)<<1);if(4==o)g=(g=e[i>>3])>>4-(7&i)&15,f[_*s+(t>>1)]|=g<<4-((1&t)<<2);if(o>=8){const r=_*s+t*a;for(let t=0;t<a;t++)f[r+t]=e[(i>>3)+t]}i+=o,t+=m}F++,_+=p}w*v!=0&&(l+=v*(1+E)),A+=1}return f}(r,e)),r}function _inflate(e,r){return t(new Uint8Array(e.buffer,2,e.length-6),r)}var t=function(){const e={H:{}};return e.H.N=function(t,r){const i=Uint8Array;let o,a,s=0,f=0,l=0,c=0,u=0,h=0,d=0,A=0,g=0;if(3==t[0]&&0==t[1])return r||new i(0);const p=e.H,m=p.b,w=p.e,v=p.R,b=p.n,y=p.A,E=p.Z,F=p.m,_=null==r;for(_&&(r=new i(t.length>>>2<<5));0==s;)if(s=m(t,g,1),f=m(t,g+1,2),g+=3,0!=f){if(_&&(r=e.H.W(r,A+(1<<17))),1==f&&(o=F.J,a=F.h,h=511,d=31),2==f){l=w(t,g,5)+257,c=w(t,g+5,5)+1,u=w(t,g+10,4)+4,g+=14;let e=1;for(var B=0;B<38;B+=2)F.Q[B]=0,F.Q[B+1]=0;for(B=0;B<u;B++){const r=w(t,g+3*B,3);F.Q[1+(F.X[B]<<1)]=r,r>e&&(e=r)}g+=3*u,b(F.Q,e),y(F.Q,e,F.u),o=F.w,a=F.d,g=v(F.u,(1<<e)-1,l+c,t,g,F.v);const r=p.V(F.v,0,l,F.C);h=(1<<r)-1;const i=p.V(F.v,l,c,F.D);d=(1<<i)-1,b(F.C,r),y(F.C,r,o),b(F.D,i),y(F.D,i,a)}for(;;){const e=o[E(t,g)&h];g+=15&e;const i=e>>>4;if(i>>>8==0)r[A++]=i;else{if(256==i)break;{let e=A+i-254;if(i>264){const r=F.q[i-257];e=A+(r>>>3)+w(t,g,7&r),g+=7&r}const o=a[E(t,g)&d];g+=15&o;const s=o>>>4,f=F.c[s],l=(f>>>4)+m(t,g,15&f);for(g+=15&f;A<e;)r[A]=r[A++-l],r[A]=r[A++-l],r[A]=r[A++-l],r[A]=r[A++-l];A=e}}}}else{0!=(7&g)&&(g+=8-(7&g));const o=4+(g>>>3),a=t[o-4]|t[o-3]<<8;_&&(r=e.H.W(r,A+a)),r.set(new i(t.buffer,t.byteOffset+o,a),A),g=o+a<<3,A+=a}return r.length==A?r:r.slice(0,A)},e.H.W=function(e,t){const r=e.length;if(t<=r)return e;const i=new Uint8Array(r<<1);return i.set(e,0),i},e.H.R=function(t,r,i,o,a,s){const f=e.H.e,l=e.H.Z;let c=0;for(;c<i;){const e=t[l(o,a)&r];a+=15&e;const i=e>>>4;if(i<=15)s[c]=i,c++;else{let e=0,t=0;16==i?(t=3+f(o,a,2),a+=2,e=s[c-1]):17==i?(t=3+f(o,a,3),a+=3):18==i&&(t=11+f(o,a,7),a+=7);const r=c+t;
vendor: 7,314 bytes, line 202
202for(;c<r;)s[c]=e,c++}}return a},e.H.V=function(e,t,r,i){let o=0,a=0;const s=i.length>>>1;for(;a<r;){const r=e[a+t];i[a<<1]=0,i[1+(a<<1)]=r,r>o&&(o=r),a++}for(;a<s;)i[a<<1]=0,i[1+(a<<1)]=0,a++;return o},e.H.n=function(t,r){const i=e.H.m,o=t.length;let a,s,f;let l;const c=i.j;for(var u=0;u<=r;u++)c[u]=0;for(u=1;u<o;u+=2)c[t[u]]++;const h=i.K;for(a=0,c[0]=0,s=1;s<=r;s++)a=a+c[s-1]<<1,h[s]=a;for(f=0;f<o;f+=2)l=t[f+1],0!=l&&(t[f]=h[l],h[l]++)},e.H.A=function(t,r,i){const o=t.length,a=e.H.m.r;for(let e=0;e<o;e+=2)if(0!=t[e+1]){const o=e>>1,s=t[e+1],f=o<<4|s,l=r-s;let c=t[e]<<l;const u=c+(1<<l);for(;c!=u;){i[a[c]>>>15-r]=f,c++}}},e.H.l=function(t,r){const i=e.H.m.r,o=15-r;for(let e=0;e<t.length;e+=2){const a=t[e]<<r-t[e+1];t[e]=i[a]>>>o}},e.H.M=function(e,t,r){r<<=7&t;const i=t>>>3;e[i]|=r,e[i+1]|=r>>>8},e.H.I=function(e,t,r){r<<=7&t;const i=t>>>3;e[i]|=r,e[i+1]|=r>>>8,e[i+2]|=r>>>16},e.H.e=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<r)-1},e.H.b=function(e,t,r){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<r)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var r=0;r<32768;r++){let e=r;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[r]=(e>>>16|e<<16)>>>17}function n(e,t,r){for(;0!=t--;)e.push(0,r)}for(r=0;r<32;r++)t.q[r]=t.S[r]<<3|t.T[r],t.c[r]=t.p[r]<<4|t.z[r];n(t._,144,8),n(t._,112,9),n(t._,24,7),n(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),n(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),n(t.Q,19,0),n(t.C,286,0),n(t.D,30,0),n(t.v,320,0)}(),e.H.N}();function _getBPP(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function _filterZero(e,t,r,i,o){let a=_getBPP(t);const s=Math.ceil(i*a/8);let f,l;a=Math.ceil(a/8);let c=e[r],u=0;if(c>1&&(e[r]=[0,0,1][c-2]),3==c)for(u=a;u<s;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let t=0;t<o;t++)if(f=r+t*s,l=f+t+1,c=e[l-1],u=0,0==c)for(;u<s;u++)e[f+u]=e[l+u];else if(1==c){for(;u<a;u++)e[f+u]=e[l+u];for(;u<s;u++)e[f+u]=e[l+u]+e[f+u-a]}else if(2==c)for(;u<s;u++)e[f+u]=e[l+u]+e[f+u-s];else if(3==c){for(;u<a;u++)e[f+u]=e[l+u]+(e[f+u-s]>>>1);for(;u<s;u++)e[f+u]=e[l+u]+(e[f+u-s]+e[f+u-a]>>>1)}else{for(;u<a;u++)e[f+u]=e[l+u]+_paeth(0,e[f+u-s],0);for(;u<s;u++)e[f+u]=e[l+u]+_paeth(e[f+u-a],e[f+u-s],e[f+u-a-s])}return e}function _paeth(e,t,r){const i=e+t-r,o=i-e,a=i-t,s=i-r;return o*o<=a*a&&o*o<=s*s?e:a*a<=s*s?t:r}function _IHDR(t,r,i){i.width=e.readUint(t,r),r+=4,i.height=e.readUint(t,r),r+=4,i.depth=t[r],r++,i.ctype=t[r],r++,i.compress=t[r],r++,i.filter=t[r],r++,i.interlace=t[r],r++}function _copyTile(e,t,r,i,o,a,s,f,l){const c=Math.min(t,o),u=Math.min(r,a);let h=0,d=0;for(let r=0;r<u;r++)for(let a=0;a<c;a++)if(s>=0&&f>=0?(h=r*t+a<<2,d=(f+r)*o+s+a<<2):(h=(-f+r)*t-s+a<<2,d=r*o+a<<2),0==l)i[d]=e[h],i[d+1]=e[h+1],i[d+2]=e[h+2],i[d+3]=e[h+3];else if(1==l){var A=e[h+3]*(1/255),g=e[h]*A,p=e[h+1]*A,m=e[h+2]*A,w=i[d+3]*(1/255),v=i[d]*w,b=i[d+1]*w,y=i[d+2]*w;const t=1-A,r=A+w*t,o=0==r?0:1/r;i[d+3]=255*r,i[d+0]=(g+v*t)*o,i[d+1]=(p+b*t)*o,i[d+2]=(m+y*t)*o}else if(2==l){A=e[h+3],g=e[h],p=e[h+1],m=e[h+2],w=i[d+3],v=i[d],b=i[d+1],y=i[d+2];A==w&&g==v&&p==b&&m==y?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=g,i[d+1]=p,i[d+2]=m,i[d+3]=A)}else if(3==l){A=e[h+3],g=e[h],p=e[h+1],m=e[h+2],w=i[d+3],v=i[d],b=i[d+1],y=i[d+2];if(A==w&&g==v&&p==b&&m==y)continue;if(A<220&&w>20)return!1}return!0}return{decode:function decode(r){const i=new Uint8Array(r);let o=8;const a=e,s=a.readUshort,f=a.readUint,l={tabs:{},frames:[]},c=new Uint8Array(i.length);let u,h=0,d=0;const A=[137,80,78,71,13,10,26,10];for(var g=0;g<8;g++)if(i[g]!=A[g])throw"The input is not a PNG file!";for(;o<i.length;){const e=a.readUint(i,o);o+=4;const r=a.readASCII(i,o,4);if(o+=4,"IHDR"==r)_IHDR(i,o,l);else if("iCCP"==r){for(var p=o;0!=i[p];)p++;a.readASCII(i,o,p-o),i[p+1];const s=i.slice(p+2,o+e);let f=null;try{f=_inflate(s)}catch(e){f=t(s)}l.tabs[r]=f}else if("CgBI"==r)l.tabs[r]=i.slice(o,o+4);else if("IDAT"==r){for(g=0;g<e;g++)c[h+g]=i[o+g];h+=e}else if("acTL"==r)l.tabs[r]={num_frames:f(i,o),num_plays:f(i,o+4)},u=new Uint8Array(i.length);else if("fcTL"==r){if(0!=d)(E=l.frames[l.frames.length-1]).data=_decompress(l,u.slice(0,d),E.rect.width,E.rect.height),d=0;const e={x:f(i,o+12),y:f(i,o+16),width:f(i,o+4),height:f(i,o+8)};let t=s(i,o+22);t=s(i,o+20)/(0==t?100:t);const r={rect:e,delay:Math.round(1e3*t),dispose:i[o+24],blend:i[o+25]};l.frames.push(r)}else if("fdAT"==r){for(g=0;g<e-4;g++)u[d+g]=i[o+g+4];d+=e-4}else if("pHYs"==r)l.tabs[r]=[a.readUint(i,o),a.readUint(i,o+4),i[o+8]];else if("cHRM"==r){l.tabs[r]=[];for(g=0;g<8;g++)l.tabs[r].push(a.readUint(i,o+4*g))}else if("tEXt"==r||"zTXt"==r){null==l.tabs[r]&&(l.tabs[r]={});var m=a.nextZero(i,o),w=a.readASCII(i,o,m-o),v=o+e-m-1;if("tEXt"==r)y=a.readASCII(i,m+1,v);else{var b=_inflate(i.slice(m+2,m+2+v));y=a.readUTF8(b,0,b.length)}l.tabs[r][w]=y}else if("iTXt"==r){null==l.tabs[r]&&(l.tabs[r]={});m=0,p=o;m=a.nextZero(i,p);w=a.readASCII(i,p,m-p);const t=i[p=m+1];var y;i[p+1],p+=2,m=a.nextZero(i,p),a.readASCII(i,p,m-p),p=m+1,m=a.nextZero(i,p),a.readUTF8(i,p,m-p);v=e-((p=m+1)-o);if(0==t)y=a.readUTF8(i,p,v);else{b=_inflate(i.slice(p,p+v));y=a.readUTF8(b,0,b.length)}l.tabs[r][w]=y}else if("PLTE"==r)l.tabs[r]=a.readBytes(i,o,e);else if("hIST"==r){const e=l.tabs.PLTE.length/3;l.tabs[r]=[];for(g=0;g<e;g++)l.tabs[r].push(s(i,o+2*g))}else if("tRNS"==r)3==l.ctype?l.tabs[r]=a.readBytes(i,o,e):0==l.ctype?l.tabs[r]=s(i,o):2==l.ctype&&(l.tabs[r]=[s(i,o),s(i,o+2),s(i,o+4)]);else if("gAMA"==r)l.tabs[r]=a.readUint(i,o)/1e5;else if("sRGB"==r)l.tabs[r]=i[o];else if("bKGD"==r)0==l.ctype||4==l.ctype?l.tabs[r]=[s(i,o)]:2==l.ctype||6==l.ctype?l.tabs[r]=[s(i,o),s(i,o+2),s(i,o+4)]:3==l.ctype&&(l.tabs[r]=i[o]);else if("IEND"==r)break;o+=e,a.readUint(i,o),o+=4}var E;return 0!=d&&((E=l.frames[l.frames.length-1]).data=_decompress(l,u.slice(0,d),E.rect.width,E.rect.height)),l.data=_decompress(l,c,l.width,l.height),delete l.compress,delete l.interlace,delete l.filter,l},toRGBA8:function toRGBA8(e){const t=e.width,r=e.height;if(null==e.tabs.acTL)return[decodeImage(e.data,t,r,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const o=t*r*4,a=new Uint8Array(o),s=new Uint8Array(o),f=new Uint8Array(o);for(let c=0;c<e.frames.length;c++){const u=e.frames[c],h=u.rect.x,d=u.rect.y,A=u.rect.width,g=u.rect.height,p=decodeImage(u.data,A,g,e);if(0!=c)for(var l=0;l<o;l++)f[l]=a[l];
vendor: 9,119 bytes, line 202
202if(0==u.blend?_copyTile(p,A,g,a,t,r,h,d,0):1==u.blend&&_copyTile(p,A,g,a,t,r,h,d,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)_copyTile(s,A,g,a,t,r,h,d,0);else if(2==u.dispose)for(l=0;l<o;l++)a[l]=f[l]}return i},_paeth:_paeth,_copyTile:_copyTile,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,r=UPNG._paeth;var i={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let e=0;e<8;e++)1&r?r=3988292384^r>>>1:r>>>=1;e[t]=r}return e}(),update(e,t,r,o){for(let a=0;a<o;a++)e=i.table[255&(e^t[r+a])]^e>>>8;return e},crc:(e,t,r)=>4294967295^i.update(4294967295,e,t,r)};function addErr(e,t,r,i){t[r]+=e[0]*i>>4,t[r+1]+=e[1]*i>>4,t[r+2]+=e[2]*i>>4,t[r+3]+=e[3]*i>>4}function N(e){return Math.max(0,Math.min(255,e))}function D(e,t){const r=e[0]-t[0],i=e[1]-t[1],o=e[2]-t[2],a=e[3]-t[3];return r*r+i*i+o*o+a*a}function dither(e,t,r,i,o,a,s){null==s&&(s=1);const f=i.length,l=[];for(var c=0;c<f;c++){const e=i[c];l.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(c=0;c<f;c++){let e=4294967295;for(var u=0,h=0;h<f;h++){var d=D(l[c],l[h]);h!=c&&d<e&&(e=d,u=h)}}const A=new Uint32Array(o.buffer),g=new Int16Array(t*r*4),p=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(c=0;c<p.length;c++)p[c]=255*((p[c]+.5)/16-.5);for(let o=0;o<r;o++)for(let w=0;w<t;w++){var m;c=4*(o*t+w);if(2!=s)m=[N(e[c]+g[c]),N(e[c+1]+g[c+1]),N(e[c+2]+g[c+2]),N(e[c+3]+g[c+3])];else{d=p[4*(3&o)+(3&w)];m=[N(e[c]+d),N(e[c+1]+d),N(e[c+2]+d),N(e[c+3]+d)]}u=0;let v=16777215;for(h=0;h<f;h++){const e=D(m,l[h]);e<v&&(v=e,u=h)}const b=l[u],y=[m[0]-b[0],m[1]-b[1],m[2]-b[2],m[3]-b[3]];1==s&&(w!=t-1&&addErr(y,g,c+4,7),o!=r-1&&(0!=w&&addErr(y,g,c+4*t-4,3),addErr(y,g,c+4*t,5),w!=t-1&&addErr(y,g,c+4*t+4,1))),a[c>>2]=u,A[c>>2]=i[u]}}function _main(e,r,o,a,s){null==s&&(s={});const{crc:f}=i,l=t.writeUint,c=t.writeUshort,u=t.writeASCII;let h=8;const d=e.frames.length>1;let A,g=!1,p=33+(d?20:0);if(null!=s.sRGB&&(p+=13),null!=s.pHYs&&(p+=21),null!=s.iCCP&&(A=pako.deflate(s.iCCP),p+=21+A.length+4),3==e.ctype){for(var m=e.plte.length,w=0;w<m;w++)e.plte[w]>>>24!=255&&(g=!0);p+=8+3*m+4+(g?8+1*m+4:0)}for(var v=0;v<e.frames.length;v++){d&&(p+=38),p+=(F=e.frames[v]).cimg.length+12,0!=v&&(p+=4)}p+=12;const b=new Uint8Array(p),y=[137,80,78,71,13,10,26,10];for(w=0;w<8;w++)b[w]=y[w];if(l(b,h,13),h+=4,u(b,h,"IHDR"),h+=4,l(b,h,r),h+=4,l(b,h,o),h+=4,b[h]=e.depth,h++,b[h]=e.ctype,h++,b[h]=0,h++,b[h]=0,h++,b[h]=0,h++,l(b,h,f(b,h-17,17)),h+=4,null!=s.sRGB&&(l(b,h,1),h+=4,u(b,h,"sRGB"),h+=4,b[h]=s.sRGB,h++,l(b,h,f(b,h-5,5)),h+=4),null!=s.iCCP){const e=13+A.length;l(b,h,e),h+=4,u(b,h,"iCCP"),h+=4,u(b,h,"ICC profile"),h+=11,h+=2,b.set(A,h),h+=A.length,l(b,h,f(b,h-(e+4),e+4)),h+=4}if(null!=s.pHYs&&(l(b,h,9),h+=4,u(b,h,"pHYs"),h+=4,l(b,h,s.pHYs[0]),h+=4,l(b,h,s.pHYs[1]),h+=4,b[h]=s.pHYs[2],h++,l(b,h,f(b,h-13,13)),h+=4),d&&(l(b,h,8),h+=4,u(b,h,"acTL"),h+=4,l(b,h,e.frames.length),h+=4,l(b,h,null!=s.loop?s.loop:0),h+=4,l(b,h,f(b,h-12,12)),h+=4),3==e.ctype){l(b,h,3*(m=e.plte.length)),h+=4,u(b,h,"PLTE"),h+=4;for(w=0;w<m;w++){const t=3*w,r=e.plte[w],i=255&r,o=r>>>8&255,a=r>>>16&255;b[h+t+0]=i,b[h+t+1]=o,b[h+t+2]=a}if(h+=3*m,l(b,h,f(b,h-3*m-4,3*m+4)),h+=4,g){l(b,h,m),h+=4,u(b,h,"tRNS"),h+=4;for(w=0;w<m;w++)b[h+w]=e.plte[w]>>>24&255;h+=m,l(b,h,f(b,h-m-4,m+4)),h+=4}}let E=0;for(v=0;v<e.frames.length;v++){var F=e.frames[v];d&&(l(b,h,26),h+=4,u(b,h,"fcTL"),h+=4,l(b,h,E++),h+=4,l(b,h,F.rect.width),h+=4,l(b,h,F.rect.height),h+=4,l(b,h,F.rect.x),h+=4,l(b,h,F.rect.y),h+=4,c(b,h,a[v]),h+=2,c(b,h,1e3),h+=2,b[h]=F.dispose,h++,b[h]=F.blend,h++,l(b,h,f(b,h-30,30)),h+=4);const t=F.cimg;l(b,h,(m=t.length)+(0==v?0:4)),h+=4;const r=h;u(b,h,0==v?"IDAT":"fdAT"),h+=4,0!=v&&(l(b,h,E++),h+=4),b.set(t,h),h+=m,l(b,h,f(b,r,h-r)),h+=4}return l(b,h,0),h+=4,u(b,h,"IEND"),h+=4,l(b,h,f(b,h-4,4)),h+=4,b.buffer}function compressPNG(e,t,r){for(let i=0;i<e.frames.length;i++){const o=e.frames[i];o.rect.width;const a=o.rect.height,s=new Uint8Array(a*o.bpl+a);o.cimg=_filterZero(o.img,a,o.bpp,o.bpl,s,t,r)}}function compress(t,r,i,o,a){const s=a[0],f=a[1],l=a[2],c=a[3],u=a[4],h=a[5];let d=6,A=8,g=255;for(var p=0;p<t.length;p++){const e=new Uint8Array(t[p]);for(var m=e.length,w=0;w<m;w+=4)g&=e[w+3]}const v=255!=g,b=function framize(t,r,i,o,a,s){const f=[];for(var l=0;l<t.length;l++){const h=new Uint8Array(t[l]),A=new Uint32Array(h.buffer);var c;let g=0,p=0,m=r,w=i,v=o?1:0;if(0!=l){const b=s||o||1==l||0!=f[l-2].dispose?1:2;let y=0,E=1e9;for(let e=0;e<b;e++){var u=new Uint8Array(t[l-1-e]);const o=new Uint32Array(t[l-1-e]);let s=r,f=i,c=-1,h=-1;for(let e=0;e<i;e++)for(let t=0;t<r;t++){A[d=e*r+t]!=o[d]&&(t<s&&(s=t),t>c&&(c=t),e<f&&(f=e),e>h&&(h=e))}-1==c&&(s=f=c=h=0),a&&(1==(1&s)&&s--,1==(1&f)&&f--);const v=(c-s+1)*(h-f+1);v<E&&(E=v,y=e,g=s,p=f,m=c-s+1,w=h-f+1)}u=new Uint8Array(t[l-1-y]);1==y&&(f[l-1].dispose=2),c=new Uint8Array(m*w*4),e(u,r,i,c,m,w,-g,-p,0),v=e(h,r,i,c,m,w,-g,-p,3)?1:0,1==v?_prepareDiff(h,r,i,c,{x:g,y:p,width:m,height:w}):e(h,r,i,c,m,w,-g,-p,0)}else c=h.slice(0);f.push({rect:{x:g,y:p,width:m,height:w},img:c,blend:v,dispose:0})}if(o)for(l=0;l<f.length;l++){if(1==(A=f[l]).blend)continue;const e=A.rect,o=f[l-1].rect,s=Math.min(e.x,o.x),c=Math.min(e.y,o.y),u={x:s,y:c,width:Math.max(e.x+e.width,o.x+o.width)-s,height:Math.max(e.y+e.height,o.y+o.height)-c};f[l-1].dispose=1,l-1!=0&&_updateFrame(t,r,i,f,l-1,u,a),_updateFrame(t,r,i,f,l,u,a)}let h=0;if(1!=t.length)for(var d=0;d<f.length;d++){var A;h+=(A=f[d]).rect.width*A.rect.height}return f}(t,r,i,s,f,l),y={},E=[],F=[];if(0!=o){const e=[];for(w=0;w<b.length;w++)e.push(b[w].img.buffer);const t=function concatRGBA(e){let t=0;for(var r=0;r<e.length;r++)t+=e[r].byteLength;const i=new Uint8Array(t);let o=0;for(r=0;r<e.length;r++){const t=new Uint8Array(e[r]),a=t.length;for(let e=0;e<a;e+=4){let r=t[e],a=t[e+1],s=t[e+2];const f=t[e+3];0==f&&(r=a=s=0),i[o+e]=r,i[o+e+1]=a,i[o+e+2]=s,i[o+e+3]=f}o+=a}return i.buffer}(e),r=quantize(t,o);for(w=0;w<r.plte.length;w++)E.push(r.plte[w].est.rgba);let i=0;for(w=0;w<b.length;w++){const e=(B=b[w]).img.length;var _=new Uint8Array(r.inds.buffer,i>>2,e>>2);F.push(_);const t=new Uint8Array(r.abuf,i,e);h&&dither(B.img,B.rect.width,B.rect.height,E,t,_),B.img.set(t),i+=e}}else for(p=0;p<b.length;p++){var B=b[p];const e=new Uint32Array(B.img.buffer);var U=B.rect.width;m=e.length,_=new Uint8Array(m);F.push(_);for(w=0;w<m;w++){const t=e[w];if(0!=w&&t==e[w-1])_[w]=_[w-1];else if(w>U&&t==e[w-U])_[w]=_[w-U];else{let e=y[t];if(null==e&&(y[t]=e=E.length,E.push(t),E.length>=300))break;_[w]=e}}}const C=E.length;C<=256&&0==u&&(A=C<=2?1:C<=4?2:C<=16?4:8,A=Math.max(A,c));for(p=0;p<b.length;p++){(B=b[p]).rect.x,B.rect.y;U=B.rect.width;const e=B.rect.height;let t=B.img;new Uint32Array(t.buffer);let r=4*U,i=4;if(C<=256&&0==u){r=Math.ceil(A*U/8);var I=new Uint8Array(r*e);const o=F[p];for(let t=0;t<e;t++){w=t*r;const e=t*U;if(8==A)for(var Q=0;Q<U;Q++)I[w+Q]=o[e+Q];else if(4==A)for(Q=0;Q<U;Q++)I[w+(Q>>1)]|=o[e+Q]<<4-4*(1&Q);else if(2==A)for(Q=0;Q<U;Q++)I[w+(Q>>2)]|=o[e+Q]<<6-2*(3&Q);else if(1==A)for(Q=0;Q<U;Q++)I[w+(Q>>3)]|=o[e+Q]<<7-1*(7&Q)}t=I,d=3,i=1}else if(0==v&&1==b.length){I=new Uint8Array(U*e*3);const o=U*e;for(w=0;w<o;w++){const e=3*w,r=4*w;I[e]=t[r],I[e+1]=t[r+1],I[e+2]=t[r+2]}t=I,d=2,i=3,r=3*U}B.img=t,B.bpl=r,B.bpp=i}return{ctype:d,depth:A,plte:E,frames:b}}function _updateFrame(t,r,i,o,a,s,f){const l=Uint8Array,c=Uint32Array,u=new l(t[a-1]),h=new c(t[a-1]),d=a+1<t.length?new l(t[a+1]):null,A=new l(t[a]),g=new c(A.buffer);let p=r,m=i,w=-1,v=-1;for(let e=0;e<s.height;e++)for(let t=0;t<s.width;t++){const i=s.x+t,f=s.y+e,l=f*r+i,c=g[l];0==c||0==o[a-1].dispose&&h[l]==c&&(null==d||0!=d[4*l+3])||(i<p&&(p=i),i>w&&(w=i),f<m&&(m=f),f>v&&(v=f))}-1==w&&(p=m=w=v=0),f&&(1==(1&p)&&p--,1==(1&m)&&m--),s={x:p,y:m,width:w-p+1,height:v-m+1};const b=o[a];b.rect=s,b.blend=1,b.img=new Uint8Array(s.width*s.height*4),0==o[a-1].dispose?(e(u,r,i,b.img,s.width,s.height,-s.x,-s.y,0),_prepareDiff(A,r,i,b.img,s)):e(A,r,i,b.img,s.width,s.height,-s.x,-s.y,0)}function _prepareDiff(t,r,i,o,a){e(t,r,i,o,a.width,a.height,-a.x,-a.y,2)}function _filterZero(e,t,r,i,o,a,s){const f=[];let l,c=[0,1,2,3,4];-1!=a?c=[a]:(t*i>5e5||1==r)&&(c=[0]),s&&(l={level:0});const u=UZIP;for(var h=0;h<c.length;h++){for(let a=0;a<t;a++)_filterLine(o,e,a,i,r,c[h]);f.push(u.deflate(o,l))}let d,A=1e9;for(h=0;h<f.length;h++)f[h].length<A&&(d=h,A=f[h].length);return f[d]}function _filterLine(e,t,i,o,a,s){const f=i*o;let l=f+i;if(e[l]=s,l++,0==s)if(o<500)for(var c=0;c<o;c++)e[l+c]=t[f+c];else e.set(new Uint8Array(t.buffer,f,o),l);else if(1==s){for(c=0;c<a;c++)e[l+c]=t[f+c];for(c=a;c<o;c++)e[l+c]=t[f+c]-t[f+c-a]+256&255}else if(0==i){for(c=0;c<a;c++)e[l+c]=t[f+c];if(2==s)for(c=a;c<o;c++)e[l+c]=t[f+c];if(3==s)for(c=a;c<o;c++)e[l+c]=t[f+c]-(t[f+c-a]>>1)+256&255;if(4==s)for(c=a;c<o;c++)e[l+c]=t[f+c]-r(t[f+c-a],0,0)+256&255}else{if(2==s)for(c=0;c<o;c++)e[l+c]=t[f+c]+256-t[f+c-o]&255;if(3==s){for(c=0;c<a;c++)e[l+c]=t[f+c]+256-(t[f+c-o]>>1)&255;for(c=a;c<o;c++)e[l+c]=t[f+c]+256-(t[f+c-o]+t[f+c-a]>>1)&255}if(4==s){for(c=0;c<a;c++)e[l+c]=t[f+c]+256-r(0,t[f+c-o],0)&255;for(c=a;c<o;c++)e[l+c]=t[f+c]+256-r(t[f+c-a],t[f+c-o],t[f+c-a-o])&255}}}
vendor: 18,213 bytes, line 202
202function quantize(e,t){const r=new Uint8Array(e),i=r.slice(0),o=new Uint32Array(i.buffer),a=getKDtree(i,t),s=a[0],f=a[1],l=r.length,c=new Uint8Array(l>>2);let u;if(r.length<2e7)for(var h=0;h<l;h+=4){u=getNearest(s,d=r[h]*(1/255),A=r[h+1]*(1/255),g=r[h+2]*(1/255),p=r[h+3]*(1/255)),c[h>>2]=u.ind,o[h>>2]=u.est.rgba}else for(h=0;h<l;h+=4){var d=r[h]*(1/255),A=r[h+1]*(1/255),g=r[h+2]*(1/255),p=r[h+3]*(1/255);for(u=s;u.left;)u=planeDst(u.est,d,A,g,p)<=0?u.left:u.right;c[h>>2]=u.ind,o[h>>2]=u.est.rgba}return{abuf:i.buffer,inds:c,plte:f}}function getKDtree(e,t,r){null==r&&(r=1e-4);const i=new Uint32Array(e.buffer),o={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};o.bst=stats(e,o.i0,o.i1),o.est=estats(o.bst);const a=[o];for(;a.length<t;){let t=0,o=0;for(var s=0;s<a.length;s++)a[s].est.L>t&&(t=a[s].est.L,o=s);if(t<r)break;const f=a[o],l=splitPixels(e,i,f.i0,f.i1,f.est.e,f.est.eMq255);if(f.i0>=l||f.i1<=l){f.est.L=0;continue}const c={i0:f.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=stats(e,c.i0,c.i1),c.est=estats(c.bst);const u={i0:l,i1:f.i1,bst:null,est:null,tdst:0,left:null,right:null};u.bst={R:[],m:[],N:f.bst.N-c.bst.N};for(s=0;s<16;s++)u.bst.R[s]=f.bst.R[s]-c.bst.R[s];for(s=0;s<4;s++)u.bst.m[s]=f.bst.m[s]-c.bst.m[s];u.est=estats(u.bst),f.left=c,f.right=u,a[o]=c,a.push(u)}a.sort(((e,t)=>t.bst.N-e.bst.N));for(s=0;s<a.length;s++)a[s].ind=s;return[o,a]}function getNearest(e,t,r,i,o){if(null==e.left)return e.tdst=function dist(e,t,r,i,o){const a=t-e[0],s=r-e[1],f=i-e[2],l=o-e[3];return a*a+s*s+f*f+l*l}(e.est.q,t,r,i,o),e;const a=planeDst(e.est,t,r,i,o);let s=e.left,f=e.right;a>0&&(s=e.right,f=e.left);const l=getNearest(s,t,r,i,o);if(l.tdst<=a*a)return l;const c=getNearest(f,t,r,i,o);return c.tdst<l.tdst?c:l}function planeDst(e,t,r,i,o){const{e:a}=e;return a[0]*t+a[1]*r+a[2]*i+a[3]*o-e.eMq}function splitPixels(e,t,r,i,o,a){for(i-=4;r<i;){for(;vecDot(e,r,o)<=a;)r+=4;for(;vecDot(e,i,o)>a;)i-=4;if(r>=i)break;const s=t[r>>2];t[r>>2]=t[i>>2],t[i>>2]=s,r+=4,i-=4}for(;vecDot(e,r,o)>a;)r-=4;return r+4}function vecDot(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]+e[t+3]*r[3]}function stats(e,t,r){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=[0,0,0,0],a=r-t>>2;for(let a=t;a<r;a+=4){const t=e[a]*(1/255),r=e[a+1]*(1/255),s=e[a+2]*(1/255),f=e[a+3]*(1/255);o[0]+=t,o[1]+=r,o[2]+=s,o[3]+=f,i[0]+=t*t,i[1]+=t*r,i[2]+=t*s,i[3]+=t*f,i[5]+=r*r,i[6]+=r*s,i[7]+=r*f,i[10]+=s*s,i[11]+=s*f,i[15]+=f*f}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:o,N:a}}function estats(e){const{R:t}=e,{m:r}=e,{N:i}=e,a=r[0],s=r[1],f=r[2],l=r[3],c=0==i?0:1/i,u=[t[0]-a*a*c,t[1]-a*s*c,t[2]-a*f*c,t[3]-a*l*c,t[4]-s*a*c,t[5]-s*s*c,t[6]-s*f*c,t[7]-s*l*c,t[8]-f*a*c,t[9]-f*s*c,t[10]-f*f*c,t[11]-f*l*c,t[12]-l*a*c,t[13]-l*s*c,t[14]-l*f*c,t[15]-l*l*c],h=u,d=o;let A=[Math.random(),Math.random(),Math.random(),Math.random()],g=0,p=0;if(0!=i)for(let e=0;e<16&&(A=d.multVec(h,A),p=Math.sqrt(d.dot(A,A)),A=d.sml(1/p,A),!(0!=e&&Math.abs(p-g)<1e-9));e++)g=p;const m=[a*c,s*c,f*c,l*c];return{Cov:u,q:m,e:A,L:g,eMq255:d.dot(d.sml(255,m),A),eMq:d.dot(A,m),rgba:(Math.round(255*m[3])<<24|Math.round(255*m[2])<<16|Math.round(255*m[1])<<8|Math.round(255*m[0])<<0)>>>0}}var o={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function encode(e,t,r,i,o,a,s){null==i&&(i=0),null==s&&(s=!1);const f=compress(e,t,r,i,[!1,!1,!1,0,s,!1]);return compressPNG(f,-1),_main(f,t,r,o,a)},UPNG.encodeLL=function encodeLL(e,t,r,i,o,a,s,f){const l={ctype:0+(1==i?0:2)+(0==o?0:4),depth:a,frames:[]},c=(i+o)*a,u=c*t;for(let i=0;i<e.length;i++)l.frames.push({rect:{x:0,y:0,width:t,height:r},img:new Uint8Array(e[i]),blend:0,dispose:1,bpp:Math.ceil(c/8),bpl:Math.ceil(u/8)});return compressPNG(l,0,!0),_main(l,t,r,s,f)},UPNG.encode.compress=compress,UPNG.encode.dither=dither,UPNG.quantize=quantize,UPNG.quantize.getKDtree=getKDtree,UPNG.quantize.getNearest=getNearest}();const t={toArrayBuffer(e,r){const i=e.width,o=e.height,a=i<<2,s=e.getContext("2d").getImageData(0,0,i,o),f=new Uint32Array(s.data.buffer),l=(32*i+31)/32<<2,c=l*o,u=122+c,h=new ArrayBuffer(u),d=new DataView(h),A=1<<20;let g,p,m,w,v=A,b=0,y=0,E=0;function set16(e){d.setUint16(y,e,!0),y+=2}function set32(e){d.setUint32(y,e,!0),y+=4}function seek(e){y+=e}set16(19778),set32(u),seek(4),set32(122),set32(108),set32(i),set32(-o>>>0),set16(1),set16(32),set32(3),set32(c),set32(2835),set32(2835),seek(8),set32(16711680),set32(65280),set32(255),set32(4278190080),set32(1466527264),function convert(){for(;b<o&&v>0;){for(w=122+b*l,g=0;g<a;)v--,p=f[E++],m=p>>>24,d.setUint32(w+g,p<<8|m),g+=4;b++}E<f.length?(v=A,setTimeout(convert,t._dly)):r(h)}()},toBlob(e,t){this.toArrayBuffer(e,(e=>{t(new Blob([e],{type:"image/bmp"}))}))},_dly:9};var r={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},i={[r.CHROME]:16384,[r.FIREFOX]:11180,[r.DESKTOP_SAFARI]:16384,[r.IE]:8192,[r.IOS]:4096,[r.ETC]:8192};const o="undefined"!=typeof window,a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,s=o&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(o||a)&&(s&&s.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(o||a)&&(s&&s.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,r=Date.now()){return new Promise((i=>{const o=e.split(","),a=o[0].match(/:(.*?);/)[1],s=globalThis.atob(o[1]);let f=s.length;const l=new Uint8Array(f);for(;f--;)l[f]=s.charCodeAt(f);const c=new Blob([l],{type:a});c.name=t,c.lastModified=r,i(c)}))}function getDataUrlFromFile(e){return new Promise(((t,r)=>{const i=new CustomFileReader;i.onload=()=>t(i.result),i.onerror=e=>r(e),i.readAsDataURL(e)}))}function loadImage(e){return new Promise(((t,r)=>{const i=new Image;i.onload=()=>t(i),i.onerror=e=>r(e),i.src=e}))}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=r.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=r.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=r.IOS:/Safari/i.test(t)?e=r.DESKTOP_SAFARI:/Firefox/i.test(t)?e=r.FIREFOX:(/MSIE/i.test(t)||!0==!!document.documentMode)&&(e=r.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const r=getBrowserName(),o=i[r];let a=e,s=t,f=a*s;const l=a>s?s/a:a/s;for(;f>o*o;){const e=(o+a)/2,t=(o+s)/2;e<t?(s=t,a=t*l):(s=e*l,a=e),f=a*s}return{width:a,height:s}}function getNewCanvasAndCtx(e,t){let r,i;try{if(r=new OffscreenCanvas(e,t),i=r.getContext("2d"),null===i)throw new Error("getContext of OffscreenCanvas returns null")}catch(e){r=document.createElement("canvas"),i=r.getContext("2d")}return r.width=e,r.height=t,[r,i]}function drawImageInCanvas(e,t){const{width:r,height:i}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[o,a]=getNewCanvasAndCtx(r,i);return t&&/jpe?g/.test(t)&&(a.fillStyle="white",a.fillRect(0,0,o.width,o.height)),a.drawImage(e,0,0,o.width,o.height),o}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise((function(i,o){let a,s;var $Try_2_Post=function(){try{return s=drawImageInCanvas(a,t.fileType||e.type),i([a,s])}catch(e){return o(e)}},$Try_2_Catch=function(t){try{0;var $Try_3_Catch=function(e){try{throw e}catch(e){return o(e)}};try{let t;return getDataUrlFromFile(e).then((function(e){try{return t=e,loadImage(t).then((function(e){try{return a=e,function(){try{return $Try_2_Post()}catch(e){return o(e)}}()}catch(e){return $Try_3_Catch(e)}}),$Try_3_Catch)}catch(e){return $Try_3_Catch(e)}}),$Try_3_Catch)}catch(e){$Try_3_Catch(e)}}catch(e){return o(e)}};try{if(isIOS()||[r.DESKTOP_SAFARI,r.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then((function(e){try{return a=e,$Try_2_Post()}catch(e){return $Try_2_Catch()}}),$Try_2_Catch)}catch(e){$Try_2_Catch()}}))}function canvasToFile(e,r,i,o,a=1){return new Promise((function(s,f){let l;if("image/png"===r){let c,u,h;return c=e.getContext("2d"),({data:u}=c.getImageData(0,0,e.width,e.height)),h=UPNG.encode([u.buffer],e.width,e.height,4096*a),l=new Blob([h],{type:r}),l.name=i,l.lastModified=o,$If_4.call(this)}{if("image/bmp"===r)return new Promise((r=>t.toBlob(e,r))).then(function(e){try{return l=e,l.name=i,l.lastModified=o,$If_5.call(this)}catch(e){return f(e)}}.bind(this),f);{if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:r,quality:a}).then(function(e){try{return l=e,l.name=i,l.lastModified=o,$If_6.call(this)}catch(e){return f(e)}}.bind(this),f);{let d;return d=e.toDataURL(r,a),getFilefromDataUrl(d,i,o).then(function(e){try{return l=e,$If_6.call(this)}catch(e){return f(e)}}.bind(this),f)}function $If_6(){return $If_5.call(this)}}function $If_5(){return $If_4.call(this)}}function $If_4(){return s(l)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,t){let r,i,o,a,s;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):(r="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==",getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(r){try{return i=r,drawFileInCanvas(i).then((function(r){try{return o=r[1],canvasToFile(o,i.type,i.name,i.lastModified).then((function(r){try{return a=r,cleanupCanvasMemory(o),drawFileInCanvas(a).then((function(r){try{return s=r[0],isAutoOrientationInBrowser.cachedResult=1===s.width&&2===s.height,e(isAutoOrientationInBrowser.cachedResult)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t))}))}function getExifOrientation(e){return new Promise(((t,r)=>{const i=new CustomFileReader;i.onload=e=>{const r=new DataView(e.target.result);if(65496!=r.getUint16(0,!1))return t(-2);const i=r.byteLength;let o=2;for(;o<i;){if(r.getUint16(o+2,!1)<=8)return t(-1);const e=r.getUint16(o,!1);if(o+=2,65505==e){if(1165519206!=r.getUint32(o+=2,!1))return t(-1);const e=18761==r.getUint16(o+=6,!1);o+=r.getUint32(o+4,e);const i=r.getUint16(o,e);o+=2;for(let a=0;a<i;a++)if(274==r.getUint16(o+12*a,e))return t(r.getUint16(o+12*a+8,e))}else{if(65280!=(65280&e))break;o+=r.getUint16(o,!1)}}return t(-1)},i.onerror=e=>r(e),i.readAsArrayBuffer(e)}))}function handleMaxWidthOrHeight(e,t){const{width:r}=e,{height:i}=e,{maxWidthOrHeight:o}=t;let a,s=e;return isFinite(o)&&(r>o||i>o)&&([s,a]=getNewCanvasAndCtx(r,i),r>i?(s.width=o,s.height=i/r*o):(s.width=r/i*o,s.height=o),a.drawImage(e,0,0,s.width,s.height),cleanupCanvasMemory(e)),s}function followExifOrientation(e,t){const{width:r}=e,{height:i}=e,[o,a]=getNewCanvasAndCtx(r,i);switch(t>4&&t<9?(o.width=i,o.height=r):(o.width=r,o.height=i),t){case 2:a.transform(-1,0,0,1,r,0);break;case 3:a.transform(-1,0,0,-1,r,i);break;case 4:a.transform(1,0,0,-1,0,i);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,i,0);break;case 7:a.transform(0,-1,-1,0,i,r);break;case 8:a.transform(0,-1,1,0,0,r)}return a.drawImage(e,0,0,r,i),cleanupCanvasMemory(e),o}function compress(e,t,r=0){return new Promise((function(i,o){let a,s,f,l,c,u,h,d,A,g,p,m,w,v,b,y,E,F,_,B;function incProgress(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;a+=e,t.onProgress(Math.min(a,100))}function setProgress(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;a=Math.min(Math.max(e,a),100),t.onProgress(a)}return a=r,s=t.maxIteration||10,f=1024*t.maxSizeMB*1024,incProgress(),drawFileInCanvas(e,t).then(function(r){try{return[,l]=r,incProgress(),c=handleMaxWidthOrHeight(l,t),incProgress(),new Promise((function(r,i){var o;if(!(o=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return o=e,$If_2.call(this)}catch(e){return i(e)}}.bind(this),i);function $If_2(){return r(o)}return $If_2.call(this)})).then(function(r){try{return u=r,incProgress(),isAutoOrientationInBrowser().then(function(r){try{return h=r?c:followExifOrientation(c,u),incProgress(),d=t.initialQuality||1,A=t.fileType||e.type,canvasToFile(h,A,e.name,e.lastModified,d).then(function(r){try{{if(g=r,incProgress(),p=g.size>f,m=g.size>e.size,!p&&!m)return setProgress(100),i(g);var a;function $Loop_3(){if(s--&&(b>f||b>w)){let t,r;return t=B?.95*_.width:_.width,r=B?.95*_.height:_.height,[E,F]=getNewCanvasAndCtx(t,r),F.drawImage(_,0,0,t,r),d*="image/png"===A?.85:.95,canvasToFile(E,A,e.name,e.lastModified,d).then((function(e){try{return y=e,cleanupCanvasMemory(_),_=E,b=y.size,setProgress(Math.min(99,Math.floor((v-b)/(v-f)*100))),$Loop_3}catch(e){return o(e)}}),o)}return[1]}return w=e.size,v=g.size,b=v,_=h,B=!t.alwaysKeepResolution&&p,(a=function(e){for(;e;){if(e.then)return void e.then(a,o);try{if(e.pop){if(e.length)return e.pop()?$Loop_3_exit.call(this):e;e=$Loop_3}else e=e.call(this)}catch(e){return o(e)}}}.bind(this))($Loop_3);function $Loop_3_exit(){return cleanupCanvasMemory(_),cleanupCanvasMemory(E),cleanupCanvasMemory(c),cleanupCanvasMemory(h),cleanupCanvasMemory(l),setProgress(100),i(y)}}}catch(u){return o(u)}}.bind(this),o)}catch(e){return o(e)}}.bind(this),o)}catch(e){return o(e)}}.bind(this),o)}catch(e){return o(e)}}.bind(this),o)}))}const f="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let l;function compressOnWebWorker(e,t){return new Promise(((r,i)=>{l||(l=function createWorkerScriptURL(e){const t=[];return"function"==typeof e?t.push(`(${e})()`):t.push(e),URL.createObjectURL(new Blob(t))}(f));const o=new Worker(l);o.addEventListener("message",(function handler(e){if(t.signal&&t.signal.aborted)o.terminate();else if(void 0===e.data.progress){if(e.data.error)return i(new Error(e.data.error)),void o.terminate();r(e.data.file),o.terminate()}else t.onProgress(e.data.progress)})),o.addEventListener("error",i),t.signal&&t.signal.addEventListener("abort",(()=>{i(t.signal.reason),o.terminate()})),o.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function imageCompression(e,t){return new Promise((function(r,i){let o,a,s,f,l,c;if(o={...t},s=0,({onProgress:f}=o),o.maxSizeMB=o.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof o.useWebWorker||o.useWebWorker,delete o.useWebWorker,o.onProgress=e=>{s=e,"function"==typeof f&&f(s)},!(e instanceof Blob||e instanceof CustomFile))return i(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return i(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,o).then(function(e){try{return a=e,$If_4.call(this)}catch(e){return i(e)}}.bind(this),i);var u=function(){try{return $If_4.call(this)}catch(e){return i(e)}}.bind(this),$Try_1_Catch=function(t){try{return compress(e,o).then((function(e){try{return a=e,u()}catch(e){return i(e)}}),i)}catch(e){return i(e)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/[email protected]/dist/browser-image-compression.js",compressOnWebWorker(e,o).then((function(e){try{return a=e,u()}catch(e){return $Try_1_Catch()}}),$Try_1_Catch)}catch(e){$Try_1_Catch()}function $If_4(){try{a.name=e.name,a.lastModified=e.lastModified}catch(e){}try{o.preserveExif&&"image/jpeg"===e.type&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(a=copyExifWithoutOrientation(e,a))}catch(e){}return r(a)}}))}return imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2",imageCompression}));
202(function(){if(window.RbmFormUpload){return} 203const defaults={url:"/calls/form-upload",deleteUrl:"/calls/form-upload/delete",postKey:"form_uploads[]",fieldId:null,maxFiles:1,maxFileSize:null,existing:[],compression:{maxWidthOrHeight:2560,maxSizeMB:1,fileType:"image/webp",initialQuality:0.8,useWebWorker:!0,},fallbackFileType:"image/jpeg",compressTypes:["image/jpeg","image/png","image/webp","image/bmp","image/heic","image/heif"],compressConcurrency:2,uploadConcurrency:3,libraryUrl:"/js/vendor/browser-image-compression.js",workerUrl:"/js/form-upload.worker.js",thumbnailSize:160,texts:{compressing:"Verkleinenâ¦",waiting:"Wacht op uploadâ¦",uploading:"Uploadenâ¦",done:"Geüpload",failed:"Uploaden mislukt.",tooLarge:"Dit bestand is te groot. De maximale grootte is {size}.",tooMany:"Je kunt maximaal {max} bestand(en) toevoegen.",preparing:"Bestanden voorbereidenâ¦",fixErrors:"Verwijder de bestanden met een fout of probeer ze opnieuw.",required:"Voeg een bestand toe.",selected:"{count} bestand(en) toegevoegd",retry:"Opnieuw",replace:"Vervangen",remove:"Verwijderen",},};const STATUS={COMPRESS_QUEUED:"compress-queued",COMPRESSING:"compressing",WAITING:"waiting",UPLOADING:"uploading",DONE:"done",ERROR:"error",};const EXTENSIONS={"image/webp":"webp","image/jpeg":"jpg","image/png":"png",};let nextId=1;const encodeSupport={};function canEncode(type){if(!(type in encodeSupport)){const canvas=document.createElement("canvas");canvas.width=canvas.height=1;encodeSupport[type]=canvas.toDataURL(type).indexOf("data:"+type)===0} 204return encodeSupport[type]} 205function format(text,values){return text.replace(/\{(\w+)\}/g,(match,key)=>(key in values?values[key]:match))} 206function humanSize(bytes){const units=["B","kB","MB","GB"];let i=0;for(;bytes>=1000&&i<units.length-1;i++){bytes/=1000} 207return Math.round(bytes*10)/10+" "+units[i]} 208function extensionOf(name){const match=/\.([a-z0-9]+)$/i.exec(name);return match?match[1].toLowerCase():""} 209function displayName(name){return name.replace(/\.[a-z0-9]+$/i,"")||name} 210function renameForType(file,original){const extension=EXTENSIONS[file.type];let name=original.name;if(extension&&extensionOf(name)!==extension){name=name.replace(/\.[a-z0-9]+$/i,"")+"."+extension} 211return new File([file],name,{type:file.type,lastModified:original.lastModified})} 212class FormUpload{constructor(root,options){this.root=root;this.options=Object.assign({},defaults,options);this.options.compression=Object.assign({},defaults.compression,options.compression);this.options.texts=Object.assign({},defaults.texts,options.texts);this.form=root.closest("form");this.input=root.querySelector('input[type="file"]');this.list=root.querySelector("[data-form-upload-list]");this.tokens=root.querySelector("[data-form-upload-tokens]");this.label=root.querySelector("label");this.labelText=root.querySelector("label span");this.originalLabelText=this.labelText?this.labelText.innerHTML:"";this.labelButton=root.querySelector("label strong");this.originalLabelButton=this.labelButton?this.labelButton.innerHTML:"";this.inline=this.options.maxFiles===1&&Boolean(this.label&&this.labelText&&this.labelButton);this.items=[];this.waiters=[];this.bypassSubmit=!1;this.waitingToSubmit=!1;this.message=document.createElement("p");this.message.className="form-upload__message";this.message.setAttribute("role","status");this.list.insertAdjacentElement("afterend",this.message);this.required=this.input.required;this.input.required=!1;this.input.multiple=this.options.maxFiles>1;this.replaceInput=document.createElement("input");this.replaceInput.type="file";this.replaceInput.hidden=!0;if(this.input.accept){this.replaceInput.accept=this.input.accept} 213root.appendChild(this.replaceInput);this.input.addEventListener("change",()=>{this.add(Array.from(this.input.files));this.input.value=""});this.replaceInput.addEventListener("change",()=>{if(this.replaceTarget&&this.replaceInput.files.length>0){this.replace(this.replaceTarget,this.replaceInput.files[0])} 214this.replaceTarget=null;this.replaceInput.value=""});this.list.addEventListener("click",(event)=>this.onListClick(event));
214if(this.inline){this.createInline()} 215if(this.form){this.form.addEventListener("submit",(event)=>this.onSubmit(event))}(this.options.existing||[]).forEach((upload)=>{const item=this.createItem(null);item.name=upload.name;item.size=upload.size;item.type=upload.type;item.token=upload.token;item.status=STATUS.DONE;this.items.push(item)});this.render()} 216add(files){if(files.length===0){return} 217this.setMessage("");if(this.options.maxFiles===1){this.items.slice().forEach((item)=>this.remove(item));files=files.slice(0,1)}else{const room=this.options.maxFiles-this.items.length;if(files.length>room){this.setMessage(format(this.options.texts.tooMany,{max:this.options.maxFiles}));files=files.slice(0,Math.max(0,room))}} 218files.forEach((file)=>{const item=this.createItem(file);this.items.push(item);this.prepare(item)});this.render();this.pump()} 219remove(item){const index=this.items.indexOf(item);if(index===-1){return} 220this.items.splice(index,1);this.discard(item);this.render();this.pump()} 221replace(item,file){const index=this.items.indexOf(item);if(index===-1){return} 222const replacement=this.createItem(file);this.items.splice(index,1,replacement);this.discard(item);this.prepare(replacement);this.render();this.pump()} 223createItem(file){return{id:nextId++,file:file,name:file?file.name:"",size:file?file.size:0,type:file?file.type:"",result:null,token:null,status:null,progress:0,error:null,thumbnail:null,discarded:!1,worker:null,abortController:null,xhr:null,element:null,}} 224discard(item){item.discarded=!0;if(item.worker){item.worker.terminate();item.worker=null} 225if(item.abortController){item.abortController.abort()} 226if(item.xhr){item.xhr.abort();item.xhr=null} 227if(item.token){this.deleteUpload(item.token);item.token=null}} 228isCurrent(item){return!item.discarded&&this.items.indexOf(item)!==-1} 229prepare(item){if(this.shouldCompress(item.file)){item.status=STATUS.COMPRESS_QUEUED}else{this.setResult(item,item.file)}} 230shouldCompress(file){if(this.options.compressTypes.indexOf(file.type)!==-1){return!0} 231return file.type===""&&["heic","heif"].indexOf(extensionOf(file.name))!==-1} 232compressionOptions(){const options=Object.assign({},this.options.compression);if(options.fileType&&!canEncode(options.fileType)){options.fileType=this.options.fallbackFileType} 233return options} 234async compress(item){item.status=STATUS.COMPRESSING;item.progress=0;this.update(item);const options=this.compressionOptions();const onProgress=(progress)=>{if(this.isCurrent(item)){item.progress=progress;this.update(item)}};let result=null;try{if(options.useWebWorker&&window.Worker&&typeof OffscreenCanvas!=="undefined"){result=await this.compressInWorker(item,options,onProgress).catch(()=>null)} 235if(!result&&this.isCurrent(item)&&typeof window.imageCompression==="function"){item.abortController=new AbortController();result=await window.imageCompression(item.file,Object.assign({},options,{useWebWorker:!1,signal:item.abortController.signal,onProgress:onProgress,}))}}catch(error){result=null} 236item.abortController=null;if(!this.isCurrent(item)){return} 237const useResult=result&&result.size<item.file.size&&/^image\//.test(result.type);this.setResult(item,useResult?renameForType(result,item.file):item.file);this.pump()} 238compressInWorker(item,options,onProgress){return new Promise((resolve,reject)=>{const worker=new Worker(this.options.workerUrl);const finish=(callback,value)=>{worker.terminate();item.worker=null;callback(value)};item.worker={terminate:()=>finish(reject,new Error("Aborted"))};worker.addEventListener("message",(event)=>{if(event.data.progress!==undefined){onProgress(event.data.progress)}else if(event.data.file){finish(resolve,event.data.file)}else{finish(reject,new Error(event.data.error))}});worker.addEventListener("error",(event)=>{event.preventDefault();finish(reject,new Error(event.message))});worker.postMessage({id:item.id,file:item.file,options:options,libUrl:new URL(this.options.libraryUrl,window.location.href).href,})})} 239setResult(item,file){item.result=file;item.size=file.size;item.type=file.type;item.progress=0;if(this.options.maxFileSize&&file.size>this.options.maxFileSize){this.setError(item,format(this.options.texts.tooLarge,{size:humanSize(this.options.maxFileSize)}),!1)}else{item.status=STATUS.WAITING} 240this.createThumbnail(item)} 241async createThumbnail(item){if(!item.result||!/^image\//.test(item.result.type)||typeof createImageBitmap!=="function"){return} 242try{const bitmap=await createImageBitmap(item.result);const scale=Math.min(1,this.options.thumbnailSize/Math.max(bitmap.width,bitmap.height));const canvas=document.createElement("canvas");canvas.width=Math.round(bitmap.width*scale);canvas.height=Math.round(bitmap.height*scale);canvas.getContext("2d").drawImage(bitmap,0,0,canvas.width,canvas.height);bitmap.close();item.thumbnail=canvas.toDataURL("image/jpeg",0.7);if(this.isCurrent(item)){this.update(item)}}catch(error){}} 243upload(item){item.status=STATUS.UPLOADING;item.progress=0;item.error=null;this.update(item);const data=new FormData();data.append("csrf_token",this.csrfToken());data.append("field",this.options.fieldId);data.append("file",item.result,item.result.name);data.append("original_name",item.name);const xhr=new XMLHttpRequest();item.xhr=xhr;xhr.open("POST",this.options.url);xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.responseType="json";xhr.upload.addEventListener("progress",(event)=>{if(event.lengthComputable&&this.isCurrent(item)){item.progress=Math.round((event.loaded/event.total)*100);this.update(item)}});xhr.addEventListener("load",()=>{item.xhr=null;const response=xhr.response||{};if(!this.isCurrent(item)){if(response.ok&&response.token){this.deleteUpload(response.token)} 244return} 245if(xhr.status===200&&response.ok&&response.token){item.token=response.token;item.status=STATUS.DONE;this.render()}else{const retryable=xhr.status!==200||response.retry===!0;this.setError(item,response.message||this.options.texts.failed,retryable)} 246this.pump()});const fail=()=>{item.xhr=null;if(this.isCurrent(item)){this.setError(item,this.options.texts.failed,!0);this.pump()}};xhr.addEventListener("error",fail);xhr.addEventListener("timeout",fail);xhr.send(data)} 247deleteUpload(token){const data=new FormData();data.append("csrf_token",this.csrfToken());data.append("token",token);fetch(this.options.deleteUrl,{method:"POST",body:data,headers:{"X-Requested-With":"XMLHttpRequest"},keepalive:!0,}).catch(()=>{})} 248csrfToken(){const field=this.form&&this.form.querySelector('input[name="csrf_token"]');return field?field.value:""} 249setError(item,message,retryable){item.status=STATUS.ERROR;item.error=message;item.retryable=retryable;this.update(item)} 250retry(item){if(item.result){item.status=STATUS.WAITING;item.error=null;this.update(item);this.pump()}} 251pump(){const count=(status)=>this.items.filter((item)=>item.status===status).length;let compressing=count(STATUS.COMPRESSING);
251this.items.forEach((item)=>{if(item.status===STATUS.COMPRESS_QUEUED&&compressing<this.options.compressConcurrency){compressing++;this.compress(item)}});let uploading=count(STATUS.UPLOADING);this.items.forEach((item)=>{if(item.status===STATUS.WAITING&&uploading<this.options.uploadConcurrency){uploading++;this.upload(item)}});this.resolveWaiters()} 252isBusy(){return this.items.some((item)=>item.status!==STATUS.DONE&&item.status!==STATUS.ERROR)} 253whenSettled(){return new Promise((resolve)=>{this.waiters.push(resolve);this.resolveWaiters()})} 254resolveWaiters(){if(!this.isBusy()){this.waiters.splice(0).forEach((resolve)=>resolve())}} 255onSubmit(event){if(this.bypassSubmit){return} 256if(this.waitingToSubmit){event.preventDefault();return} 257this.syncTokens();if(this.required&&this.items.length===0){event.preventDefault();this.setMessage(this.options.texts.required,!0);return} 258if(this.items.some((item)=>item.status===STATUS.ERROR)){event.preventDefault();this.setMessage(this.options.texts.fixErrors,!0);return} 259if(!this.isBusy()){return} 260event.preventDefault();const submitter=event.submitter||null;this.waitingToSubmit=!0;this.setSubmitting(!0);this.setMessage(this.options.texts.preparing);this.whenSettled().then(()=>{this.waitingToSubmit=!1;this.setSubmitting(!1);this.setMessage("");if(this.items.some((item)=>item.status===STATUS.ERROR)){this.setMessage(this.options.texts.fixErrors,!0);return} 261this.syncTokens();this.bypassSubmit=!0;try{if(typeof this.form.requestSubmit==="function"){this.form.requestSubmit(submitter&&submitter.form===this.form?submitter:undefined)}else{this.form.submit()}}finally{this.bypassSubmit=!1}})} 262setSubmitting(submitting){this.form.querySelectorAll('button[type="submit"], input[type="submit"]').forEach((button)=>{button.disabled=submitting});this.form.setAttribute("aria-busy",submitting?"true":"false")} 263syncTokens(){this.tokens.innerHTML="";this.items.forEach((item)=>{if(item.status===STATUS.DONE&&item.token){const input=document.createElement("input");input.type="hidden";input.name=this.options.postKey;input.value=item.token;this.tokens.appendChild(input)}})} 264onListClick(event){const button=event.target.closest("button[data-action]");if(!button){return} 265const id=Number(button.closest("[data-item-id]").getAttribute("data-item-id"));const item=this.items.find((candidate)=>candidate.id===id);if(!item){return} 266const action=button.getAttribute("data-action");if(action==="remove"){this.remove(item);this.input.focus()}else if(action==="replace"){this.replaceTarget=item;this.replaceInput.click()}else if(action==="retry"){this.retry(item)}} 267setMessage(text,isError){this.message.textContent=text;this.message.classList.toggle("form-upload__message--error",Boolean(isError))} 268render(){if(this.inline){this.updateInline();this.syncTokens();return} 269const elements=this.items.map((item)=>{if(!item.element){item.element=this.createElement(item)} 270this.update(item);return item.element});this.list.replaceChildren(...elements);this.list.hidden=elements.length===0;if(this.labelText){this.labelText.innerHTML=this.items.length>0?format(this.options.texts.selected,{count:this.items.length}):this.originalLabelText} 271this.syncTokens()} 272createElement(item){const texts=this.options.texts;const element=document.createElement("li");element.className="form-upload__item";element.setAttribute("data-item-id",item.id);element.innerHTML='<div class="form-upload__thumb"></div>'+'<div class="form-upload__info">'+'<div class="form-upload__name"></div>'+'<div class="form-upload__status"></div>'+'<div class="form-upload__progress"><div></div></div>'+"</div>"+'<div class="form-upload__actions">'+'<button type="button" data-action="retry"></button>'+'<button type="button" data-action="replace"></button>'+'<button type="button" data-action="remove"></button>'+"</div>";element.querySelector('[data-action="retry"]').textContent=texts.retry;element.querySelector('[data-action="replace"]').textContent=texts.replace;element.querySelector('[data-action="remove"]').textContent=texts.remove;return element} 273createInline(){const texts=this.options.texts;this.inlineThumb=document.createElement("i");this.inlineThumb.className="form-upload__inline-thumb";this.inlineProgress=document.createElement("i");this.inlineProgress.className="form-upload__inline-progress";this.inlineProgress.appendChild(document.createElement("i"));this.inlineActions=document.createElement("i");this.inlineActions.className="form-upload__inline-actions";this.inlineActions.innerHTML='<b role="button" tabindex="0" data-action="retry"></b>'+'<b role="button" tabindex="0" data-action="remove">×</b>';this.inlineActions.querySelector('[data-action="retry"]').textContent=texts.retry;
273this.label.append(this.inlineThumb,this.inlineProgress,this.inlineActions);const handle=(event)=>{const control=event.target.closest("[data-action]");if(!control||!this.inlineActions.contains(control)){return} 274if(event.type==="keydown"&&event.key!=="Enter"&&event.key!==" "){return} 275event.preventDefault();event.stopPropagation();const item=this.items[0];if(!item){return} 276if(control.getAttribute("data-action")==="remove"){this.remove(item);this.input.focus()}else{this.retry(item)}};this.label.addEventListener("click",handle);this.label.addEventListener("keydown",handle)} 277updateInline(){const item=this.items[0];const texts=this.options.texts;const filled=Boolean(item);this.label.classList.toggle("form-upload__label--filled",filled);["compress-queued","compressing","waiting","uploading","done","error"].forEach((status)=>{this.label.classList.toggle("form-upload__label--"+status,filled&&item.status===status)});this.labelButton.innerHTML=filled?"":this.originalLabelButton;if(filled){this.labelButton.textContent=texts.replace} 278this.inlineThumb.hidden=this.inlineProgress.hidden=this.inlineActions.hidden=!filled;if(!filled){this.labelText.innerHTML=this.originalLabelText;this.labelText.removeAttribute("title");this.inlineThumb.replaceChildren();this.inlineThumb.removeAttribute("data-item-id");return} 279const statusText={[STATUS.COMPRESS_QUEUED]:texts.compressing,[STATUS.COMPRESSING]:texts.compressing+(item.progress?" "+item.progress+"%":""),[STATUS.WAITING]:texts.waiting,[STATUS.UPLOADING]:texts.uploading+" "+item.progress+"%",[STATUS.DONE]:"",[STATUS.ERROR]:item.error,}[item.status]||"";this.labelText.textContent=displayName(item.name)+(statusText?" · "+statusText:"");this.labelText.title=displayName(item.name);const showProgress=item.status===STATUS.COMPRESSING||item.status===STATUS.UPLOADING;this.inlineProgress.hidden=!showProgress;this.inlineProgress.firstElementChild.style.width=(showProgress?item.progress:0)+"%";if(this.inlineThumb.getAttribute("data-item-id")!==String(item.id)){this.inlineThumb.replaceChildren();this.inlineThumb.setAttribute("data-item-id",item.id)} 280if(item.thumbnail&&!this.inlineThumb.querySelector("img")){const image=document.createElement("img");image.src=item.thumbnail;image.alt="";this.inlineThumb.replaceChildren(image)}else if(!item.thumbnail&&!this.inlineThumb.textContent){this.inlineThumb.textContent=extensionOf(item.name).toUpperCase()||"?"} 281this.inlineActions.querySelector('[data-action="retry"]').hidden=!(item.status===STATUS.ERROR&&item.retryable);this.inlineActions.querySelector('[data-action="remove"]').setAttribute("aria-label",texts.remove+": "+displayName(item.name))} 282update(item){if(this.inline){if(item===this.items[0]){this.updateInline()} 283return} 284const element=item.element;if(!element){return} 285const texts=this.options.texts;const statusText={[STATUS.COMPRESS_QUEUED]:texts.compressing,[STATUS.COMPRESSING]:texts.compressing+(item.progress?" "+item.progress+"%":""),[STATUS.WAITING]:texts.waiting,[STATUS.UPLOADING]:texts.uploading+" "+item.progress+"%",[STATUS.DONE]:texts.done+(item.size?" ("+humanSize(item.size)+")":""),[STATUS.ERROR]:item.error,}[item.status]||"";element.className="form-upload__item form-upload__item--"+item.status;element.querySelector(".form-upload__name").textContent=displayName(item.name);element.querySelector(".form-upload__status").textContent=statusText;const showProgress=item.status===STATUS.COMPRESSING||item.status===STATUS.UPLOADING;const progress=element.querySelector(".form-upload__progress");progress.hidden=!showProgress;progress.firstElementChild.style.width=(showProgress?item.progress:0)+"%";const thumb=element.querySelector(".form-upload__thumb");if(item.thumbnail&&!thumb.querySelector("img")){const image=document.createElement("img");image.src=item.thumbnail;image.alt="";thumb.replaceChildren(image)}else if(!item.thumbnail&&!thumb.textContent){thumb.textContent=extensionOf(item.name).toUpperCase()||"?"} 286element.querySelector('[data-action="retry"]').hidden=!(item.status===STATUS.ERROR&&item.retryable);element.querySelector('[data-action="remove"]').setAttribute("aria-label",texts.remove+": "+displayName(item.name));element.querySelector('[data-action="replace"]').setAttribute("aria-label",texts.replace+": "+displayName(item.name))}} 287function init(element,options){if(element.rbmFormUpload){return element.rbmFormUpload} 288let dataOptions={};try{dataOptions=JSON.parse(element.getAttribute("data-form-upload")||"{}")}catch(error){dataOptions={}} 289dataOptions.fieldId=element.getAttribute("data-field-id");element.rbmFormUpload=new FormUpload(element,Object.assign({},dataOptions,options||{}));return element.rbmFormUpload} 290function initAll(){document.querySelectorAll("[data-form-upload]").forEach((element)=>init(element))} 291window.RbmFormUpload={defaults:defaults,init:init,initAll:initAll};
291if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",initAll)}else{initAll()}})()
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.