<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
; /* Start:"a:4:{s:4:"full";s:56:"/local/templates/agency_ux/js/swiper.js?1683192949139426";s:6:"source";s:39:"/local/templates/agency_ux/js/swiper.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
/**
 * Swiper 9.2.4
 * Most modern mobile touch slider and framework with hardware accelerated transitions
 * https://swiperjs.com
 *
 * Copyright 2014-2023 Vladimir Kharlampidi
 *
 * Released under the MIT License
 *
 * Released on: April 21, 2023
 */

!function(e,t){"object"==typeof exports&amp;&amp;"undefined"!=typeof module?module.exports=t():"function"==typeof define&amp;&amp;define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e){return null!==e&amp;&amp;"object"==typeof e&amp;&amp;"constructor"in e&amp;&amp;e.constructor===Object}function t(s,a){void 0===s&amp;&amp;(s={}),void 0===a&amp;&amp;(a={}),Object.keys(a).forEach((i=&gt;{void 0===s[i]?s[i]=a[i]:e(a[i])&amp;&amp;e(s[i])&amp;&amp;Object.keys(a[i]).length&gt;0&amp;&amp;t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=&gt;null,querySelectorAll:()=&gt;[],getElementById:()=&gt;null,createEvent:()=&gt;({initEvent(){}}),createElement:()=&gt;({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=&gt;[]}),createElementNS:()=&gt;({}),importNode:()=&gt;null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=&gt;({getPropertyValue:()=&gt;""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=&gt;({}),requestAnimationFrame:e=&gt;"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&amp;&amp;clearTimeout(e)}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}function n(e,t){return void 0===t&amp;&amp;(t=0),setTimeout(e,t)}function l(){return Date.now()}function o(e,t){void 0===t&amp;&amp;(t="x");const s=r();let a,i,n;const l=function(e){const t=r();let s;return t.getComputedStyle&amp;&amp;(s=t.getComputedStyle(e,null)),!s&amp;&amp;e.currentStyle&amp;&amp;(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(i=l.transform||l.webkitTransform,i.split(",").length&gt;6&amp;&amp;(i=i.split(", ").map((e=&gt;e.replace(",","."))).join(", ")),n=new s.WebKitCSSMatrix("none"===i?"":i)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=n.toString().split(",")),"x"===t&amp;&amp;(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&amp;&amp;(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function d(e){return"object"==typeof e&amp;&amp;null!==e&amp;&amp;e.constructor&amp;&amp;"Object"===Object.prototype.toString.call(e).slice(8,-1)}function c(e){return"undefined"!=typeof window&amp;&amp;void 0!==window.HTMLElement?e instanceof HTMLElement:e&amp;&amp;(1===e.nodeType||11===e.nodeType)}function p(){const e=Object(arguments.length&lt;=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let s=1;s&lt;arguments.length;s+=1){const a=s&lt;0||arguments.length&lt;=s?void 0:arguments[s];if(null!=a&amp;&amp;!c(a)){const s=Object.keys(Object(a)).filter((e=&gt;t.indexOf(e)&lt;0));for(let t=0,i=s.length;t&lt;i;t+=1){const i=s[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&amp;&amp;r.enumerable&amp;&amp;(d(e[i])&amp;&amp;d(a[i])?a[i].__swiper__?e[i]=a[i]:p(e[i],a[i]):!d(e[i])&amp;&amp;d(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:p(e[i],a[i])):e[i]=a[i])}}}return e}function u(e,t,s){e.style.setProperty(t,s)}function m(e){let{swiper:t,targetPosition:s,side:a}=e;const i=r(),n=-t.translate;let l,o=null;const d=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=s&gt;n?"next":"prev",p=(e,t)=&gt;"next"===c&amp;&amp;e&gt;=t||"prev"===c&amp;&amp;e&lt;=t,u=()=&gt;{l=(new Date).getTime(),null===o&amp;&amp;(o=l);const e=Math.max(Math.min((l-o)/d,1),0),r=.5-Math.cos(e*Math.PI)/2;let c=n+r*(s-n);if(p(c,s)&amp;&amp;(c=s),t.wrapperEl.scrollTo({[a]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=&gt;{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[a]:c})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function h(e){return e.querySelector(".swiper-slide-transform")||e.shadowEl&amp;&amp;e.shadowEl.querySelector(".swiper-slide-transform")||e}function f(e,t){return void 0===t&amp;&amp;(t=""),[...e.children].filter((e=&gt;e.matches(t)))}function g(e,t){void 0===t&amp;&amp;(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:[t]),s}function v(e){const t=r(),s=a(),i=e.getBoundingClientRect(),n=s.body,l=e.clientTop||n.clientTop||0,o=e.clientLeft||n.clientLeft||0,d=e===t?t.scrollY:e.scrollTop,c=e===t?t.scrollX:e.scrollLeft;return{top:i.top+d-l,left:i.left+c-o}}function w(e,t){return r().getComputedStyle(e,null).getPropertyValue(t)}function b(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&amp;&amp;(t+=1);return t}}function y(e,t){const s=[];let a=e.parentElement;for(;a;)t?a.matches(t)&amp;&amp;s.push(a):s.push(a),a=a.parentElement;return s}function E(e,t){t&amp;&amp;e.addEventListener("transitionend",(function s(a){a.target===e&amp;&amp;(t.call(e,a),e.removeEventListener("transitionend",s))}))}function x(e,t,s){const a=r();return s?e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(a.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom")):e.offsetWidth}let S,T,M;function C(){return S||(S=function(){const e=r(),t=a();return{smoothScroll:t.documentElement&amp;&amp;"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&amp;&amp;t instanceof e.DocumentTouch)}}()),S}function P(e){return void 0===e&amp;&amp;(e={}),T||(T=function(e){let{userAgent:t}=void 0===e?{}:e;const s=C(),a=r(),i=a.navigator.platform,n=t||a.navigator.userAgent,l={ios:!1,android:!1},o=a.screen.width,d=a.screen.height,c=n.match(/(Android);?[\s\/]+([\d.]+)?/);let p=n.match(/(iPad).*OS\s([\d_]+)/);const u=n.match(/(iPod)(.*OS\s([\d_]+))?/),m=!p&amp;&amp;n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let f="MacIntel"===i;return!p&amp;&amp;f&amp;&amp;s.touch&amp;&amp;["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${d}`)&gt;=0&amp;&amp;(p=n.match(/(Version)\/([\d.]+)/),p||(p=[0,1,"13_0_0"]),f=!1),c&amp;&amp;!h&amp;&amp;(l.os="android",l.android=!0),(p||m||u)&amp;&amp;(l.os="ios",l.ios=!0),l}(e)),T}function L(){return M||(M=function(){const e=r();let t=!1;function s(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")&gt;=0&amp;&amp;t.indexOf("chrome")&lt;0&amp;&amp;t.indexOf("android")&lt;0}if(s()){const s=String(e.navigator.userAgent);if(s.includes("Version/")){const[e,a]=s.split("Version/")[1].split(" ")[0].split(".").map((e=&gt;Number(e)));t=e&lt;16||16===e&amp;&amp;a&lt;2}}return{isSafari:t||s(),needPerspectiveFix:t,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),M}var z={on(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach((e=&gt;{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)})),a},once(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;function i(){a.off(e,i),i.__emitterProxy&amp;&amp;delete i.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n&lt;s;n++)r[n]=arguments[n];t.apply(a,r)}return i.__emitterProxy=t,a.on(e,i,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const a=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)&lt;0&amp;&amp;s.eventsAnyListeners[a](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s&gt;=0&amp;&amp;t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=&gt;{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&amp;&amp;s.eventsListeners[e].forEach(((a,i)=&gt;{(a===t||a.__emitterProxy&amp;&amp;a.__emitterProxy===t)&amp;&amp;s.eventsListeners[e].splice(i,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,a;for(var i=arguments.length,r=new Array(i),n=0;n&lt;i;n++)r[n]=arguments[n];"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],s=r.slice(1,r.length),a=e):(t=r[0].events,s=r[0].data,a=r[0].context||e),s.unshift(a);return(Array.isArray(t)?t:t.split(" ")).forEach((t=&gt;{e.eventsAnyListeners&amp;&amp;e.eventsAnyListeners.length&amp;&amp;e.eventsAnyListeners.forEach((e=&gt;{e.apply(a,[t,...s])})),e.eventsListeners&amp;&amp;e.eventsListeners[t]&amp;&amp;e.eventsListeners[t].forEach((e=&gt;{e.apply(a,s)}))})),e}};const A=(e,t)=&gt;{if(!e||e.destroyed||!e.params)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){const t=s.querySelector(`.${e.params.lazyPreloaderClass}`);t&amp;&amp;t.remove()}},$=(e,t)=&gt;{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&amp;&amp;s.removeAttribute("loading")},I=e=&gt;{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t&lt;0)return;t=Math.min(t,s);const a="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex,r=i+a-1;if(e.params.rewind)for(let a=i-t;a&lt;=r+t;a+=1){const t=(a%s+s)%s;t!==i&amp;&amp;t&gt;r&amp;&amp;$(e,t)}else for(let a=Math.max(r-t,0);a&lt;=Math.min(r+t,s-1);a+=1)a!==i&amp;&amp;a&gt;r&amp;&amp;$(e,a)};var k={updateSize:function(){const e=this;let t,s;const a=e.el;t=void 0!==e.params.width&amp;&amp;null!==e.params.width?e.params.width:a.clientWidth,s=void 0!==e.params.height&amp;&amp;null!==e.params.height?e.params.height:a.clientHeight,0===t&amp;&amp;e.isHorizontal()||0===s&amp;&amp;e.isVertical()||(t=t-parseInt(w(a,"padding-left")||0,10)-parseInt(w(a,"padding-right")||0,10),s=s-parseInt(w(a,"padding-top")||0,10)-parseInt(w(a,"padding-bottom")||0,10),Number.isNaN(t)&amp;&amp;(t=0),Number.isNaN(s)&amp;&amp;(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function s(e,s){return parseFloat(e.getPropertyValue(t(s))||0)}const a=e.params,{wrapperEl:i,slidesEl:r,size:n,rtlTranslate:l,wrongRTL:o}=e,d=e.virtual&amp;&amp;a.virtual.enabled,c=d?e.virtual.slides.length:e.slides.length,p=f(r,`.${e.params.slideClass}, swiper-slide`),m=d?e.virtual.slides.length:p.length;let h=[];const g=[],v=[];let b=a.slidesOffsetBefore;"function"==typeof b&amp;&amp;(b=a.slidesOffsetBefore.call(e));let y=a.slidesOffsetAfter;"function"==typeof y&amp;&amp;(y=a.slidesOffsetAfter.call(e));const E=e.snapGrid.length,S=e.slidesGrid.length;let T=a.spaceBetween,M=-b,C=0,P=0;if(void 0===n)return;"string"==typeof T&amp;&amp;T.indexOf("%")&gt;=0&amp;&amp;(T=parseFloat(T.replace("%",""))/100*n),e.virtualSize=-T,p.forEach((e=&gt;{l?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""})),a.centeredSlides&amp;&amp;a.cssMode&amp;&amp;(u(i,"--swiper-centered-offset-before",""),u(i,"--swiper-centered-offset-after",""));const L=a.grid&amp;&amp;a.grid.rows&gt;1&amp;&amp;e.grid;let z;L&amp;&amp;e.grid.initSlides(m);const A="auto"===a.slidesPerView&amp;&amp;a.breakpoints&amp;&amp;Object.keys(a.breakpoints).filter((e=&gt;void 0!==a.breakpoints[e].slidesPerView)).length&gt;0;for(let i=0;i&lt;m;i+=1){let r;if(z=0,p[i]&amp;&amp;(r=p[i]),L&amp;&amp;e.grid.updateSlide(i,r,m,t),!p[i]||"none"!==w(r,"display")){if("auto"===a.slidesPerView){A&amp;&amp;(p[i].style[t("width")]="");const n=getComputedStyle(r),l=r.style.transform,o=r.style.webkitTransform;if(l&amp;&amp;(r.style.transform="none"),o&amp;&amp;(r.style.webkitTransform="none"),a.roundLengths)z=e.isHorizontal()?x(r,"width",!0):x(r,"height",!0);else{const e=s(n,"width"),t=s(n,"padding-left"),a=s(n,"padding-right"),i=s(n,"margin-left"),l=s(n,"margin-right"),o=n.getPropertyValue("box-sizing");if(o&amp;&amp;"border-box"===o)z=e+i+l;else{const{clientWidth:s,offsetWidth:n}=r;z=e+t+a+i+l+(n-s)}}l&amp;&amp;(r.style.transform=l),o&amp;&amp;(r.style.webkitTransform=o),a.roundLengths&amp;&amp;(z=Math.floor(z))}else z=(n-(a.slidesPerView-1)*T)/a.slidesPerView,a.roundLengths&amp;&amp;(z=Math.floor(z)),p[i]&amp;&amp;(p[i].style[t("width")]=`${z}px`);p[i]&amp;&amp;(p[i].swiperSlideSize=z),v.push(z),a.centeredSlides?(M=M+z/2+C/2+T,0===C&amp;&amp;0!==i&amp;&amp;(M=M-n/2-T),0===i&amp;&amp;(M=M-n/2-T),Math.abs(M)&lt;.001&amp;&amp;(M=0),a.roundLengths&amp;&amp;(M=Math.floor(M)),P%a.slidesPerGroup==0&amp;&amp;h.push(M),g.push(M)):(a.roundLengths&amp;&amp;(M=Math.floor(M)),(P-Math.min(e.params.slidesPerGroupSkip,P))%e.params.slidesPerGroup==0&amp;&amp;h.push(M),g.push(M),M=M+z+T),e.virtualSize+=z+T,C=z,P+=1}}if(e.virtualSize=Math.max(e.virtualSize,n)+y,l&amp;&amp;o&amp;&amp;("slide"===a.effect||"coverflow"===a.effect)&amp;&amp;(i.style.width=`${e.virtualSize+a.spaceBetween}px`),a.setWrapperSize&amp;&amp;(i.style[t("width")]=`${e.virtualSize+a.spaceBetween}px`),L&amp;&amp;e.grid.updateWrapperSize(z,h,t),!a.centeredSlides){const t=[];for(let s=0;s&lt;h.length;s+=1){let i=h[s];a.roundLengths&amp;&amp;(i=Math.floor(i)),h[s]&lt;=e.virtualSize-n&amp;&amp;t.push(i)}h=t,Math.floor(e.virtualSize-n)-Math.floor(h[h.length-1])&gt;1&amp;&amp;h.push(e.virtualSize-n)}if(d&amp;&amp;a.loop){const t=v[0]+T;if(a.slidesPerGroup&gt;1){const s=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/a.slidesPerGroup),i=t*a.slidesPerGroup;for(let e=0;e&lt;s;e+=1)h.push(h[h.length-1]+i)}for(let s=0;s&lt;e.virtual.slidesBefore+e.virtual.slidesAfter;s+=1)1===a.slidesPerGroup&amp;&amp;h.push(h[h.length-1]+t),g.push(g[g.length-1]+t),e.virtualSize+=t}if(0===h.length&amp;&amp;(h=[0]),0!==a.spaceBetween){const s=e.isHorizontal()&amp;&amp;l?"marginLeft":t("marginRight");p.filter(((e,t)=&gt;!(a.cssMode&amp;&amp;!a.loop)||t!==p.length-1)).forEach((e=&gt;{e.style[s]=`${T}px`}))}if(a.centeredSlides&amp;&amp;a.centeredSlidesBounds){let e=0;v.forEach((t=&gt;{e+=t+(a.spaceBetween?a.spaceBetween:0)})),e-=a.spaceBetween;const t=e-n;h=h.map((e=&gt;e&lt;0?-b:e&gt;t?t+y:e))}if(a.centerInsufficientSlides){let e=0;if(v.forEach((t=&gt;{e+=t+(a.spaceBetween?a.spaceBetween:0)})),e-=a.spaceBetween,e&lt;n){const t=(n-e)/2;h.forEach(((e,s)=&gt;{h[s]=e-t})),g.forEach(((e,s)=&gt;{g[s]=e+t}))}}if(Object.assign(e,{slides:p,snapGrid:h,slidesGrid:g,slidesSizesGrid:v}),a.centeredSlides&amp;&amp;a.cssMode&amp;&amp;!a.centeredSlidesBounds){u(i,"--swiper-centered-offset-before",-h[0]+"px"),u(i,"--swiper-centered-offset-after",e.size/2-v[v.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=&gt;e+t)),e.slidesGrid=e.slidesGrid.map((e=&gt;e+s))}if(m!==c&amp;&amp;e.emit("slidesLengthChange"),h.length!==E&amp;&amp;(e.params.watchOverflow&amp;&amp;e.checkOverflow(),e.emit("snapGridLengthChange")),g.length!==S&amp;&amp;e.emit("slidesGridLengthChange"),a.watchSlidesProgress&amp;&amp;e.updateSlidesOffset(),!(d||a.cssMode||"slide"!==a.effect&amp;&amp;"fade"!==a.effect)){const t=`${a.containerModifierClass}backface-hidden`,s=e.el.classList.contains(t);m&lt;=a.maxBackfaceHiddenSlides?s||e.el.classList.add(t):s&amp;&amp;e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],a=t.virtual&amp;&amp;t.params.virtual.enabled;let i,r=0;"number"==typeof e?t.setTransition(e):!0===e&amp;&amp;t.setTransition(t.params.speed);const n=e=&gt;a?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&amp;&amp;t.params.slidesPerView&gt;1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach((e=&gt;{s.push(e)}));else for(i=0;i&lt;Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e&gt;t.slides.length&amp;&amp;!a)break;s.push(n(e))}else s.push(n(t.activeIndex));for(i=0;i&lt;s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;r=e&gt;r?e:r}(r||0===r)&amp;&amp;(t.wrapperEl.style.height=`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let a=0;a&lt;t.length;a+=1)t[a].swiperSlideOffset=(e.isHorizontal()?t[a].offsetLeft:t[a].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&amp;&amp;(e=this&amp;&amp;this.translate||0);const t=this,s=t.params,{slides:a,rtlTranslate:i,snapGrid:r}=t;if(0===a.length)return;void 0===a[0].swiperSlideOffset&amp;&amp;t.updateSlidesOffset();let n=-e;i&amp;&amp;(n=e),a.forEach((e=&gt;{e.classList.remove(s.slideVisibleClass)})),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let e=0;e&lt;a.length;e+=1){const l=a[e];let o=l.swiperSlideOffset;s.cssMode&amp;&amp;s.centeredSlides&amp;&amp;(o-=a[0].swiperSlideOffset);const d=(n+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),c=(n-r[0]+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),p=-(n-o),u=p+t.slidesSizesGrid[e];(p&gt;=0&amp;&amp;p&lt;t.size-1||u&gt;1&amp;&amp;u&lt;=t.size||p&lt;=0&amp;&amp;u&gt;=t.size)&amp;&amp;(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),a[e].classList.add(s.slideVisibleClass)),l.progress=i?-d:d,l.originalProgress=i?-c:c}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&amp;&amp;t.translate&amp;&amp;t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:r,isEnd:n,progressLoop:l}=t;const o=r,d=n;if(0===a)i=0,r=!0,n=!0;else{i=(e-t.minTranslate())/a;const s=Math.abs(e-t.minTranslate())&lt;1,l=Math.abs(e-t.maxTranslate())&lt;1;r=s||i&lt;=0,n=l||i&gt;=1,s&amp;&amp;(i=0),l&amp;&amp;(i=1)}if(s.loop){const s=t.getSlideIndexByData(0),a=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[s],r=t.slidesGrid[a],n=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o&gt;=i?(o-i)/n:(o+n-r)/n,l&gt;1&amp;&amp;(l-=1)}Object.assign(t,{progress:i,progressLoop:l,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&amp;&amp;s.autoHeight)&amp;&amp;t.updateSlidesProgress(e),r&amp;&amp;!o&amp;&amp;t.emit("reachBeginning toEdge"),n&amp;&amp;!d&amp;&amp;t.emit("reachEnd toEdge"),(o&amp;&amp;!r||d&amp;&amp;!n)&amp;&amp;t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:a,activeIndex:i}=e,r=e.virtual&amp;&amp;s.virtual.enabled,n=e=&gt;f(a,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let l;if(t.forEach((e=&gt;{e.classList.remove(s.slideActiveClass,s.slideNextClass,s.slidePrevClass)})),r)if(s.loop){let t=i-e.virtual.slidesBefore;t&lt;0&amp;&amp;(t=e.virtual.slides.length+t),t&gt;=e.virtual.slides.length&amp;&amp;(t-=e.virtual.slides.length),l=n(`[data-swiper-slide-index="${t}"]`)}else l=n(`[data-swiper-slide-index="${i}"]`);else l=t[i];if(l){l.classList.add(s.slideActiveClass);let e=function(e,t){const s=[];for(;e.nextElementSibling;){const a=e.nextElementSibling;t?a.matches(t)&amp;&amp;s.push(a):s.push(a),e=a}return s}(l,`.${s.slideClass}, swiper-slide`)[0];s.loop&amp;&amp;!e&amp;&amp;(e=t[0]),e&amp;&amp;e.classList.add(s.slideNextClass);let a=function(e,t){const s=[];for(;e.previousElementSibling;){const a=e.previousElementSibling;t?a.matches(t)&amp;&amp;s.push(a):s.push(a),e=a}return s}(l,`.${s.slideClass}, swiper-slide`)[0];s.loop&amp;&amp;0===!a&amp;&amp;(a=t[t.length-1]),a&amp;&amp;a.classList.add(s.slidePrevClass)}e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:a,params:i,activeIndex:r,realIndex:n,snapIndex:l}=t;let o,d=e;const c=e=&gt;{let s=e-t.virtual.slidesBefore;return s&lt;0&amp;&amp;(s=t.virtual.slides.length+s),s&gt;=t.virtual.slides.length&amp;&amp;(s-=t.virtual.slides.length),s};if(void 0===d&amp;&amp;(d=function(e){const{slidesGrid:t,params:s}=e,a=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e&lt;t.length;e+=1)void 0!==t[e+1]?a&gt;=t[e]&amp;&amp;a&lt;t[e+1]-(t[e+1]-t[e])/2?i=e:a&gt;=t[e]&amp;&amp;a&lt;t[e+1]&amp;&amp;(i=e+1):a&gt;=t[e]&amp;&amp;(i=e);return s.normalizeSlideIndex&amp;&amp;(i&lt;0||void 0===i)&amp;&amp;(i=0),i}(t)),a.indexOf(s)&gt;=0)o=a.indexOf(s);else{const e=Math.min(i.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/i.slidesPerGroup)}if(o&gt;=a.length&amp;&amp;(o=a.length-1),d===r)return o!==l&amp;&amp;(t.snapIndex=o,t.emit("snapIndexChange")),void(t.params.loop&amp;&amp;t.virtual&amp;&amp;t.params.virtual.enabled&amp;&amp;(t.realIndex=c(d)));let p;p=t.virtual&amp;&amp;i.virtual.enabled&amp;&amp;i.loop?c(d):t.slides[d]?parseInt(t.slides[d].getAttribute("data-swiper-slide-index")||d,10):d,Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:n,realIndex:p,previousIndex:r,activeIndex:d}),t.initialized&amp;&amp;I(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),n!==p&amp;&amp;t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&amp;&amp;t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,a=e.closest(`.${s.slideClass}, swiper-slide`);let i,r=!1;if(a)for(let e=0;e&lt;t.slides.length;e+=1)if(t.slides[e]===a){r=!0,i=e;break}if(!a||!r)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=a,t.virtual&amp;&amp;t.params.virtual.enabled?t.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=i,s.slideToClickedSlide&amp;&amp;void 0!==t.clickedIndex&amp;&amp;t.clickedIndex!==t.activeIndex&amp;&amp;t.slideToClickedSlide()}};var O={getTranslate:function(e){void 0===e&amp;&amp;(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:a,wrapperEl:i}=this;if(t.virtualTranslate)return s?-a:a;if(t.cssMode)return a;let r=o(i,e);return r+=this.cssOverflowAdjustment(),s&amp;&amp;(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:a,params:i,wrapperEl:r,progress:n}=s;let l,o=0,d=0;s.isHorizontal()?o=a?-e:e:d=e,i.roundLengths&amp;&amp;(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,i.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:i.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),r.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==n&amp;&amp;s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,a,i){void 0===e&amp;&amp;(e=0),void 0===t&amp;&amp;(t=this.params.speed),void 0===s&amp;&amp;(s=!0),void 0===a&amp;&amp;(a=!0);const r=this,{params:n,wrapperEl:l}=r;if(r.animating&amp;&amp;n.preventInteractionOnTransition)return!1;const o=r.minTranslate(),d=r.maxTranslate();let c;if(c=a&amp;&amp;e&gt;o?o:a&amp;&amp;e&lt;d?d:e,r.updateProgress(c),n.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return m({swiper:r,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(c),s&amp;&amp;(r.emit("beforeTransitionStart",t,i),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),s&amp;&amp;(r.emit("beforeTransitionStart",t,i),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&amp;&amp;!r.destroyed&amp;&amp;e.target===this&amp;&amp;(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,s&amp;&amp;r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}};function D(e){let{swiper:t,runCallbacks:s,direction:a,step:i}=e;const{activeIndex:r,previousIndex:n}=t;let l=a;if(l||(l=r&gt;n?"next":r&lt;n?"prev":"reset"),t.emit(`transition${i}`),s&amp;&amp;r!==n){if("reset"===l)return void t.emit(`slideResetTransition${i}`);t.emit(`slideChangeTransition${i}`),"next"===l?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`)}}var G={slideTo:function(e,t,s,a,i){void 0===e&amp;&amp;(e=0),void 0===t&amp;&amp;(t=this.params.speed),void 0===s&amp;&amp;(s=!0),"string"==typeof e&amp;&amp;(e=parseInt(e,10));const r=this;let n=e;n&lt;0&amp;&amp;(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:h,enabled:f}=r;if(r.animating&amp;&amp;l.preventInteractionOnTransition||!f&amp;&amp;!a&amp;&amp;!i)return!1;const g=Math.min(r.params.slidesPerGroupSkip,n);let v=g+Math.floor((n-g)/r.params.slidesPerGroup);v&gt;=o.length&amp;&amp;(v=o.length-1);const w=-o[v];if(l.normalizeSlideIndex)for(let e=0;e&lt;d.length;e+=1){const t=-Math.floor(100*w),s=Math.floor(100*d[e]),a=Math.floor(100*d[e+1]);void 0!==d[e+1]?t&gt;=s&amp;&amp;t&lt;a-(a-s)/2?n=e:t&gt;=s&amp;&amp;t&lt;a&amp;&amp;(n=e+1):t&gt;=s&amp;&amp;(n=e)}if(r.initialized&amp;&amp;n!==p){if(!r.allowSlideNext&amp;&amp;w&lt;r.translate&amp;&amp;w&lt;r.minTranslate())return!1;if(!r.allowSlidePrev&amp;&amp;w&gt;r.translate&amp;&amp;w&gt;r.maxTranslate()&amp;&amp;(p||0)!==n)return!1}let b;if(n!==(c||0)&amp;&amp;s&amp;&amp;r.emit("beforeSlideChangeStart"),r.updateProgress(w),b=n&gt;p?"next":n&lt;p?"prev":"reset",u&amp;&amp;-w===r.translate||!u&amp;&amp;w===r.translate)return r.updateActiveIndex(n),l.autoHeight&amp;&amp;r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==l.effect&amp;&amp;r.setTranslate(w),"reset"!==b&amp;&amp;(r.transitionStart(s,b),r.transitionEnd(s,b)),!1;if(l.cssMode){const e=r.isHorizontal(),s=u?w:-w;if(0===t){const t=r.virtual&amp;&amp;r.params.virtual.enabled;t&amp;&amp;(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),t&amp;&amp;!r._cssModeVirtualInitialSet&amp;&amp;r.params.initialSlide&gt;0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame((()=&gt;{h[e?"scrollLeft":"scrollTop"]=s}))):h[e?"scrollLeft":"scrollTop"]=s,t&amp;&amp;requestAnimationFrame((()=&gt;{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1}))}else{if(!r.support.smoothScroll)return m({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(w),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,a),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&amp;&amp;!r.destroyed&amp;&amp;e.target===this&amp;&amp;(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&amp;&amp;(e=0),void 0===t&amp;&amp;(t=this.params.speed),void 0===s&amp;&amp;(s=!0),"string"==typeof e){e=parseInt(e,10)}const i=this;let r=e;return i.params.loop&amp;&amp;(i.virtual&amp;&amp;i.params.virtual.enabled?r+=i.virtual.slidesBefore:r=i.getSlideIndexByData(r)),i.slideTo(r,t,s,a)},slideNext:function(e,t,s){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0);const a=this,{enabled:i,params:r,animating:n}=a;if(!i)return a;let l=r.slidesPerGroup;"auto"===r.slidesPerView&amp;&amp;1===r.slidesPerGroup&amp;&amp;r.slidesPerGroupAuto&amp;&amp;(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex&lt;r.slidesPerGroupSkip?1:l,d=a.virtual&amp;&amp;r.virtual.enabled;if(r.loop){if(n&amp;&amp;!d&amp;&amp;r.loopPreventsSliding)return!1;a.loopFix({direction:"next"}),a._clientLeft=a.wrapperEl.clientLeft}return r.rewind&amp;&amp;a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0);const a=this,{params:i,snapGrid:r,slidesGrid:n,rtlTranslate:l,enabled:o,animating:d}=a;if(!o)return a;const c=a.virtual&amp;&amp;i.virtual.enabled;if(i.loop){if(d&amp;&amp;!c&amp;&amp;i.loopPreventsSliding)return!1;a.loopFix({direction:"prev"}),a._clientLeft=a.wrapperEl.clientLeft}function p(e){return e&lt;0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?a.translate:-a.translate),m=r.map((e=&gt;p(e)));let h=r[m.indexOf(u)-1];if(void 0===h&amp;&amp;i.cssMode){let e;r.forEach(((t,s)=&gt;{u&gt;=t&amp;&amp;(e=s)})),void 0!==e&amp;&amp;(h=r[e&gt;0?e-1:e])}let f=0;if(void 0!==h&amp;&amp;(f=n.indexOf(h),f&lt;0&amp;&amp;(f=a.activeIndex-1),"auto"===i.slidesPerView&amp;&amp;1===i.slidesPerGroup&amp;&amp;i.slidesPerGroupAuto&amp;&amp;(f=f-a.slidesPerViewDynamic("previous",!0)+1,f=Math.max(f,0))),i.rewind&amp;&amp;a.isBeginning){const i=a.params.virtual&amp;&amp;a.params.virtual.enabled&amp;&amp;a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(i,e,t,s)}return a.slideTo(f,e,t,s)},slideReset:function(e,t,s){return void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0),this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e,t,s,a){void 0===e&amp;&amp;(e=this.params.speed),void 0===t&amp;&amp;(t=!0),void 0===a&amp;&amp;(a=.5);const i=this;let r=i.activeIndex;const n=Math.min(i.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/i.params.slidesPerGroup),o=i.rtlTranslate?i.translate:-i.translate;if(o&gt;=i.snapGrid[l]){const e=i.snapGrid[l];o-e&gt;(i.snapGrid[l+1]-e)*a&amp;&amp;(r+=i.params.slidesPerGroup)}else{const e=i.snapGrid[l-1];o-e&lt;=(i.snapGrid[l]-e)*a&amp;&amp;(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,slidesEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,r=e.clickedIndex;const l=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?r&lt;e.loopedSlides-a/2||r&gt;e.slides.length-e.loopedSlides+a/2?(e.loopFix(),r=e.getSlideIndex(f(s,`${l}[data-swiper-slide-index="${i}"]`)[0]),n((()=&gt;{e.slideTo(r)}))):e.slideTo(r):r&gt;e.slides.length-a?(e.loopFix(),r=e.getSlideIndex(f(s,`${l}[data-swiper-slide-index="${i}"]`)[0]),n((()=&gt;{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var B={loopCreate:function(e){const t=this,{params:s,slidesEl:a}=t;if(!s.loop||t.virtual&amp;&amp;t.params.virtual.enabled)return;f(a,`.${s.slideClass}, swiper-slide`).forEach(((e,t)=&gt;{e.setAttribute("data-swiper-slide-index",t)})),t.loopFix({slideRealIndex:e,direction:s.centeredSlides?void 0:"next"})},loopFix:function(e){let{slideRealIndex:t,slideTo:s=!0,direction:a,setTranslate:i,activeSlideIndex:r,byController:n,byMousewheel:l}=void 0===e?{}:e;const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:d,allowSlidePrev:c,allowSlideNext:p,slidesEl:u,params:m}=o;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&amp;&amp;m.virtual.enabled)return s&amp;&amp;(m.centeredSlides||0!==o.snapIndex?m.centeredSlides&amp;&amp;o.snapIndex&lt;m.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&amp;&amp;o.slideTo(o.virtual.slidesBefore,0,!1,!0):o.slideTo(o.virtual.slides.length,0,!1,!0)),o.allowSlidePrev=c,o.allowSlideNext=p,void o.emit("loopFix");const h="auto"===m.slidesPerView?o.slidesPerViewDynamic():Math.ceil(parseFloat(m.slidesPerView,10));let f=m.loopedSlides||h;f%m.slidesPerGroup!=0&amp;&amp;(f+=m.slidesPerGroup-f%m.slidesPerGroup),o.loopedSlides=f;const g=[],v=[];let w=o.activeIndex;void 0===r?r=o.getSlideIndex(o.slides.filter((e=&gt;e.classList.contains(m.slideActiveClass)))[0]):w=r;const b="next"===a||!a,y="prev"===a||!a;let E=0,x=0;if(r&lt;f){E=Math.max(f-r,m.slidesPerGroup);for(let e=0;e&lt;f-r;e+=1){const t=e-Math.floor(e/d.length)*d.length;g.push(d.length-t-1)}}else if(r&gt;o.slides.length-2*f){x=Math.max(r-(o.slides.length-2*f),m.slidesPerGroup);for(let e=0;e&lt;x;e+=1){const t=e-Math.floor(e/d.length)*d.length;v.push(t)}}if(y&amp;&amp;g.forEach((e=&gt;{u.prepend(o.slides[e])})),b&amp;&amp;v.forEach((e=&gt;{u.append(o.slides[e])})),o.recalcSlides(),"auto"===m.slidesPerView&amp;&amp;o.updateSlides(),m.watchSlidesProgress&amp;&amp;o.updateSlidesOffset(),s)if(g.length&gt;0&amp;&amp;y)if(void 0===t){const e=o.slidesGrid[w],t=o.slidesGrid[w+E]-e;l?o.setTranslate(o.translate-t):(o.slideTo(w+E,0,!1,!0),i&amp;&amp;(o.touches[o.isHorizontal()?"startX":"startY"]+=t))}else i&amp;&amp;o.slideToLoop(t,0,!1,!0);else if(v.length&gt;0&amp;&amp;b)if(void 0===t){const e=o.slidesGrid[w],t=o.slidesGrid[w-x]-e;l?o.setTranslate(o.translate-t):(o.slideTo(w-x,0,!1,!0),i&amp;&amp;(o.touches[o.isHorizontal()?"startX":"startY"]+=t))}else o.slideToLoop(t,0,!1,!0);if(o.allowSlidePrev=c,o.allowSlideNext=p,o.controller&amp;&amp;o.controller.control&amp;&amp;!n){const e={slideRealIndex:t,slideTo:!1,direction:a,setTranslate:i,activeSlideIndex:r,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach((t=&gt;{!t.destroyed&amp;&amp;t.params.loop&amp;&amp;t.loopFix(e)})):o.controller.control instanceof o.constructor&amp;&amp;o.controller.control.params.loop&amp;&amp;o.controller.control.loopFix(e)}o.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||e.virtual&amp;&amp;e.params.virtual.enabled)return;e.recalcSlides();const a=[];e.slides.forEach((e=&gt;{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;a[t]=e})),e.slides.forEach((e=&gt;{e.removeAttribute("data-swiper-slide-index")})),a.forEach((e=&gt;{s.append(e)})),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function H(e){const t=this,s=a(),i=r(),n=t.touchEventsData;n.evCache.push(e);const{params:o,touches:d,enabled:c}=t;if(!c)return;if(!o.simulateTouch&amp;&amp;"mouse"===e.pointerType)return;if(t.animating&amp;&amp;o.preventInteractionOnTransition)return;!t.animating&amp;&amp;o.cssMode&amp;&amp;o.loop&amp;&amp;t.loopFix();let p=e;p.originalEvent&amp;&amp;(p=p.originalEvent);let u=p.target;if("wrapper"===o.touchEventsTarget&amp;&amp;!t.wrapperEl.contains(u))return;if("which"in p&amp;&amp;3===p.which)return;if("button"in p&amp;&amp;p.button&gt;0)return;if(n.isTouched&amp;&amp;n.isMoved)return;const m=!!o.noSwipingClass&amp;&amp;""!==o.noSwipingClass,h=e.composedPath?e.composedPath():e.path;m&amp;&amp;p.target&amp;&amp;p.target.shadowRoot&amp;&amp;h&amp;&amp;(u=h[0]);const f=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,g=!(!p.target||!p.target.shadowRoot);if(o.noSwiping&amp;&amp;(g?function(e,t){return void 0===t&amp;&amp;(t=this),function t(s){if(!s||s===a()||s===r())return null;s.assignedSlot&amp;&amp;(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(f,u):u.closest(f)))return void(t.allowClick=!0);if(o.swipeHandler&amp;&amp;!u.closest(o.swipeHandler))return;d.currentX=p.pageX,d.currentY=p.pageY;const v=d.currentX,w=d.currentY,b=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,y=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(b&amp;&amp;(v&lt;=y||v&gt;=i.innerWidth-y)){if("prevent"!==b)return;e.preventDefault()}Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),d.startX=v,d.startY=w,n.touchStartTime=l(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold&gt;0&amp;&amp;(n.allowThresholdMove=!1);let E=!0;u.matches(n.focusableElements)&amp;&amp;(E=!1,"SELECT"===u.nodeName&amp;&amp;(n.isTouched=!1)),s.activeElement&amp;&amp;s.activeElement.matches(n.focusableElements)&amp;&amp;s.activeElement!==u&amp;&amp;s.activeElement.blur();const x=E&amp;&amp;t.allowTouchMove&amp;&amp;o.touchStartPreventDefault;!o.touchStartForcePreventDefault&amp;&amp;!x||u.isContentEditable||p.preventDefault(),t.params.freeMode&amp;&amp;t.params.freeMode.enabled&amp;&amp;t.freeMode&amp;&amp;t.animating&amp;&amp;!o.cssMode&amp;&amp;t.freeMode.onTouchStart(),t.emit("touchStart",p)}function X(e){const t=a(),s=this,i=s.touchEventsData,{params:r,touches:n,rtlTranslate:o,enabled:d}=s;if(!d)return;if(!r.simulateTouch&amp;&amp;"mouse"===e.pointerType)return;let c=e;if(c.originalEvent&amp;&amp;(c=c.originalEvent),!i.isTouched)return void(i.startMoving&amp;&amp;i.isScrolling&amp;&amp;s.emit("touchMoveOpposite",c));const p=i.evCache.findIndex((e=&gt;e.pointerId===c.pointerId));p&gt;=0&amp;&amp;(i.evCache[p]=c);const u=i.evCache.length&gt;1?i.evCache[0]:c,m=u.pageX,h=u.pageY;if(c.preventedByNestedSwiper)return n.startX=m,void(n.startY=h);if(!s.allowTouchMove)return c.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&amp;&amp;(Object.assign(n,{startX:m,startY:h,prevX:s.touches.currentX,prevY:s.touches.currentY,currentX:m,currentY:h}),i.touchStartTime=l()));if(r.touchReleaseOnEdges&amp;&amp;!r.loop)if(s.isVertical()){if(h&lt;n.startY&amp;&amp;s.translate&lt;=s.maxTranslate()||h&gt;n.startY&amp;&amp;s.translate&gt;=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(m&lt;n.startX&amp;&amp;s.translate&lt;=s.maxTranslate()||m&gt;n.startX&amp;&amp;s.translate&gt;=s.minTranslate())return;if(t.activeElement&amp;&amp;c.target===t.activeElement&amp;&amp;c.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);if(i.allowTouchCallbacks&amp;&amp;s.emit("touchMove",c),c.targetTouches&amp;&amp;c.targetTouches.length&gt;1)return;n.currentX=m,n.currentY=h;const f=n.currentX-n.startX,g=n.currentY-n.startY;if(s.params.threshold&amp;&amp;Math.sqrt(f**2+g**2)&lt;s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&amp;&amp;n.currentY===n.startY||s.isVertical()&amp;&amp;n.currentX===n.startX?i.isScrolling=!1:f*f+g*g&gt;=25&amp;&amp;(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,i.isScrolling=s.isHorizontal()?e&gt;r.touchAngle:90-e&gt;r.touchAngle)}if(i.isScrolling&amp;&amp;s.emit("touchMoveOpposite",c),void 0===i.startMoving&amp;&amp;(n.currentX===n.startX&amp;&amp;n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling||s.zoom&amp;&amp;s.params.zoom&amp;&amp;s.params.zoom.enabled&amp;&amp;i.evCache.length&gt;1)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!r.cssMode&amp;&amp;c.cancelable&amp;&amp;c.preventDefault(),r.touchMoveStopPropagation&amp;&amp;!r.nested&amp;&amp;c.stopPropagation();let v=s.isHorizontal()?f:g,w=s.isHorizontal()?n.currentX-n.previousX:n.currentY-n.previousY;r.oneWayMovement&amp;&amp;(v=Math.abs(v)*(o?1:-1),w=Math.abs(w)*(o?1:-1)),n.diff=v,v*=r.touchRatio,o&amp;&amp;(v=-v,w=-w);const b=s.touchesDirection;s.swipeDirection=v&gt;0?"prev":"next",s.touchesDirection=w&gt;0?"prev":"next";const y=s.params.loop&amp;&amp;!r.cssMode;if(!i.isMoved){if(y&amp;&amp;s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!r.grabCursor||!0!==s.allowSlideNext&amp;&amp;!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",c)}let E;i.isMoved&amp;&amp;b!==s.touchesDirection&amp;&amp;y&amp;&amp;Math.abs(v)&gt;=1&amp;&amp;(s.loopFix({direction:s.swipeDirection,setTranslate:!0}),E=!0),s.emit("sliderMove",c),i.isMoved=!0,i.currentTranslate=v+i.startTranslate;let x=!0,S=r.resistanceRatio;if(r.touchReleaseOnEdges&amp;&amp;(S=0),v&gt;0?(y&amp;&amp;!E&amp;&amp;i.currentTranslate&gt;(r.centeredSlides?s.minTranslate()-s.size/2:s.minTranslate())&amp;&amp;s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate&gt;s.minTranslate()&amp;&amp;(x=!1,r.resistance&amp;&amp;(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+v)**S))):v&lt;0&amp;&amp;(y&amp;&amp;!E&amp;&amp;i.currentTranslate&lt;(r.centeredSlides?s.maxTranslate()+s.size/2:s.maxTranslate())&amp;&amp;s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===r.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(r.slidesPerView,10)))}),i.currentTranslate&lt;s.maxTranslate()&amp;&amp;(x=!1,r.resistance&amp;&amp;(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-i.startTranslate-v)**S))),x&amp;&amp;(c.preventedByNestedSwiper=!0),!s.allowSlideNext&amp;&amp;"next"===s.swipeDirection&amp;&amp;i.currentTranslate&lt;i.startTranslate&amp;&amp;(i.currentTranslate=i.startTranslate),!s.allowSlidePrev&amp;&amp;"prev"===s.swipeDirection&amp;&amp;i.currentTranslate&gt;i.startTranslate&amp;&amp;(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),r.threshold&gt;0){if(!(Math.abs(v)&gt;r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=s.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&amp;&amp;!r.cssMode&amp;&amp;((r.freeMode&amp;&amp;r.freeMode.enabled&amp;&amp;s.freeMode||r.watchSlidesProgress)&amp;&amp;(s.updateActiveIndex(),s.updateSlidesClasses()),s.params.freeMode&amp;&amp;r.freeMode.enabled&amp;&amp;s.freeMode&amp;&amp;s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function Y(e){const t=this,s=t.touchEventsData,a=s.evCache.findIndex((t=&gt;t.pointerId===e.pointerId));if(a&gt;=0&amp;&amp;s.evCache.splice(a,1),["pointercancel","pointerout","pointerleave"].includes(e.type)){if(!("pointercancel"===e.type&amp;&amp;(t.browser.isSafari||t.browser.isWebView)))return}const{params:i,touches:r,rtlTranslate:o,slidesGrid:d,enabled:c}=t;if(!c)return;if(!i.simulateTouch&amp;&amp;"mouse"===e.pointerType)return;let p=e;if(p.originalEvent&amp;&amp;(p=p.originalEvent),s.allowTouchCallbacks&amp;&amp;t.emit("touchEnd",p),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&amp;&amp;i.grabCursor&amp;&amp;t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);i.grabCursor&amp;&amp;s.isMoved&amp;&amp;s.isTouched&amp;&amp;(!0===t.allowSlideNext||!0===t.allowSlidePrev)&amp;&amp;t.setGrabCursor(!1);const u=l(),m=u-s.touchStartTime;if(t.allowClick){const e=p.path||p.composedPath&amp;&amp;p.composedPath();t.updateClickedSlide(e&amp;&amp;e[0]||p.target),t.emit("tap click",p),m&lt;300&amp;&amp;u-s.lastClickTime&lt;300&amp;&amp;t.emit("doubleTap doubleClick",p)}if(s.lastClickTime=l(),n((()=&gt;{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===r.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let h;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,h=i.followFinger?o?t.translate:-t.translate:-s.currentTranslate,i.cssMode)return;if(t.params.freeMode&amp;&amp;i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});let f=0,g=t.slidesSizesGrid[0];for(let e=0;e&lt;d.length;e+=e&lt;i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e&lt;i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==d[e+t]?h&gt;=d[e]&amp;&amp;h&lt;d[e+t]&amp;&amp;(f=e,g=d[e+t]-d[e]):h&gt;=d[e]&amp;&amp;(f=e,g=d[d.length-1]-d[d.length-2])}let v=null,w=null;i.rewind&amp;&amp;(t.isBeginning?w=t.params.virtual&amp;&amp;t.params.virtual.enabled&amp;&amp;t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&amp;&amp;(v=0));const b=(h-d[f])/g,y=f&lt;i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(m&gt;i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&amp;&amp;(b&gt;=i.longSwipesRatio?t.slideTo(i.rewind&amp;&amp;t.isEnd?v:f+y):t.slideTo(f)),"prev"===t.swipeDirection&amp;&amp;(b&gt;1-i.longSwipesRatio?t.slideTo(f+y):null!==w&amp;&amp;b&lt;0&amp;&amp;Math.abs(b)&gt;i.longSwipesRatio?t.slideTo(w):t.slideTo(f))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&amp;&amp;(p.target===t.navigation.nextEl||p.target===t.navigation.prevEl)?p.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&amp;&amp;t.slideTo(null!==v?v:f+y),"prev"===t.swipeDirection&amp;&amp;t.slideTo(null!==w?w:f))}}function N(){const e=this,{params:t,el:s}=e;if(s&amp;&amp;0===s.offsetWidth)return;t.breakpoints&amp;&amp;e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:r}=e,n=e.virtual&amp;&amp;e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=n&amp;&amp;t.loop;!("auto"===t.slidesPerView||t.slidesPerView&gt;1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l?e.params.loop&amp;&amp;!n?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&amp;&amp;e.autoplay.running&amp;&amp;e.autoplay.paused&amp;&amp;(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout((()=&gt;{e.autoplay&amp;&amp;e.autoplay.running&amp;&amp;e.autoplay.paused&amp;&amp;e.autoplay.resume()}),500)),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&amp;&amp;r!==e.snapGrid&amp;&amp;e.checkOverflow()}function q(e){const t=this;t.enabled&amp;&amp;(t.allowClick||(t.params.preventClicks&amp;&amp;e.preventDefault(),t.params.preventClicksPropagation&amp;&amp;t.animating&amp;&amp;(e.stopPropagation(),e.stopImmediatePropagation())))}function R(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&amp;&amp;(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();i=0===r?0:(e.translate-e.minTranslate())/r,i!==e.progress&amp;&amp;e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function _(e){A(this,e.target),this.update()}let V=!1;function F(){}const j=(e,t)=&gt;{const s=a(),{params:i,el:r,wrapperEl:n,device:l}=e,o=!!i.nested,d="on"===t?"addEventListener":"removeEventListener",c=t;r[d]("pointerdown",e.onTouchStart,{passive:!1}),s[d]("pointermove",e.onTouchMove,{passive:!1,capture:o}),s[d]("pointerup",e.onTouchEnd,{passive:!0}),s[d]("pointercancel",e.onTouchEnd,{passive:!0}),s[d]("pointerout",e.onTouchEnd,{passive:!0}),s[d]("pointerleave",e.onTouchEnd,{passive:!0}),(i.preventClicks||i.preventClicksPropagation)&amp;&amp;r[d]("click",e.onClick,!0),i.cssMode&amp;&amp;n[d]("scroll",e.onScroll),i.updateOnWindowResize?e[c](l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",N,!0):e[c]("observerUpdate",N,!0),r[d]("load",e.onLoad,{capture:!0})};const W=(e,t)=&gt;e.grid&amp;&amp;t.grid&amp;&amp;t.grid.rows&gt;1;var U={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function K(e,t){return function(s){void 0===s&amp;&amp;(s={});const a=Object.keys(s)[0],i=s[a];"object"==typeof i&amp;&amp;null!==i?(["navigation","pagination","scrollbar"].indexOf(a)&gt;=0&amp;&amp;!0===e[a]&amp;&amp;(e[a]={auto:!0}),a in e&amp;&amp;"enabled"in i?(!0===e[a]&amp;&amp;(e[a]={enabled:!0}),"object"!=typeof e[a]||"enabled"in e[a]||(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),p(t,s)):p(t,s)):p(t,s)}}const Z={eventsEmitter:z,update:k,translate:O,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&amp;&amp;(e=!0);const s=this,{params:a}=s;a.cssMode||(a.autoHeight&amp;&amp;s.updateAutoHeight(),D({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&amp;&amp;(e=!0);const s=this,{params:a}=s;s.animating=!1,a.cssMode||(s.setTransition(0),D({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:G,loop:B,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&amp;&amp;t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&amp;&amp;(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&amp;&amp;requestAnimationFrame((()=&gt;{t.__preventObserver__=!1}))},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&amp;&amp;e.isLocked||e.params.cssMode||(e.isElement&amp;&amp;(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&amp;&amp;requestAnimationFrame((()=&gt;{e.__preventObserver__=!1})))}},events:{attachEvents:function(){const e=this,t=a(),{params:s}=e;e.onTouchStart=H.bind(e),e.onTouchMove=X.bind(e),e.onTouchEnd=Y.bind(e),s.cssMode&amp;&amp;(e.onScroll=R.bind(e)),e.onClick=q.bind(e),e.onLoad=_.bind(e),V||(t.addEventListener("touchstart",F),V=!0),j(e,"on")},detachEvents:function(){j(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:a,el:i}=e,r=a.breakpoints;if(!r||r&amp;&amp;0===Object.keys(r).length)return;const n=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!n||e.currentBreakpoint===n)return;const l=(n in r?r[n]:void 0)||e.originalParams,o=W(e,a),d=W(e,l),c=a.enabled;o&amp;&amp;!d?(i.classList.remove(`${a.containerModifierClass}grid`,`${a.containerModifierClass}grid-column`),e.emitContainerClasses()):!o&amp;&amp;d&amp;&amp;(i.classList.add(`${a.containerModifierClass}grid`),(l.grid.fill&amp;&amp;"column"===l.grid.fill||!l.grid.fill&amp;&amp;"column"===a.grid.fill)&amp;&amp;i.classList.add(`${a.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=&gt;{const s=a[t]&amp;&amp;a[t].enabled,i=l[t]&amp;&amp;l[t].enabled;s&amp;&amp;!i&amp;&amp;e[t].disable(),!s&amp;&amp;i&amp;&amp;e[t].enable()}));const u=l.direction&amp;&amp;l.direction!==a.direction,m=a.loop&amp;&amp;(l.slidesPerView!==a.slidesPerView||u);u&amp;&amp;s&amp;&amp;e.changeDirection(),p(e.params,l);const h=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),c&amp;&amp;!h?e.disable():!c&amp;&amp;h&amp;&amp;e.enable(),e.currentBreakpoint=n,e.emit("_beforeBreakpoint",l),m&amp;&amp;s&amp;&amp;(e.loopDestroy(),e.loopCreate(t),e.updateSlides()),e.emit("breakpoint",l)},getBreakpoint:function(e,t,s){if(void 0===t&amp;&amp;(t="window"),!e||"container"===t&amp;&amp;!s)return;let a=!1;const i=r(),n="window"===t?i.innerHeight:s.clientHeight,l=Object.keys(e).map((e=&gt;{if("string"==typeof e&amp;&amp;0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}}));l.sort(((e,t)=&gt;parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e&lt;l.length;e+=1){const{point:r,value:n}=l[e];"window"===t?i.matchMedia(`(min-width: ${n}px)`).matches&amp;&amp;(a=r):n&lt;=s.clientWidth&amp;&amp;(a=r)}return a||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:a}=s;if(a){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*a;e.isLocked=e.size&gt;s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&amp;&amp;(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&amp;&amp;(e.allowSlidePrev=!e.isLocked),t&amp;&amp;t!==e.isLocked&amp;&amp;(e.isEnd=!1),t!==e.isLocked&amp;&amp;e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:a,el:i,device:r}=e,n=function(e,t){const s=[];return e.forEach((e=&gt;{"object"==typeof e?Object.keys(e).forEach((a=&gt;{e[a]&amp;&amp;s.push(t+a)})):"string"==typeof e&amp;&amp;s.push(t+e)})),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&amp;&amp;s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:a},{grid:s.grid&amp;&amp;s.grid.rows&gt;1},{"grid-column":s.grid&amp;&amp;s.grid.rows&gt;1&amp;&amp;"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&amp;&amp;s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...n),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e.classList.remove(...t),this.emitContainerClasses()}}},Q={};class J{constructor(){let e,t;for(var s=arguments.length,i=new Array(s),r=0;r&lt;s;r++)i[r]=arguments[r];1===i.length&amp;&amp;i[0].constructor&amp;&amp;"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?t=i[0]:[e,t]=i,t||(t={}),t=p({},t),e&amp;&amp;!t.el&amp;&amp;(t.el=e);const n=a();if(t.el&amp;&amp;"string"==typeof t.el&amp;&amp;n.querySelectorAll(t.el).length&gt;1){const e=[];return n.querySelectorAll(t.el).forEach((s=&gt;{const a=p({},t,{el:s});e.push(new J(a))})),e}const l=this;l.__swiper__=!0,l.support=C(),l.device=P({userAgent:t.userAgent}),l.browser=L(),l.eventsListeners={},l.eventsAnyListeners=[],l.modules=[...l.__modules__],t.modules&amp;&amp;Array.isArray(t.modules)&amp;&amp;l.modules.push(...t.modules);const o={};l.modules.forEach((e=&gt;{e({params:t,swiper:l,extendParams:K(t,o),on:l.on.bind(l),once:l.once.bind(l),off:l.off.bind(l),emit:l.emit.bind(l)})}));const d=p({},U,o);return l.params=p({},d,Q,t),l.originalParams=p({},l.params),l.passedParams=p({},t),l.params&amp;&amp;l.params.on&amp;&amp;Object.keys(l.params.on).forEach((e=&gt;{l.on(e,l.params.on[e])})),l.params&amp;&amp;l.params.onAny&amp;&amp;l.onAny(l.params.onAny),Object.assign(l,{enabled:l.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=&gt;"horizontal"===l.params.direction,isVertical:()=&gt;"vertical"===l.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,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,focusableElements:l.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.emit("_swiper"),l.params.init&amp;&amp;l.init(),l}getSlideIndex(e){const{slidesEl:t,params:s}=this,a=b(f(t,`.${s.slideClass}, swiper-slide`)[0]);return b(e)-a}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter((t=&gt;1*t.getAttribute("data-swiper-slide-index")===e))[0])}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=f(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&amp;&amp;e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&amp;&amp;(e.enabled=!1,e.params.grabCursor&amp;&amp;e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=&gt;0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=&gt;0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach((s=&gt;{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&amp;&amp;(e="current"),void 0===t&amp;&amp;(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if(s.centeredSlides){let e,t=a[l].swiperSlideSize;for(let s=l+1;s&lt;a.length;s+=1)a[s]&amp;&amp;!e&amp;&amp;(t+=a[s].swiperSlideSize,o+=1,t&gt;n&amp;&amp;(e=!0));for(let s=l-1;s&gt;=0;s-=1)a[s]&amp;&amp;!e&amp;&amp;(t+=a[s].swiperSlideSize,o+=1,t&gt;n&amp;&amp;(e=!0))}else if("current"===e)for(let e=l+1;e&lt;a.length;e+=1){(t?i[e]+r[e]-i[l]&lt;n:i[e]-i[l]&lt;n)&amp;&amp;(o+=1)}else for(let e=l-1;e&gt;=0;e-=1){i[l]-i[e]&lt;n&amp;&amp;(o+=1)}return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function a(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(s.breakpoints&amp;&amp;e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach((t=&gt;{t.complete&amp;&amp;A(e,t)})),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode&amp;&amp;e.params.freeMode.enabled)a(),e.params.autoHeight&amp;&amp;e.updateAutoHeight();else{if(("auto"===e.params.slidesPerView||e.params.slidesPerView&gt;1)&amp;&amp;e.isEnd&amp;&amp;!e.params.centeredSlides){const t=e.virtual&amp;&amp;e.params.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||a()}s.watchOverflow&amp;&amp;t!==e.snapGrid&amp;&amp;e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&amp;&amp;(t=!0);const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&amp;&amp;"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${a}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.forEach((t=&gt;{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&amp;&amp;s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&amp;&amp;"rtl"===e||!t.rtl&amp;&amp;"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&amp;&amp;t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let s=e||t.params.el;if("string"==typeof s&amp;&amp;(s=document.querySelector(s)),!s)return!1;s.swiper=t,s.shadowEl&amp;&amp;(t.isElement=!0);const a=()=&gt;`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=&gt;{if(s&amp;&amp;s.shadowRoot&amp;&amp;s.shadowRoot.querySelector){return s.shadowRoot.querySelector(a())}return f(s,a())[0]})();return!i&amp;&amp;t.params.createElements&amp;&amp;(i=g("div",t.params.wrapperClass),s.append(i),f(s,`.${t.params.slideClass}`).forEach((e=&gt;{i.append(e)}))),Object.assign(t,{el:s,wrapperEl:i,slidesEl:t.isElement?s:i,mounted:!0,rtl:"rtl"===s.dir.toLowerCase()||"rtl"===w(s,"direction"),rtlTranslate:"horizontal"===t.params.direction&amp;&amp;("rtl"===s.dir.toLowerCase()||"rtl"===w(s,"direction")),wrongRTL:"-webkit-box"===w(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;return!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&amp;&amp;t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&amp;&amp;t.checkOverflow(),t.params.grabCursor&amp;&amp;t.enabled&amp;&amp;t.setGrabCursor(),t.params.loop&amp;&amp;t.virtual&amp;&amp;t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&amp;&amp;t.loopCreate(),t.attachEvents(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach((e=&gt;{e.complete?A(t,e):e.addEventListener("load",(e=&gt;{A(t,e.target)}))})),I(t),t.initialized=!0,I(t),t.emit("init"),t.emit("afterInit")),t}destroy(e,t){void 0===e&amp;&amp;(e=!0),void 0===t&amp;&amp;(t=!0);const s=this,{params:a,el:i,wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&amp;&amp;s.loopDestroy(),t&amp;&amp;(s.removeClasses(),i.removeAttribute("style"),r.removeAttribute("style"),n&amp;&amp;n.length&amp;&amp;n.forEach((e=&gt;{e.classList.remove(a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")}))),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=&gt;{s.off(e)})),!1!==e&amp;&amp;(s.el.swiper=null,function(e){const t=e;Object.keys(t).forEach((e=&gt;{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){p(Q,e)}static get extendedDefaults(){return Q}static get defaults(){return U}static installModule(e){J.prototype.__modules__||(J.prototype.__modules__=[]);const t=J.prototype.__modules__;"function"==typeof e&amp;&amp;t.indexOf(e)&lt;0&amp;&amp;t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=&gt;J.installModule(e))),J):(J.installModule(e),J)}}function ee(e,t,s,a){return e.params.createElements&amp;&amp;Object.keys(a).forEach((i=&gt;{if(!s[i]&amp;&amp;!0===s.auto){let r=f(e.el,`.${a[i]}`)[0];r||(r=g("div",a[i]),r.className=a[i],e.el.append(r)),s[i]=r,t[i]=r}})),s}function te(e){return void 0===e&amp;&amp;(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function se(e){const t=this,{params:s,slidesEl:a}=t;s.loop&amp;&amp;t.loopDestroy();const i=e=&gt;{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,a.append(t.children[0]),t.innerHTML=""}else a.append(e)};if("object"==typeof e&amp;&amp;"length"in e)for(let t=0;t&lt;e.length;t+=1)e[t]&amp;&amp;i(e[t]);else i(e);t.recalcSlides(),s.loop&amp;&amp;t.loopCreate(),s.observer&amp;&amp;!t.isElement||t.update()}function ae(e){const t=this,{params:s,activeIndex:a,slidesEl:i}=t;s.loop&amp;&amp;t.loopDestroy();let r=a+1;const n=e=&gt;{if("string"==typeof e){const t=document.createElement("div");t.innerHTML=e,i.prepend(t.children[0]),t.innerHTML=""}else i.prepend(e)};if("object"==typeof e&amp;&amp;"length"in e){for(let t=0;t&lt;e.length;t+=1)e[t]&amp;&amp;n(e[t]);r=a+e.length}else n(e);t.recalcSlides(),s.loop&amp;&amp;t.loopCreate(),s.observer&amp;&amp;!t.isElement||t.update(),t.slideTo(r,0,!1)}function ie(e,t){const s=this,{params:a,activeIndex:i,slidesEl:r}=s;let n=i;a.loop&amp;&amp;(n-=s.loopedSlides,s.loopDestroy(),s.recalcSlides());const l=s.slides.length;if(e&lt;=0)return void s.prependSlide(t);if(e&gt;=l)return void s.appendSlide(t);let o=n&gt;e?n+1:n;const d=[];for(let t=l-1;t&gt;=e;t-=1){const e=s.slides[t];e.remove(),d.unshift(e)}if("object"==typeof t&amp;&amp;"length"in t){for(let e=0;e&lt;t.length;e+=1)t[e]&amp;&amp;r.append(t[e]);o=n&gt;e?n+t.length:n}else r.append(t);for(let e=0;e&lt;d.length;e+=1)r.append(d[e]);s.recalcSlides(),a.loop&amp;&amp;s.loopCreate(),a.observer&amp;&amp;!s.isElement||s.update(),a.loop?s.slideTo(o+s.loopedSlides,0,!1):s.slideTo(o,0,!1)}function re(e){const t=this,{params:s,activeIndex:a}=t;let i=a;s.loop&amp;&amp;(i-=t.loopedSlides,t.loopDestroy());let r,n=i;if("object"==typeof e&amp;&amp;"length"in e){for(let s=0;s&lt;e.length;s+=1)r=e[s],t.slides[r]&amp;&amp;t.slides[r].remove(),r&lt;n&amp;&amp;(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&amp;&amp;t.slides[r].remove(),r&lt;n&amp;&amp;(n-=1),n=Math.max(n,0);t.recalcSlides(),s.loop&amp;&amp;t.loopCreate(),s.observer&amp;&amp;!t.isElement||t.update(),s.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)}function ne(){const e=this,t=[];for(let s=0;s&lt;e.slides.length;s+=1)t.push(s);e.removeSlide(t)}function le(e){const{effect:t,swiper:s,on:a,setTranslate:i,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;a("beforeInit",(()=&gt;{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&amp;&amp;l()&amp;&amp;s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),a("setTranslate",(()=&gt;{s.params.effect===t&amp;&amp;i()})),a("setTransition",((e,a)=&gt;{s.params.effect===t&amp;&amp;r(a)})),a("transitionEnd",(()=&gt;{if(s.params.effect===t&amp;&amp;o){if(!d||!d().slideShadows)return;s.slides.forEach((e=&gt;{e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((e=&gt;e.remove()))})),o()}})),a("virtualUpdate",(()=&gt;{s.params.effect===t&amp;&amp;(s.slides.length||(c=!0),requestAnimationFrame((()=&gt;{c&amp;&amp;s.slides&amp;&amp;s.slides.length&amp;&amp;(i(),c=!1)})))}))}function oe(e,t){const s=h(t);return s!==t&amp;&amp;(s.style.backfaceVisibility="hidden",s.style["-webkit-backface-visibility"]="hidden"),s}function de(e){let{swiper:t,duration:s,transformElements:a,allSlides:i}=e;const{activeIndex:r}=t;if(t.params.virtualTranslate&amp;&amp;0!==s){let e,s=!1;e=i?a:a.filter((e=&gt;{const s=e.classList.contains("swiper-slide-transform")?(e=&gt;{if(!e.parentElement)return t.slides.filter((t=&gt;t.shadowEl&amp;&amp;t.shadowEl===e.parentNode))[0];return e.parentElement})(e):e;return t.getSlideIndex(s)===r})),e.forEach((e=&gt;{E(e,(()=&gt;{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});t.wrapperEl.dispatchEvent(e)}))}))}}function ce(e,t,s){const a="swiper-slide-shadow"+(s?`-${s}`:""),i=h(t);let r=i.querySelector(`.${a}`);return r||(r=g("div","swiper-slide-shadow"+(s?`-${s}`:"")),i.append(r)),r}Object.keys(Z).forEach((e=&gt;{Object.keys(Z[e]).forEach((t=&gt;{J.prototype[t]=Z[e][t]}))})),J.use([function(e){let{swiper:t,on:s,emit:a}=e;const i=r();let n=null,l=null;const o=()=&gt;{t&amp;&amp;!t.destroyed&amp;&amp;t.initialized&amp;&amp;(a("beforeResize"),a("resize"))},d=()=&gt;{t&amp;&amp;!t.destroyed&amp;&amp;t.initialized&amp;&amp;a("orientationchange")};s("init",(()=&gt;{t.params.resizeObserver&amp;&amp;void 0!==i.ResizeObserver?t&amp;&amp;!t.destroyed&amp;&amp;t.initialized&amp;&amp;(n=new ResizeObserver((e=&gt;{l=i.requestAnimationFrame((()=&gt;{const{width:s,height:a}=t;let i=s,r=a;e.forEach((e=&gt;{let{contentBoxSize:s,contentRect:a,target:n}=e;n&amp;&amp;n!==t.el||(i=a?a.width:(s[0]||s).inlineSize,r=a?a.height:(s[0]||s).blockSize)})),i===s&amp;&amp;r===a||o()}))})),n.observe(t.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",d))})),s("destroy",(()=&gt;{l&amp;&amp;i.cancelAnimationFrame(l),n&amp;&amp;n.unobserve&amp;&amp;t.el&amp;&amp;(n.unobserve(t.el),n=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",d)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=[],l=r(),o=function(e,s){void 0===s&amp;&amp;(s={});const a=new(l.MutationObserver||l.WebkitMutationObserver)((e=&gt;{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const s=function(){i("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(s):l.setTimeout(s,0)}));a.observe(e,{attributes:void 0===s.attributes||s.attributes,childList:void 0===s.childList||s.childList,characterData:void 0===s.characterData||s.characterData}),n.push(a)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",(()=&gt;{if(t.params.observer){if(t.params.observeParents){const e=y(t.el);for(let t=0;t&lt;e.length;t+=1)o(e[t])}o(t.el,{childList:t.params.observeSlideChildren}),o(t.wrapperEl,{attributes:!1})}})),a("destroy",(()=&gt;{n.forEach((e=&gt;{e.disconnect()})),n.splice(0,n.length)}))}]);const pe=[function(e){let t,{swiper:s,extendParams:i,on:r,emit:n}=e;i({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});const l=a();s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const o=l.createElement("div");function d(e,t){const a=s.params.virtual;if(a.cache&amp;&amp;s.virtual.cache[t])return s.virtual.cache[t];let i;return a.renderSlide?(i=a.renderSlide.call(s,e,t),"string"==typeof i&amp;&amp;(o.innerHTML=i,i=o.children[0])):i=s.isElement?g("swiper-slide"):g("div",s.params.slideClass),i.setAttribute("data-swiper-slide-index",t),a.renderSlide||(i.innerHTML=e),a.cache&amp;&amp;(s.virtual.cache[t]=i),i}function c(e){const{slidesPerView:t,slidesPerGroup:a,centeredSlides:i,loop:r}=s.params,{addSlidesBefore:l,addSlidesAfter:o}=s.params.virtual,{from:c,to:p,slides:u,slidesGrid:m,offset:h}=s.virtual;s.params.cssMode||s.updateActiveIndex();const g=s.activeIndex||0;let v,w,b;v=s.rtlTranslate?"right":s.isHorizontal()?"left":"top",i?(w=Math.floor(t/2)+a+o,b=Math.floor(t/2)+a+l):(w=t+(a-1)+o,b=(r?t:a)+l);let y=g-b,E=g+w;r||(y=Math.max(y,0),E=Math.min(E,u.length-1));let x=(s.slidesGrid[y]||0)-(s.slidesGrid[0]||0);function S(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),n("virtualUpdate")}if(r&amp;&amp;g&gt;=b?(y-=b,i||(x+=s.slidesGrid[0])):r&amp;&amp;g&lt;b&amp;&amp;(y=-b,i&amp;&amp;(x+=s.slidesGrid[0])),Object.assign(s.virtual,{from:y,to:E,offset:x,slidesGrid:s.slidesGrid,slidesBefore:b,slidesAfter:w}),c===y&amp;&amp;p===E&amp;&amp;!e)return s.slidesGrid!==m&amp;&amp;x!==h&amp;&amp;s.slides.forEach((e=&gt;{e.style[v]=x-Math.abs(s.cssOverflowAdjustment())+"px"})),s.updateProgress(),void n("virtualUpdate");if(s.params.virtual.renderExternal)return s.params.virtual.renderExternal.call(s,{offset:x,from:y,to:E,slides:function(){const e=[];for(let t=y;t&lt;=E;t+=1)e.push(u[t]);return e}()}),void(s.params.virtual.renderExternalUpdate?S():n("virtualUpdate"));const T=[],M=[],C=e=&gt;{let t=e;return e&lt;0?t=u.length+e:t&gt;=u.length&amp;&amp;(t-=u.length),t};if(e)s.slidesEl.querySelectorAll(`.${s.params.slideClass}, swiper-slide`).forEach((e=&gt;{e.remove()}));else for(let e=c;e&lt;=p;e+=1)if(e&lt;y||e&gt;E){const t=C(e);s.slidesEl.querySelectorAll(`.${s.params.slideClass}[data-swiper-slide-index="${t}"], swiper-slide[data-swiper-slide-index="${t}"]`).forEach((e=&gt;{e.remove()}))}const P=r?-u.length:0,L=r?2*u.length:u.length;for(let t=P;t&lt;L;t+=1)if(t&gt;=y&amp;&amp;t&lt;=E){const s=C(t);void 0===p||e?M.push(s):(t&gt;p&amp;&amp;M.push(s),t&lt;c&amp;&amp;T.push(s))}if(M.forEach((e=&gt;{s.slidesEl.append(d(u[e],e))})),r)for(let e=T.length-1;e&gt;=0;e-=1){const t=T[e];s.slidesEl.prepend(d(u[t],t))}else T.sort(((e,t)=&gt;t-e)),T.forEach((e=&gt;{s.slidesEl.prepend(d(u[e],e))}));f(s.slidesEl,".swiper-slide, swiper-slide").forEach((e=&gt;{e.style[v]=x-Math.abs(s.cssOverflowAdjustment())+"px"})),S()}r("beforeInit",(()=&gt;{if(!s.params.virtual.enabled)return;let e;if(void 0===s.passedParams.virtual.slides){const t=[...s.slidesEl.children].filter((e=&gt;e.matches(`.${s.params.slideClass}, swiper-slide`)));t&amp;&amp;t.length&amp;&amp;(s.virtual.slides=[...t],e=!0,t.forEach(((e,t)=&gt;{e.setAttribute("data-swiper-slide-index",t),s.virtual.cache[t]=e,e.remove()})))}e||(s.virtual.slides=s.params.virtual.slides),s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,s.params.initialSlide||c()})),r("setTranslate",(()=&gt;{s.params.virtual.enabled&amp;&amp;(s.params.cssMode&amp;&amp;!s._immediateVirtual?(clearTimeout(t),t=setTimeout((()=&gt;{c()}),100)):c())})),r("init update resize",(()=&gt;{s.params.virtual.enabled&amp;&amp;s.params.cssMode&amp;&amp;u(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)})),Object.assign(s.virtual,{appendSlide:function(e){if("object"==typeof e&amp;&amp;"length"in e)for(let t=0;t&lt;e.length;t+=1)e[t]&amp;&amp;s.virtual.slides.push(e[t]);else s.virtual.slides.push(e);c(!0)},prependSlide:function(e){const t=s.activeIndex;let a=t+1,i=1;if(Array.isArray(e)){for(let t=0;t&lt;e.length;t+=1)e[t]&amp;&amp;s.virtual.slides.unshift(e[t]);a=t+e.length,i=e.length}else s.virtual.slides.unshift(e);if(s.params.virtual.cache){const e=s.virtual.cache,t={};Object.keys(e).forEach((s=&gt;{const a=e[s],r=a.getAttribute("data-swiper-slide-index");r&amp;&amp;a.setAttribute("data-swiper-slide-index",parseInt(r,10)+i),t[parseInt(s,10)+i]=a})),s.virtual.cache=t}c(!0),s.slideTo(a,0)},removeSlide:function(e){if(null==e)return;let t=s.activeIndex;if(Array.isArray(e))for(let a=e.length-1;a&gt;=0;a-=1)s.virtual.slides.splice(e[a],1),s.params.virtual.cache&amp;&amp;delete s.virtual.cache[e[a]],e[a]&lt;t&amp;&amp;(t-=1),t=Math.max(t,0);else s.virtual.slides.splice(e,1),s.params.virtual.cache&amp;&amp;delete s.virtual.cache[e],e&lt;t&amp;&amp;(t-=1),t=Math.max(t,0);c(!0),s.slideTo(t,0)},removeAllSlides:function(){s.virtual.slides=[],s.params.virtual.cache&amp;&amp;(s.virtual.cache={}),c(!0),s.slideTo(0,0)},update:c})},function(e){let{swiper:t,extendParams:s,on:i,emit:n}=e;const l=a(),o=r();function d(e){if(!t.enabled)return;const{rtlTranslate:s}=t;let a=e;a.originalEvent&amp;&amp;(a=a.originalEvent);const i=a.keyCode||a.charCode,r=t.params.keyboard.pageUpDown,d=r&amp;&amp;33===i,c=r&amp;&amp;34===i,p=37===i,u=39===i,m=38===i,h=40===i;if(!t.allowSlideNext&amp;&amp;(t.isHorizontal()&amp;&amp;u||t.isVertical()&amp;&amp;h||c))return!1;if(!t.allowSlidePrev&amp;&amp;(t.isHorizontal()&amp;&amp;p||t.isVertical()&amp;&amp;m||d))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||l.activeElement&amp;&amp;l.activeElement.nodeName&amp;&amp;("input"===l.activeElement.nodeName.toLowerCase()||"textarea"===l.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&amp;&amp;(d||c||p||u||m||h)){let e=!1;if(y(t.el,`.${t.params.slideClass}, swiper-slide`).length&gt;0&amp;&amp;0===y(t.el,`.${t.params.slideActiveClass}`).length)return;const a=t.el,i=a.clientWidth,r=a.clientHeight,n=o.innerWidth,l=o.innerHeight,d=v(a);s&amp;&amp;(d.left-=a.scrollLeft);const c=[[d.left,d.top],[d.left+i,d.top],[d.left,d.top+r],[d.left+i,d.top+r]];for(let t=0;t&lt;c.length;t+=1){const s=c[t];if(s[0]&gt;=0&amp;&amp;s[0]&lt;=n&amp;&amp;s[1]&gt;=0&amp;&amp;s[1]&lt;=l){if(0===s[0]&amp;&amp;0===s[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((d||c||p||u)&amp;&amp;(a.preventDefault?a.preventDefault():a.returnValue=!1),((c||u)&amp;&amp;!s||(d||p)&amp;&amp;s)&amp;&amp;t.slideNext(),((d||p)&amp;&amp;!s||(c||u)&amp;&amp;s)&amp;&amp;t.slidePrev()):((d||c||m||h)&amp;&amp;(a.preventDefault?a.preventDefault():a.returnValue=!1),(c||h)&amp;&amp;t.slideNext(),(d||m)&amp;&amp;t.slidePrev()),n("keyPress",i)}}function c(){t.keyboard.enabled||(l.addEventListener("keydown",d),t.keyboard.enabled=!0)}function p(){t.keyboard.enabled&amp;&amp;(l.removeEventListener("keydown",d),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},s({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),i("init",(()=&gt;{t.params.keyboard.enabled&amp;&amp;c()})),i("destroy",(()=&gt;{t.keyboard.enabled&amp;&amp;p()})),Object.assign(t.keyboard,{enable:c,disable:p})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const o=r();let d;s({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let c,p=l();const u=[];function m(){t.enabled&amp;&amp;(t.mouseEntered=!0)}function h(){t.enabled&amp;&amp;(t.mouseEntered=!1)}function f(e){return!(t.params.mousewheel.thresholdDelta&amp;&amp;e.delta&lt;t.params.mousewheel.thresholdDelta)&amp;&amp;(!(t.params.mousewheel.thresholdTime&amp;&amp;l()-p&lt;t.params.mousewheel.thresholdTime)&amp;&amp;(e.delta&gt;=6&amp;&amp;l()-p&lt;60||(e.direction&lt;0?t.isEnd&amp;&amp;!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&amp;&amp;!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),p=(new o.Date).getTime(),!1)))}function g(e){let s=e,a=!0;if(!t.enabled)return;const r=t.params.mousewheel;t.params.cssMode&amp;&amp;s.preventDefault();let o=t.el;"container"!==t.params.mousewheel.eventsTarget&amp;&amp;(o=document.querySelector(t.params.mousewheel.eventsTarget));const p=o&amp;&amp;o.contains(s.target);if(!t.mouseEntered&amp;&amp;!p&amp;&amp;!r.releaseOnEdges)return!0;s.originalEvent&amp;&amp;(s=s.originalEvent);let m=0;const h=t.rtlTranslate?-1:1,g=function(e){let t=0,s=0,a=0,i=0;return"detail"in e&amp;&amp;(s=e.detail),"wheelDelta"in e&amp;&amp;(s=-e.wheelDelta/120),"wheelDeltaY"in e&amp;&amp;(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&amp;&amp;(t=-e.wheelDeltaX/120),"axis"in e&amp;&amp;e.axis===e.HORIZONTAL_AXIS&amp;&amp;(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&amp;&amp;(i=e.deltaY),"deltaX"in e&amp;&amp;(a=e.deltaX),e.shiftKey&amp;&amp;!a&amp;&amp;(a=i,i=0),(a||i)&amp;&amp;e.deltaMode&amp;&amp;(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&amp;&amp;!t&amp;&amp;(t=a&lt;1?-1:1),i&amp;&amp;!s&amp;&amp;(s=i&lt;1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(r.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(g.pixelX)&gt;Math.abs(g.pixelY)))return!0;m=-g.pixelX*h}else{if(!(Math.abs(g.pixelY)&gt;Math.abs(g.pixelX)))return!0;m=-g.pixelY}else m=Math.abs(g.pixelX)&gt;Math.abs(g.pixelY)?-g.pixelX*h:-g.pixelY;if(0===m)return!0;r.invert&amp;&amp;(m=-m);let v=t.getTranslate()+m*r.sensitivity;if(v&gt;=t.minTranslate()&amp;&amp;(v=t.minTranslate()),v&lt;=t.maxTranslate()&amp;&amp;(v=t.maxTranslate()),a=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),a&amp;&amp;t.params.nested&amp;&amp;s.stopPropagation(),t.params.freeMode&amp;&amp;t.params.freeMode.enabled){const e={time:l(),delta:Math.abs(m),direction:Math.sign(m)},a=c&amp;&amp;e.time&lt;c.time+500&amp;&amp;e.delta&lt;=c.delta&amp;&amp;e.direction===c.direction;if(!a){c=void 0;let l=t.getTranslate()+m*r.sensitivity;const o=t.isBeginning,p=t.isEnd;if(l&gt;=t.minTranslate()&amp;&amp;(l=t.minTranslate()),l&lt;=t.maxTranslate()&amp;&amp;(l=t.maxTranslate()),t.setTransition(0),t.setTranslate(l),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!o&amp;&amp;t.isBeginning||!p&amp;&amp;t.isEnd)&amp;&amp;t.updateSlidesClasses(),t.params.loop&amp;&amp;t.loopFix({direction:e.direction&lt;0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(d),d=void 0,u.length&gt;=15&amp;&amp;u.shift();const s=u.length?u[u.length-1]:void 0,a=u[0];if(u.push(e),s&amp;&amp;(e.delta&gt;s.delta||e.direction!==s.direction))u.splice(0);else if(u.length&gt;=15&amp;&amp;e.time-a.time&lt;500&amp;&amp;a.delta-e.delta&gt;=1&amp;&amp;e.delta&lt;=6){const s=m&gt;0?.8:.2;c=e,u.splice(0),d=n((()=&gt;{t.slideToClosest(t.params.speed,!0,void 0,s)}),0)}d||(d=n((()=&gt;{c=e,u.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(a||i("scroll",s),t.params.autoplay&amp;&amp;t.params.autoplayDisableOnInteraction&amp;&amp;t.autoplay.stop(),l===t.minTranslate()||l===t.maxTranslate())return!0}}else{const s={time:l(),delta:Math.abs(m),direction:Math.sign(m),raw:e};u.length&gt;=2&amp;&amp;u.shift();const a=u.length?u[u.length-1]:void 0;if(u.push(s),a?(s.direction!==a.direction||s.delta&gt;a.delta||s.time&gt;a.time+150)&amp;&amp;f(s):f(s),function(e){const s=t.params.mousewheel;if(e.direction&lt;0){if(t.isEnd&amp;&amp;!t.params.loop&amp;&amp;s.releaseOnEdges)return!0}else if(t.isBeginning&amp;&amp;!t.params.loop&amp;&amp;s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function v(e){let s=t.el;"container"!==t.params.mousewheel.eventsTarget&amp;&amp;(s=document.querySelector(t.params.mousewheel.eventsTarget)),s[e]("mouseenter",m),s[e]("mouseleave",h),s[e]("wheel",g)}function w(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",g),!0):!t.mousewheel.enabled&amp;&amp;(v("addEventListener"),t.mousewheel.enabled=!0,!0)}function b(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,g),!0):!!t.mousewheel.enabled&amp;&amp;(v("removeEventListener"),t.mousewheel.enabled=!1,!0)}a("init",(()=&gt;{!t.params.mousewheel.enabled&amp;&amp;t.params.cssMode&amp;&amp;b(),t.params.mousewheel.enabled&amp;&amp;w()})),a("destroy",(()=&gt;{t.params.cssMode&amp;&amp;w(),t.mousewheel.enabled&amp;&amp;b()})),Object.assign(t.mousewheel,{enable:w,disable:b})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const r=e=&gt;(Array.isArray(e)||(e=[e].filter((e=&gt;!!e))),e);function n(e){let s;return e&amp;&amp;"string"==typeof e&amp;&amp;t.isElement&amp;&amp;(s=t.el.shadowRoot.querySelector(e),s)?s:(e&amp;&amp;("string"==typeof e&amp;&amp;(s=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&amp;&amp;"string"==typeof e&amp;&amp;s.length&gt;1&amp;&amp;1===t.el.querySelectorAll(e).length&amp;&amp;(s=t.el.querySelector(e))),e&amp;&amp;!s?e:s)}function l(e,s){const a=t.params.navigation;(e=r(e)).forEach((e=&gt;{e&amp;&amp;(e.classList[s?"add":"remove"](...a.disabledClass.split(" ")),"BUTTON"===e.tagName&amp;&amp;(e.disabled=s),t.params.watchOverflow&amp;&amp;t.enabled&amp;&amp;e.classList[t.isLocked?"add":"remove"](a.lockClass))}))}function o(){const{nextEl:e,prevEl:s}=t.navigation;if(t.params.loop)return l(s,!1),void l(e,!1);l(s,t.isBeginning&amp;&amp;!t.params.rewind),l(e,t.isEnd&amp;&amp;!t.params.rewind)}function d(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&amp;&amp;(t.slidePrev(),i("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&amp;&amp;(t.slideNext(),i("navigationNext"))}function p(){const e=t.params.navigation;if(t.params.navigation=ee(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&amp;&amp;!e.prevEl)return;let s=n(e.nextEl),a=n(e.prevEl);Object.assign(t.navigation,{nextEl:s,prevEl:a}),s=r(s),a=r(a);const i=(s,a)=&gt;{s&amp;&amp;s.addEventListener("click","next"===a?c:d),!t.enabled&amp;&amp;s&amp;&amp;s.classList.add(...e.lockClass.split(" "))};s.forEach((e=&gt;i(e,"next"))),a.forEach((e=&gt;i(e,"prev")))}function u(){let{nextEl:e,prevEl:s}=t.navigation;e=r(e),s=r(s);const a=(e,s)=&gt;{e.removeEventListener("click","next"===s?c:d),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach((e=&gt;a(e,"next"))),s.forEach((e=&gt;a(e,"prev")))}a("init",(()=&gt;{!1===t.params.navigation.enabled?m():(p(),o())})),a("toEdge fromEdge lock unlock",(()=&gt;{o()})),a("destroy",(()=&gt;{u()})),a("enable disable",(()=&gt;{let{nextEl:e,prevEl:s}=t.navigation;e=r(e),s=r(s),[...e,...s].filter((e=&gt;!!e)).forEach((e=&gt;e.classList[t.enabled?"remove":"add"](t.params.navigation.lockClass)))})),a("click",((e,s)=&gt;{let{nextEl:a,prevEl:n}=t.navigation;a=r(a),n=r(n);const l=s.target;if(t.params.navigation.hideOnClick&amp;&amp;!n.includes(l)&amp;&amp;!a.includes(l)){if(t.pagination&amp;&amp;t.params.pagination&amp;&amp;t.params.pagination.clickable&amp;&amp;(t.pagination.el===l||t.pagination.el.contains(l)))return;let e;a.length?e=a[0].classList.contains(t.params.navigation.hiddenClass):n.length&amp;&amp;(e=n[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...a,...n].filter((e=&gt;!!e)).forEach((e=&gt;e.classList.toggle(t.params.navigation.hiddenClass)))}}));const m=()=&gt;{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=&gt;{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),p(),o()},disable:m,update:o,init:p,destroy:u})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const r="swiper-pagination";let n;s({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:e=&gt;e,formatFractionTotal:e=&gt;e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,bullets:[]};let l=0;const o=e=&gt;(Array.isArray(e)||(e=[e].filter((e=&gt;!!e))),e);function d(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&amp;&amp;0===t.pagination.el.length}function c(e,s){const{bulletActiveClass:a}=t.params.pagination;e&amp;&amp;(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&amp;&amp;(e.classList.add(`${a}-${s}`),(e=e[("prev"===s?"previous":"next")+"ElementSibling"])&amp;&amp;e.classList.add(`${a}-${s}-${s}`))}function p(e){const s=e.target.closest(te(t.params.pagination.bulletClass));if(!s)return;e.preventDefault();const a=b(s)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===a)return;const e=t.getSlideIndexByData(a),s=t.getSlideIndexByData(t.realIndex);e&gt;t.slides.length-t.loopedSlides&amp;&amp;t.loopFix({direction:e&gt;s?"next":"prev",activeSlideIndex:e,slideTo:!1}),t.slideToLoop(a)}else t.slideTo(a)}function u(){const e=t.rtl,s=t.params.pagination;if(d())return;let a,r,p=t.pagination.el;p=o(p);const u=t.virtual&amp;&amp;t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,m=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(r=t.previousRealIndex||0,a=t.params.slidesPerGroup&gt;1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(a=t.snapIndex,r=t.previousSnapIndex):(r=t.previousIndex||0,a=t.activeIndex||0),"bullets"===s.type&amp;&amp;t.pagination.bullets&amp;&amp;t.pagination.bullets.length&gt;0){const i=t.pagination.bullets;let o,d,u;if(s.dynamicBullets&amp;&amp;(n=x(i[0],t.isHorizontal()?"width":"height",!0),p.forEach((e=&gt;{e.style[t.isHorizontal()?"width":"height"]=n*(s.dynamicMainBullets+4)+"px"})),s.dynamicMainBullets&gt;1&amp;&amp;void 0!==r&amp;&amp;(l+=a-(r||0),l&gt;s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l&lt;0&amp;&amp;(l=0)),o=Math.max(a-l,0),d=o+(Math.min(i.length,s.dynamicMainBullets)-1),u=(d+o)/2),i.forEach((e=&gt;{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map((e=&gt;`${s.bulletActiveClass}${e}`))].map((e=&gt;"string"==typeof e&amp;&amp;e.includes(" ")?e.split(" "):e)).flat();e.classList.remove(...t)})),p.length&gt;1)i.forEach((e=&gt;{const t=b(e);t===a&amp;&amp;e.classList.add(...s.bulletActiveClass.split(" ")),s.dynamicBullets&amp;&amp;(t&gt;=o&amp;&amp;t&lt;=d&amp;&amp;e.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),t===o&amp;&amp;c(e,"prev"),t===d&amp;&amp;c(e,"next"))}));else{const e=i[a];if(e&amp;&amp;e.classList.add(...s.bulletActiveClass.split(" ")),s.dynamicBullets){const e=i[o],t=i[d];for(let e=o;e&lt;=d;e+=1)i[e]&amp;&amp;i[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));c(e,"prev"),c(t,"next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),r=(n*a-n)/2-u*n,l=e?"right":"left";i.forEach((e=&gt;{e.style[t.isHorizontal()?l:"top"]=`${r}px`}))}}p.forEach(((e,r)=&gt;{if("fraction"===s.type&amp;&amp;(e.querySelectorAll(te(s.currentClass)).forEach((e=&gt;{e.textContent=s.formatFractionCurrent(a+1)})),e.querySelectorAll(te(s.totalClass)).forEach((e=&gt;{e.textContent=s.formatFractionTotal(m)}))),"progressbar"===s.type){let i;i=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const r=(a+1)/m;let n=1,l=1;"horizontal"===i?n=r:l=r,e.querySelectorAll(te(s.progressbarFillClass)).forEach((e=&gt;{e.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${l})`,e.style.transitionDuration=`${t.params.speed}ms`}))}"custom"===s.type&amp;&amp;s.renderCustom?(e.innerHTML=s.renderCustom(t,a+1,m),0===r&amp;&amp;i("paginationRender",e)):(0===r&amp;&amp;i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&amp;&amp;t.enabled&amp;&amp;e.classList[t.isLocked?"add":"remove"](s.lockClass)}))}function m(){const e=t.params.pagination;if(d())return;const s=t.virtual&amp;&amp;t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let a=t.pagination.el;a=o(a);let r="";if("bullets"===e.type){let a=t.params.loop?Math.ceil(s/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&amp;&amp;t.params.freeMode.enabled&amp;&amp;a&gt;s&amp;&amp;(a=s);for(let s=0;s&lt;a;s+=1)e.renderBullet?r+=e.renderBullet.call(t,s,e.bulletClass):r+=`&lt;${e.bulletElement} class="${e.bulletClass}"&gt;&lt;/${e.bulletElement}&gt;`}"fraction"===e.type&amp;&amp;(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`&lt;span class="${e.currentClass}"&gt;&lt;/span&gt; / &lt;span class="${e.totalClass}"&gt;&lt;/span&gt;`),"progressbar"===e.type&amp;&amp;(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`&lt;span class="${e.progressbarFillClass}"&gt;&lt;/span&gt;`),t.pagination.bullets=[],a.forEach((s=&gt;{"custom"!==e.type&amp;&amp;(s.innerHTML=r||""),"bullets"===e.type&amp;&amp;t.pagination.bullets.push(...s.querySelectorAll(te(e.bulletClass)))})),"custom"!==e.type&amp;&amp;i("paginationRender",a[0])}function h(){t.params.pagination=ee(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s;"string"==typeof e.el&amp;&amp;t.isElement&amp;&amp;(s=t.el.shadowRoot.querySelector(e.el)),s||"string"!=typeof e.el||(s=[...document.querySelectorAll(e.el)]),s||(s=e.el),s&amp;&amp;0!==s.length&amp;&amp;(t.params.uniqueNavElements&amp;&amp;"string"==typeof e.el&amp;&amp;Array.isArray(s)&amp;&amp;s.length&gt;1&amp;&amp;(s=[...t.el.querySelectorAll(e.el)],s.length&gt;1&amp;&amp;(s=s.filter((e=&gt;y(e,".swiper")[0]===t.el))[0])),Array.isArray(s)&amp;&amp;1===s.length&amp;&amp;(s=s[0]),Object.assign(t.pagination,{el:s}),s=o(s),s.forEach((s=&gt;{"bullets"===e.type&amp;&amp;e.clickable&amp;&amp;s.classList.add(e.clickableClass),s.classList.add(e.modifierClass+e.type),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&amp;&amp;e.dynamicBullets&amp;&amp;(s.classList.add(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets&lt;1&amp;&amp;(e.dynamicMainBullets=1)),"progressbar"===e.type&amp;&amp;e.progressbarOpposite&amp;&amp;s.classList.add(e.progressbarOppositeClass),e.clickable&amp;&amp;s.addEventListener("click",p),t.enabled||s.classList.add(e.lockClass)})))}function f(){const e=t.params.pagination;if(d())return;let s=t.pagination.el;s&amp;&amp;(s=o(s),s.forEach((s=&gt;{s.classList.remove(e.hiddenClass),s.classList.remove(e.modifierClass+e.type),s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&amp;&amp;s.removeEventListener("click",p)}))),t.pagination.bullets&amp;&amp;t.pagination.bullets.forEach((t=&gt;t.classList.remove(...e.bulletActiveClass.split(" "))))}a("changeDirection",(()=&gt;{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:s}=t.pagination;s=o(s),s.forEach((s=&gt;{s.classList.remove(e.horizontalClass,e.verticalClass),s.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)}))})),a("init",(()=&gt;{!1===t.params.pagination.enabled?g():(h(),m(),u())})),a("activeIndexChange",(()=&gt;{void 0===t.snapIndex&amp;&amp;u()})),a("snapIndexChange",(()=&gt;{u()})),a("snapGridLengthChange",(()=&gt;{m(),u()})),a("destroy",(()=&gt;{f()})),a("enable disable",(()=&gt;{let{el:e}=t.pagination;e&amp;&amp;(e=o(e),e.forEach((e=&gt;e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass))))})),a("lock unlock",(()=&gt;{u()})),a("click",((e,s)=&gt;{const a=s.target;let{el:r}=t.pagination;if(Array.isArray(r)||(r=[r].filter((e=&gt;!!e))),t.params.pagination.el&amp;&amp;t.params.pagination.hideOnClick&amp;&amp;r&amp;&amp;r.length&gt;0&amp;&amp;!a.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&amp;&amp;(t.navigation.nextEl&amp;&amp;a===t.navigation.nextEl||t.navigation.prevEl&amp;&amp;a===t.navigation.prevEl))return;const e=r[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),r.forEach((e=&gt;e.classList.toggle(t.params.pagination.hiddenClass)))}}));const g=()=&gt;{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&amp;&amp;(e=o(e),e.forEach((e=&gt;e.classList.add(t.params.pagination.paginationDisabledClass)))),f()};Object.assign(t.pagination,{enable:()=&gt;{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&amp;&amp;(e=o(e),e.forEach((e=&gt;e.classList.remove(t.params.pagination.paginationDisabledClass)))),h(),m(),u()},disable:g,render:m,update:u,init:h,destroy:f})},function(e){let{swiper:t,extendParams:s,on:i,emit:r}=e;const l=a();let o,d,c,p,u=!1,m=null,h=null;function f(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:s}=t,{dragEl:a,el:i}=e,r=t.params.scrollbar,n=t.params.loop?t.progressLoop:t.progress;let l=d,o=(c-d)*n;s?(o=-o,o&gt;0?(l=d-o,o=0):-o+d&gt;c&amp;&amp;(l=c+o)):o&lt;0?(l=d+o,o=0):o+d&gt;c&amp;&amp;(l=c-o),t.isHorizontal()?(a.style.transform=`translate3d(${o}px, 0, 0)`,a.style.width=`${l}px`):(a.style.transform=`translate3d(0px, ${o}px, 0)`,a.style.height=`${l}px`),r.hide&amp;&amp;(clearTimeout(m),i.style.opacity=1,m=setTimeout((()=&gt;{i.style.opacity=0,i.style.transitionDuration="400ms"}),1e3))}function w(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:s,el:a}=e;s.style.width="",s.style.height="",c=t.isHorizontal()?a.offsetWidth:a.offsetHeight,p=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),d="auto"===t.params.scrollbar.dragSize?c*p:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?s.style.width=`${d}px`:s.style.height=`${d}px`,a.style.display=p&gt;=1?"none":"",t.params.scrollbar.hide&amp;&amp;(a.style.opacity=0),t.params.watchOverflow&amp;&amp;t.enabled&amp;&amp;e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function b(e){return t.isHorizontal()?e.clientX:e.clientY}function y(e){const{scrollbar:s,rtlTranslate:a}=t,{el:i}=s;let r;r=(b(e)-v(i)[t.isHorizontal()?"left":"top"]-(null!==o?o:d/2))/(c-d),r=Math.max(Math.min(r,1),0),a&amp;&amp;(r=1-r);const n=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*r;t.updateProgress(n),t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}function E(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:n,dragEl:l}=a;u=!0,o=e.target===l?b(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.style.transitionDuration="100ms",l.style.transitionDuration="100ms",y(e),clearTimeout(h),n.style.transitionDuration="0ms",s.hide&amp;&amp;(n.style.opacity=1),t.params.cssMode&amp;&amp;(t.wrapperEl.style["scroll-snap-type"]="none"),r("scrollbarDragStart",e)}function x(e){const{scrollbar:s,wrapperEl:a}=t,{el:i,dragEl:n}=s;u&amp;&amp;(e.preventDefault?e.preventDefault():e.returnValue=!1,y(e),a.style.transitionDuration="0ms",i.style.transitionDuration="0ms",n.style.transitionDuration="0ms",r("scrollbarDragMove",e))}function S(e){const s=t.params.scrollbar,{scrollbar:a,wrapperEl:i}=t,{el:l}=a;u&amp;&amp;(u=!1,t.params.cssMode&amp;&amp;(t.wrapperEl.style["scroll-snap-type"]="",i.style.transitionDuration=""),s.hide&amp;&amp;(clearTimeout(h),h=n((()=&gt;{l.style.opacity=0,l.style.transitionDuration="400ms"}),1e3)),r("scrollbarDragEnd",e),s.snapOnRelease&amp;&amp;t.slideToClosest())}function T(e){const{scrollbar:s,params:a}=t,i=s.el;if(!i)return;const r=i,n=!!a.passiveListeners&amp;&amp;{passive:!1,capture:!1},o=!!a.passiveListeners&amp;&amp;{passive:!0,capture:!1};if(!r)return;const d="on"===e?"addEventListener":"removeEventListener";r[d]("pointerdown",E,n),l[d]("pointermove",x,n),l[d]("pointerup",S,o)}function M(){const{scrollbar:e,el:s}=t;t.params.scrollbar=ee(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const a=t.params.scrollbar;if(!a.el)return;let i,r;"string"==typeof a.el&amp;&amp;t.isElement&amp;&amp;(i=t.el.shadowRoot.querySelector(a.el)),i||"string"!=typeof a.el?i||(i=a.el):i=l.querySelectorAll(a.el),t.params.uniqueNavElements&amp;&amp;"string"==typeof a.el&amp;&amp;i.length&gt;1&amp;&amp;1===s.querySelectorAll(a.el).length&amp;&amp;(i=s.querySelector(a.el)),i.length&gt;0&amp;&amp;(i=i[0]),i.classList.add(t.isHorizontal()?a.horizontalClass:a.verticalClass),i&amp;&amp;(r=i.querySelector(`.${t.params.scrollbar.dragClass}`),r||(r=g("div",t.params.scrollbar.dragClass),i.append(r))),Object.assign(e,{el:i,dragEl:r}),a.draggable&amp;&amp;t.params.scrollbar.el&amp;&amp;t.scrollbar.el&amp;&amp;T("on"),i&amp;&amp;i.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}function C(){const e=t.params.scrollbar,s=t.scrollbar.el;s&amp;&amp;s.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&amp;&amp;t.scrollbar.el&amp;&amp;T("off")}s({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},i("init",(()=&gt;{!1===t.params.scrollbar.enabled?P():(M(),w(),f())})),i("update resize observerUpdate lock unlock",(()=&gt;{w()})),i("setTranslate",(()=&gt;{f()})),i("setTransition",((e,s)=&gt;{!function(e){t.params.scrollbar.el&amp;&amp;t.scrollbar.el&amp;&amp;(t.scrollbar.dragEl.style.transitionDuration=`${e}ms`)}(s)})),i("enable disable",(()=&gt;{const{el:e}=t.scrollbar;e&amp;&amp;e.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)})),i("destroy",(()=&gt;{C()}));const P=()=&gt;{t.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&amp;&amp;t.scrollbar.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),C()};Object.assign(t.scrollbar,{enable:()=&gt;{t.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&amp;&amp;t.scrollbar.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),M(),w(),f()},disable:P,updateSize:w,setTranslate:f,init:M,destroy:C})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({parallax:{enabled:!1}});const i=(e,s)=&gt;{const{rtl:a}=t,i=a?-1:1,r=e.getAttribute("data-swiper-parallax")||"0";let n=e.getAttribute("data-swiper-parallax-x"),l=e.getAttribute("data-swiper-parallax-y");const o=e.getAttribute("data-swiper-parallax-scale"),d=e.getAttribute("data-swiper-parallax-opacity"),c=e.getAttribute("data-swiper-parallax-rotate");if(n||l?(n=n||"0",l=l||"0"):t.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")&gt;=0?parseInt(n,10)*s*i+"%":n*s*i+"px",l=l.indexOf("%")&gt;=0?parseInt(l,10)*s+"%":l*s+"px",null!=d){const t=d-(d-1)*(1-Math.abs(s));e.style.opacity=t}let p=`translate3d(${n}, ${l}, 0px)`;if(null!=o){p+=` scale(${o-(o-1)*(1-Math.abs(s))})`}if(c&amp;&amp;null!=c){p+=` rotate(${c*s*-1}deg)`}e.style.transform=p},r=()=&gt;{const{el:e,slides:s,progress:a,snapGrid:r}=t;f(e,"[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").forEach((e=&gt;{i(e,a)})),s.forEach(((e,s)=&gt;{let n=e.progress;t.params.slidesPerGroup&gt;1&amp;&amp;"auto"!==t.params.slidesPerView&amp;&amp;(n+=Math.ceil(s/2)-a*(r.length-1)),n=Math.min(Math.max(n,-1),1),e.querySelectorAll("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale], [data-swiper-parallax-rotate]").forEach((e=&gt;{i(e,n)}))}))};a("beforeInit",(()=&gt;{t.params.parallax.enabled&amp;&amp;(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),a("init",(()=&gt;{t.params.parallax.enabled&amp;&amp;r()})),a("setTranslate",(()=&gt;{t.params.parallax.enabled&amp;&amp;r()})),a("setTransition",((e,s)=&gt;{t.params.parallax.enabled&amp;&amp;function(e){void 0===e&amp;&amp;(e=t.params.speed);const{el:s}=t;s.querySelectorAll("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").forEach((t=&gt;{let s=parseInt(t.getAttribute("data-swiper-parallax-duration"),10)||e;0===e&amp;&amp;(s=0),t.style.transitionDuration=`${s}ms`}))}(s)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();s({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let l,d,c=1,p=!1;const u=[],m={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},h={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let w=1;function b(){if(u.length&lt;2)return 1;const e=u[0].pageX,t=u[0].pageY,s=u[1].pageX,a=u[1].pageY;return Math.sqrt((s-e)**2+(a-t)**2)}function E(e){const s=t.isElement?"swiper-slide":`.${t.params.slideClass}`;return!!e.target.matches(s)||t.slides.filter((t=&gt;t.contains(e.target))).length&gt;0}function x(e){if("mouse"===e.pointerType&amp;&amp;u.splice(0,u.length),!E(e))return;const s=t.params.zoom;if(l=!1,d=!1,u.push(e),!(u.length&lt;2)){if(l=!0,m.scaleStart=b(),!m.slideEl){m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`),m.slideEl||(m.slideEl=t.slides[t.activeIndex]);let a=m.slideEl.querySelector(`.${s.containerClass}`);if(a&amp;&amp;(a=a.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=a,m.imageWrapEl=a?y(m.imageEl,`.${s.containerClass}`)[0]:void 0,!m.imageWrapEl)return void(m.imageEl=void 0);m.maxRatio=m.imageWrapEl.getAttribute("data-swiper-zoom")||s.maxRatio}if(m.imageEl){const[e,t]=function(){if(u.length&lt;2)return{x:null,y:null};const e=m.imageEl.getBoundingClientRect();return[(u[0].pageX+(u[1].pageX-u[0].pageX)/2-e.x)/c,(u[0].pageY+(u[1].pageY-u[0].pageY)/2-e.y)/c]}();m.originX=e,m.originY=t,m.imageEl.style.transitionDuration="0ms"}p=!0}}function S(e){if(!E(e))return;const s=t.params.zoom,a=t.zoom,i=u.findIndex((t=&gt;t.pointerId===e.pointerId));i&gt;=0&amp;&amp;(u[i]=e),u.length&lt;2||(d=!0,m.scaleMove=b(),m.imageEl&amp;&amp;(a.scale=m.scaleMove/m.scaleStart*c,a.scale&gt;m.maxRatio&amp;&amp;(a.scale=m.maxRatio-1+(a.scale-m.maxRatio+1)**.5),a.scale&lt;s.minRatio&amp;&amp;(a.scale=s.minRatio+1-(s.minRatio-a.scale+1)**.5),m.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`))}function T(e){if(!E(e))return;if("mouse"===e.pointerType&amp;&amp;"pointerout"===e.type)return;const s=t.params.zoom,a=t.zoom,i=u.findIndex((t=&gt;t.pointerId===e.pointerId));i&gt;=0&amp;&amp;u.splice(i,1),l&amp;&amp;d&amp;&amp;(l=!1,d=!1,m.imageEl&amp;&amp;(a.scale=Math.max(Math.min(a.scale,m.maxRatio),s.minRatio),m.imageEl.style.transitionDuration=`${t.params.speed}ms`,m.imageEl.style.transform=`translate3d(0,0,0) scale(${a.scale})`,c=a.scale,p=!1,a.scale&gt;1&amp;&amp;m.slideEl?m.slideEl.classList.add(`${s.zoomedSlideClass}`):a.scale&lt;=1&amp;&amp;m.slideEl&amp;&amp;m.slideEl.classList.remove(`${s.zoomedSlideClass}`),1===a.scale&amp;&amp;(m.originX=0,m.originY=0,m.slideEl=void 0)))}function M(e){if(!E(e)||!function(e){const s=`.${t.params.zoom.containerClass}`;return!!e.target.matches(s)||[...t.el.querySelectorAll(s)].filter((t=&gt;t.contains(e.target))).length&gt;0}(e))return;const s=t.zoom;if(!m.imageEl)return;if(!h.isTouched||!m.slideEl)return;h.isMoved||(h.width=m.imageEl.offsetWidth,h.height=m.imageEl.offsetHeight,h.startX=o(m.imageWrapEl,"x")||0,h.startY=o(m.imageWrapEl,"y")||0,m.slideWidth=m.slideEl.offsetWidth,m.slideHeight=m.slideEl.offsetHeight,m.imageWrapEl.style.transitionDuration="0ms");const a=h.width*s.scale,i=h.height*s.scale;if(a&lt;m.slideWidth&amp;&amp;i&lt;m.slideHeight)return;h.minX=Math.min(m.slideWidth/2-a/2,0),h.maxX=-h.minX,h.minY=Math.min(m.slideHeight/2-i/2,0),h.maxY=-h.minY,h.touchesCurrent.x=u.length&gt;0?u[0].pageX:e.pageX,h.touchesCurrent.y=u.length&gt;0?u[0].pageY:e.pageY;if(Math.max(Math.abs(h.touchesCurrent.x-h.touchesStart.x),Math.abs(h.touchesCurrent.y-h.touchesStart.y))&gt;5&amp;&amp;(t.allowClick=!1),!h.isMoved&amp;&amp;!p){if(t.isHorizontal()&amp;&amp;(Math.floor(h.minX)===Math.floor(h.startX)&amp;&amp;h.touchesCurrent.x&lt;h.touchesStart.x||Math.floor(h.maxX)===Math.floor(h.startX)&amp;&amp;h.touchesCurrent.x&gt;h.touchesStart.x))return void(h.isTouched=!1);if(!t.isHorizontal()&amp;&amp;(Math.floor(h.minY)===Math.floor(h.startY)&amp;&amp;h.touchesCurrent.y&lt;h.touchesStart.y||Math.floor(h.maxY)===Math.floor(h.startY)&amp;&amp;h.touchesCurrent.y&gt;h.touchesStart.y))return void(h.isTouched=!1)}e.cancelable&amp;&amp;e.preventDefault(),e.stopPropagation(),h.isMoved=!0;const r=(s.scale-c)/(m.maxRatio-t.params.zoom.minRatio),{originX:n,originY:l}=m;h.currentX=h.touchesCurrent.x-h.touchesStart.x+h.startX+r*(h.width-2*n),h.currentY=h.touchesCurrent.y-h.touchesStart.y+h.startY+r*(h.height-2*l),h.currentX&lt;h.minX&amp;&amp;(h.currentX=h.minX+1-(h.minX-h.currentX+1)**.8),h.currentX&gt;h.maxX&amp;&amp;(h.currentX=h.maxX-1+(h.currentX-h.maxX+1)**.8),h.currentY&lt;h.minY&amp;&amp;(h.currentY=h.minY+1-(h.minY-h.currentY+1)**.8),h.currentY&gt;h.maxY&amp;&amp;(h.currentY=h.maxY-1+(h.currentY-h.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=h.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=h.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(h.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(h.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(h.touchesCurrent.x-g.prevPositionX)&lt;2&amp;&amp;(g.x=0),Math.abs(h.touchesCurrent.y-g.prevPositionY)&lt;2&amp;&amp;(g.y=0),g.prevPositionX=h.touchesCurrent.x,g.prevPositionY=h.touchesCurrent.y,g.prevTime=Date.now(),m.imageWrapEl.style.transform=`translate3d(${h.currentX}px, ${h.currentY}px,0)`}function C(){const e=t.zoom;m.slideEl&amp;&amp;t.activeIndex!==t.slides.indexOf(m.slideEl)&amp;&amp;(m.imageEl&amp;&amp;(m.imageEl.style.transform="translate3d(0,0,0) scale(1)"),m.imageWrapEl&amp;&amp;(m.imageWrapEl.style.transform="translate3d(0,0,0)"),m.slideEl.classList.remove(`${t.params.zoom.zoomedSlideClass}`),e.scale=1,c=1,m.slideEl=void 0,m.imageEl=void 0,m.imageWrapEl=void 0,m.originX=0,m.originY=0)}function P(e){const s=t.zoom,a=t.params.zoom;if(!m.slideEl){e&amp;&amp;e.target&amp;&amp;(m.slideEl=e.target.closest(`.${t.params.slideClass}, swiper-slide`)),m.slideEl||(t.params.virtual&amp;&amp;t.params.virtual.enabled&amp;&amp;t.virtual?m.slideEl=f(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex]);let s=m.slideEl.querySelector(`.${a.containerClass}`);s&amp;&amp;(s=s.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=s,m.imageWrapEl=s?y(m.imageEl,`.${a.containerClass}`)[0]:void 0}if(!m.imageEl||!m.imageWrapEl)return;let i,r,l,o,d,p,u,g,w,b,E,x,S,T,M,C,P,L;t.params.cssMode&amp;&amp;(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),m.slideEl.classList.add(`${a.zoomedSlideClass}`),void 0===h.touchesStart.x&amp;&amp;e?(i=e.pageX,r=e.pageY):(i=h.touchesStart.x,r=h.touchesStart.y);const z="number"==typeof e?e:null;1===c&amp;&amp;z&amp;&amp;(i=void 0,r=void 0),s.scale=z||m.imageWrapEl.getAttribute("data-swiper-zoom")||a.maxRatio,c=z||m.imageWrapEl.getAttribute("data-swiper-zoom")||a.maxRatio,!e||1===c&amp;&amp;z?(u=0,g=0):(P=m.slideEl.offsetWidth,L=m.slideEl.offsetHeight,l=v(m.slideEl).left+n.scrollX,o=v(m.slideEl).top+n.scrollY,d=l+P/2-i,p=o+L/2-r,w=m.imageEl.offsetWidth,b=m.imageEl.offsetHeight,E=w*s.scale,x=b*s.scale,S=Math.min(P/2-E/2,0),T=Math.min(L/2-x/2,0),M=-S,C=-T,u=d*s.scale,g=p*s.scale,u&lt;S&amp;&amp;(u=S),u&gt;M&amp;&amp;(u=M),g&lt;T&amp;&amp;(g=T),g&gt;C&amp;&amp;(g=C)),z&amp;&amp;1===s.scale&amp;&amp;(m.originX=0,m.originY=0),m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform=`translate3d(${u}px, ${g}px,0)`,m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform=`translate3d(0,0,0) scale(${s.scale})`}function L(){const e=t.zoom,s=t.params.zoom;if(!m.slideEl){t.params.virtual&amp;&amp;t.params.virtual.enabled&amp;&amp;t.virtual?m.slideEl=f(t.slidesEl,`.${t.params.slideActiveClass}`)[0]:m.slideEl=t.slides[t.activeIndex];let e=m.slideEl.querySelector(`.${s.containerClass}`);e&amp;&amp;(e=e.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),m.imageEl=e,m.imageWrapEl=e?y(m.imageEl,`.${s.containerClass}`)[0]:void 0}m.imageEl&amp;&amp;m.imageWrapEl&amp;&amp;(t.params.cssMode&amp;&amp;(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,c=1,m.imageWrapEl.style.transitionDuration="300ms",m.imageWrapEl.style.transform="translate3d(0,0,0)",m.imageEl.style.transitionDuration="300ms",m.imageEl.style.transform="translate3d(0,0,0) scale(1)",m.slideEl.classList.remove(`${s.zoomedSlideClass}`),m.slideEl=void 0,m.originX=0,m.originY=0)}function z(e){const s=t.zoom;s.scale&amp;&amp;1!==s.scale?L():P(e)}function A(){return{passiveListener:!!t.params.passiveListeners&amp;&amp;{passive:!0,capture:!1},activeListenerWithCapture:!t.params.passiveListeners||{passive:!1,capture:!0}}}function $(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const{passiveListener:s,activeListenerWithCapture:a}=A();t.wrapperEl.addEventListener("pointerdown",x,s),t.wrapperEl.addEventListener("pointermove",S,a),["pointerup","pointercancel","pointerout"].forEach((e=&gt;{t.wrapperEl.addEventListener(e,T,s)})),t.wrapperEl.addEventListener("pointermove",M,a)}function I(){const e=t.zoom;if(!e.enabled)return;e.enabled=!1;const{passiveListener:s,activeListenerWithCapture:a}=A();t.wrapperEl.removeEventListener("pointerdown",x,s),t.wrapperEl.removeEventListener("pointermove",S,a),["pointerup","pointercancel","pointerout"].forEach((e=&gt;{t.wrapperEl.removeEventListener(e,T,s)})),t.wrapperEl.removeEventListener("pointermove",M,a)}Object.defineProperty(t.zoom,"scale",{get:()=&gt;w,set(e){if(w!==e){const t=m.imageEl,s=m.slideEl;i("zoomChange",e,t,s)}w=e}}),a("init",(()=&gt;{t.params.zoom.enabled&amp;&amp;$()})),a("destroy",(()=&gt;{I()})),a("touchStart",((e,s)=&gt;{t.zoom.enabled&amp;&amp;function(e){const s=t.device;if(!m.imageEl)return;if(h.isTouched)return;s.android&amp;&amp;e.cancelable&amp;&amp;e.preventDefault(),h.isTouched=!0;const a=u.length&gt;0?u[0]:e;h.touchesStart.x=a.pageX,h.touchesStart.y=a.pageY}(s)})),a("touchEnd",((e,s)=&gt;{t.zoom.enabled&amp;&amp;function(){const e=t.zoom;if(!m.imageEl)return;if(!h.isTouched||!h.isMoved)return h.isTouched=!1,void(h.isMoved=!1);h.isTouched=!1,h.isMoved=!1;let s=300,a=300;const i=g.x*s,r=h.currentX+i,n=g.y*a,l=h.currentY+n;0!==g.x&amp;&amp;(s=Math.abs((r-h.currentX)/g.x)),0!==g.y&amp;&amp;(a=Math.abs((l-h.currentY)/g.y));const o=Math.max(s,a);h.currentX=r,h.currentY=l;const d=h.width*e.scale,c=h.height*e.scale;h.minX=Math.min(m.slideWidth/2-d/2,0),h.maxX=-h.minX,h.minY=Math.min(m.slideHeight/2-c/2,0),h.maxY=-h.minY,h.currentX=Math.max(Math.min(h.currentX,h.maxX),h.minX),h.currentY=Math.max(Math.min(h.currentY,h.maxY),h.minY),m.imageWrapEl.style.transitionDuration=`${o}ms`,m.imageWrapEl.style.transform=`translate3d(${h.currentX}px, ${h.currentY}px,0)`}()})),a("doubleTap",((e,s)=&gt;{!t.animating&amp;&amp;t.params.zoom.enabled&amp;&amp;t.zoom.enabled&amp;&amp;t.params.zoom.toggle&amp;&amp;z(s)})),a("transitionEnd",(()=&gt;{t.zoom.enabled&amp;&amp;t.params.zoom.enabled&amp;&amp;C()})),a("slideChange",(()=&gt;{t.zoom.enabled&amp;&amp;t.params.zoom.enabled&amp;&amp;t.params.cssMode&amp;&amp;C()})),Object.assign(t.zoom,{enable:$,disable:I,in:P,out:L,toggle:z})},function(e){let{swiper:t,extendParams:s,on:a}=e;function i(e,t){const s=function(){let e,t,s;return(a,i)=&gt;{for(t=-1,e=a.length;e-t&gt;1;)s=e+t&gt;&gt;1,a[s]&lt;=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function r(){t.controller.control&amp;&amp;t.controller.spline&amp;&amp;(t.controller.spline=void 0,delete t.controller.spline)}s({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},a("beforeInit",(()=&gt;{if("undefined"!=typeof window&amp;&amp;("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){const e=document.querySelector(t.params.controller.control);if(e&amp;&amp;e.swiper)t.controller.control=e.swiper;else if(e){const s=a=&gt;{t.controller.control=a.detail[0],t.update(),e.removeEventListener("init",s)};e.addEventListener("init",s)}}else t.controller.control=t.params.controller.control})),a("update",(()=&gt;{r()})),a("resize",(()=&gt;{r()})),a("observerUpdate",(()=&gt;{r()})),a("setTranslate",((e,s,a)=&gt;{t.controller.control&amp;&amp;!t.controller.control.destroyed&amp;&amp;t.controller.setTranslate(s,a)})),a("setTransition",((e,s,a)=&gt;{t.controller.control&amp;&amp;!t.controller.control.destroyed&amp;&amp;t.controller.setTransition(s,a)})),Object.assign(t.controller,{setTranslate:function(e,s){const a=t.controller.control;let r,n;const l=t.constructor;function o(e){if(e.destroyed)return;const s=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&amp;&amp;(!function(e){t.controller.spline=t.params.loop?new i(t.slidesGrid,e.slidesGrid):new i(t.snapGrid,e.snapGrid)}(e),n=-t.controller.spline.interpolate(-s)),n&amp;&amp;"container"!==t.params.controller.by||(r=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(r)&amp;&amp;Number.isFinite(r)||(r=1),n=(s-t.minTranslate())*r+e.minTranslate()),t.params.controller.inverse&amp;&amp;(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(let e=0;e&lt;a.length;e+=1)a[e]!==s&amp;&amp;a[e]instanceof l&amp;&amp;o(a[e]);else a instanceof l&amp;&amp;s!==a&amp;&amp;o(a)},setTransition:function(e,s){const a=t.constructor,i=t.controller.control;let r;function l(s){s.destroyed||(s.setTransition(e,t),0!==e&amp;&amp;(s.transitionStart(),s.params.autoHeight&amp;&amp;n((()=&gt;{s.updateAutoHeight()})),E(s.wrapperEl,(()=&gt;{i&amp;&amp;s.transitionEnd()}))))}if(Array.isArray(i))for(r=0;r&lt;i.length;r+=1)i[r]!==s&amp;&amp;i[r]instanceof a&amp;&amp;l(i[r]);else i instanceof a&amp;&amp;s!==i&amp;&amp;l(i)}})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({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}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let i=null;function r(e){const t=i;0!==t.length&amp;&amp;(t.innerHTML="",t.innerHTML=e)}const n=e=&gt;(Array.isArray(e)||(e=[e].filter((e=&gt;!!e))),e);function l(e){(e=n(e)).forEach((e=&gt;{e.setAttribute("tabIndex","0")}))}function o(e){(e=n(e)).forEach((e=&gt;{e.setAttribute("tabIndex","-1")}))}function d(e,t){(e=n(e)).forEach((e=&gt;{e.setAttribute("role",t)}))}function c(e,t){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-roledescription",t)}))}function p(e,t){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-label",t)}))}function u(e){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-disabled",!0)}))}function m(e){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-disabled",!1)}))}function h(e){if(13!==e.keyCode&amp;&amp;32!==e.keyCode)return;const s=t.params.a11y,a=e.target;t.pagination&amp;&amp;t.pagination.el&amp;&amp;(a===t.pagination.el||t.pagination.el.contains(e.target))&amp;&amp;!e.target.matches(te(t.params.pagination.bulletClass))||(t.navigation&amp;&amp;t.navigation.nextEl&amp;&amp;a===t.navigation.nextEl&amp;&amp;(t.isEnd&amp;&amp;!t.params.loop||t.slideNext(),t.isEnd?r(s.lastSlideMessage):r(s.nextSlideMessage)),t.navigation&amp;&amp;t.navigation.prevEl&amp;&amp;a===t.navigation.prevEl&amp;&amp;(t.isBeginning&amp;&amp;!t.params.loop||t.slidePrev(),t.isBeginning?r(s.firstSlideMessage):r(s.prevSlideMessage)),t.pagination&amp;&amp;a.matches(te(t.params.pagination.bulletClass))&amp;&amp;a.click())}function f(){return t.pagination&amp;&amp;t.pagination.bullets&amp;&amp;t.pagination.bullets.length}function v(){return f()&amp;&amp;t.params.pagination.clickable}const w=(e,t,s)=&gt;{l(e),"BUTTON"!==e.tagName&amp;&amp;(d(e,"button"),e.addEventListener("keydown",h)),p(e,s),function(e,t){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-controls",t)}))}(e,t)},y=()=&gt;{t.a11y.clicked=!0},E=()=&gt;{requestAnimationFrame((()=&gt;{requestAnimationFrame((()=&gt;{t.destroyed||(t.a11y.clicked=!1)}))}))},x=e=&gt;{if(t.a11y.clicked)return;const s=e.target.closest(`.${t.params.slideClass}, swiper-slide`);if(!s||!t.slides.includes(s))return;const a=t.slides.indexOf(s)===t.activeIndex,i=t.params.watchSlidesProgress&amp;&amp;t.visibleSlides&amp;&amp;t.visibleSlides.includes(s);a||i||e.sourceCapabilities&amp;&amp;e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(s),0))},S=()=&gt;{const e=t.params.a11y;e.itemRoleDescriptionMessage&amp;&amp;c(t.slides,e.itemRoleDescriptionMessage),e.slideRole&amp;&amp;d(t.slides,e.slideRole);const s=t.slides.length;e.slideLabelMessage&amp;&amp;t.slides.forEach(((a,i)=&gt;{const r=t.params.loop?parseInt(a.getAttribute("data-swiper-slide-index"),10):i;p(a,e.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,s))}))},T=()=&gt;{const e=t.params.a11y;t.el.append(i);const s=t.el;e.containerRoleDescriptionMessage&amp;&amp;c(s,e.containerRoleDescriptionMessage),e.containerMessage&amp;&amp;p(s,e.containerMessage);const a=t.wrapperEl,r=e.id||a.getAttribute("id")||`swiper-wrapper-${l=16,void 0===l&amp;&amp;(l=16),"x".repeat(l).replace(/x/g,(()=&gt;Math.round(16*Math.random()).toString(16)))}`;var l;const o=t.params.autoplay&amp;&amp;t.params.autoplay.enabled?"off":"polite";var d;d=r,n(a).forEach((e=&gt;{e.setAttribute("id",d)})),function(e,t){(e=n(e)).forEach((e=&gt;{e.setAttribute("aria-live",t)}))}(a,o),S();let{nextEl:u,prevEl:m}=t.navigation?t.navigation:{};if(u=n(u),m=n(m),u&amp;&amp;u.forEach((t=&gt;w(t,r,e.nextSlideMessage))),m&amp;&amp;m.forEach((t=&gt;w(t,r,e.prevSlideMessage))),v()){(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=&gt;{e.addEventListener("keydown",h)}))}t.el.addEventListener("focus",x,!0),t.el.addEventListener("pointerdown",y,!0),t.el.addEventListener("pointerup",E,!0)};a("beforeInit",(()=&gt;{i=g("span",t.params.a11y.notificationClass),i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),t.isElement&amp;&amp;i.setAttribute("slot","container-end")})),a("afterInit",(()=&gt;{t.params.a11y.enabled&amp;&amp;T()})),a("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=&gt;{t.params.a11y.enabled&amp;&amp;S()})),a("fromEdge toEdge afterInit lock unlock",(()=&gt;{t.params.a11y.enabled&amp;&amp;function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{nextEl:e,prevEl:s}=t.navigation;s&amp;&amp;(t.isBeginning?(u(s),o(s)):(m(s),l(s))),e&amp;&amp;(t.isEnd?(u(e),o(e)):(m(e),l(e)))}()})),a("paginationUpdate",(()=&gt;{t.params.a11y.enabled&amp;&amp;function(){const e=t.params.a11y;f()&amp;&amp;t.pagination.bullets.forEach((s=&gt;{t.params.pagination.clickable&amp;&amp;(l(s),t.params.pagination.renderBullet||(d(s,"button"),p(s,e.paginationBulletMessage.replace(/\{\{index\}\}/,b(s)+1)))),s.matches(te(t.params.pagination.bulletActiveClass))?s.setAttribute("aria-current","true"):s.removeAttribute("aria-current")}))}()})),a("destroy",(()=&gt;{t.params.a11y.enabled&amp;&amp;function(){i&amp;&amp;i.length&gt;0&amp;&amp;i.remove();let{nextEl:e,prevEl:s}=t.navigation?t.navigation:{};e=n(e),s=n(s),e&amp;&amp;e.forEach((e=&gt;e.removeEventListener("keydown",h))),s&amp;&amp;s.forEach((e=&gt;e.removeEventListener("keydown",h))),v()&amp;&amp;(Array.isArray(t.pagination.el)?t.pagination.el:[t.pagination.el]).forEach((e=&gt;{e.removeEventListener("keydown",h)}));t.el.removeEventListener("focus",x,!0),t.el.removeEventListener("pointerdown",y,!0),t.el.removeEventListener("pointerup",E,!0)}()}))},function(e){let{swiper:t,extendParams:s,on:a}=e;s({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,n={};const l=e=&gt;e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=&gt;{const t=r();let s;s=e?new URL(e):t.location;const a=s.pathname.slice(1).split("/").filter((e=&gt;""!==e)),i=a.length;return{key:a[i-2],value:a[i-1]}},d=(e,s)=&gt;{const a=r();if(!i||!t.params.history.enabled)return;let n;n=t.params.url?new URL(t.params.url):a.location;const o=t.slides[s];let d=l(o.getAttribute("data-history"));if(t.params.history.root.length&gt;0){let s=t.params.history.root;"/"===s[s.length-1]&amp;&amp;(s=s.slice(0,s.length-1)),d=`${s}/${e?`${e}/`:""}${d}`}else n.pathname.includes(e)||(d=`${e?`${e}/`:""}${d}`);t.params.history.keepQuery&amp;&amp;(d+=n.search);const c=a.history.state;c&amp;&amp;c.value===d||(t.params.history.replaceState?a.history.replaceState({value:d},null,d):a.history.pushState({value:d},null,d))},c=(e,s,a)=&gt;{if(s)for(let i=0,r=t.slides.length;i&lt;r;i+=1){const r=t.slides[i];if(l(r.getAttribute("data-history"))===s){const s=t.getSlideIndex(r);t.slideTo(s,e,a)}}else t.slideTo(0,e,a)},p=()=&gt;{n=o(t.params.url),c(t.params.speed,n.value,!1)};a("init",(()=&gt;{t.params.history.enabled&amp;&amp;(()=&gt;{const e=r();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);i=!0,n=o(t.params.url),n.key||n.value?(c(0,n.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",p)):t.params.history.replaceState||e.addEventListener("popstate",p)}})()})),a("destroy",(()=&gt;{t.params.history.enabled&amp;&amp;(()=&gt;{const e=r();t.params.history.replaceState||e.removeEventListener("popstate",p)})()})),a("transitionEnd _freeModeNoMomentumRelease",(()=&gt;{i&amp;&amp;d(t.params.history.key,t.activeIndex)})),a("slideChange",(()=&gt;{i&amp;&amp;t.params.cssMode&amp;&amp;d(t.params.history.key,t.activeIndex)}))},function(e){let{swiper:t,extendParams:s,emit:i,on:n}=e,l=!1;const o=a(),d=r();s({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,s){if(t.virtual&amp;&amp;t.params.virtual.enabled){const e=t.slides.filter((e=&gt;e.getAttribute("data-hash")===s))[0];if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return t.getSlideIndex(f(t.slidesEl,`.${t.params.slideClass}[data-hash="${s}"], swiper-slide[data-hash="${s}"]`)[0])}}});const c=()=&gt;{i("hashChange");const e=o.location.hash.replace("#",""),s=t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`);if(e!==(s?s.getAttribute("data-hash"):"")){const s=t.params.hashNavigation.getSlideIndex(t,e);if(console.log(s),void 0===s)return;t.slideTo(s)}},p=()=&gt;{if(!l||!t.params.hashNavigation.enabled)return;const e=t.slidesEl.querySelector(`[data-swiper-slide-index="${t.activeIndex}"]`),s=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";t.params.hashNavigation.replaceState&amp;&amp;d.history&amp;&amp;d.history.replaceState?(d.history.replaceState(null,null,`#${s}`||""),i("hashSet")):(o.location.hash=s||"",i("hashSet"))};n("init",(()=&gt;{t.params.hashNavigation.enabled&amp;&amp;(()=&gt;{if(!t.params.hashNavigation.enabled||t.params.history&amp;&amp;t.params.history.enabled)return;l=!0;const e=o.location.hash.replace("#","");if(e){const s=0,a=t.params.hashNavigation.getSlideIndex(t,e);t.slideTo(a||0,s,t.params.runCallbacksOnInit,!0)}t.params.hashNavigation.watchState&amp;&amp;d.addEventListener("hashchange",c)})()})),n("destroy",(()=&gt;{t.params.hashNavigation.enabled&amp;&amp;t.params.hashNavigation.watchState&amp;&amp;d.removeEventListener("hashchange",c)})),n("transitionEnd _freeModeNoMomentumRelease",(()=&gt;{l&amp;&amp;p()})),n("slideChange",(()=&gt;{l&amp;&amp;t.params.cssMode&amp;&amp;p()}))},function(e){let t,s,{swiper:i,extendParams:r,on:n,emit:l,params:o}=e;i.autoplay={running:!1,paused:!1,timeLeft:0},r({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let d,c,p,u,m,h,f,g=o&amp;&amp;o.autoplay?o.autoplay.delay:3e3,v=o&amp;&amp;o.autoplay?o.autoplay.delay:3e3,w=(new Date).getTime;function b(e){i&amp;&amp;!i.destroyed&amp;&amp;i.wrapperEl&amp;&amp;e.target===i.wrapperEl&amp;&amp;(i.wrapperEl.removeEventListener("transitionend",b),M())}const y=()=&gt;{if(i.destroyed||!i.autoplay.running)return;i.autoplay.paused?c=!0:c&amp;&amp;(v=d,c=!1);const e=i.autoplay.paused?d:w+v-(new Date).getTime();i.autoplay.timeLeft=e,l("autoplayTimeLeft",e,e/g),s=requestAnimationFrame((()=&gt;{y()}))},E=e=&gt;{if(i.destroyed||!i.autoplay.running)return;cancelAnimationFrame(s),y();let a=void 0===e?i.params.autoplay.delay:e;g=i.params.autoplay.delay,v=i.params.autoplay.delay;const r=(()=&gt;{let e;if(e=i.virtual&amp;&amp;i.params.virtual.enabled?i.slides.filter((e=&gt;e.classList.contains("swiper-slide-active")))[0]:i.slides[i.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(r)&amp;&amp;r&gt;0&amp;&amp;void 0===e&amp;&amp;(a=r,g=r,v=r),d=a;const n=i.params.speed,o=()=&gt;{i&amp;&amp;!i.destroyed&amp;&amp;(i.params.autoplay.reverseDirection?!i.isBeginning||i.params.loop||i.params.rewind?(i.slidePrev(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(i.slides.length-1,n,!0,!0),l("autoplay")):!i.isEnd||i.params.loop||i.params.rewind?(i.slideNext(n,!0,!0),l("autoplay")):i.params.autoplay.stopOnLastSlide||(i.slideTo(0,n,!0,!0),l("autoplay")),i.params.cssMode&amp;&amp;(w=(new Date).getTime(),requestAnimationFrame((()=&gt;{E()}))))};return a&gt;0?(clearTimeout(t),t=setTimeout((()=&gt;{o()}),a)):requestAnimationFrame((()=&gt;{o()})),a},x=()=&gt;{i.autoplay.running=!0,E(),l("autoplayStart")},S=()=&gt;{i.autoplay.running=!1,clearTimeout(t),cancelAnimationFrame(s),l("autoplayStop")},T=(e,s)=&gt;{if(i.destroyed||!i.autoplay.running)return;clearTimeout(t),e||(f=!0);const a=()=&gt;{l("autoplayPause"),i.params.autoplay.waitForTransition?i.wrapperEl.addEventListener("transitionend",b):M()};if(i.autoplay.paused=!0,s)return h&amp;&amp;(d=i.params.autoplay.delay),h=!1,void a();const r=d||i.params.autoplay.delay;d=r-((new Date).getTime()-w),i.isEnd&amp;&amp;d&lt;0&amp;&amp;!i.params.loop||(d&lt;0&amp;&amp;(d=0),a())},M=()=&gt;{i.isEnd&amp;&amp;d&lt;0&amp;&amp;!i.params.loop||i.destroyed||!i.autoplay.running||(w=(new Date).getTime(),f?(f=!1,E(d)):E(),i.autoplay.paused=!1,l("autoplayResume"))},C=()=&gt;{if(i.destroyed||!i.autoplay.running)return;const e=a();"hidden"===e.visibilityState&amp;&amp;(f=!0,T(!0)),"visible"===e.visibilityState&amp;&amp;M()},P=e=&gt;{"mouse"===e.pointerType&amp;&amp;(f=!0,T(!0))},L=e=&gt;{"mouse"===e.pointerType&amp;&amp;i.autoplay.paused&amp;&amp;M()};n("init",(()=&gt;{i.params.autoplay.enabled&amp;&amp;(i.params.autoplay.pauseOnMouseEnter&amp;&amp;(i.el.addEventListener("pointerenter",P),i.el.addEventListener("pointerleave",L)),a().addEventListener("visibilitychange",C),w=(new Date).getTime(),x())})),n("destroy",(()=&gt;{i.el.removeEventListener("pointerenter",P),i.el.removeEventListener("pointerleave",L),a().removeEventListener("visibilitychange",C),i.autoplay.running&amp;&amp;S()})),n("beforeTransitionStart",((e,t,s)=&gt;{!i.destroyed&amp;&amp;i.autoplay.running&amp;&amp;(s||!i.params.autoplay.disableOnInteraction?T(!0,!0):S())})),n("sliderFirstMove",(()=&gt;{!i.destroyed&amp;&amp;i.autoplay.running&amp;&amp;(i.params.autoplay.disableOnInteraction?S():(p=!0,u=!1,f=!1,m=setTimeout((()=&gt;{f=!0,u=!0,T(!0)}),200)))})),n("touchEnd",(()=&gt;{if(!i.destroyed&amp;&amp;i.autoplay.running&amp;&amp;p){if(clearTimeout(m),clearTimeout(t),i.params.autoplay.disableOnInteraction)return u=!1,void(p=!1);u&amp;&amp;i.params.cssMode&amp;&amp;M(),u=!1,p=!1}})),n("slideChange",(()=&gt;{!i.destroyed&amp;&amp;i.autoplay.running&amp;&amp;(h=!0)})),Object.assign(i.autoplay,{start:x,stop:S,pause:T,resume:M})},function(e){let{swiper:t,extendParams:s,on:i}=e;s({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let r=!1,n=!1;function l(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const s=e.clickedIndex,a=e.clickedSlide;if(a&amp;&amp;a.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;i=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):s,t.params.loop?t.slideToLoop(i):t.slideTo(i)}function o(){const{thumbs:e}=t.params;if(r)return!1;r=!0;const s=t.constructor;if(e.swiper instanceof s)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper.update();else if(d(e.swiper)){const a=Object.assign({},e.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new s(a),n=!0}return t.thumbs.swiper.el.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",l),!0}function c(e){const s=t.thumbs.swiper;if(!s||s.destroyed)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;let i=1;const r=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView&gt;1&amp;&amp;!t.params.centeredSlides&amp;&amp;(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),s.slides.forEach((e=&gt;e.classList.remove(r))),s.params.loop||s.params.virtual&amp;&amp;s.params.virtual.enabled)for(let e=0;e&lt;i;e+=1)f(s.slidesEl,`[data-swiper-slide-index="${t.realIndex+e}"]`).forEach((e=&gt;{e.classList.add(r)}));else for(let e=0;e&lt;i;e+=1)s.slides[t.realIndex+e]&amp;&amp;s.slides[t.realIndex+e].classList.add(r);const n=t.params.thumbs.autoScrollOffset,l=n&amp;&amp;!s.params.loop;if(t.realIndex!==s.realIndex||l){const i=s.activeIndex;let r,o;if(s.params.loop){const e=s.slides.filter((e=&gt;e.getAttribute("data-swiper-slide-index")===`${t.realIndex}`))[0];r=s.slides.indexOf(e),o=t.activeIndex&gt;t.previousIndex?"next":"prev"}else r=t.realIndex,o=r&gt;t.previousIndex?"next":"prev";l&amp;&amp;(r+="next"===o?n:-1*n),s.visibleSlidesIndexes&amp;&amp;s.visibleSlidesIndexes.indexOf(r)&lt;0&amp;&amp;(s.params.centeredSlides?r=r&gt;i?r-Math.floor(a/2)+1:r+Math.floor(a/2)-1:r&gt;i&amp;&amp;s.params.slidesPerGroup,s.slideTo(r,e?0:void 0))}}t.thumbs={swiper:null},i("beforeInit",(()=&gt;{const{thumbs:e}=t.params;if(e&amp;&amp;e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const s=a(),i=()=&gt;{const a="string"==typeof e.swiper?s.querySelector(e.swiper):e.swiper;if(a&amp;&amp;a.swiper)e.swiper=a.swiper,o(),c(!0);else if(a){const s=i=&gt;{e.swiper=i.detail[0],a.removeEventListener("init",s),o(),c(!0),e.swiper.update(),t.update()};a.addEventListener("init",s)}return a},r=()=&gt;{if(t.destroyed)return;i()||requestAnimationFrame(r)};requestAnimationFrame(r)}else o(),c(!0)})),i("slideChange update resize observerUpdate",(()=&gt;{c()})),i("setTransition",((e,s)=&gt;{const a=t.thumbs.swiper;a&amp;&amp;!a.destroyed&amp;&amp;a.setTransition(s)})),i("beforeDestroy",(()=&gt;{const e=t.thumbs.swiper;e&amp;&amp;!e.destroyed&amp;&amp;n&amp;&amp;e.destroy()})),Object.assign(t.thumbs,{init:o,update:c})},function(e){let{swiper:t,extendParams:s,emit:a,once:i}=e;s({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){const{touchEventsData:e,touches:s}=t;0===e.velocities.length&amp;&amp;e.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:l()})},onTouchEnd:function(e){let{currentPos:s}=e;const{params:r,wrapperEl:n,rtlTranslate:o,snapGrid:d,touchEventsData:c}=t,p=l()-c.touchStartTime;if(s&lt;-t.minTranslate())t.slideTo(t.activeIndex);else if(s&gt;-t.maxTranslate())t.slides.length&lt;d.length?t.slideTo(d.length-1):t.slideTo(t.slides.length-1);else{if(r.freeMode.momentum){if(c.velocities.length&gt;1){const e=c.velocities.pop(),s=c.velocities.pop(),a=e.position-s.position,i=e.time-s.time;t.velocity=a/i,t.velocity/=2,Math.abs(t.velocity)&lt;r.freeMode.minimumVelocity&amp;&amp;(t.velocity=0),(i&gt;150||l()-e.time&gt;300)&amp;&amp;(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeMode.momentumVelocityRatio,c.velocities.length=0;let e=1e3*r.freeMode.momentumRatio;const s=t.velocity*e;let p=t.translate+s;o&amp;&amp;(p=-p);let u,m=!1;const h=20*Math.abs(t.velocity)*r.freeMode.momentumBounceRatio;let f;if(p&lt;t.maxTranslate())r.freeMode.momentumBounce?(p+t.maxTranslate()&lt;-h&amp;&amp;(p=t.maxTranslate()-h),u=t.maxTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.maxTranslate(),r.loop&amp;&amp;r.centeredSlides&amp;&amp;(f=!0);else if(p&gt;t.minTranslate())r.freeMode.momentumBounce?(p-t.minTranslate()&gt;h&amp;&amp;(p=t.minTranslate()+h),u=t.minTranslate(),m=!0,c.allowMomentumBounce=!0):p=t.minTranslate(),r.loop&amp;&amp;r.centeredSlides&amp;&amp;(f=!0);else if(r.freeMode.sticky){let e;for(let t=0;t&lt;d.length;t+=1)if(d[t]&gt;-p){e=t;break}p=Math.abs(d[e]-p)&lt;Math.abs(d[e-1]-p)||"next"===t.swipeDirection?d[e]:d[e-1],p=-p}if(f&amp;&amp;i("transitionEnd",(()=&gt;{t.loopFix()})),0!==t.velocity){if(e=o?Math.abs((-p-t.translate)/t.velocity):Math.abs((p-t.translate)/t.velocity),r.freeMode.sticky){const s=Math.abs((o?-p:p)-t.translate),a=t.slidesSizesGrid[t.activeIndex];e=s&lt;a?r.speed:s&lt;2*a?1.5*r.speed:2.5*r.speed}}else if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode.momentumBounce&amp;&amp;m?(t.updateProgress(u),t.setTransition(e),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating=!0,E(n,(()=&gt;{t&amp;&amp;!t.destroyed&amp;&amp;c.allowMomentumBounce&amp;&amp;(a("momentumBounce"),t.setTransition(r.speed),setTimeout((()=&gt;{t.setTranslate(u),E(n,(()=&gt;{t&amp;&amp;!t.destroyed&amp;&amp;t.transitionEnd()}))}),0))}))):t.velocity?(a("_freeModeNoMomentumRelease"),t.updateProgress(p),t.setTransition(e),t.setTranslate(p),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,E(n,(()=&gt;{t&amp;&amp;!t.destroyed&amp;&amp;t.transitionEnd()})))):t.updateProgress(p),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode&amp;&amp;a("_freeModeNoMomentumRelease")}(!r.freeMode.momentum||p&gt;=r.longSwipesMs)&amp;&amp;(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,s,a,{swiper:i,extendParams:r}=e;r({grid:{rows:1,fill:"column"}}),i.grid={initSlides:e=&gt;{const{slidesPerView:r}=i.params,{rows:n,fill:l}=i.params.grid;s=t/n,a=Math.floor(e/n),t=Math.floor(e/n)===e/n?e:Math.ceil(e/n)*n,"auto"!==r&amp;&amp;"row"===l&amp;&amp;(t=Math.max(t,r*n))},updateSlide:(e,r,n,l)=&gt;{const{slidesPerGroup:o,spaceBetween:d}=i.params,{rows:c,fill:p}=i.params.grid;let u,m,h;if("row"===p&amp;&amp;o&gt;1){const s=Math.floor(e/(o*c)),a=e-c*o*s,i=0===s?o:Math.min(Math.ceil((n-s*c*o)/c),o);h=Math.floor(a/i),m=a-h*i+s*o,u=m+h*t/c,r.style.order=u}else"column"===p?(m=Math.floor(e/c),h=e-m*c,(m&gt;a||m===a&amp;&amp;h===c-1)&amp;&amp;(h+=1,h&gt;=c&amp;&amp;(h=0,m+=1))):(h=Math.floor(e/s),m=e-h*s);r.style[l("margin-top")]=0!==h?d&amp;&amp;`${d}px`:""},updateWrapperSize:(e,s,a)=&gt;{const{spaceBetween:r,centeredSlides:n,roundLengths:l}=i.params,{rows:o}=i.params.grid;if(i.virtualSize=(e+r)*t,i.virtualSize=Math.ceil(i.virtualSize/o)-r,i.wrapperEl.style[a("width")]=`${i.virtualSize+r}px`,n){const e=[];for(let t=0;t&lt;s.length;t+=1){let a=s[t];l&amp;&amp;(a=Math.floor(a)),s[t]&lt;i.virtualSize+s[0]&amp;&amp;e.push(a)}s.splice(0,s.length),s.push(...e)}}}},function(e){let{swiper:t}=e;Object.assign(t,{appendSlide:se.bind(t),prependSlide:ae.bind(t),addSlide:ie.bind(t),removeSlide:re.bind(t),removeAllSlides:ne.bind(t)})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({fadeEffect:{crossFade:!1}}),le({effect:"fade",swiper:t,on:a,setTranslate:()=&gt;{const{slides:e}=t;t.params.fadeEffect;for(let s=0;s&lt;e.length;s+=1){const e=t.slides[s];let a=-e.swiperSlideOffset;t.params.virtualTranslate||(a-=t.translate);let i=0;t.isHorizontal()||(i=a,a=0);const r=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e.progress),0):1+Math.min(Math.max(e.progress,-1),0),n=oe(0,e);n.style.opacity=r,n.style.transform=`translate3d(${a}px, ${i}px, 0px)`}},setTransition:e=&gt;{const s=t.slides.map((e=&gt;h(e)));s.forEach((t=&gt;{t.style.transitionDuration=`${e}ms`})),de({swiper:t,duration:e,transformElements:s,allSlides:!0})},overwriteParams:()=&gt;({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,s)=&gt;{let a=s?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),i=s?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=g("div","swiper-slide-shadow-"+(s?"left":"top")),e.append(a)),i||(i=g("div","swiper-slide-shadow-"+(s?"right":"bottom")),e.append(i)),a&amp;&amp;(a.style.opacity=Math.max(-t,0)),i&amp;&amp;(i.style.opacity=Math.max(t,0))};le({effect:"cube",swiper:t,on:a,setTranslate:()=&gt;{const{el:e,wrapperEl:s,slides:a,width:r,height:n,rtlTranslate:l,size:o,browser:d}=t,c=t.params.cubeEffect,p=t.isHorizontal(),u=t.virtual&amp;&amp;t.params.virtual.enabled;let m,h=0;c.shadow&amp;&amp;(p?(m=t.slidesEl.querySelector(".swiper-cube-shadow"),m||(m=g("div","swiper-cube-shadow"),t.slidesEl.append(m)),m.style.height=`${r}px`):(m=e.querySelector(".swiper-cube-shadow"),m||(m=g("div","swiper-cube-shadow"),e.append(m))));for(let e=0;e&lt;a.length;e+=1){const t=a[e];let s=e;u&amp;&amp;(s=parseInt(t.getAttribute("data-swiper-slide-index"),10));let r=90*s,n=Math.floor(r/360);l&amp;&amp;(r=-r,n=Math.floor(-r/360));const d=Math.max(Math.min(t.progress,1),-1);let m=0,f=0,g=0;s%4==0?(m=4*-n*o,g=0):(s-1)%4==0?(m=0,g=4*-n*o):(s-2)%4==0?(m=o+4*n*o,g=o):(s-3)%4==0&amp;&amp;(m=-o,g=3*o+4*o*n),l&amp;&amp;(m=-m),p||(f=m,m=0);const v=`rotateX(${p?0:-r}deg) rotateY(${p?r:0}deg) translate3d(${m}px, ${f}px, ${g}px)`;d&lt;=1&amp;&amp;d&gt;-1&amp;&amp;(h=90*s+90*d,l&amp;&amp;(h=90*-s-90*d)),t.style.transform=v,c.slideShadows&amp;&amp;i(t,d,p)}if(s.style.transformOrigin=`50% 50% -${o/2}px`,s.style["-webkit-transform-origin"]=`50% 50% -${o/2}px`,c.shadow)if(p)m.style.transform=`translate3d(0px, ${r/2+c.shadowOffset}px, ${-r/2}px) rotateX(90deg) rotateZ(0deg) scale(${c.shadowScale})`;else{const e=Math.abs(h)-90*Math.floor(Math.abs(h)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=c.shadowScale,a=c.shadowScale/t,i=c.shadowOffset;m.style.transform=`scale3d(${s}, 1, ${a}) translate3d(0px, ${n/2+i}px, ${-n/2/a}px) rotateX(-90deg)`}const f=(d.isSafari||d.isWebView)&amp;&amp;d.needPerspectiveFix?-o/2:0;s.style.transform=`translate3d(0px,0,${f}px) rotateX(${t.isHorizontal()?0:h}deg) rotateY(${t.isHorizontal()?-h:0}deg)`,s.style.setProperty("--swiper-cube-translate-z",`${f}px`)},setTransition:e=&gt;{const{el:s,slides:a}=t;if(a.forEach((t=&gt;{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=&gt;{t.style.transitionDuration=`${e}ms`}))})),t.params.cubeEffect.shadow&amp;&amp;!t.isHorizontal()){const t=s.querySelector(".swiper-cube-shadow");t&amp;&amp;(t.style.transitionDuration=`${e}ms`)}},recreateShadows:()=&gt;{const e=t.isHorizontal();t.slides.forEach((t=&gt;{const s=Math.max(Math.min(t.progress,1),-1);i(t,s,e)}))},getEffectParams:()=&gt;t.params.cubeEffect,perspective:()=&gt;!0,overwriteParams:()=&gt;({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({flipEffect:{slideShadows:!0,limitRotation:!0}});const i=(e,s,a)=&gt;{let i=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),r=t.isHorizontal()?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");i||(i=ce(0,e,t.isHorizontal()?"left":"top")),r||(r=ce(0,e,t.isHorizontal()?"right":"bottom")),i&amp;&amp;(i.style.opacity=Math.max(-s,0)),r&amp;&amp;(r.style.opacity=Math.max(s,0))};le({effect:"flip",swiper:t,on:a,setTranslate:()=&gt;{const{slides:e,rtlTranslate:s}=t,a=t.params.flipEffect;for(let r=0;r&lt;e.length;r+=1){const n=e[r];let l=n.progress;t.params.flipEffect.limitRotation&amp;&amp;(l=Math.max(Math.min(n.progress,1),-1));const o=n.swiperSlideOffset;let d=-180*l,c=0,p=t.params.cssMode?-o-t.translate:-o,u=0;t.isHorizontal()?s&amp;&amp;(d=-d):(u=p,p=0,c=-d,d=0),n.style.zIndex=-Math.abs(Math.round(l))+e.length,a.slideShadows&amp;&amp;i(n,l);const m=`translate3d(${p}px, ${u}px, 0px) rotateX(${c}deg) rotateY(${d}deg)`;oe(0,n).style.transform=m}},setTransition:e=&gt;{const s=t.slides.map((e=&gt;h(e)));s.forEach((t=&gt;{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=&gt;{t.style.transitionDuration=`${e}ms`}))})),de({swiper:t,duration:e,transformElements:s})},recreateShadows:()=&gt;{t.params.flipEffect;t.slides.forEach((e=&gt;{let s=e.progress;t.params.flipEffect.limitRotation&amp;&amp;(s=Math.max(Math.min(e.progress,1),-1)),i(e,s)}))},getEffectParams:()=&gt;t.params.flipEffect,perspective:()=&gt;!0,overwriteParams:()=&gt;({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),le({effect:"coverflow",swiper:t,on:a,setTranslate:()=&gt;{const{width:e,height:s,slides:a,slidesSizesGrid:i}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth;for(let e=0,t=a.length;e&lt;t;e+=1){const t=a[e],s=i[e],l=(o-t.swiperSlideOffset-s/2)/s,p="function"==typeof r.modifier?r.modifier(l):l*r.modifier;let u=n?d*p:0,m=n?0:d*p,h=-c*Math.abs(p),f=r.stretch;"string"==typeof f&amp;&amp;-1!==f.indexOf("%")&amp;&amp;(f=parseFloat(r.stretch)/100*s);let g=n?0:f*p,v=n?f*p:0,w=1-(1-r.scale)*Math.abs(p);Math.abs(v)&lt;.001&amp;&amp;(v=0),Math.abs(g)&lt;.001&amp;&amp;(g=0),Math.abs(h)&lt;.001&amp;&amp;(h=0),Math.abs(u)&lt;.001&amp;&amp;(u=0),Math.abs(m)&lt;.001&amp;&amp;(m=0),Math.abs(w)&lt;.001&amp;&amp;(w=0);const b=`translate3d(${v}px,${g}px,${h}px)  rotateX(${m}deg) rotateY(${u}deg) scale(${w})`;if(oe(0,t).style.transform=b,t.style.zIndex=1-Math.abs(Math.round(p)),r.slideShadows){let e=n?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),s=n?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=ce(0,t,n?"left":"top")),s||(s=ce(0,t,n?"right":"bottom")),e&amp;&amp;(e.style.opacity=p&gt;0?p:0),s&amp;&amp;(s.style.opacity=-p&gt;0?-p:0)}}},setTransition:e=&gt;{t.slides.map((e=&gt;h(e))).forEach((t=&gt;{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach((t=&gt;{t.style.transitionDuration=`${e}ms`}))}))},perspective:()=&gt;!0,overwriteParams:()=&gt;({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=&gt;"string"==typeof e?e:`${e}px`;le({effect:"creative",swiper:t,on:a,setTranslate:()=&gt;{const{slides:e,wrapperEl:s,slidesSizesGrid:a}=t,r=t.params.creativeEffect,{progressMultiplier:n}=r,l=t.params.centeredSlides;if(l){const e=a[0]/2-t.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${e}px))`}for(let s=0;s&lt;e.length;s+=1){const a=e[s],o=a.progress,d=Math.min(Math.max(a.progress,-r.limitProgress),r.limitProgress);let c=d;l||(c=Math.min(Math.max(a.originalProgress,-r.limitProgress),r.limitProgress));const p=a.swiperSlideOffset,u=[t.params.cssMode?-p-t.translate:-p,0,0],m=[0,0,0];let h=!1;t.isHorizontal()||(u[1]=u[0],u[0]=0);let f={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d&lt;0?(f=r.next,h=!0):d&gt;0&amp;&amp;(f=r.prev,h=!0),u.forEach(((e,t)=&gt;{u[t]=`calc(${e}px + (${i(f.translate[t])} * ${Math.abs(d*n)}))`})),m.forEach(((e,t)=&gt;{m[t]=f.rotate[t]*Math.abs(d*n)})),a.style.zIndex=-Math.abs(Math.round(o))+e.length;const g=u.join(", "),v=`rotateX(${m[0]}deg) rotateY(${m[1]}deg) rotateZ(${m[2]}deg)`,w=c&lt;0?`scale(${1+(1-f.scale)*c*n})`:`scale(${1-(1-f.scale)*c*n})`,b=c&lt;0?1+(1-f.opacity)*c*n:1-(1-f.opacity)*c*n,y=`translate3d(${g}) ${v} ${w}`;if(h&amp;&amp;f.shadow||!h){let e=a.querySelector(".swiper-slide-shadow");if(!e&amp;&amp;f.shadow&amp;&amp;(e=ce(0,a)),e){const t=r.shadowPerProgress?d*(1/r.limitProgress):d;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const E=oe(0,a);E.style.transform=y,E.style.opacity=b,f.origin&amp;&amp;(E.style.transformOrigin=f.origin)}},setTransition:e=&gt;{const s=t.slides.map((e=&gt;h(e)));s.forEach((t=&gt;{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=&gt;{t.style.transitionDuration=`${e}ms`}))})),de({swiper:t,duration:e,transformElements:s,allSlides:!0})},perspective:()=&gt;t.params.creativeEffect.perspective,overwriteParams:()=&gt;({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),le({effect:"cards",swiper:t,on:a,setTranslate:()=&gt;{const{slides:e,activeIndex:s}=t,a=t.params.cardsEffect,{startTranslate:i,isTouched:r}=t.touchEventsData,n=t.translate;for(let l=0;l&lt;e.length;l+=1){const o=e[l],d=o.progress,c=Math.min(Math.max(d,-4),4);let p=o.swiperSlideOffset;t.params.centeredSlides&amp;&amp;!t.params.cssMode&amp;&amp;(t.wrapperEl.style.transform=`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&amp;&amp;t.params.cssMode&amp;&amp;(p-=e[0].swiperSlideOffset);let u=t.params.cssMode?-p-t.translate:-p,m=0;const h=-100*Math.abs(c);let f=1,g=-a.perSlideRotate*c,v=a.perSlideOffset-.75*Math.abs(c);const w=t.virtual&amp;&amp;t.params.virtual.enabled?t.virtual.from+l:l,b=(w===s||w===s-1)&amp;&amp;c&gt;0&amp;&amp;c&lt;1&amp;&amp;(r||t.params.cssMode)&amp;&amp;n&lt;i,y=(w===s||w===s+1)&amp;&amp;c&lt;0&amp;&amp;c&gt;-1&amp;&amp;(r||t.params.cssMode)&amp;&amp;n&gt;i;if(b||y){const e=(1-Math.abs((Math.abs(c)-.5)/.5))**.5;g+=-28*c*e,f+=-.5*e,v+=96*e,m=-25*e*Math.abs(c)+"%"}if(u=c&lt;0?`calc(${u}px + (${v*Math.abs(c)}%))`:c&gt;0?`calc(${u}px + (-${v*Math.abs(c)}%))`:`${u}px`,!t.isHorizontal()){const e=m;m=u,u=e}const E=c&lt;0?""+(1+(1-f)*c):""+(1-(1-f)*c),x=`\n        translate3d(${u}, ${m}, ${h}px)\n        rotateZ(${a.rotate?g:0}deg)\n        scale(${E})\n      `;if(a.slideShadows){let e=o.querySelector(".swiper-slide-shadow");e||(e=ce(0,o)),e&amp;&amp;(e.style.opacity=Math.min(Math.max((Math.abs(c)-.5)/.5,0),1))}o.style.zIndex=-Math.abs(Math.round(d))+e.length;oe(0,o).style.transform=x}},setTransition:e=&gt;{const s=t.slides.map((e=&gt;h(e)));s.forEach((t=&gt;{t.style.transitionDuration=`${e}ms`,t.querySelectorAll(".swiper-slide-shadow").forEach((t=&gt;{t.style.transitionDuration=`${e}ms`}))})),de({swiper:t,duration:e,transformElements:s})},perspective:()=&gt;!0,overwriteParams:()=&gt;({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return J.use(pe),J}));
//# sourceMappingURL=swiper-bundle.min.js.map
/* End */
;
; /* Start:"a:4:{s:4:"full";s:63:"/local/templates/agency_ux/js/air-datepicker.js?168976566947472";s:6:"source";s:47:"/local/templates/agency_ux/js/air-datepicker.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
!function(e,t){"object"==typeof exports&amp;&amp;"object"==typeof module?module.exports=t():"function"==typeof define&amp;&amp;define.amd?define([],t):"object"==typeof exports?exports.AirDatepicker=t():e.AirDatepicker=t()}(this,(function(){return function(){"use strict";var e={d:function(t,i){for(var s in i)e.o(i,s)&amp;&amp;!e.o(t,s)&amp;&amp;Object.defineProperty(t,s,{enumerable:!0,get:i[s]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return K}});var i={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},s={classes:"",inline:!1,locale:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:i.days,minView:i.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,prevHtml:'&lt;svg&gt;&lt;path d="M 17,12 l -5,5 l 5,5"&gt;&lt;/path&gt;&lt;/svg&gt;',nextHtml:'&lt;svg&gt;&lt;path d="M 14,12 l 5,5 l -5,5"&gt;&lt;/path&gt;&lt;/svg&gt;',navTitles:{days:"MMMM, &lt;i&gt;yyyy&lt;/i&gt;",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function a(e){let t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:document;return"string"==typeof e?t.querySelector(e):e}function n(){let{tagName:e="div",className:t="",innerHtml:i="",id:s="",attrs:a={}}=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{},n=document.createElement(e);return t&amp;&amp;n.classList.add(...t.split(" ")),s&amp;&amp;(n.id=s),i&amp;&amp;(n.innerHTML=i),a&amp;&amp;r(n,a),n}function r(e,t){for(let[i,s]of Object.entries(t))void 0!==s&amp;&amp;e.setAttribute(i,s);return e}function h(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function o(e){let t=e.getHours(),{hours:i,dayPeriod:s}=l(t);return{year:e.getFullYear(),month:e.getMonth(),fullMonth:e.getMonth()+1&lt;10?"0"+(e.getMonth()+1):e.getMonth()+1,date:e.getDate(),fullDate:e.getDate()&lt;10?"0"+e.getDate():e.getDate(),day:e.getDay(),hours:t,fullHours:d(t),hours12:i,dayPeriod:s,fullHours12:d(i),minutes:e.getMinutes(),fullMinutes:e.getMinutes()&lt;10?"0"+e.getMinutes():e.getMinutes()}}function l(e){return{dayPeriod:e&gt;11?"pm":"am",hours:e%12==0?12:e%12}}function d(e){return e&lt;10?"0"+e:e}function c(e){let t=10*Math.floor(e.getFullYear()/10);return[t,t+9]}function u(){let e=[];for(var t=arguments.length,i=new Array(t),s=0;s&lt;t;s++)i[s]=arguments[s];return i.forEach((t=&gt;{if("object"==typeof t)for(let i in t)t[i]&amp;&amp;e.push(i);else t&amp;&amp;e.push(t)})),e.join(" ")}function p(e,t){let s=arguments.length&gt;2&amp;&amp;void 0!==arguments[2]?arguments[2]:i.days;if(!e||!t)return!1;let a=o(e),n=o(t),r={[i.days]:a.date===n.date&amp;&amp;a.month===n.month&amp;&amp;a.year===n.year,[i.months]:a.month===n.month&amp;&amp;a.year===n.year,[i.years]:a.year===n.year};return r[s]}function m(e,t,i){let s=g(e,!1).getTime(),a=g(t,!1).getTime();return i?s&gt;=a:s&gt;a}function v(e,t){return!m(e,t,!0)}function g(e){let t=!(arguments.length&gt;1&amp;&amp;void 0!==arguments[1])||arguments[1],i=new Date(e.getTime());return"boolean"!=typeof t||t||D(i),i}function D(e){return e.setHours(0,0,0,0),e}function y(e,t,i){e.length?e.forEach((e=&gt;{e.addEventListener(t,i)})):e.addEventListener(t,i)}function f(e,t){return!(!e||e===document||e instanceof DocumentFragment)&amp;&amp;(e.matches(t)?e:f(e.parentNode,t))}function w(e,t,i){return e&gt;i?i:e&lt;t?t:e}function b(e){for(var t=arguments.length,i=new Array(t&gt;1?t-1:0),s=1;s&lt;t;s++)i[s-1]=arguments[s];return i.filter((e=&gt;e)).forEach((t=&gt;{for(let[i,s]of Object.entries(t))if(void 0!==s&amp;&amp;"[object Object]"===s.toString()){let t=void 0!==e[i]?e[i].toString():void 0,a=s.toString(),n=Array.isArray(s)?[]:{};e[i]=e[i]?t!==a?n:e[i]:n,b(e[i],s)}else e[i]=s})),e}function k(e){let t=e;return e instanceof Date||(t=new Date(e)),isNaN(t.getTime())&amp;&amp;(console.log(`Unable to convert value "${e}" to Date object`),t=!1),t}function C(e){let t="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|&gt;|"+t+")("+e+")($|&lt;|"+t+")","g")}function $(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class _{constructor(){let{type:e,date:t,dp:i,opts:s,body:a}=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{};$(this,"focus",(()=&gt;{this.$cell.classList.add("-focus-"),this.focused=!0})),$(this,"removeFocus",(()=&gt;{this.$cell.classList.remove("-focus-"),this.focused=!1})),$(this,"select",(()=&gt;{this.$cell.classList.add("-selected-"),this.selected=!0})),$(this,"removeSelect",(()=&gt;{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),$(this,"onChangeSelectedDate",(()=&gt;{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&amp;&amp;this._handleRangeStatus())})),$(this,"onChangeFocusDate",(e=&gt;{if(!e)return void(this.focused&amp;&amp;this.removeFocus());let t=p(e,this.date,this.type);t?this.focus():!t&amp;&amp;this.focused&amp;&amp;this.removeFocus(),this.opts.range&amp;&amp;this._handleRangeStatus()})),$(this,"render",(()=&gt;(this.$cell.innerHTML=this._getHtml(),this.$cell.adpCell=this,this.$cell))),this.type=e,this.singleType=this.type.slice(0,-1),this.date=t,this.dp=i,this.opts=s,this.body=a,this.customData=!1,this.init()}init(){let{range:e,onRenderCell:t}=this.opts;t&amp;&amp;(this.customData=t({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&amp;&amp;(this._handleSelectedStatus(),e&amp;&amp;this._handleRangeStatus())}_bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var e;let{year:t,month:i,date:s}=o(this.date),a=(null===(e=this.customData)||void 0===e?void 0:e.attrs)||{};this.$cell=n({className:this._getClassName(),attrs:{"data-year":t,"data-month":i,"data-date":s,...a}})}_getClassName(){var e,t;let s=new Date,{selectOtherMonths:a,selectOtherYears:n}=this.opts,{minDate:r,maxDate:h}=this.dp,{day:l}=o(this.date),d=this._isOutOfMinMaxRange(),c=null===(e=this.customData)||void 0===e?void 0:e.disabled,m=u("air-datepicker-cell",`-${this.singleType}-`,{"-current-":p(s,this.date,this.type),"-min-date-":r&amp;&amp;p(r,this.date,this.type),"-max-date-":h&amp;&amp;p(h,this.date,this.type)}),v="";switch(this.type){case i.days:v=u({"-weekend-":this.dp.isWeekend(l),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&amp;&amp;!a||d||c});break;case i.months:v=u({"-disabled-":d||c});break;case i.years:v=u({"-other-decade-":this.isOtherDecade,"-disabled-":d||this.isOtherDecade&amp;&amp;!n||c})}return u(m,v,null===(t=this.customData)||void 0===t?void 0:t.classes)}_getHtml(){var e;let{year:t,month:s,date:a}=o(this.date),{showOtherMonths:n,showOtherYears:r}=this.opts;if(null!==(e=this.customData)&amp;&amp;void 0!==e&amp;&amp;e.html)return this.customData.html;switch(this.type){case i.days:return!n&amp;&amp;this.isOtherMonth?"":a;case i.months:return this.dp.locale[this.opts.monthsField][s];case i.years:return!r&amp;&amp;this.isOtherDecade?"":t}}_isOutOfMinMaxRange(){let{minDate:e,maxDate:t}=this.dp,{type:s,date:a}=this,{month:n,year:r,date:h}=o(a),l=s===i.days,d=s===i.years,c=!!e&amp;&amp;new Date(r,d?e.getMonth():n,l?h:e.getDate()),u=!!t&amp;&amp;new Date(r,d?t.getMonth():n,l?h:t.getDate());return e&amp;&amp;t?v(c,e)||m(u,t):e?v(c,e):t?m(u,t):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{rangeDateFrom:e,rangeDateTo:t}=this.dp,i=u({"-in-range-":e&amp;&amp;t&amp;&amp;(s=this.date,a=e,n=t,m(s,a)&amp;&amp;v(s,n)),"-range-from-":e&amp;&amp;p(this.date,e,this.type),"-range-to-":t&amp;&amp;p(this.date,t,this.type)});var s,a,n;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),i&amp;&amp;this.$cell.classList.add(...i.split(" "))}_handleSelectedStatus(){let e=this.dp._checkIfDateIsSelected(this.date,this.type);e?this.select():!e&amp;&amp;this.selected&amp;&amp;this.removeSelect()}_handleInitialFocusStatus(){p(this.dp.focusDate,this.date,this.type)&amp;&amp;this.focus()}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function M(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let S={[i.days]:`&lt;div class="air-datepicker-body--day-names"&gt;&lt;/div&gt;&lt;div class="air-datepicker-body--cells -${i.days}-"&gt;&lt;/div&gt;`,[i.months]:`&lt;div class="air-datepicker-body--cells -${i.months}-"&gt;&lt;/div&gt;`,[i.years]:`&lt;div class="air-datepicker-body--cells -${i.years}-"&gt;&lt;/div&gt;`};const T=".air-datepicker-cell";class F{constructor(e){let{dp:t,type:s,opts:a}=e;M(this,"handleClick",(e=&gt;{let t=e.target.closest(T).adpCell;if(t.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let i=this.dp._checkIfDateIsSelected(t.date,t.type);i?this.dp._handleAlreadySelectedDates(i,t.date):this.dp.selectDate(t.date)})),M(this,"handleDayNameClick",(e=&gt;{let t=e.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(t),datepicker:this.dp})})),M(this,"onChangeCurrentView",(e=&gt;{e!==this.type?this.hide():(this.show(),this.render())})),M(this,"onMouseOverCell",(e=&gt;{let t=f(e.target,T);this.dp.setFocusDate(!!t&amp;&amp;t.adpCell.date)})),M(this,"onMouseOutCell",(()=&gt;{this.dp.setFocusDate(!1)})),M(this,"onClickBody",(e=&gt;{let{onClickDayName:t}=this.opts,i=e.target;i.closest(T)&amp;&amp;this.handleClick(e),t&amp;&amp;i.closest(".air-datepicker-body--day-name")&amp;&amp;this.handleDayNameClick(e)})),M(this,"onMouseDown",(e=&gt;{this.pressed=!0;let t=f(e.target,T),i=t&amp;&amp;t.adpCell;p(i.date,this.dp.rangeDateFrom)&amp;&amp;(this.rangeFromFocused=!0),p(i.date,this.dp.rangeDateTo)&amp;&amp;(this.rangeToFocused=!0)})),M(this,"onMouseMove",(e=&gt;{if(!this.pressed||!this.dp.isMinViewReached)return;e.preventDefault();let t=f(e.target,T),i=t&amp;&amp;t.adpCell,{selectedDates:s,rangeDateTo:a,rangeDateFrom:n}=this.dp;if(!i||i.isDisabled)return;let{date:r}=i;if(2===s.length){if(this.rangeFromFocused&amp;&amp;!m(r,a)){let{hours:e,minutes:t}=o(n);r.setHours(e),r.setMinutes(t),this.dp.rangeDateFrom=r,this.dp.replaceDate(n,r)}if(this.rangeToFocused&amp;&amp;!v(r,n)){let{hours:e,minutes:t}=o(a);r.setHours(e),r.setMinutes(t),this.dp.rangeDateTo=r,this.dp.replaceDate(a,r)}}})),M(this,"onMouseUp",(()=&gt;{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),M(this,"onChangeViewDate",((e,t)=&gt;{if(!this.isVisible)return;let s=c(e),a=c(t);switch(this.dp.currentView){case i.days:if(p(e,t,i.months))return;break;case i.months:if(p(e,t,i.years))return;break;case i.years:if(s[0]===a[0]&amp;&amp;s[1]===a[1])return}this.render()})),M(this,"render",(()=&gt;{this.destroyCells(),this._generateCells(),this.cells.forEach((e=&gt;{this.$cells.appendChild(e.render())}))})),this.dp=t,this.type=s,this.opts=a,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===i.days&amp;&amp;this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:e,dynamicRange:t}=this.opts;y(this.$el,"mouseover",this.onMouseOverCell),y(this.$el,"mouseout",this.onMouseOutCell),y(this.$el,"click",this.onClickBody),e&amp;&amp;t&amp;&amp;(y(this.$el,"mousedown",this.onMouseDown),y(this.$el,"mousemove",this.onMouseMove),y(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=n({className:`air-datepicker-body -${this.type}-`,innerHtml:S[this.type]}),this.$names=a(".air-datepicker-body--day-names",this.$el),this.$cells=a(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let e=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:this.dp.locale.firstDay,t="",s=this.dp.isWeekend,{onClickDayName:a}=this.opts,n=e,r=0;for(;r&lt;7;){let e=n%7;t+=`&lt;div class="${u("air-datepicker-body--day-name",{[i.cssClassWeekend]:s(e),"-clickable-":!!a})}" data-day-index='${e}'&gt;${this.dp.locale.daysMin[e]}&lt;/div&gt;`,r++,n++}return t}_getDaysCells(){let{viewDate:e,locale:{firstDay:t}}=this.dp,i=h(e),{year:s,month:a}=o(e),n=new Date(s,a,1),r=new Date(s,a,i),l=n.getDay()-t,d=6-r.getDay()+t;l=l&lt;0?l+7:l,d=d&gt;6?d-7:d;let c=function(e,t){let{year:i,month:s,date:a}=o(e);return new Date(i,s,a-t)}(n,l),u=i+l+d,p=c.getDate(),{year:m,month:v}=o(c),g=0;for(;g&lt;u;){let e=new Date(m,v,p+g);this._generateCell(e),g++}}_generateCell(e){let{type:t,dp:i,opts:s}=this,a=new _({type:t,dp:i,opts:s,date:e,body:this});return this.cells.push(a),a}_generateDayCells(){this._getDaysCells()}_generateMonthCells(){let{year:e}=this.dp.parsedViewDate,t=0;for(;t&lt;12;)this.cells.push(this._generateCell(new Date(e,t))),t++}_generateYearCells(){let e=c(this.dp.viewDate),t=e[0]-1,i=e[1]+1,s=t;for(;s&lt;=i;)this.cells.push(this._generateCell(new Date(s,0))),s++}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCells(){switch(this.type){case i.days:this._generateDayCells();break;case i.months:this._generateMonthCells();break;case i.years:this._generateYearCells()}}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((e=&gt;e.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView)}}function V(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class x{constructor(e){let{dp:t,opts:i}=e;V(this,"onClickNav",(e=&gt;{let t=f(e.target,".air-datepicker-nav--action");if(!t)return;let i=t.dataset.action;this.dp[i]()})),V(this,"onChangeViewDate",(()=&gt;{this.render(),this._resetNavStatus(),this.handleNavStatus()})),V(this,"onChangeCurrentView",(()=&gt;{this.render(),this._resetNavStatus(),this.handleNavStatus()})),V(this,"onClickNavTitle",(()=&gt;{this.dp.isFinalView||this.dp.up()})),V(this,"update",(()=&gt;{let{prevHtml:e,nextHtml:t}=this.opts;this.$prev.innerHTML=e,this.$next.innerHTML=t,this._resetNavStatus(),this.render(),this.handleNavStatus()})),V(this,"renderDelay",(()=&gt;{setTimeout(this.render)})),V(this,"render",(()=&gt;{this.$title.innerHTML=this._getTitle(),function(e,t){for(let i in t)t[i]?e.classList.add(i):e.classList.remove(i)}(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=t,this.opts=i,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=a(".air-datepicker-nav--title",this.$el),this.$prev=a('[data-action="prev"]',this.$el),this.$next=a('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(i.eventChangeViewDate,this.onChangeViewDate),this.dp.on(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&amp;&amp;(this.dp.on(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&amp;&amp;this.dp.on(i.eventChangeTime,this.render))}destroy(){this.dp.off(i.eventChangeViewDate,this.onChangeViewDate),this.dp.off(i.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&amp;&amp;(this.dp.off(i.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&amp;&amp;this.dp.off(i.eventChangeTime,this.render))}_createElement(){this.$el=n({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:e,opts:t}=this,i=t.navTitles[e.currentView];return"function"==typeof i?i(e):e.formatDate(e.viewDate,i)}handleNavStatus(){let{disableNavWhenOutOfRange:e}=this.opts,{minDate:t,maxDate:s}=this.dp;if(!t&amp;&amp;!s||!e)return;let{year:a,month:n}=this.dp.parsedViewDate,r=!!t&amp;&amp;o(t),h=!!s&amp;&amp;o(s);switch(this.dp.currentView){case i.days:t&amp;&amp;r.month&gt;=n&amp;&amp;r.year&gt;=a&amp;&amp;this._disableNav("prev"),s&amp;&amp;h.month&lt;=n&amp;&amp;h.year&lt;=a&amp;&amp;this._disableNav("next");break;case i.months:t&amp;&amp;r.year&gt;=a&amp;&amp;this._disableNav("prev"),s&amp;&amp;h.year&lt;=a&amp;&amp;this._disableNav("next");break;case i.years:{let e=c(this.dp.viewDate);t&amp;&amp;r.year&gt;=e[0]&amp;&amp;this._disableNav("prev"),s&amp;&amp;h.year&lt;=e[1]&amp;&amp;this._disableNav("next");break}}}_disableNav(e){a('[data-action="'+e+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){!function(e){for(var t=arguments.length,i=new Array(t&gt;1?t-1:0),s=1;s&lt;t;s++)i[s-1]=arguments[s];e.length?e.forEach((e=&gt;{e.classList.remove(...i)})):e.classList.remove(...i)}(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:e,nextHtml:t}=this.opts;this.$el.innerHTML=`&lt;div class="air-datepicker-nav--action" data-action="prev"&gt;${e}&lt;/div&gt;&lt;div class="air-datepicker-nav--title"&gt;&lt;/div&gt;&lt;div class="air-datepicker-nav--action" data-action="next"&gt;${t}&lt;/div&gt;`}get isNavIsFunction(){let{navTitles:e}=this.opts;return Object.keys(e).find((t=&gt;"function"==typeof e[t]))}}var H={today:{content:e=&gt;e.locale.today,onClick:e=&gt;e.setViewDate(new Date)},clear:{content:e=&gt;e.locale.clear,onClick:e=&gt;e.clear()}};class E{constructor(e){let{dp:t,opts:i}=e;this.dp=t,this.opts=i,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=n({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:e}=this.opts;Array.isArray(e)||(e=[e]),e.forEach((e=&gt;{let t=e;"string"==typeof e&amp;&amp;H[e]&amp;&amp;(t=H[e]);let i=this.createButton(t);t.onClick&amp;&amp;this.attachEventToButton(i,t.onClick),this.$el.appendChild(i)}))}attachEventToButton(e,t){e.addEventListener("click",(()=&gt;{t(this.dp)}))}createButton(e){let{content:t,className:i,tagName:s="button",attrs:a={}}=e;return n({tagName:s,innerHtml:`&lt;span tabindex='-1'&gt;${"function"==typeof t?t(this.dp):t}&lt;/span&gt;`,className:u("air-datepicker-button",i),attrs:a})}render(){this.generateButtons()}}function L(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class O{constructor(){let{opts:e,dp:t}=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{};L(this,"toggleTimepickerIsActive",(e=&gt;{this.dp.timepickerIsActive=e})),L(this,"onChangeSelectedDate",(e=&gt;{let{date:t,updateTime:i=!1}=e;t&amp;&amp;(this.setMinMaxTime(t),this.setCurrentTime(!!i&amp;&amp;t),this.addTimeToDate(t))})),L(this,"onChangeLastSelectedDate",(e=&gt;{e&amp;&amp;(this.setTime(e),this.render())})),L(this,"onChangeInputRange",(e=&gt;{let t=e.target;this[t.getAttribute("name")]=t.value,this.updateText(),this.dp.trigger(i.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),L(this,"onMouseEnterLeave",(e=&gt;{let t=e.target.getAttribute("name"),i=this.$minutesText;"hours"===t&amp;&amp;(i=this.$hoursText),i.classList.toggle("-focus-")})),L(this,"onFocus",(()=&gt;{this.toggleTimepickerIsActive(!0)})),L(this,"onBlur",(()=&gt;{this.toggleTimepickerIsActive(!1)})),this.opts=e,this.dp=t;let{timeFormat:s}=this.dp.locale;s&amp;&amp;(s.match(C("h"))||s.match(C("hh")))&amp;&amp;(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let e="input";navigator.userAgent.match(/trident/gi)&amp;&amp;(e="change"),y(this.$ranges,e,this.onChangeInputRange),y(this.$ranges,"mouseenter",this.onMouseEnterLeave),y(this.$ranges,"mouseleave",this.onMouseEnterLeave),y(this.$ranges,"focus",this.onFocus),y(this.$ranges,"mousedown",this.onFocus),y(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=n({className:u("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(i.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(i.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:e,hours:t,displayHours:i,minutes:s,minHours:a,minMinutes:n,maxHours:r,maxMinutes:h,dayPeriod:o,opts:{hoursStep:l,minutesStep:c}}=this;this.$el.innerHTML=`&lt;div class="air-datepicker-time--current"&gt;   &lt;span class="air-datepicker-time--current-hours"&gt;${d(i)}&lt;/span&gt;   &lt;span class="air-datepicker-time--current-colon"&gt;:&lt;/span&gt;   &lt;span class="air-datepicker-time--current-minutes"&gt;${d(s)}&lt;/span&gt;   `+(e?`&lt;span class='air-datepicker-time--current-ampm'&gt;${o}&lt;/span&gt;`:"")+'&lt;/div&gt;&lt;div class="air-datepicker-time--sliders"&gt;   &lt;div class="air-datepicker-time--row"&gt;'+`      &lt;input type="range" name="hours" value="${t}" min="${a}" max="${r}" step="${l}"/&gt;   &lt;/div&gt;   &lt;div class="air-datepicker-time--row"&gt;`+`      &lt;input type="range" name="minutes" value="${s}" min="${n}" max="${h}" step="${c}"/&gt;   &lt;/div&gt;&lt;/div&gt;`}defineDOM(){let e=e=&gt;a(e,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=e('[name="hours"]'),this.$minutes=e('[name="minutes"]'),this.$hoursText=e(".air-datepicker-time--current-hours"),this.$minutesText=e(".air-datepicker-time--current-minutes"),this.$ampm=e(".air-datepicker-time--current-ampm")}setTime(e){this.setMinMaxTime(e),this.setCurrentTime(e)}addTimeToDate(e){e&amp;&amp;(e.setHours(this.hours),e.setMinutes(this.minutes))}setMinMaxTime(e){if(this.setMinMaxTimeFromOptions(),e){let{minDate:t,maxDate:i}=this.dp;t&amp;&amp;p(e,t)&amp;&amp;this.setMinTimeFromMinDate(t),i&amp;&amp;p(e,i)&amp;&amp;this.setMaxTimeFromMaxDate(i)}}setCurrentTime(e){let{hours:t,minutes:i}=e?o(e):this;this.hours=w(t,this.minHours,this.maxHours),this.minutes=w(i,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:e,minMinutes:t,maxHours:i,maxMinutes:s}=this.opts;this.minHours=w(e,0,23),this.minMinutes=w(t,0,59),this.maxHours=w(i,0,23),this.maxMinutes=w(s,0,59)}setMinTimeFromMinDate(e){let{lastSelectedDate:t}=this.dp;this.minHours=e.getHours(),t&amp;&amp;t.getHours()&gt;e.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=e.getMinutes()}setMaxTimeFromMaxDate(e){let{lastSelectedDate:t}=this.dp;this.maxHours=e.getHours(),t&amp;&amp;t.getHours()&lt;e.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=e.getMinutes()}updateSliders(){r(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,r(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=d(this.displayHours),this.$minutesText.innerHTML=d(this.minutes),this.ampm&amp;&amp;(this.$ampm.innerHTML=this.dayPeriod)}set hours(e){this._hours=e;let{hours:t,dayPeriod:i}=l(e);this.displayHours=this.ampm?t:e,this.dayPeriod=i}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function A(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class N{constructor(e){let{dp:t,opts:i}=e;A(this,"pressedKeys",new Set),A(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],e=&gt;e.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],e=&gt;e.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],e=&gt;e.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],e=&gt;e.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],e=&gt;e.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],e=&gt;e.year-=10],[["Control","Shift","ArrowUp"],(e,t)=&gt;t.up()]])),A(this,"handleHotKey",(e=&gt;{let t=this.hotKeys.get(e),i=o(this.getInitialFocusDate());t(i,this.dp);let{year:s,month:a,date:n}=i,r=h(new Date(s,a));r&lt;n&amp;&amp;(n=r);let l=this.dp.getClampedDate(new Date(s,a,n));this.dp.setFocusDate(l,{viewDateTransition:!0})})),A(this,"isHotKeyPressed",(()=&gt;{let e=!1,t=this.pressedKeys.size,i=e=&gt;this.pressedKeys.has(e);for(let[s]of this.hotKeys){if(e)break;if(Array.isArray(s[0]))s.forEach((a=&gt;{e||t!==a.length||(e=a.every(i)&amp;&amp;s)}));else{if(t!==s.length)continue;e=s.every(i)&amp;&amp;s}}return e})),A(this,"isArrow",(e=&gt;e&gt;=37&amp;&amp;e&lt;=40)),A(this,"onKeyDown",(e=&gt;{let{key:t,which:i}=e,{dp:s,dp:{focusDate:a},opts:n}=this;this.registerKey(t);let r=this.isHotKeyPressed();if(r)return e.preventDefault(),void this.handleHotKey(r);if(this.isArrow(i))return e.preventDefault(),void this.focusNextCell(t);if("Enter"===t){if(s.currentView!==n.minView)return void s.down();if(a){let e=s._checkIfDateIsSelected(a);return void(e?s._handleAlreadySelectedDates(e,a):s.selectDate(a))}}"Escape"===t&amp;&amp;this.dp.hide()})),A(this,"onKeyUp",(e=&gt;{this.removeKey(e.key)})),this.dp=t,this.opts=i,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:e}=this.dp;e.addEventListener("keydown",this.onKeyDown),e.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:e}=this.dp;e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:e,currentView:t,selectedDates:s,parsedViewDate:{year:a,month:n}}=this.dp,r=e||s[s.length-1];if(!r)switch(t){case i.days:r=new Date(a,n,(new Date).getDate());break;case i.months:r=new Date(a,n,1);break;case i.years:r=new Date(a,0,1)}return r}focusNextCell(e){let t=this.getInitialFocusDate(),{currentView:s}=this.dp,{days:a,months:n,years:r}=i,h=o(t),l=h.year,d=h.month,c=h.date;switch(e){case"ArrowLeft":s===a&amp;&amp;(c-=1),s===n&amp;&amp;(d-=1),s===r&amp;&amp;(l-=1);break;case"ArrowUp":s===a&amp;&amp;(c-=7),s===n&amp;&amp;(d-=3),s===r&amp;&amp;(l-=4);break;case"ArrowRight":s===a&amp;&amp;(c+=1),s===n&amp;&amp;(d+=1),s===r&amp;&amp;(l+=1);break;case"ArrowDown":s===a&amp;&amp;(c+=7),s===n&amp;&amp;(d+=3),s===r&amp;&amp;(l+=4)}let u=this.dp.getClampedDate(new Date(l,d,c));this.dp.setFocusDate(u,{viewDateTransition:!0})}registerKey(e){this.pressedKeys.add(e)}removeKey(e){this.pressedKeys.delete(e)}}let I={on(e,t){this.__events||(this.__events={}),this.__events[e]?this.__events[e].push(t):this.__events[e]=[t]},off(e,t){this.__events&amp;&amp;this.__events[e]&amp;&amp;(this.__events[e]=this.__events[e].filter((e=&gt;e!==t)))},removeAllEvents(){this.__events={}},trigger(e){for(var t=arguments.length,i=new Array(t&gt;1?t-1:0),s=1;s&lt;t;s++)i[s-1]=arguments[s];this.__events&amp;&amp;this.__events[e]&amp;&amp;this.__events[e].forEach((e=&gt;{e(...i)}))}};function P(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}let j="",R="",B=!1;class K{static buildGlobalContainer(e){B=!0,j=n({className:e,id:e}),a("body").appendChild(j)}constructor(e,t){var r=this;if(P(this,"viewIndexes",[i.days,i.months,i.years]),P(this,"next",(()=&gt;{let{year:e,month:t}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(e,t+1,1));break;case i.months:this.setViewDate(new Date(e+1,t,1));break;case i.years:this.setViewDate(new Date(e+10,0,1))}})),P(this,"prev",(()=&gt;{let{year:e,month:t}=this.parsedViewDate;switch(this.currentView){case i.days:this.setViewDate(new Date(e,t-1,1));break;case i.months:this.setViewDate(new Date(e-1,t,1));break;case i.years:this.setViewDate(new Date(e-10,0,1))}})),P(this,"_finishHide",(()=&gt;{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),P(this,"setPosition",(function(e){let t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]&amp;&amp;arguments[1];if("function"==typeof(e=e||r.opts.position))return void(r.customHide=e({$datepicker:r.$datepicker,$target:r.$el,$pointer:r.$pointer,isViewChange:t,done:r._finishHide}));let i,s,{isMobile:a}=r.opts,n=r.$el.getBoundingClientRect(),h=r.$el.getBoundingClientRect(),o=r.$datepicker.offsetParent,l=r.$el.offsetParent,d=r.$datepicker.getBoundingClientRect(),c=e.split(" "),u=window.scrollY,p=window.scrollX,m=r.opts.offset,v=c[0],g=c[1];if(a)r.$datepicker.style.cssText="left: 50%; top: 50%";else{if(o===l&amp;&amp;o!==document.body&amp;&amp;(h={top:r.$el.offsetTop,left:r.$el.offsetLeft,width:n.width,height:r.$el.offsetHeight},u=0,p=0),o!==l&amp;&amp;o!==document.body){let e=o.getBoundingClientRect();h={top:n.top-e.top,left:n.left-e.left,width:n.width,height:n.height},u=0,p=0}switch(v){case"top":i=h.top-d.height-m;break;case"right":s=h.left+h.width+m;break;case"bottom":i=h.top+h.height+m;break;case"left":s=h.left-d.width-m}switch(g){case"top":i=h.top;break;case"right":s=h.left+h.width-d.width;break;case"bottom":i=h.top+h.height-d.height;break;case"left":s=h.left;break;case"center":/left|right/.test(v)?i=h.top+h.height/2-d.height/2:s=h.left+h.width/2-d.width/2}r.$datepicker.style.cssText=`left: ${s+p}px; top: ${i+u}px`}})),P(this,"_setInputValue",(()=&gt;{let{opts:e,$altField:t,locale:{dateFormat:i}}=this,{altFieldDateFormat:s,altField:a}=e;a&amp;&amp;t&amp;&amp;(t.value=this._getInputValue(s)),this.$el.value=this._getInputValue(i)})),P(this,"_getInputValue",(e=&gt;{let{selectedDates:t,opts:i}=this,{multipleDates:s,multipleDatesSeparator:a}=i;if(!t.length)return"";let n="function"==typeof e,r=n?e(s?t:t[0]):t.map((t=&gt;this.formatDate(t,e)));return r=n?r:r.join(a),r})),P(this,"_checkIfDateIsSelected",(function(e){let t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:i.days,s=!1;return r.selectedDates.some((i=&gt;{let a=p(e,i,t);return s=a&amp;&amp;i,a})),s})),P(this,"_scheduleCallAfterTransition",(e=&gt;{this._cancelScheduledCall(),e&amp;&amp;e(!1),this._onTransitionEnd=()=&gt;{e&amp;&amp;e(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),P(this,"_cancelScheduledCall",(()=&gt;{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),P(this,"setViewDate",(e=&gt;{if(!((e=k(e))instanceof Date))return;if(p(e,this.viewDate))return;let t=this.viewDate;this.viewDate=e;let{onChangeViewDate:s}=this.opts;if(s){let{month:e,year:t}=this.parsedViewDate;s({month:e,year:t,decade:this.curDecade})}this.trigger(i.eventChangeViewDate,e,t)})),P(this,"setFocusDate",(function(e){let t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{};(!e||(e=k(e))instanceof Date)&amp;&amp;(r.focusDate=e,r.opts.range&amp;&amp;e&amp;&amp;r._handleRangeOnFocus(),r.trigger(i.eventChangeFocusDate,e,t))})),P(this,"setCurrentView",(e=&gt;{if(this.viewIndexes.includes(e)){if(this.currentView=e,this.elIsInput&amp;&amp;this.visible&amp;&amp;this.setPosition(void 0,!0),this.trigger(i.eventChangeCurrentView,e),!this.views[e]){let t=this.views[e]=new F({dp:this,opts:this.opts,type:e});this.shouldUpdateDOM&amp;&amp;this.$content.appendChild(t.$el)}this.opts.onChangeView&amp;&amp;this.opts.onChangeView(e)}})),P(this,"_updateLastSelectedDate",(e=&gt;{this.lastSelectedDate=e,this.trigger(i.eventChangeLastSelectedDate,e)})),P(this,"destroy",(()=&gt;{let{showEvent:e,isMobile:t}=this.opts,i=this.$datepicker.parentNode;i&amp;&amp;i.removeChild(this.$datepicker),this.$el.removeEventListener(e,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),t&amp;&amp;this._removeMobileAttributes(),this.keyboardNav&amp;&amp;this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts=null,this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=null,this.rangeDateFrom=null,this.rangeDateTo=null})),P(this,"update",(e=&gt;{let t=b({},this.opts);b(this.opts,e);let{timepicker:s,buttons:a,range:n,selectedDates:r,isMobile:h}=this.opts,o=this.visible||this.treatAsInline;this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this._handleLocale(),!t.selectedDates&amp;&amp;r&amp;&amp;this.selectDate(r),e.view&amp;&amp;this.setCurrentView(e.view),this._setInputValue(),t.range&amp;&amp;!n?(this.rangeDateTo=!1,this.rangeDateFrom=!1):!t.range&amp;&amp;n&amp;&amp;this.selectedDates.length&amp;&amp;(this.rangeDateFrom=this.selectedDates[0],this.rangeDateTo=this.selectedDates[1]),t.timepicker&amp;&amp;!s?(o&amp;&amp;this.timepicker.destroy(),this.timepicker=!1,this.$timepicker.parentNode.removeChild(this.$timepicker)):!t.timepicker&amp;&amp;s&amp;&amp;this._addTimepicker(),!t.buttons&amp;&amp;a?this._addButtons():t.buttons&amp;&amp;!a?(this.buttons.destroy(),this.$buttons.parentNode.removeChild(this.$buttons)):o&amp;&amp;t.buttons&amp;&amp;a&amp;&amp;this.buttons.clearHtml().render(),!t.isMobile&amp;&amp;h?(this.treatAsInline||R||this._createMobileOverlay(),this._addMobileAttributes(),this.visible&amp;&amp;this._showMobileOverlay()):t.isMobile&amp;&amp;!h&amp;&amp;(this._removeMobileAttributes(),this.visible&amp;&amp;(R.classList.remove("-active-"),"function"!=typeof this.opts.position&amp;&amp;this.setPosition())),o&amp;&amp;(this.nav.update(),this.views[this.currentView].render(),this.currentView===i.days&amp;&amp;this.views[this.currentView].renderDayNames())})),P(this,"isOtherMonth",(e=&gt;{let{month:t}=o(e);return t!==this.parsedViewDate.month})),P(this,"isOtherYear",(e=&gt;{let{year:t}=o(e);return t!==this.parsedViewDate.year})),P(this,"isOtherDecade",(e=&gt;{let{year:t}=o(e),[i,s]=c(this.viewDate);return t&lt;i||t&gt;s})),P(this,"_onChangeSelectedDate",(e=&gt;{let{silent:t}=e;setTimeout((()=&gt;{this._setInputValue(),this.opts.onSelect&amp;&amp;!t&amp;&amp;this._triggerOnSelect()}))})),P(this,"_onChangeFocusedDate",(function(e){let{viewDateTransition:t}=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{};if(!e)return;let i=!1;t&amp;&amp;(i=r.isOtherMonth(e)||r.isOtherYear(e)||r.isOtherDecade(e)),i&amp;&amp;r.setViewDate(e)})),P(this,"_onChangeTime",(e=&gt;{let{hours:t,minutes:i}=e,s=new Date,{lastSelectedDate:a,opts:{onSelect:n}}=this,r=a;a||(r=s);let h=this.getCell(r,this.currentViewSingular),o=h&amp;&amp;h.adpCell;o&amp;&amp;o.isDisabled||(r.setHours(t),r.setMinutes(i),a?(this._setInputValue(),n&amp;&amp;this._triggerOnSelect()):this.selectDate(r))})),P(this,"_onFocus",(e=&gt;{this.visible||this.show()})),P(this,"_onBlur",(e=&gt;{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),P(this,"_onMouseDown",(e=&gt;{this.inFocus=!0})),P(this,"_onMouseUp",(e=&gt;{this.inFocus=!1,this.$el.focus()})),P(this,"_onResize",(()=&gt;{this.visible&amp;&amp;"function"!=typeof this.opts.position&amp;&amp;this.setPosition()})),P(this,"_onClickOverlay",(()=&gt;{this.visible&amp;&amp;this.hide()})),P(this,"isWeekend",(e=&gt;this.opts.weekends.includes(e))),P(this,"getClampedDate",(e=&gt;{let{minDate:t,maxDate:i}=this,s=e;return i&amp;&amp;m(e,i)?s=i:t&amp;&amp;v(e,t)&amp;&amp;(s=t),s})),this.$el=a(e),!this.$el)return;this.$datepicker=n({className:"air-datepicker"}),this.opts=b({},s,t),this.$customContainer=!!this.opts.container&amp;&amp;a(this.opts.container),this.$altField=a(this.opts.altField||!1);let{view:h,startDate:l}=this.opts;l||(this.opts.startDate=new Date),"INPUT"===this.$el.nodeName&amp;&amp;(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=k(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=h,this.selectedDates=[],this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:e,treatAsInline:t,opts:{inline:i,isMobile:s,selectedDates:n,keyboardNav:r,onlyTimepicker:h}}=this,o=a("body");(!B||B&amp;&amp;j&amp;&amp;!o.contains(j))&amp;&amp;!i&amp;&amp;this.elIsInput&amp;&amp;!this.$customContainer&amp;&amp;K.buildGlobalContainer(K.defaultGlobalContainerId),!s||R||t||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&amp;&amp;(i||this._bindEvents(),r&amp;&amp;!h&amp;&amp;(this.keyboardNav=new N({dp:this,opts:e}))),n&amp;&amp;this.selectDate(n,{silent:!0}),this.opts.visible&amp;&amp;!t&amp;&amp;this.show(),s&amp;&amp;!t&amp;&amp;this.$el.setAttribute("readonly",!0),t&amp;&amp;this._createComponents()}_createMobileOverlay(){R=n({className:"air-datepicker-overlay"}),j.appendChild(R)}_createComponents(){let{opts:e,treatAsInline:t,opts:{inline:i,buttons:s,timepicker:a,position:n,classes:r,onlyTimepicker:h,isMobile:o}}=this;this._buildBaseHtml(),this.elIsInput&amp;&amp;(i||this._setPositionClasses(n)),!i&amp;&amp;this.elIsInput||this.$datepicker.classList.add("-inline-"),r&amp;&amp;this.$datepicker.classList.add(...r.split(" ")),h&amp;&amp;this.$datepicker.classList.add("-only-timepicker-"),o&amp;&amp;!t&amp;&amp;this._addMobileAttributes(),this.views[this.currentView]=new F({dp:this,type:this.currentView,opts:e}),this.nav=new x({dp:this,opts:e}),a&amp;&amp;this._addTimepicker(),s&amp;&amp;this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let e in this.views)this.views[e].destroy();this.views={},this.nav.destroy(),this.timepicker&amp;&amp;this.timepicker.destroy()}_addMobileAttributes(){R.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){R.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||""===this.initialReadonly||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:e,maxDate:t}=this.opts;this.minDate=!!e&amp;&amp;k(e),this.maxDate=!!t&amp;&amp;k(t)}_addTimepicker(){this.$timepicker=n({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new O({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=n({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new E({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(i.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(i.eventChangeFocusDate,this._onChangeFocusedDate),this.on(i.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:e}=this.opts;var t,i;this.elIsInput?e?(t=this.$datepicker,(i=this.$el).parentNode.insertBefore(t,i.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='&lt;i class="air-datepicker--pointer"&gt;&lt;/i&gt;&lt;div class="air-datepicker--navigation"&gt;&lt;/div&gt;&lt;div class="air-datepicker--content"&gt;&lt;/div&gt;',this.$content=a(".air-datepicker--content",this.$datepicker),this.$pointer=a(".air-datepicker--pointer",this.$datepicker),this.$nav=a(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:e,dateFormat:t,firstDay:i,timepicker:s,onlyTimepicker:a,timeFormat:n,dateTimeSeparator:r}=this.opts;var h;this.locale=(h=e,JSON.parse(JSON.stringify(h))),t&amp;&amp;(this.locale.dateFormat=t),void 0!==n&amp;&amp;""!==n&amp;&amp;(this.locale.timeFormat=n);let{timeFormat:o}=this.locale;if(""!==i&amp;&amp;(this.locale.firstDay=i),s&amp;&amp;"function"!=typeof t){let e=o?r:"";this.locale.dateFormat=[this.locale.dateFormat,o||""].join(e)}a&amp;&amp;"function"!=typeof t&amp;&amp;(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(e){if("function"==typeof e)return void this.$datepicker.classList.add("-custom-position-");let t=(e=e.split(" "))[0],i=`air-datepicker -${t}-${e[1]}- -from-${t}-`;this.$datepicker.classList.add(...i.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:e,minDate:t,maxDate:i}=this;i&amp;&amp;m(e,i)&amp;&amp;this.setViewDate(i),t&amp;&amp;v(e,t)&amp;&amp;this.setViewDate(t)}formatDate(){let e=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:this.viewDate,t=arguments.length&gt;1?arguments[1]:void 0;if(e=k(e),!(e instanceof Date))return;let i=t,s=this.locale,a=o(e),n=a.dayPeriod,r=c(e),h=K.replacer,l={T:e.getTime(),m:a.minutes,mm:a.fullMinutes,h:a.hours12,hh:a.fullHours12,H:a.hours,HH:a.fullHours,aa:n,AA:n.toUpperCase(),E:s.daysShort[a.day],EEEE:s.days[a.day],d:a.date,dd:a.fullDate,M:a.month+1,MM:a.fullMonth,MMM:s.monthsShort[a.month],MMMM:s.months[a.month],yy:a.year.toString().slice(-2),yyyy:a.year,yyyy1:r[0],yyyy2:r[1]};for(let[e,t]of Object.entries(l))i=h(i,C(e),t);return i}down(e){this._handleUpDownActions(e,"down")}up(e){this._handleUpDownActions(e,"up")}selectDate(e){let t,s=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:{},{currentView:a,parsedViewDate:n,selectedDates:r}=this,{updateTime:h}=s,{moveToOtherMonthsOnSelect:o,moveToOtherYearsOnSelect:l,multipleDates:d,range:c,autoClose:u}=this.opts,p=r.length;if(Array.isArray(e))return e.forEach((e=&gt;{this.selectDate(e,s)})),new Promise((e=&gt;{setTimeout(e)}));if((e=k(e))instanceof Date){if(a===i.days&amp;&amp;e.getMonth()!==n.month&amp;&amp;o&amp;&amp;(t=new Date(e.getFullYear(),e.getMonth(),1)),a===i.years&amp;&amp;e.getFullYear()!==n.year&amp;&amp;l&amp;&amp;(t=new Date(e.getFullYear(),0,1)),t&amp;&amp;this.setViewDate(t),d&amp;&amp;!c){if(p===d)return;this._checkIfDateIsSelected(e)||r.push(e)}else if(c)switch(p){case 1:r.push(e),this.rangeDateTo||(this.rangeDateTo=e),m(this.rangeDateFrom,this.rangeDateTo)&amp;&amp;(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=e),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[e],this.rangeDateFrom=e,this.rangeDateTo="";break;default:this.selectedDates=[e],this.rangeDateFrom=e}else this.selectedDates=[e];return this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,silent:null==s?void 0:s.silent,date:e,updateTime:h}),this._updateLastSelectedDate(e),u&amp;&amp;!this.timepickerIsActive&amp;&amp;this.visible&amp;&amp;(d||c?c&amp;&amp;1===p&amp;&amp;this.hide():this.hide()),new Promise((e=&gt;{setTimeout(e)}))}}unselectDate(e){let t=this.selectedDates,s=this;if((e=k(e))instanceof Date)return t.some(((a,n)=&gt;{if(p(a,e))return t.splice(n,1),s.selectedDates.length?s._updateLastSelectedDate(s.selectedDates[s.selectedDates.length-1]):(s.rangeDateFrom="",s.rangeDateTo="",s._updateLastSelectedDate(!1)),this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,date:e}),!0}))}replaceDate(e,t){let s=this.selectedDates.find((t=&gt;p(t,e,this.currentView))),a=this.selectedDates.indexOf(s);a&lt;0||p(this.selectedDates[a],t,this.currentView)||(this.selectedDates[a]=t,this.trigger(i.eventChangeSelectedDate,{action:i.actionSelectDate,date:t,updateTime:!0}),this._updateLastSelectedDate(t))}clear(){let e=arguments.length&gt;0&amp;&amp;void 0!==arguments[0]?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.trigger(i.eventChangeSelectedDate,{action:i.actionUnselectDate,silent:e.silent}),new Promise((e=&gt;{setTimeout(e)}))}show(){let{onShow:e,isMobile:t}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,e&amp;&amp;this._scheduleCallAfterTransition(e),t&amp;&amp;this._showMobileOverlay()}hide(){let{onHide:e,isMobile:t}=this.opts,i=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&amp;&amp;this.customHide(),this.elIsInput&amp;&amp;this.$el.blur(),this._scheduleCallAfterTransition((t=&gt;{!this.customHide&amp;&amp;(t&amp;&amp;i||!t&amp;&amp;!i)&amp;&amp;this._finishHide(),e&amp;&amp;e(t)})),t&amp;&amp;R.classList.remove("-active-")}_triggerOnSelect(){let e=[],t=[],{selectedDates:i,locale:s,opts:{onSelect:a,multipleDates:n,range:r}}=this,h=n||r,o="function"==typeof s.dateFormat;i.length&amp;&amp;(e=i.map(g),t=o?n?s.dateFormat(e):e.map((e=&gt;s.dateFormat(e))):e.map((e=&gt;this.formatDate(e,s.dateFormat)))),a({date:h?e:e[0],formattedDate:h?t:t[0],datepicker:this})}_handleAlreadySelectedDates(e,t){let{range:i,toggleSelected:s}=this.opts;i?s?this.unselectDate(t):2!==this.selectedDates.length&amp;&amp;this.selectDate(t):s&amp;&amp;this.unselectDate(t),s||this._updateLastSelectedDate(e)}_handleUpDownActions(e,t){if(!((e=k(e||this.focusDate||this.viewDate))instanceof Date))return;let i="up"===t?this.viewIndex+1:this.viewIndex-1;i&gt;2&amp;&amp;(i=2),i&lt;0&amp;&amp;(i=0),this.setViewDate(new Date(e.getFullYear(),e.getMonth(),1)),this.setCurrentView(this.viewIndexes[i])}_handleRangeOnFocus(){1===this.selectedDates.length&amp;&amp;(m(this.selectedDates[0],this.focusDate)?(this.rangeDateTo=this.selectedDates[0],this.rangeDateFrom=this.focusDate):(this.rangeDateTo=this.focusDate,this.rangeDateFrom=this.selectedDates[0]))}getCell(e){let t=arguments.length&gt;1&amp;&amp;void 0!==arguments[1]?arguments[1]:i.day;if(!((e=k(e))instanceof Date))return;let{year:s,month:a,date:n}=o(e),r=`[data-year="${s}"]`,h=`[data-month="${a}"]`,l={[i.day]:`${r}${h}[data-date="${n}"]`,[i.month]:`${r}${h}`,[i.year]:`${r}`};return this.views[this.currentView].$el.querySelector(l[t])}_showMobileOverlay(){R.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((e,t)=&gt;parseFloat(t)+e),0)&gt;0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return o(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return c(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===i.years}get hasSelectedDates(){return this.selectedDates.length&gt;0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===i.days}get $container(){return this.$customContainer||j}static replacer(e,t,i){return e.replace(t,(function(e,t,s,a){return t+i+a}))}}var U;return P(K,"defaults",s),P(K,"version","3.3.5"),P(K,"defaultGlobalContainerId","air-datepicker-global-container"),U=K.prototype,Object.assign(U,I),t.default}()}));
/* End */
;
; /* Start:"a:4:{s:4:"full";s:62:"/local/templates/agency_ux/js/fancybox.umd.js?1697027848143773";s:6:"source";s:45:"/local/templates/agency_ux/js/fancybox.umd.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
!function(t,e){"object"==typeof exports&amp;&amp;"undefined"!=typeof module?e(exports):"function"==typeof define&amp;&amp;define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).window=t.window||{})}(this,(function(t){"use strict";const e=(t,e=1e4)=&gt;(t=parseFloat(t+"")||0,Math.round((t+Number.EPSILON)*e)/e),i=function(t){if(!(t&amp;&amp;t instanceof Element&amp;&amp;t.offsetParent))return!1;const e=t.scrollHeight&gt;t.clientHeight,i=window.getComputedStyle(t).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return e&amp;&amp;!n&amp;&amp;!s},n=function(t,e=void 0){return!(!t||t===document.body||e&amp;&amp;t===e)&amp;&amp;(i(t)?t:n(t.parentElement,e))},s=function(t){var e=(new DOMParser).parseFromString(t,"text/html").body;if(e.childElementCount&gt;1){for(var i=document.createElement("div");e.firstChild;)i.appendChild(e.firstChild);return i}return e.firstChild},o=t=&gt;`${t||""}`.split(" ").filter((t=&gt;!!t)),a=(t,e,i)=&gt;{o(e).forEach((e=&gt;{t&amp;&amp;t.classList.toggle(e,i||!1)}))};class r{constructor(t){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=t,this.pageX=t.pageX,this.pageY=t.pageY,this.clientX=t.clientX,this.clientY=t.clientY,this.id=self.Touch&amp;&amp;t instanceof Touch?t.identifier:-1,this.time=Date.now()}}const l={passive:!1};class c{constructor(t,{start:e=(()=&gt;!0),move:i=(()=&gt;{}),end:n=(()=&gt;{})}){Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=t,this.startCallback=e,this.moveCallback=i,this.endCallback=n;for(const t of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[t]=this[t].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(t){if(!t.buttons||0!==t.button)return;const e=new r(t);this.currentPointers.some((t=&gt;t.id===e.id))||this.triggerPointerStart(e,t)&amp;&amp;(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerStart(new r(e),t);window.addEventListener("blur",this.onWindowBlur)}onMove(t){const e=this.currentPointers.slice(),i="changedTouches"in t?Array.from(t.changedTouches||[]).map((t=&gt;new r(t))):[new r(t)],n=[];for(const t of i){const e=this.currentPointers.findIndex((e=&gt;e.id===t.id));e&lt;0||(n.push(t),this.currentPointers[e]=t)}n.length&amp;&amp;this.moveCallback(t,this.currentPointers.slice(),e)}onPointerEnd(t){t.buttons&gt;0&amp;&amp;0!==t.button||(this.triggerPointerEnd(t,new r(t)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(t){for(const e of Array.from(t.changedTouches||[]))this.triggerPointerEnd(t,new r(e))}triggerPointerStart(t,e){return!!this.startCallback(e,t,this.currentPointers.slice())&amp;&amp;(this.currentPointers.push(t),this.startPointers.push(t),!0)}triggerPointerEnd(t,e){const i=this.currentPointers.findIndex((t=&gt;t.id===e.id));i&lt;0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(t,e,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const t=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:t.clientX,clientY:t.clientY}),t,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function h(t,e){return e?Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2)):0}function d(t,e){return e?{clientX:(t.clientX+e.clientX)/2,clientY:(t.clientY+e.clientY)/2}:t}const u=t=&gt;"object"==typeof t&amp;&amp;null!==t&amp;&amp;t.constructor===Object&amp;&amp;"[object Object]"===Object.prototype.toString.call(t),p=(t,...e)=&gt;{const i=e.length;for(let n=0;n&lt;i;n++){const i=e[n]||{};Object.entries(i).forEach((([e,i])=&gt;{const n=Array.isArray(i)?[]:{};t[e]||Object.assign(t,{[e]:n}),u(i)?Object.assign(t[e],p(n,i)):Array.isArray(i)?Object.assign(t,{[e]:[...i]}):Object.assign(t,{[e]:i})}))}return t},f=function(t,e){return t.split(".").reduce(((t,e)=&gt;"object"==typeof t?t[e]:void 0),e)};class m{constructor(t={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(t);for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))t.startsWith("on")&amp;&amp;"function"==typeof this[t]&amp;&amp;(this[t]=this[t].bind(this))}setOptions(t){this.options=t?p({},this.constructor.defaults,t):{};for(const[t,e]of Object.entries(this.option("on")||{}))this.on(t,e)}option(t,...e){let i=f(t,this.options);return i&amp;&amp;"function"==typeof i&amp;&amp;(i=i.call(this,this,...e)),i}optionFor(t,e,i,...n){let s=f(e,t);var o;"string"!=typeof(o=s)||isNaN(o)||isNaN(parseFloat(o))||(s=parseFloat(s)),"true"===s&amp;&amp;(s=!0),"false"===s&amp;&amp;(s=!1),s&amp;&amp;"function"==typeof s&amp;&amp;(s=s.call(this,this,t,...n));let a=f(e,this.options);return a&amp;&amp;"function"==typeof a?s=a.call(this,this,t,...n,s):void 0===s&amp;&amp;(s=a),void 0===s?i:s}cn(t){const e=this.options.classes;return e&amp;&amp;e[t]||""}localize(t,e=[]){t=String(t).replace(/\{\{(\w+).?(\w+)?\}\}/g,((t,e,i)=&gt;{let n="";return i?n=this.option(`${e[0]+e.toLowerCase().substring(1)}.l10n.${i}`):e&amp;&amp;(n=this.option(`l10n.${e}`)),n||(n=t),n}));for(let i=0;i&lt;e.length;i++)t=t.split(e[i][0]).join(e[i][1]);return t=t.replace(/\{\{(.*?)\}\}/g,((t,e)=&gt;e))}on(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&amp;&amp;(i=t),this.events||(this.events=new Map),i.forEach((t=&gt;{let i=this.events.get(t);i||(this.events.set(t,[]),i=[]),i.includes(e)||i.push(e),this.events.set(t,i)}))}off(t,e){let i=[];"string"==typeof t?i=t.split(" "):Array.isArray(t)&amp;&amp;(i=t),i.forEach((t=&gt;{const i=this.events.get(t);if(Array.isArray(i)){const t=i.indexOf(e);t&gt;-1&amp;&amp;i.splice(t,1)}}))}emit(t,...e){[...this.events.get(t)||[]].forEach((t=&gt;t(this,...e))),"*"!==t&amp;&amp;this.emit("*",t,...e)}}Object.defineProperty(m,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(m,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class g extends m{constructor(t={}){super(t),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(t={}){const e=new Map;for(const[i,n]of Object.entries(t)){const t=this.option(i),s=this.plugins[i];s||!1===t?s&amp;&amp;!1===t&amp;&amp;(s.detach(),delete this.plugins[i]):e.set(i,new n(this,t||{}))}for(const[t,i]of e)this.plugins[t]=i,i.attach()}detachPlugins(t){t=t||Object.keys(this.plugins);for(const e of t){const t=this.plugins[e];t&amp;&amp;t.detach(),delete this.plugins[e]}return this.emit("detachPlugins"),this}}var b;!function(t){t[t.Init=0]="Init",t[t.Error=1]="Error",t[t.Ready=2]="Ready",t[t.Panning=3]="Panning",t[t.Mousemove=4]="Mousemove",t[t.Destroy=5]="Destroy"}(b||(b={}));const v=["a","b","c","d","e","f"],y={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},w={content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:y},x='&lt;div class="f-spinner"&gt;&lt;svg viewBox="0 0 50 50"&gt;&lt;circle cx="25" cy="25" r="20"&gt;&lt;/circle&gt;&lt;circle cx="25" cy="25" r="20"&gt;&lt;/circle&gt;&lt;/svg&gt;&lt;/div&gt;',E=t=&gt;t&amp;&amp;null!==t&amp;&amp;t instanceof Element&amp;&amp;"nodeType"in t,S=(t,e)=&gt;{t&amp;&amp;o(e).forEach((e=&gt;{t.classList.remove(e)}))},P=(t,e)=&gt;{t&amp;&amp;o(e).forEach((e=&gt;{t.classList.add(e)}))},C={a:1,b:0,c:0,d:1,e:0,f:0},M=1e5,T=1e3,O="mousemove",A="drag",z="content";let L=null,R=null;class k extends g{get isTouchDevice(){return null===R&amp;&amp;(R=window.matchMedia("(hover: none)").matches),R}get isMobile(){return null===L&amp;&amp;(L=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),L}get panMode(){return this.options.panMode!==O||this.isTouchDevice?A:O}get panOnlyZoomed(){const t=this.options.panOnlyZoomed;return"auto"===t?this.isTouchDevice:t}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){const{a:t,b:e}=this.current;return Math.sqrt(t*t+e*e)||1}get targetScale(){const{a:t,b:e}=this.target;return Math.sqrt(t*t+e*e)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:t}=this;return t.fullWidth/t.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:t,contentRect:e}=this,i=Math.max(t.height/e.fitHeight,t.width/e.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)&gt;1e-5&amp;&amp;!this.isResting}get isContentLoading(){const t=this.content;return!!(t&amp;&amp;t instanceof HTMLImageElement)&amp;&amp;!t.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const t of v){const e="e"==t||"f"===t?.001:1e-5;if(Math.abs(this.target[t]-this.current[t])&gt;e)return!1}return!(!this.ignoreBounds&amp;&amp;!this.checkBounds().inBounds)}constructor(t,e={},i={}){var n;if(super(e),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:b.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},C)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},C)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!t)throw new Error("Container Element Not Found");this.container=t,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},k.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){t.classList.add(this.cn("isLoading"));const e=s(x);!t.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=t.appendChild(e):this.spinner=(null===(n=o.parentElement)||void 0===n?void 0:n.insertBefore(e,o))||null}this.emit("beforeLoad")}else queueMicrotask((()=&gt;{this.enable()}))}initContent(){const{container:t}=this,e=this.cn(z);let i=this.option(z)||t.querySelector(`.${e}`);if(i||(i=t.querySelector("img,picture")||t.firstElementChild,i&amp;&amp;P(i,e)),i instanceof HTMLPictureElement&amp;&amp;(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:t,container:e,state:i}=this;t&amp;&amp;(t.remove(),this.spinner=null),this.option("spinner")&amp;&amp;e.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),i===b.Init?this.enable():this.updateMetrics()}onError(){this.state!==b.Destroy&amp;&amp;(this.spinner&amp;&amp;(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=b.Error,this.emit("error"))}attachObserver(){var t;const e=()=&gt;{const{container:t,containerRect:e}=this;return Math.abs(e.width-t.getBoundingClientRect().width)&gt;.1||Math.abs(e.height-t.getBoundingClientRect().height)&gt;.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=&gt;{this.updateTimer||(e()?(this.onResize(),this.isMobile&amp;&amp;(this.updateTimer=setTimeout((()=&gt;{e()&amp;&amp;this.onResize(),this.updateTimer=null}),500))):this.updateTimer&amp;&amp;(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(t=this.resizeObserver)||void 0===t||t.observe(this.container)}detachObserver(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}attachEvents(){const{container:t}=this;t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(t,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(O,this.onMouseMove)}detachEvents(){var t;const{container:e}=this;e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(t=this.pointerTracker)||void 0===t||t.stop(),this.pointerTracker=null,document.removeEventListener(O,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&amp;&amp;(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&amp;&amp;(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){const t=this.friction;this.setTargetForce();const e=this.option("maxVelocity");for(const i of v)t?(this.velocity[i]*=1-t,e&amp;&amp;!this.isScaling&amp;&amp;(this.velocity[i]=Math.max(Math.min(this.velocity[i],e),-1*e)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=&gt;this.animate())):this.stop("current")}setTargetForce(){for(const t of v)"e"===t&amp;&amp;this.isBouncingX||"f"===t&amp;&amp;this.isBouncingY||(this.velocity[t]=(1/(1-this.friction)-1)*(this.target[t]-this.current[t]))}checkBounds(t=0,e=0){const{current:i}=this,n=i.e+t,s=i.f+e,o=this.getBounds(),{x:a,y:r}=o,l=a.min,c=a.max,h=r.min,d=r.max;let u=0,p=0;return l!==1/0&amp;&amp;n&lt;l?u=l-n:c!==1/0&amp;&amp;n&gt;c&amp;&amp;(u=c-n),h!==1/0&amp;&amp;s&lt;h?p=h-s:d!==1/0&amp;&amp;s&gt;d&amp;&amp;(p=d-s),Math.abs(u)&lt;.001&amp;&amp;(u=0),Math.abs(p)&lt;.001&amp;&amp;(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&amp;&amp;!p})}clampTargetBounds(){const{target:t}=this,{x:e,y:i}=this.getBounds();e.min!==1/0&amp;&amp;(t.e=Math.max(t.e,e.min)),e.max!==1/0&amp;&amp;(t.e=Math.min(t.e,e.max)),i.min!==1/0&amp;&amp;(t.f=Math.max(t.f,i.min)),i.max!==1/0&amp;&amp;(t.f=Math.min(t.f,i.max))}calculateContentDim(t=this.current){const{content:e,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i;let r=o,l=a;if(this.option("zoom")||0!==this.angle){const i=!(e instanceof HTMLImageElement)&amp;&amp;("none"===window.getComputedStyle(e).maxWidth||"none"===window.getComputedStyle(e).maxHeight),c=i?o:n,h=i?a:s,d=this.getMatrix(t),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+c,0).matrixTransform(d),f=new DOMPoint(0+c,0+h).matrixTransform(d),m=new DOMPoint(0,0+h).matrixTransform(d),g=Math.abs(f.x-u.x),b=Math.abs(f.y-u.y),v=Math.abs(m.x-p.x),y=Math.abs(m.y-p.y);r=Math.max(g,v),l=Math.max(b,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===O||this.targetScale&lt;this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:t}=this,{x:e,y:i,xDiff:n,yDiff:s}=this.checkBounds();const o=this.option("maxVelocity");let a=this.velocity.e,r=this.velocity.f;0!==n?(this.isBouncingX=!0,n*a&lt;=0?a+=.14*n:(a=.14*n,e.min!==1/0&amp;&amp;(this.target.e=Math.max(t.e,e.min)),e.max!==1/0&amp;&amp;(this.target.e=Math.min(t.e,e.max))),o&amp;&amp;(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*r&lt;=0?r+=.14*s:(r=.14*s,i.min!==1/0&amp;&amp;(this.target.f=Math.max(t.f,i.min)),i.max!==1/0&amp;&amp;(this.target.f=Math.min(t.f,i.max))),o&amp;&amp;(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&amp;&amp;(this.velocity.e=a),this.isBouncingY&amp;&amp;(this.velocity.f=r)}enable(){const{content:t}=this,e=new DOMMatrixReadOnly(window.getComputedStyle(t).transform);for(const t of v)this.current[t]=this.target[t]=e[t];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=b.Ready,this.emit("ready")}onClick(t){var e;this.isDragging&amp;&amp;(null===(e=this.pointerTracker)||void 0===e||e.clear(),this.trackingPoints=[],this.startDecelAnim());const i=t.target;if(!i||t.defaultPrevented)return;if(i.hasAttribute("disabled"))return t.preventDefault(),void t.stopPropagation();if((()=&gt;{const t=window.getSelection();return t&amp;&amp;"Range"===t.type})()&amp;&amp;!i.closest("button"))return;const n=i.closest("[data-panzoom-action]"),s=i.closest("[data-panzoom-change]"),o=n||s,a=o&amp;&amp;E(o)?o.dataset:null;if(a){const e=a.panzoomChange,i=a.panzoomAction;if((e||i)&amp;&amp;t.preventDefault(),e){let t={};try{t=JSON.parse(e)}catch(t){console&amp;&amp;console.warn("The given data was not valid JSON")}return void this.applyChange(t)}if(i)return void(this[i]&amp;&amp;this[i]())}if(Math.abs(this.dragOffset.x)&gt;3||Math.abs(this.dragOffset.y)&gt;3)return t.preventDefault(),void t.stopPropagation();if(i.closest("[data-fancybox]"))return;const r=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&amp;&amp;!this.canZoomOut()&amp;&amp;(Math.abs(r.x-l.x)&gt;2||Math.abs(r.y-l.y)&gt;2))return;this.dragStart.time=0;const c=e=&gt;{this.option("zoom",t)&amp;&amp;e&amp;&amp;"string"==typeof e&amp;&amp;/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(e)&amp;&amp;"function"==typeof this[e]&amp;&amp;(t.preventDefault(),this[e]({event:t}))},h=this.option("click",t),d=this.option("dblClick",t);d?(this.clicks++,1==this.clicks&amp;&amp;(this.clickTimer=setTimeout((()=&gt;{1===this.clicks?(this.emit("click",t),!t.defaultPrevented&amp;&amp;h&amp;&amp;c(h)):(this.emit("dblClick",t),t.defaultPrevented||c(d)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",t),!t.defaultPrevented&amp;&amp;h&amp;&amp;c(h))}addTrackingPoint(t){const e=this.trackingPoints.filter((t=&gt;t.time&gt;Date.now()-100));e.push(t),this.trackingPoints=e}onPointerDown(t,e,i){var n;if(!1===this.option("touch",t))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===O&amp;&amp;this.targetScale&gt;1)return t.preventDefault(),t.stopPropagation(),!1;const o=t.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(n=window.getSelection())||void 0===n||n.removeAllRanges()}if("mousedown"===t.type)["A","BUTTON"].includes(o.nodeName)||t.preventDefault();else if(Math.abs(this.velocity.a)&gt;.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(e),this.emit("touchStart",t)),!0}onPointerMove(t,i,s){if(!1===this.option("touch",t))return;if(!this.isDragging)return;if(i.length&lt;2&amp;&amp;this.panOnlyZoomed&amp;&amp;e(this.targetScale)&lt;=e(this.minScale))return;if(this.emit("touchMove",t),t.defaultPrevented)return;this.addTrackingPoint(i[0]);const{content:o}=this,a=d(s[0],s[1]),r=d(i[0],i[1]);let l=0,c=0;if(i.length&gt;1){const t=o.getBoundingClientRect();l=a.clientX-t.left-.5*t.width,c=a.clientY-t.top-.5*t.height}const u=h(s[0],s[1]),p=h(i[0],i[1]);let f=u?p/u:1,m=r.clientX-a.clientX,g=r.clientY-a.clientY;this.dragOffset.x+=m,this.dragOffset.y+=g,this.dragOffset.time=Date.now()-this.dragStart.time;let b=e(this.targetScale)===e(this.minScale)&amp;&amp;this.option("lockAxis");if(b&amp;&amp;!this.lockedAxis)if("xy"===b||"y"===b||"touchmove"===t.type){if(Math.abs(this.dragOffset.x)&lt;6&amp;&amp;Math.abs(this.dragOffset.y)&lt;6)return void t.preventDefault();const e=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=e&gt;45&amp;&amp;e&lt;135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,m=0,g=0}else this.lockedAxis=b;if(n(t.target,this.content)&amp;&amp;(b="x",this.dragOffset.y=0),b&amp;&amp;"xy"!==b&amp;&amp;this.lockedAxis!==b&amp;&amp;e(this.targetScale)===e(this.minScale))return;t.cancelable&amp;&amp;t.preventDefault(),this.container.classList.add(this.cn("isDragging"));const v=this.checkBounds(m,g);this.option("rubberband")?("x"!==this.isInfinite&amp;&amp;(v.xDiff&gt;0&amp;&amp;m&lt;0||v.xDiff&lt;0&amp;&amp;m&gt;0)&amp;&amp;(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*v.xDiff))),"y"!==this.isInfinite&amp;&amp;(v.yDiff&gt;0&amp;&amp;g&lt;0||v.yDiff&lt;0&amp;&amp;g&gt;0)&amp;&amp;(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*v.yDiff)))):(v.xDiff&amp;&amp;(m=0),v.yDiff&amp;&amp;(g=0));const y=this.targetScale,w=this.minScale,x=this.maxScale;y&lt;.5*w&amp;&amp;(f=Math.max(f,w)),y&gt;1.5*x&amp;&amp;(f=Math.min(f,x)),"y"===this.lockedAxis&amp;&amp;e(y)===e(w)&amp;&amp;(m=0),"x"===this.lockedAxis&amp;&amp;e(y)===e(w)&amp;&amp;(g=0),this.applyChange({originX:l,originY:c,panX:m,panY:g,scale:f,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(t,e,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&amp;&amp;(this.addTrackingPoint(e),this.panOnlyZoomed&amp;&amp;this.contentRect.width-this.contentRect.fitWidth&lt;1&amp;&amp;this.contentRect.height-this.contentRect.fitHeight&lt;1&amp;&amp;(this.trackingPoints=[]),n(t.target,this.content)&amp;&amp;"y"===this.lockedAxis&amp;&amp;(this.trackingPoints=[]),this.emit("touchEnd",t),this.isDragging=!1,this.lockedAxis=!1,this.state!==b.Destroy&amp;&amp;(t.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var t;const i=this.isScaling;this.rAF&amp;&amp;(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of v)this.velocity[t]=0;this.target.e=this.current.e,this.target.f=this.current.f,S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:n}=this,s=n[0],o=n[n.length-1];let a=0,r=0,l=0;o&amp;&amp;s&amp;&amp;(a=o.clientX-s.clientX,r=o.clientY-s.clientY,l=o.time-s.time);const c=(null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1;1!==c&amp;&amp;(a*=c,r*=c);let h=0,d=0,u=0,p=0,f=this.option("decelFriction");const m=this.targetScale;if(l&gt;0){u=Math.abs(a)&gt;3?a/(l/30):0,p=Math.abs(r)&gt;3?r/(l/30):0;const t=this.option("maxVelocity");t&amp;&amp;(u=Math.max(Math.min(u,t),-1*t),p=Math.max(Math.min(p,t),-1*t))}u&amp;&amp;(h=u/(1/(1-f)-1)),p&amp;&amp;(d=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&amp;&amp;"y"===this.lockedAxis&amp;&amp;e(m)===this.minScale)&amp;&amp;(h=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&amp;&amp;"x"===this.lockedAxis&amp;&amp;e(m)===this.minScale)&amp;&amp;(d=p=0);const g=this.dragOffset.x,b=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(g)&lt;y&amp;&amp;Math.abs(b)&lt;y&amp;&amp;(h=d=0,u=p=0),(m&lt;this.minScale-1e-5||m&gt;this.maxScale+1e-5||i&amp;&amp;!h&amp;&amp;!d)&amp;&amp;(f=.35),this.applyChange({panX:h,panY:d,friction:f}),this.emit("decel",u,p,g,b)}onWheel(t){var e=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)&gt;Math.abs(t)?e:t}));const i=Math.max(-1,Math.min(1,e));if(this.emit("wheel",t,i),this.panMode===O)return;if(t.defaultPrevented)return;const n=this.option("wheel");"pan"===n?(t.preventDefault(),this.panOnlyZoomed&amp;&amp;!this.canZoomOut()||this.applyChange({panX:2*-t.deltaX,panY:2*-t.deltaY,bounce:!1})):"zoom"===n&amp;&amp;!1!==this.option("zoom")&amp;&amp;this.zoomWithWheel(t)}onMouseMove(t){this.panWithMouse(t)}onKeydown(t){"Escape"===t.key&amp;&amp;this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:t,target:i,content:n,contentRect:s}=this,o=Object.assign({},C);for(const n of v){const s="e"==n||"f"===n?T:M;o[n]=e(t[n],s),Math.abs(i[n]-t[n])&lt;("e"==n||"f"===n?.51:.001)&amp;&amp;(t[n]=i[n])}let{a:a,b:r,c:l,d:c,e:h,f:d}=o,u=`matrix(${a}, ${r}, ${l}, ${c}, ${h}, ${d})`,p=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;if(this.option("transformParent")&amp;&amp;(p=p.parentElement||p),p.style.transform===u)return;p.style.transform=u;const{contentWidth:f,contentHeight:m}=this.calculateContentDim();s.width=f,s.height=m,this.emit("afterTransform")}updateMetrics(t=!1){var i;if(!this||this.state===b.Destroy)return;if(this.isContentLoading)return;const n=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),{container:s,content:o}=this,a=o instanceof HTMLImageElement,r=s.getBoundingClientRect(),l=getComputedStyle(this.container);let c=r.width*n,h=r.height*n;const d=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=h-d;this.containerRect={width:c,height:h,innerWidth:u,innerHeight:p};let f=this.option("width")||"auto",m=this.option("height")||"auto";"auto"===f&amp;&amp;(f=parseFloat(o.dataset.width||"")||(t=&gt;{let e=0;return e=t instanceof HTMLImageElement?t.naturalWidth:t instanceof SVGElement?t.width.baseVal.value:Math.max(t.offsetWidth,t.scrollWidth),e||0})(o)),"auto"===m&amp;&amp;(m=parseFloat(o.dataset.height||"")||(t=&gt;{let e=0;return e=t instanceof HTMLImageElement?t.naturalHeight:t instanceof SVGElement?t.height.baseVal.value:Math.max(t.offsetHeight,t.scrollHeight),e||0})(o));let g=o.parentElement instanceof HTMLPictureElement?o.parentElement:o;this.option("transformParent")&amp;&amp;(g=g.parentElement||g);const v=g.getAttribute("style")||"";g.style.setProperty("transform","none","important"),a&amp;&amp;(g.style.width="",g.style.height=""),g.offsetHeight;const y=o.getBoundingClientRect();let w=y.width*n,x=y.height*n,E=0,S=0;a&amp;&amp;(Math.abs(f-w)&gt;1||Math.abs(m-x)&gt;1)&amp;&amp;({width:w,height:x,top:E,left:S}=((t,e,i,n)=&gt;{const s=i/n;return s&gt;t/e?(i=t,n=t/s):(i=e*s,n=e),{width:i,height:n,top:.5*(e-n),left:.5*(t-i)}})(w,x,f,m)),this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:y.top-r.top+E,bottom:r.bottom-y.bottom+E,left:y.left-r.left+S,right:r.right-y.right+S,fitWidth:w,fitHeight:x,width:w,height:x,fullWidth:f,fullHeight:m}),g.style.cssText=v,a&amp;&amp;(g.style.width=`${w}px`,g.style.height=`${x}px`),this.setTransform(),!0!==t&amp;&amp;this.emit("refresh"),this.ignoreBounds||(e(this.targetScale)&lt;e(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale&gt;this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===b.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}getBounds(){const t=this.option("bounds");if("auto"!==t)return t;const{contentWidth:i,contentHeight:n}=this.calculateContentDim(this.target);let s=0,o=0,a=0,r=0;const l=this.option("infinite");if(!0===l||this.lockedAxis&amp;&amp;l===this.lockedAxis)s=-1/0,a=1/0,o=-1/0,r=1/0;else{let{containerRect:t,contentRect:l}=this,c=e(this.contentRect.fitWidth*this.targetScale,T),h=e(this.contentRect.fitHeight*this.targetScale,T),{innerWidth:d,innerHeight:u}=t;if(this.containerRect.width===c&amp;&amp;(d=t.width),this.containerRect.width===h&amp;&amp;(u=t.height),i&gt;d){a=.5*(i-d),s=-1*a;let t=.5*(l.right-l.left);s+=t,a+=t}if(this.contentRect.fitWidth&gt;d&amp;&amp;i&lt;d&amp;&amp;(s-=.5*(this.contentRect.fitWidth-d),a-=.5*(this.contentRect.fitWidth-d)),n&gt;u){r=.5*(n-u),o=-1*r;let t=.5*(l.bottom-l.top);o+=t,r+=t}this.contentRect.fitHeight&gt;u&amp;&amp;n&lt;u&amp;&amp;(s-=.5*(this.contentRect.fitHeight-u),a-=.5*(this.contentRect.fitHeight-u))}return{x:{min:s,max:a},y:{min:o,max:r}}}updateControls(){const t=this,i=t.container,{panMode:n,contentRect:s,fullScale:o,targetScale:r,coverScale:l,maxScale:c,minScale:h}=t;let d={toggleMax:r-h&lt;.5*(c-h)?c:h,toggleCover:r-h&lt;.5*(l-h)?l:h,toggleZoom:r-h&lt;.5*(o-h)?o:h}[t.option("click")||""]||h,u=t.canZoomIn(),p=t.canZoomOut(),f=n===A&amp;&amp;!!this.option("touch"),m=p&amp;&amp;f;if(f&amp;&amp;(e(r)&lt;e(h)&amp;&amp;!this.panOnlyZoomed&amp;&amp;(m=!0),(e(s.width,1)&gt;e(s.fitWidth,1)||e(s.height,1)&gt;e(s.fitHeight,1))&amp;&amp;(m=!0)),e(s.width*r,1)&lt;e(s.fitWidth,1)&amp;&amp;(m=!1),n===O&amp;&amp;(m=!1),a(i,this.cn("isDraggable"),m),!this.option("zoom"))return;let g=u&amp;&amp;e(d)&gt;e(r),b=!g&amp;&amp;!m&amp;&amp;p&amp;&amp;e(d)&lt;e(r);a(i,this.cn("canZoomIn"),g),a(i,this.cn("canZoomOut"),b);for(const t of i.querySelectorAll('[data-panzoom-action="zoomIn"]'))u?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of i.querySelectorAll('[data-panzoom-action="zoomOut"]'))p?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of i.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){u||p?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&amp;&amp;(e.style.display=u?"":"none")}}panTo({x:t=this.target.e,y:e=this.target.f,scale:i=this.targetScale,friction:n=this.option("friction"),angle:s=0,originX:o=0,originY:a=0,flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==b.Destroy&amp;&amp;this.applyChange({panX:t-this.target.e,panY:e-this.target.f,scale:i/this.targetScale,angle:s,originX:o,originY:a,friction:n,flipX:r,flipY:l,ignoreBounds:c})}applyChange({panX:t=0,panY:i=0,scale:n=1,angle:s=0,originX:o=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:h=!1,bounce:d=this.option("bounce")}){const u=this.state;if(u===b.Destroy)return;this.rAF&amp;&amp;(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=h;const{current:p}=this,f=p.e,m=p.f,g=this.getMatrix(this.target);let y=(new DOMMatrix).translate(f,m).translate(o,a).translate(t,i);if(this.option("zoom")){if(!h){const t=this.targetScale,e=this.minScale,i=this.maxScale;t*n&lt;e&amp;&amp;(n=e/t),t*n&gt;i&amp;&amp;(n=i/t)}y=y.scale(n)}y=y.translate(-o,-a).translate(-f,-m).multiply(g),s&amp;&amp;(y=y.rotate(s)),l&amp;&amp;(y=y.scale(-1,1)),c&amp;&amp;(y=y.scale(1,-1));for(const t of v)"e"!==t&amp;&amp;"f"!==t&amp;&amp;(y[t]&gt;this.minScale+1e-5||y[t]&lt;this.minScale-1e-5)?this.target[t]=y[t]:this.target[t]=e(y[t],T);(this.targetScale&lt;this.scale||Math.abs(n-1)&gt;.1||this.panMode===O||!1===d)&amp;&amp;!h&amp;&amp;this.clampTargetBounds(),u===b.Init?this.animate():this.isResting||(this.state=b.Panning,this.requestTick())}stop(t=!1){if(this.state===b.Init||this.state===b.Destroy)return;const e=this.isTicking;this.rAF&amp;&amp;(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of v)this.velocity[e]=0,"current"===t?this.current[e]=this.target[e]:"target"===t&amp;&amp;(this.target[e]=this.current[e]);this.setTransform(),S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1,this.state=b.Ready,e&amp;&amp;(this.emit("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),P(this.container,"is-animating"),this.isScaling&amp;&amp;P(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=&gt;this.animate())))}panWithMouse(t,i=this.option("mouseMoveFriction")){if(this.pmme=t,this.panMode!==O||!t)return;if(e(this.targetScale)&lt;=e(this.minScale))return;this.emit("mouseMove",t);const{container:n,containerRect:s,contentRect:o}=this,a=s.width,r=s.height,l=n.getBoundingClientRect(),c=(t.clientX||0)-l.left,h=(t.clientY||0)-l.top;let{contentWidth:d,contentHeight:u}=this.calculateContentDim(this.target);const p=this.option("mouseMoveFactor");p&gt;1&amp;&amp;(d!==a&amp;&amp;(d*=p),u!==r&amp;&amp;(u*=p));let f=.5*(d-a)-c/a*100/100*(d-a);f+=.5*(o.right-o.left);let m=.5*(u-r)-h/r*100/100*(u-r);m+=.5*(o.bottom-o.top),this.applyChange({panX:f-this.target.e,panY:m-this.target.f,friction:i})}zoomWithWheel(t){if(this.state===b.Destroy||this.state===b.Init)return;const i=Date.now();if(i-this.pwt&lt;45)return void t.preventDefault();this.pwt=i;var n=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)&gt;Math.abs(t)?e:t}));const s=Math.max(-1,Math.min(1,n)),{targetScale:o,maxScale:a,minScale:r}=this;let l=o*(100+45*s)/100;e(l)&lt;e(r)&amp;&amp;e(o)&lt;=e(r)?(this.cwd+=Math.abs(s),l=r):e(l)&gt;e(a)&amp;&amp;e(o)&gt;=e(a)?(this.cwd+=Math.abs(s),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd&gt;this.option("wheelLimit")||(t.preventDefault(),e(l)!==e(o)&amp;&amp;this.zoomTo(l,{event:t}))}canZoomIn(){return this.option("zoom")&amp;&amp;(e(this.contentRect.width,1)&lt;e(this.contentRect.fitWidth,1)||e(this.targetScale)&lt;e(this.maxScale))}canZoomOut(){return this.option("zoom")&amp;&amp;e(this.targetScale)&gt;e(this.minScale)}zoomIn(t=1.25,e){this.zoomTo(this.targetScale*t,e)}zoomOut(t=.8,e){this.zoomTo(this.targetScale*t,e)}zoomToFit(t){this.zoomTo("fit",t)}zoomToCover(t){this.zoomTo("cover",t)}zoomToFull(t){this.zoomTo("full",t)}zoomToMax(t){this.zoomTo("max",t)}toggleZoom(t){this.zoomTo(this.targetScale-this.minScale&lt;.5*(this.fullScale-this.minScale)?"full":"fit",t)}toggleMax(t){this.zoomTo(this.targetScale-this.minScale&lt;.5*(this.maxScale-this.minScale)?"max":"fit",t)}toggleCover(t){this.zoomTo(this.targetScale-this.minScale&lt;.5*(this.coverScale-this.minScale)?"cover":"fit",t)}iterateZoom(t){this.zoomTo("next",t)}zoomTo(t=1,{friction:e="auto",originX:i="auto",originY:n="auto",event:s}={}){if(this.isContentLoading||this.state===b.Destroy)return;const{targetScale:o}=this;this.stop();let a=1;if(this.panMode===O&amp;&amp;(s=this.pmme||s),s||"auto"===i||"auto"===n){const t=this.content.getBoundingClientRect(),e=this.container.getBoundingClientRect(),o=s?s.clientX:e.left+.5*e.width,a=s?s.clientY:e.top+.5*e.height;i=o-t.left-.5*t.width,n=a-t.top-.5*t.height}const r=this.fullScale,l=this.maxScale;let c=this.coverScale;"number"==typeof t?a=t/o:("next"===t&amp;&amp;(r-c&lt;.2&amp;&amp;(c=r),t=o&lt;r-1e-5?"full":o&lt;l-1e-5?"max":"fit"),a="full"===t?r/o||1:"cover"===t?c/o||1:"max"===t?l/o||1:1/o||1),e="auto"===e?a&gt;1?.15:.25:e,this.applyChange({scale:a,originX:i,originY:n,friction:e}),s&amp;&amp;this.panMode===O&amp;&amp;this.panWithMouse(s,e)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.height-(e.top+.5*e.fitHeight)-i.f,scale:t.width/e.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:t,contentRect:e,target:i}=this;this.applyChange({panX:.5*t.width-(e.left+.5*e.fitWidth)-i.e,panY:.5*t.innerHeight-(e.top+.5*e.fitHeight)-i.f,scale:t.height/e.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:t}=this,e=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");t.classList.toggle(e);const n=t.classList.contains(e);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(t=this.current){const{a:e,b:i,c:n,d:s,e:o,f:a}=t;return new DOMMatrix([e,i,n,s,o,a])}reset(t){if(this.state!==b.Init&amp;&amp;this.state!==b.Destroy){this.stop("current");for(const t of v)this.target[t]=C[t];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===t?this.option("friction"):t,this.state=b.Panning,this.requestTick())}}destroy(){this.stop(),this.state=b.Destroy,this.detachEvents(),this.detachObserver();const{container:t,content:e}=this,i=this.option("classes")||{};for(const e of Object.values(i))t.classList.remove(e+"");e&amp;&amp;(e.removeEventListener("load",this.onLoad),e.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(k,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(k,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const I=function(t,e){let i=!0;return(...n)=&gt;{i&amp;&amp;(i=!1,t(...n),setTimeout((()=&gt;{i=!0}),e))}},F=(t,e)=&gt;{let i=[];return t.childNodes.forEach((t=&gt;{t.nodeType!==Node.ELEMENT_NODE||e&amp;&amp;!t.matches(e)||i.push(t)})),i},D={viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}};var j;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Destroy=2]="Destroy"}(j||(j={}));const H=t=&gt;{if("string"==typeof t||t instanceof HTMLElement)t={html:t};else{const e=t.thumb;void 0!==e&amp;&amp;("string"==typeof e&amp;&amp;(t.thumbSrc=e),e instanceof HTMLImageElement&amp;&amp;(t.thumbEl=e,t.thumbElSrc=e.src,t.thumbSrc=e.src),delete t.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},t)},B=(t={})=&gt;Object.assign({index:-1,slides:[],dim:0,pos:-1},t);class N extends m{constructor(t,e){super(e),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:t})}attach(){}detach(){}}const _={classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'&lt;button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"&gt;&lt;span class="f-carousel__dot" aria-hidden="true"&gt;&lt;/span&gt;&lt;/button&gt;',dynamicFrom:11,maxCount:1/0,minCount:2};class W extends N{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let t=this.list;return t||(t=document.createElement("ul"),P(t,this.cn("list")),t.setAttribute("role","tablist"),this.instance.container.appendChild(t),P(this.instance.container,this.cn("hasDots")),this.list=t),t}refresh(){var t;const e=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(e&lt;i||e&gt;n)return void this.cleanup();const o="number"==typeof s&amp;&amp;e&gt;5&amp;&amp;e&gt;=s,r=!this.list||this.isDynamic!==o||this.list.children.length!==e;r&amp;&amp;this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!o),r)for(let t=0;t&lt;e;t++)l.append(this.createItem(t));let c,h=0;for(const e of[...l.children]){const i=h===this.instance.page;i&amp;&amp;(c=e),a(e,this.cn("isCurrent"),i),null===(t=e.children[0])||void 0===t||t.setAttribute("aria-selected",i?"true":"false");for(const t of["isBeforePrev","isPrev","isNext","isAfterNext"])S(e,this.cn(t));h++}if(c=c||l.firstChild,o&amp;&amp;c){const t=c.previousElementSibling,e=t&amp;&amp;t.previousElementSibling;P(t,this.cn("isPrev")),P(e,this.cn("isBeforePrev"));const i=c.nextElementSibling,n=i&amp;&amp;i.nextElementSibling;P(i,this.cn("isNext")),P(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(t=0){var e;const i=document.createElement("li");i.setAttribute("role","presentation");const n=s(this.instance.localize(this.option("dotTpl"),[["%d",t+1]]).replace(/\%i/g,t+""));return i.appendChild(n),null===(e=i.children[0])||void 0===e||e.setAttribute("role","tab"),i}cleanup(){this.list&amp;&amp;(this.list.remove(),this.list=null),this.isDynamic=!1,S(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(W,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:_});const $="disabled",X="next",Y="prev";class q extends N{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){const t=this.instance,e=t.pages.length,i=t.page;if(e&lt;2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&amp;&amp;s&amp;&amp;(n.removeAttribute($),s.removeAttribute($),t.isInfinite||(i&lt;=0&amp;&amp;n.setAttribute($,""),i&gt;=e-1&amp;&amp;s.setAttribute($,"")))}createButton(t){const e=this.instance,i=document.createElement("button");i.setAttribute("tabindex","0"),i.setAttribute("title",e.localize(`{{${t.toUpperCase()}}}`)),P(i,this.cn("button")+" "+this.cn(t===X?"isNext":"isPrev"));const n=e.isRTL?t===X?Y:X:t;var s;return i.innerHTML=e.localize(this.option(`${n}Tpl`)),i.dataset[`carousel${s=t,s?s.match("^[a-z]")?s.charAt(0).toUpperCase()+s.substring(1):s:""}`]="true",i}build(){let t=this.container;t||(this.container=t=document.createElement("div"),P(t,this.cn("container")),this.instance.container.appendChild(t)),this.next||(this.next=t.appendChild(this.createButton(X))),this.prev||(this.prev=t.appendChild(this.createButton(Y)))}cleanup(){this.prev&amp;&amp;this.prev.remove(),this.next&amp;&amp;this.next.remove(),this.container&amp;&amp;this.container.remove(),this.prev=null,this.next=null,this.container=null}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"&gt;&lt;path d="M9 3l9 9-9 9"/&gt;&lt;/svg&gt;',prevTpl:'&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"&gt;&lt;path d="M15 3l-9 9 9 9"/&gt;&lt;/svg&gt;'}});class V extends N{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(t){this.target=this.instance,this.nav=t,this.attachEvents()}addAsNavFor(t){this.nav=this.instance,this.target=t,this.attachEvents()}attachEvents(){this.nav&amp;&amp;this.target&amp;&amp;(this.nav.options.initialSlide=this.target.options.initialPage,this.nav.state===j.Ready?this.onNavReady(this.nav):this.nav.on("ready",this.onNavReady),this.target.state===j.Ready?this.onTargetReady(this.target):this.target.on("ready",this.onTargetReady))}onNavReady(t){t.on("createSlide",this.onNavCreateSlide),t.on("Panzoom.click",this.onNavClick),t.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(t){t.on("change",this.onTargetChange),t.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(t,e,i){this.onNavTouch(t,t.panzoom,i)}onNavTouch(t,e,i){var n,s;if(Math.abs(e.dragOffset.x)&gt;3||Math.abs(e.dragOffset.y)&gt;3)return;const o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;const l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,h=r.getPageForSlide(c),d=a.getPageForSlide(c);a.slideTo(d),r.slideTo(h,{friction:(null===(s=null===(n=this.nav)||void 0===n?void 0:n.plugins)||void 0===s?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(t,e){e.index===this.selectedIndex&amp;&amp;this.markSelectedSlide(e.index)}onTargetChange(){const{target:t,nav:e}=this;if(!t||!e)return;if(e.state!==j.Ready||t.state!==j.Ready)return;const i=t.pages[t.page].slides[0].index,n=e.getPageForSlide(i);this.markSelectedSlide(i),e.slideTo(n,null===e.prevPage?{friction:0}:void 0)}markSelectedSlide(t){const e=this.nav;e&amp;&amp;e.state===j.Ready&amp;&amp;(this.selectedIndex=t,[...e.slides].map((e=&gt;{e.el&amp;&amp;e.el.classList[e.index===t?"add":"remove"]("is-nav-selected")})))}attach(){const t=this;let e=t.options.target,i=t.options.nav;e?t.addAsNavFor(e):i&amp;&amp;t.addAsTargetFor(i)}detach(){const t=this,e=t.nav,i=t.target;e&amp;&amp;(e.off("ready",t.onNavReady),e.off("createSlide",t.onNavCreateSlide),e.off("Panzoom.click",t.onNavClick),e.off("Panzoom.touchEnd",t.onNavTouch)),t.nav=null,i&amp;&amp;(i.off("ready",t.onTargetReady),i.off("refresh",t.onTargetChange),i.off("change",t.onTargetChange)),t.target=null}}Object.defineProperty(V,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const Z={Navigation:q,Dots:W,Sync:V};class U extends g{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===j.Ready}get isInfinite(){let t=!1;const{contentDim:e,viewportDim:i,pages:n,slides:s}=this;return n.length&gt;=2&amp;&amp;e+s[0].dim&gt;=i&amp;&amp;(t=this.option("infinite")),t}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(t,e={},i={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:j.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof t&amp;&amp;(t=document.querySelector(t)),!t||!E(t))throw new Error("No Element found");this.container=t,this.slideNext=I(this.slideNext.bind(this),150),this.slidePrev=I(this.slidePrev.bind(this),150),this.userOptions=e,this.userPlugins=i,queueMicrotask((()=&gt;{this.processOptions()}))}processOptions(){const t=p({},U.defaults,this.userOptions);let e="";const i=t.breakpoints;if(i&amp;&amp;u(i))for(const[n,s]of Object.entries(i))window.matchMedia(n).matches&amp;&amp;u(s)&amp;&amp;(e+=n,p(t,s));e===this.bp&amp;&amp;this.state!==j.Init||(this.bp=e,this.state===j.Ready&amp;&amp;(t.initialSlide=this.pages[this.page].slides[0].index),this.state!==j.Init&amp;&amp;this.destroy(),super.setOptions(t),!1===this.option("enabled")?this.attachEvents():setTimeout((()=&gt;{this.init()}),0))}init(){this.state=j.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},U.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=j.Ready,this.emit("ready")}initLayout(){const{container:t}=this,e=this.option("classes");P(t,this.cn("container")),a(t,e.isLTR,!this.isRTL),a(t,e.isRTL,this.isRTL),a(t,e.isVertical,!this.isHorizontal),a(t,e.isHorizontal,this.isHorizontal);let i=this.option("viewport")||t.querySelector(`.${e.viewport}`);i||(i=document.createElement("div"),P(i,e.viewport),i.append(...F(t,`.${e.slide}`)),t.prepend(i));let n=this.option("track")||t.querySelector(`.${e.track}`);n||(n=document.createElement("div"),P(n,e.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){const{track:t}=this;if(t){this.slides=[],[...F(t,`.${this.cn("slide")}`)].forEach((t=&gt;{if(E(t)){const e=H({el:t,isDom:!0,index:this.slides.length});this.slides.push(e),this.emit("initSlide",e,this.slides.length)}}));for(let t of this.option("slides",[])){const e=H(t);e.index=this.slides.length,this.slides.push(e),this.emit("initSlide",e,this.slides.length)}this.emit("initSlides")}}setInitialPage(){let t=0;const e=this.option("initialSlide");t="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0,this.page=t}setInitialPosition(){if(!this.track||!this.pages.length)return;const t=this.isHorizontal;let e=this.page;this.pages[e]||(this.page=e=0);const i=this.pages[e].pos*(this.isRTL&amp;&amp;t?1:-1),n=t?`${i}px`:"0",s=t?"0":`${i}px`;this.track.style.transform=`translate3d(${n}, ${s}, 0) scale(1)`,this.option("adaptiveHeight")&amp;&amp;this.setViewportHeight()}initPanzoom(){this.panzoom&amp;&amp;(this.panzoom.destroy(),this.panzoom=null);const t=this.option("Panzoom")||{};this.panzoom=new k(this.viewport,p({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:t=&gt;!(this.pages.length&lt;2&amp;&amp;!t.options.infinite),bounds:()=&gt;this.getBounds(),maxVelocity:t=&gt;Math.abs(t.target[this.axis]-t.current[this.axis])&lt;2*this.viewportDim?100:0},t)),this.panzoom.on("*",((t,e,...i)=&gt;{this.emit(`Panzoom.${e}`,t,...i)})),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){const t=this.container;t&amp;&amp;(t.addEventListener("click",this.onClick,{passive:!1,capture:!1}),t.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let t=[];const{contentDim:e,viewportDim:i}=this;let n=this.option("slidesPerPage");("number"!=typeof n||e&lt;=i)&amp;&amp;(n=1/0);let s=0,o=0,a=0;for(const e of this.slides)(!t.length||o+e.dim-i&gt;.05||a===n)&amp;&amp;(t.push(B()),s=t.length-1,o=0,a=0),t[s].slides.push(e),o+=e.dim+e.gap,a++;return t}processPages(){const t=this.pages,{contentDim:i,viewportDim:n}=this,s=this.option("center"),o=this.option("fill"),a=o&amp;&amp;s&amp;&amp;i&gt;n&amp;&amp;!this.isInfinite;if(t.forEach(((t,e)=&gt;{t.index=e,t.pos=t.slides[0].pos,t.dim=0;for(const[e,i]of t.slides.entries())t.dim+=i.dim,e&lt;t.slides.length-1&amp;&amp;(t.dim+=i.gap);a&amp;&amp;t.pos+.5*t.dim&lt;.5*n?t.pos=0:a&amp;&amp;t.pos+.5*t.dim&gt;=i-.5*n?t.pos=i-n:s&amp;&amp;(t.pos+=-.5*(n-t.dim))})),t.forEach(((t,s)=&gt;{o&amp;&amp;!this.isInfinite&amp;&amp;i&gt;n&amp;&amp;(t.pos=Math.max(t.pos,0),t.pos=Math.min(t.pos,i-n)),t.pos=e(t.pos,1e3),t.dim=e(t.dim,1e3),Math.abs(t.pos)&lt;=.1&amp;&amp;(t.pos=0)})),this.isInfinite)return t;const r=[];let l;return t.forEach((t=&gt;{const e=Object.assign({},t);l&amp;&amp;e.pos===l.pos?(l.dim+=e.dim,l.slides=[...l.slides,...e.slides]):(e.index=r.length,l=e,r.push(e))})),r}getPageFromIndex(t=0){const e=this.pages.length;let i;return t=parseInt((t||0).toString())||0,i=this.isInfinite?(t%e+e)%e:Math.max(Math.min(t,e-1),0),i}getSlideMetrics(t){var i,n;const s=this.isHorizontal?"width":"height";let o=0,a=0,r=t.el;const l=r&amp;&amp;!r.parentNode;if(r?o=parseFloat(r.dataset[s]||"")||0:(r=document.createElement("div"),r.style.visibility="hidden",(this.track||document.body).prepend(r)),P(r,this.cn("slide")+" "+t.class+" "+t.customClass),o)r.style[s]=`${o}px`,r.style["width"===s?"height":"width"]="";else{l&amp;&amp;(this.track||document.body).prepend(r);const t=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);o=r.getBoundingClientRect()[s]*t}const c=getComputedStyle(r);return"content-box"===c.boxSizing&amp;&amp;(this.isHorizontal?(o+=parseFloat(c.paddingLeft)||0,o+=parseFloat(c.paddingRight)||0):(o+=parseFloat(c.paddingTop)||0,o+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(n=r.parentElement)||void 0===n||n.removeChild(r):t.el||r.remove(),{dim:e(o,1e3),gap:e(a,1e3)}}getBounds(){const{isInfinite:t,isRTL:e,isHorizontal:i,pages:n}=this;let s={min:0,max:0};if(t)s={min:-1/0,max:1/0};else if(n.length){const t=n[0].pos,o=n[n.length-1].pos;s=e&amp;&amp;i?{min:t,max:o}:{min:-1*o,max:-1*t}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let t,{isHorizontal:i,isRTL:n,isInfinite:s,viewport:o,viewportDim:a,contentDim:r,page:l,pages:c,slides:h,panzoom:d}=this,u=0,p=0,f=0,m=0;d?m=-1*d.current[this.axis]:c[l]&amp;&amp;(m=c[l].pos||0),t=i?n?"right":"left":"top",n&amp;&amp;i&amp;&amp;(m*=-1);for(const i of h)i.el?("top"===t?(i.el.style.right="",i.el.style.left=""):i.el.style.top="",i.index!==u?i.el.style[t]=0===p?"":`${e(p,1e3)}px`:i.el.style[t]="",f+=i.dim+i.gap,u++):p+=i.dim+i.gap;if(s&amp;&amp;f&amp;&amp;o){let n=getComputedStyle(o),s="padding",l=i?"Right":"Bottom",c=parseFloat(n[s+(i?"Left":"Top")]);m-=c,a+=c,a+=parseFloat(n[s+l]);for(const i of h)i.el&amp;&amp;(e(i.pos)&lt;e(a)&amp;&amp;e(i.pos+i.dim+i.gap)&lt;e(m)&amp;&amp;e(m)&gt;e(r-a)&amp;&amp;(i.el.style[t]=`${e(p+f,1e3)}px`),e(i.pos+i.gap)&gt;=e(r-a)&amp;&amp;e(i.pos)&gt;e(m+a)&amp;&amp;e(m)&lt;e(a)&amp;&amp;(i.el.style[t]=`-${e(f,1e3)}px`))}let g,b,v=[...this.inTransition];if(v.length&gt;1&amp;&amp;(g=c[v[0]],b=c[v[1]]),g&amp;&amp;b){let i=0;for(const n of h)n.el?this.inTransition.has(n.index)&amp;&amp;g.slides.indexOf(n)&lt;0&amp;&amp;(n.el.style[t]=`${e(i+(g.pos-b.pos),1e3)}px`):i+=n.dim+n.gap}}createSlideEl(t){const{track:e,slides:i}=this;if(!e||!t)return;if(t.el&amp;&amp;t.el.parentNode)return;const n=t.el||document.createElement("div");P(n,this.cn("slide")),P(n,t.class),P(n,t.customClass);const s=t.html;s&amp;&amp;(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=t.html+"");const o=[];i.forEach(((t,e)=&gt;{t.el&amp;&amp;o.push(e)}));const a=t.index;let r=null;if(o.length){r=i[o.reduce(((t,e)=&gt;Math.abs(e-a)&lt;Math.abs(t-a)?e:t))]}const l=r&amp;&amp;r.el&amp;&amp;r.el.parentNode?r.index&lt;t.index?r.el.nextSibling:r.el:null;e.insertBefore(n,e.contains(l)?l:null),t.el=n,this.emit("createSlide",t)}removeSlideEl(t,e=!1){const i=t.el;if(!i||!i.parentNode)return;const n=this.cn("isSelected");if(i.classList.contains(n)&amp;&amp;(S(i,n),this.emit("unselectSlide",t)),t.isDom&amp;&amp;!e)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",t);const s=new CustomEvent("animationend");i.dispatchEvent(s),t.el&amp;&amp;(t.el.remove(),t.el=null)}transitionTo(t=0,e=this.option("transition")){if(!e)return!1;const{pages:i,panzoom:n}=this;t=parseInt((t||0).toString())||0;const s=this.getPageFromIndex(t);if(!n||!i[s]||i.length&lt;2||Math.abs(i[this.page].slides[0].dim-this.viewportDim)&gt;1)return!1;const o=t&gt;this.page?1:-1,a=this.pages[s].pos*(this.isRTL?1:-1);if(this.page===s&amp;&amp;Math.abs(a-n.target[this.axis])&lt;1)return!1;this.clearTransitions();const r=n.isResting;P(this.container,this.cn("inTransition"));const l=this.pages[this.page].slides[0],c=this.pages[s].slides[0];this.inTransition.add(c.index),this.createSlideEl(c);let h=l.el,d=c.el;r||"slide"===e||(e="fadeFast",h=null);const u=this.isRTL?"next":"prev",p=this.isRTL?"prev":"next";return h&amp;&amp;(this.inTransition.add(l.index),l.transition=e,h.addEventListener("animationend",this.onAnimationEnd),h.classList.add(`f-${e}Out`,`to-${o&gt;0?p:u}`)),d&amp;&amp;(c.transition=e,d.addEventListener("animationend",this.onAnimationEnd),d.classList.add(`f-${e}In`,`from-${o&gt;0?u:p}`)),n.panTo({x:this.isHorizontal?a:0,y:this.isHorizontal?0:a,friction:0}),this.onChange(s),!0}manageSlideVisiblity(){const t=new Set,e=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const n of this.slides)i.has(n)?t.add(n):e.add(n);for(const e of this.inTransition)t.add(this.slides[e]);for(const e of t)this.createSlideEl(e),this.lazyLoadSlide(e);for(const i of e)t.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const t="aria-hidden";let e=this.cn("isSelected");if(e)for(const i of this.slides){const n=i.el;n&amp;&amp;(n.dataset.index=`${i.index}`,this.pages[this.page].slides.includes(i)?(n.classList.contains(e)||(P(n,e),this.emit("selectSlide",i)),n.removeAttribute(t)):(n.classList.contains(e)&amp;&amp;(S(n,e),this.emit("unselectSlide",i)),n.setAttribute(t,"true")))}}flipInfiniteTrack(){const t=this.panzoom;if(!t||!this.isInfinite)return;const e="x"===this.option("axis")?"e":"f",{viewportDim:i,contentDim:n}=this;let s=t.current[e],o=t.target[e]-s,a=0,r=.5*i,l=n;this.isRTL&amp;&amp;this.isHorizontal?(s&lt;-r&amp;&amp;(a=-1,s+=l),s&gt;l-r&amp;&amp;(a=1,s-=l)):(s&gt;r&amp;&amp;(a=1,s-=l),s&lt;-l+r&amp;&amp;(a=-1,s+=l)),a&amp;&amp;(t.current[e]=s,t.target[e]=s+o)}lazyLoadSlide(t){const e=this,i=t&amp;&amp;t.el;if(!i)return;const n=new Set,o="f-fadeIn";i.querySelectorAll("[data-lazy-srcset]").forEach((t=&gt;{t instanceof HTMLImageElement&amp;&amp;n.add(t)}));let a=Array.from(i.querySelectorAll("[data-lazy-src]"));i.dataset.lazySrc&amp;&amp;a.push(i),a.map((t=&gt;{t instanceof HTMLImageElement?n.add(t):E(t)&amp;&amp;(t.style.backgroundImage=`url('${t.dataset.lazySrc||""}')`,delete t.dataset.lazySrc)}));const r=(t,i,n)=&gt;{n&amp;&amp;(n.remove(),n=null),i.complete&amp;&amp;(i.classList.add(o),setTimeout((()=&gt;{i.classList.remove(o)}),350),i.style.visibility=""),this.option("adaptiveHeight")&amp;&amp;t.el&amp;&amp;this.pages[this.page].slides.indexOf(t)&gt;-1&amp;&amp;(e.updateMetrics(),e.setViewportHeight()),this.emit("load",t)};for(const e of n){let i=null;e.src=e.dataset.lazySrcset||e.dataset.lazySrc||"",delete e.dataset.lazySrc,delete e.dataset.lazySrcset,e.style.visibility="hidden",e.addEventListener("error",(()=&gt;{r(t,e,i)})),e.addEventListener("load",(()=&gt;{r(t,e,i)})),setTimeout((()=&gt;{e.parentNode&amp;&amp;t.el&amp;&amp;(e.complete?r(t,e,i):(i=s(x),e.parentNode.insertBefore(i,e)))}),300)}}onAnimationEnd(t){var e;const i=t.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=t.animationName;if(!i||!s||!o)return;const a=!!this.inTransition.has(n)&amp;&amp;s.transition;a&amp;&amp;o.substring(0,a.length+2)===`f-${a}`&amp;&amp;this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&amp;&amp;(null===(e=this.panzoom)||void 0===e?void 0:e.isResting)&amp;&amp;this.emit("settle")}onDecel(t,e=0,i=0,n=0,s=0){const{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,c=l.length,h=Math.abs(Math.atan2(i,e)/(Math.PI/180));let d=0;if(d=h&gt;45&amp;&amp;h&lt;135?a?0:i:a?e:0,!c)return;const u=this.option("dragFree");let p=this.page,f=o&amp;&amp;a?1:-1;const m=t.target[r]*f,g=t.current[r]*f;let{pageIndex:b}=this.getPageFromPosition(m),{pageIndex:v}=this.getPageFromPosition(g);u?this.onChange(b):(Math.abs(d)&gt;5?(l[p].dim&lt;document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&amp;&amp;(p=v),p=o&amp;&amp;a?d&lt;0?p-1:p+1:d&lt;0?p+1:p-1):p=0===n&amp;&amp;0===s?p:v,this.slideTo(p,{transition:!1,friction:t.option("decelFriction")}))}onClick(t){const e=t.target,i=e&amp;&amp;E(e)?e.dataset:null;let n,s;i&amp;&amp;(void 0!==i.carouselPage?(s="slideTo",n=i.carouselPage):void 0!==i.carouselNext?s="slideNext":void 0!==i.carouselPrev&amp;&amp;(s="slidePrev")),s?(t.preventDefault(),t.stopPropagation(),e&amp;&amp;!e.hasAttribute("disabled")&amp;&amp;this[s](n)):this.emit("click",t)}onSlideTo(t){const e=t.detail||0;this.slideTo(this.getPageForSlide(e),{friction:0})}onChange(t,e=0){const i=this.page;this.prevPage=i,this.page=t,this.option("adaptiveHeight")&amp;&amp;this.setViewportHeight(),t!==i&amp;&amp;(this.markSelectedSlides(),this.emit("change",t,i,e))}onRefresh(){let t=this.contentDim,e=this.viewportDim;this.updateMetrics(),this.contentDim===t&amp;&amp;this.viewportDim===e||this.slideTo(this.page,{friction:0,transition:!1})}onResize(){this.option("breakpoints")&amp;&amp;this.processOptions()}onBeforeTransform(t){this.lp!==t.current[this.axis]&amp;&amp;(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=t.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(t=null,e=null){this.destroy(),this.state=j.Init,this.userOptions=t||this.userOptions,this.userPlugins=e||this.userPlugins,this.processOptions()}slideTo(t=0,{friction:e=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===j.Destroy)return;t=parseInt((t||0).toString())||0;const n=this.getPageFromIndex(t);if(this.page!==n){const e=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",e,t),e.defaultPrevented)return}const{axis:s,isHorizontal:o,isRTL:a,pages:r,panzoom:l}=this,c=r.length,h=a&amp;&amp;o?1:-1;if(!l||!c)return;if(this.transitionTo(t,i))return;let d=r[n].pos;if(this.isInfinite){const e=this.contentDim,i=l.target[s]*h;if(2===c)d+=e*Math.floor(parseFloat(t+"")/2);else{const t=i;d=[d,d-e,d+e].reduce((function(e,i){return Math.abs(i-t)&lt;Math.abs(e-t)?i:e}))}}d*=h,Math.abs(l.target[s]-d)&lt;.1||(l.panTo({x:o?d:0,y:o?0:d,friction:e}),this.onChange(n))}slideToClosest(t){if(this.panzoom){const{pageIndex:e}=this.getPageFromPosition(this.panzoom.current[this.isHorizontal?"e":"f"]);this.slideTo(e,t)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),S(this.container,this.cn("inTransition"));const t=["to-prev","to-next","from-prev","from-next"];for(const e of this.slides){const i=e.el;if(i){i.removeEventListener("animationend",this.onAnimationEnd),i.classList.remove(...t);const n=e.transition;n&amp;&amp;i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}prependSlide(t){var e,i;let n=Array.isArray(t)?t:[t];for(const t of n.reverse())this.slides.unshift(H(t));for(let t=0;t&lt;this.slides.length;t++)this.slides[t].index=t;const s=(null===(e=this.pages[this.page])||void 0===e?void 0:e.pos)||0;this.page+=n.length,this.updateMetrics();const o=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0;if(this.panzoom){const t=this.isRTL?s-o:o-s;this.panzoom.target.e-=t,this.panzoom.current.e-=t,this.panzoom.requestTick()}}appendSlide(t){let e=Array.isArray(t)?t:[t];for(const t of e){const e=H(t);e.index=this.slides.length,this.slides.push(e),this.emit("initSlide",e,this.slides.length)}this.updateMetrics()}removeSlide(t){const e=this.slides.length;t=(t%e+e)%e,this.removeSlideEl(this.slides[t],!0),this.slides.splice(t,1);for(let t=0;t&lt;this.slides.length;t++)this.slides[t].index=t;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1})}updateMetrics(){const{panzoom:t,viewport:i,track:n,isHorizontal:s}=this;if(!n)return;const o=s?"width":"height",a=s?"offsetWidth":"offsetHeight";if(i){let t=Math.max(i[a],e(i.getBoundingClientRect()[o],1e3)),n=getComputedStyle(i),r="padding",l=s?"Right":"Bottom";t-=parseFloat(n[r+(s?"Left":"Top")])+parseFloat(n[r+l]),this.viewportDim=t}let r,l=this.pages.length,c=0;for(const[t,i]of this.slides.entries()){let n=0,s=0;!i.el&amp;&amp;r?(n=r.dim,s=r.gap):(({dim:n,gap:s}=this.getSlideMetrics(i)),r=i),n=e(n,1e3),s=e(s,1e3),i.dim=n,i.gap=s,i.pos=c,c+=n,(this.isInfinite||t&lt;this.slides.length-1)&amp;&amp;(c+=s)}const h=this.contentDim;c=e(c,1e3),this.contentDim=c,t&amp;&amp;(t.contentRect[o]=c,t.contentRect["e"===this.axis?"fullWidth":"fullHeight"]=c),this.pages=this.createPages(),this.pages=this.processPages(),this.state===j.Init&amp;&amp;this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),t&amp;&amp;l===this.pages.length&amp;&amp;Math.abs(c-h)&gt;.5&amp;&amp;(t.target[this.axis]=-1*this.pages[this.page].pos,t.current[this.axis]=-1*this.pages[this.page].pos,t.stop()),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(t,i=!1){void 0===t&amp;&amp;(t=this.page);const n=this,s=n.panzoom,o=n.pages[t]||0;if(!o||!s)return 0;let a=-1*s.current.e,r=n.contentDim;var l=[e((a-o.pos)/(1*o.dim),1e3),e((a+r-o.pos)/(1*o.dim),1e3),e((a-r-o.pos)/(1*o.dim),1e3)].reduce((function(t,e){return Math.abs(e)&lt;Math.abs(t)?e:t}));return i?l:Math.max(-1,Math.min(1,l))}setViewportHeight(){const{page:t,pages:e,viewport:i,isHorizontal:n}=this;if(!i||!e[t])return;let s=0;n&amp;&amp;this.track&amp;&amp;(this.track.style.height="auto",e[t].slides.forEach((t=&gt;{t.el&amp;&amp;(s=Math.max(s,t.el.offsetHeight))}))),i.style.height=s?`${s}px`:""}getPageForSlide(t){for(const e of this.pages)for(const i of e.slides)if(i.index===t)return e.index;return-1}getVisibleSlides(t=0){var e;const i=new Set;let{contentDim:n,viewportDim:s,pages:o,page:a}=this;n=n+(null===(e=this.slides[this.slides.length-1])||void 0===e?void 0:e.gap)||0;let r=0;r=this.panzoom?-1*this.panzoom.current[this.axis]:o[a]&amp;&amp;o[a].pos||0,this.isInfinite&amp;&amp;(r-=Math.floor(r/n)*n),this.isRTL&amp;&amp;this.isHorizontal&amp;&amp;(r*=-1);const l=r-s*t,c=r+s*(t+1),h=this.isInfinite?[-1,0,1]:[0];for(const t of this.slides)for(const e of h){const s=t.pos+e*n,o=t.pos+t.dim+t.gap+e*n;s&lt;c&amp;&amp;o&gt;l&amp;&amp;i.add(t)}return i}getPageFromPosition(t){const{viewportDim:e,contentDim:i}=this,n=this.pages.length,s=this.slides.length,o=this.slides[s-1];let a=0,r=0,l=0;const c=this.option("center");c&amp;&amp;(t+=.5*e),this.isInfinite||(t=Math.max(this.slides[0].pos,Math.min(t,o.pos)));const h=i+o.gap;l=Math.floor(t/h)||0,t-=l*h;let d=o,u=this.slides.find((e=&gt;{const i=t+(d&amp;&amp;!c?.5*d.dim:0);return d=e,e.pos&lt;=i&amp;&amp;e.pos+e.dim+e.gap&gt;i}));return u||(u=o),r=this.getPageForSlide(u.index),a=r+l*n,{page:a,pageIndex:r}}destroy(){if([j.Destroy].includes(this.state))return;this.state=j.Destroy;const{container:t,viewport:e,track:i,slides:n,panzoom:s}=this,o=this.option("classes");t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),s&amp;&amp;(s.destroy(),this.panzoom=null),n&amp;&amp;n.forEach((t=&gt;{this.removeSlideEl(t)})),this.detachPlugins(),e&amp;&amp;e.offsetParent&amp;&amp;i&amp;&amp;i.offsetParent&amp;&amp;e.replaceWith(...i.childNodes);for(const[e,i]of Object.entries(o))"container"!==e&amp;&amp;i&amp;&amp;t.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&amp;&amp;this.events.set("ready",a)}}Object.defineProperty(U,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:k}),Object.defineProperty(U,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(U,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Z});const G=function(t){const e=window.pageYOffset,i=window.pageYOffset+window.innerHeight;if(!E(t))return 0;const n=t.getBoundingClientRect(),s=n.y+window.pageYOffset,o=n.y+n.height+window.pageYOffset;if(e&gt;o||i&lt;s)return 0;if(e&lt;s&amp;&amp;i&gt;o)return 100;if(s&lt;e&amp;&amp;o&gt;i)return 100;let a=n.height;s&lt;e&amp;&amp;(a-=window.pageYOffset-s),o&gt;i&amp;&amp;(a-=o-i);const r=a/window.innerHeight*100;return Math.round(r)},K=!("undefined"==typeof window||!window.document||!window.document.createElement);let J;const Q=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard)","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),tt=t=&gt;{if(t&amp;&amp;K){void 0===J&amp;&amp;document.createElement("div").focus({get preventScroll(){return J=!0,!1}});try{if(J)t.focus({preventScroll:!0});else{const e=window.pageXOffset||document.body.scrollTop,i=window.pageYOffset||document.body.scrollLeft;t.focus(),document.body.scrollTo({top:e,left:i,behavior:"auto"})}}catch(t){}}},et={dragToClose:!0,hideScrollbar:!0,Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},contentClick:"toggleZoom",contentDblClick:!1,backdropClick:"close",animated:!0,idle:3500,showClass:"f-zoomInUp",hideClass:"f-fadeOut",commonCaption:!1,parentEl:null,startIndex:0,l10n:Object.assign(Object.assign({},y),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),tpl:{closeButton:'&lt;button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"&gt;&lt;path d="M20 20L4 4m16 0L4 20"/&gt;&lt;/svg&gt;&lt;/button&gt;',main:'&lt;div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1"&gt;\n    &lt;div class="fancybox__backdrop"&gt;&lt;/div&gt;\n    &lt;div class="fancybox__carousel"&gt;&lt;/div&gt;\n    &lt;div class="fancybox__footer"&gt;&lt;/div&gt;\n  &lt;/div&gt;'},groupAll:!1,groupAttr:"data-fancybox",defaultType:"image",defaultDisplay:"block",autoFocus:!0,trapFocus:!0,placeFocusBack:!0,closeButton:"auto",keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},Fullscreen:{autoStart:!1},compact:()=&gt;window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,wheel:"zoom"};var it,nt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Closing=2]="Closing",t[t.CustomClosing=3]="CustomClosing",t[t.Destroy=4]="Destroy"}(it||(it={})),function(t){t[t.Loading=0]="Loading",t[t.Opening=1]="Opening",t[t.Ready=2]="Ready",t[t.Closing=3]="Closing"}(nt||(nt={}));const st=()=&gt;{queueMicrotask((()=&gt;{(()=&gt;{const{slug:t,index:e}=ot.parseURL(),i=Qt.getInstance();if(i&amp;&amp;!1!==i.option("Hash")){const n=i.carousel;if(t&amp;&amp;n){for(let e of n.slides)if(e.slug&amp;&amp;e.slug===t)return n.slideTo(e.index);if(t===i.option("slug"))return n.slideTo(e-1);const s=i.getSlide(),o=s&amp;&amp;s.triggerEl&amp;&amp;s.triggerEl.dataset;if(o&amp;&amp;o.fancybox===t)return n.slideTo(e-1)}ot.hasSilentClose=!0,i.close()}ot.startFromUrl()})()}))};class ot extends N{constructor(){super(...arguments),Object.defineProperty(this,"origHash",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null})}onChange(){const t=this.instance,e=t.carousel;this.timer&amp;&amp;clearTimeout(this.timer);const i=t.getSlide();if(!e||!i)return;const n=t.isOpeningSlide(i),s=new URL(document.URL).hash;let o,a=i.slug||void 0,r=i.triggerEl||void 0;o=a||this.instance.option("slug"),!o&amp;&amp;r&amp;&amp;r.dataset&amp;&amp;(o=r.dataset.fancybox);let l="";o&amp;&amp;"true"!==o&amp;&amp;(l="#"+o+(!a&amp;&amp;e.slides.length&gt;1?"-"+(i.index+1):"")),n&amp;&amp;(this.origHash=s!==l?s:""),l&amp;&amp;s!==l&amp;&amp;(this.timer=setTimeout((()=&gt;{try{t.state===it.Ready&amp;&amp;window.history[n?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+l)}catch(t){}}),300))}onClose(){if(this.timer&amp;&amp;clearTimeout(this.timer),!0!==ot.hasSilentClose)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(this.origHash||""))}catch(t){}}attach(){const t=this.instance;t.on("Carousel.ready",this.onChange),t.on("Carousel.change",this.onChange),t.on("close",this.onClose)}detach(){const t=this.instance;t.off("Carousel.ready",this.onChange),t.off("Carousel.change",this.onChange),t.off("close",this.onClose)}static parseURL(){const t=window.location.hash.slice(1),e=t.split("-"),i=e[e.length-1],n=i&amp;&amp;/^\+?\d+$/.test(i)&amp;&amp;parseInt(e.pop()||"1",10)||1;return{hash:t,slug:e.join("-"),index:n}}static startFromUrl(){if(ot.hasSilentClose=!1,Qt.getInstance()||!1===Qt.defaults.Hash)return;const{hash:t,slug:e,index:i}=ot.parseURL();if(!e)return;let n=document.querySelector(`[data-slug="${t}"]`);if(n&amp;&amp;n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Qt.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${e}"]`);s.length&amp;&amp;(n=s[i-1],n&amp;&amp;n.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))}static destroy(){window.removeEventListener("hashchange",st,!1)}}function at(){window.addEventListener("hashchange",st,!1),setTimeout((()=&gt;{ot.startFromUrl()}),500)}Object.defineProperty(ot,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(ot,"hasSilentClose",{enumerable:!0,configurable:!0,writable:!0,value:!1}),K&amp;&amp;(/complete|interactive|loaded/.test(document.readyState)?at():document.addEventListener("DOMContentLoaded",at));class rt extends N{onCreateSlide(t,e,i){const n=this.instance.optionFor(i,"src")||"";i.el&amp;&amp;"image"===i.type&amp;&amp;"string"==typeof n&amp;&amp;this.setImage(i,n)}onRemoveSlide(t,e,i){i.panzoom&amp;&amp;i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(t,e,i,n){for(const t of e.slides){const e=t.panzoom;e&amp;&amp;t.index!==i&amp;&amp;e.reset(.35)}}onClose(){var t;const e=this.instance,i=e.container,n=e.getSlide();if(!i||!i.parentElement||!n)return;const{el:s,contentEl:o,panzoom:a}=n,r=n.thumbElSrc;if(!s||!r||!o||!a||a.isContentLoading||a.state===b.Init||a.state===b.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(n);if(!l)return;this.instance.state=it.CustomClosing,i.classList.remove("is-zooming-in"),i.classList.add("is-zooming-out"),o.style.backgroundImage=`url('${r}')`;const c=i.getBoundingClientRect();1===((null===(t=window.visualViewport)||void 0===t?void 0:t.scale)||1)&amp;&amp;Object.assign(i.style,{position:"absolute",top:`${window.pageYOffset}px`,left:`${window.pageXOffset}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:h,y:d,scale:u,opacity:p}=l;if(p){const t=((t,e,i,n)=&gt;{const s=e-t,o=n-i;return e=&gt;i+((e-t)/s*o||0)})(a.scale,u,1,0);a.on("afterTransform",(()=&gt;{o.style.opacity=t(a.scale)+""}))}a.on("endAnimation",(()=&gt;{e.destroy()})),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:h,y:d,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&amp;&amp;e.destroy()}setImage(t,e){const i=this.instance;t.src=e,this.process(t,e).then((e=&gt;{var n;const s=t.contentEl,o=t.imageEl,a=t.thumbElSrc;if(i.isClosing()||!s||!o)return;s.offsetHeight;const r=!!i.isOpeningSlide(t)&amp;&amp;this.getZoomInfo(t);if(this.option("protected")){null===(n=t.el)||void 0===n||n.addEventListener("contextmenu",(t=&gt;{t.preventDefault()}));const e=document.createElement("div");P(e,"fancybox-protected"),s.appendChild(e)}if(a&amp;&amp;r){const n=e.contentRect,o=Math.max(n.fullWidth,n.fullHeight);let c=null;!r.opacity&amp;&amp;o&gt;1200&amp;&amp;(c=document.createElement("img"),P(c,"fancybox-ghost"),c.src=a,s.appendChild(c));const h=()=&gt;{c&amp;&amp;(P(c,"f-fadeFastOut"),setTimeout((()=&gt;{c&amp;&amp;(c.remove(),c=null)}),200))};(l=a,new Promise(((t,e)=&gt;{const i=new Image;i.onload=t,i.onerror=e,i.src=l}))).then((()=&gt;{i.hideLoading(t),t.state=nt.Opening,this.instance.emit("reveal",t),this.zoomIn(t).then((()=&gt;{h(),this.instance.done(t)}),(()=&gt;{})),c&amp;&amp;setTimeout((()=&gt;{h()}),o&gt;2500?800:200)}),(()=&gt;{i.hideLoading(t),i.revealContent(t)}))}else{const n=this.optionFor(t,"initialSize"),s=this.optionFor(t,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:s?.12:0};let a=i.optionFor(t,"showClass")||void 0,r=!0;i.isOpeningSlide(t)&amp;&amp;("full"===n?e.zoomToFull(o):"cover"===n?e.zoomToCover(o):"max"===n?e.zoomToMax(o):r=!1,e.stop("current")),r&amp;&amp;a&amp;&amp;(a=e.isDragging?"f-fadeIn":""),i.hideLoading(t),i.revealContent(t,a)}var l}),(()=&gt;{i.setError(t,"{{IMAGE_ERROR}}")}))}process(t,e){return new Promise(((i,n)=&gt;{var o;const a=this.instance,r=t.el;a.clearContent(t),a.showLoading(t);let l=this.optionFor(t,"content");if("string"==typeof l&amp;&amp;(l=s(l)),!l||!E(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let i="",n=t.caption;i="string"==typeof n&amp;&amp;n?n.replace(/&lt;[^&gt;]+&gt;/gi,"").substring(0,1e3):`Image ${t.index+1} of ${null===(o=a.carousel)||void 0===o?void 0:o.pages.length}`,l.src=e||"",l.alt=i,l.draggable=!1,t.srcset&amp;&amp;l.setAttribute("srcset",t.srcset)}t.sizes&amp;&amp;l.setAttribute("sizes",t.sizes)}l.classList.add("fancybox-image"),t.imageEl=l,a.setContent(t,l,!1);t.panzoom=new k(r,p({transformParent:!0},this.option("Panzoom")||{},{content:l,width:a.optionFor(t,"width","auto"),height:a.optionFor(t,"height","auto"),wheel:()=&gt;{const t=a.option("wheel");return("zoom"===t||"pan"==t)&amp;&amp;t},click:(e,i)=&gt;{var n,s;if(a.isCompact||a.isClosing())return!1;if(t.index!==(null===(n=a.getSlide())||void 0===n?void 0:n.index))return!1;if(i){const t=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(t.nodeName))return!1}let o=!i||i.target&amp;&amp;(null===(s=t.contentEl)||void 0===s?void 0:s.contains(i.target));return a.option(o?"contentClick":"backdropClick")||!1},dblClick:()=&gt;a.isCompact?"toggleZoom":a.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:t=&gt;{i(t)},error:()=&gt;{n()},destroy:()=&gt;{n()}}}))}))}zoomIn(t){return new Promise(((e,i)=&gt;{const n=this.instance,s=n.container,{panzoom:o,contentEl:a,el:r}=t;o&amp;&amp;o.updateMetrics();const l=this.getZoomInfo(t);if(!(l&amp;&amp;r&amp;&amp;a&amp;&amp;o&amp;&amp;s))return void i();const{x:c,y:h,scale:d,opacity:u}=l,p=()=&gt;{t.state!==nt.Closing&amp;&amp;(u&amp;&amp;(a.style.opacity=Math.max(Math.min(1,1-(1-o.scale)/(1-d)),0)+""),o.scale&gt;=1&amp;&amp;o.scale&gt;o.targetScale-.1&amp;&amp;e(o))},f=t=&gt;{S(s,"is-zooming-in"),t.scale&lt;.99||t.scale&gt;1.01||(a.style.opacity="",t.off("endAnimation",f),t.off("touchStart",f),t.off("afterTransform",p),e(t))};o.on("endAnimation",f),o.on("touchStart",f),o.on("afterTransform",p),o.on(["error","destroy"],(()=&gt;{i()})),o.panTo({x:c,y:h,scale:d,friction:0,ignoreBounds:!0}),o.stop("current");const m={event:"mousemove"===o.panMode?n.prevMouseMoveEvent||n.options.event:void 0},g=this.optionFor(t,"initialSize");P(s,"is-zooming-in"),n.hideLoading(t),"full"===g?o.zoomToFull(m):"cover"===g?o.zoomToCover(m):"max"===g?o.zoomToMax(m):o.reset(.172)}))}getZoomInfo(t){var e;const{el:i,imageEl:n,thumbEl:s,panzoom:o}=t;if(!i||!n||!s||!o||G(s)&lt;3||!this.optionFor(t,"zoom")||this.instance.state===it.Destroy)return!1;if(1!==((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1))return!1;let{top:a,left:r,width:l,height:c}=s.getBoundingClientRect(),{top:h,left:d,fitWidth:u,fitHeight:p}=o.contentRect;if(!(l&amp;&amp;c&amp;&amp;u&amp;&amp;p))return!1;const f=o.container.getBoundingClientRect();d+=f.left,h+=f.top;const m=-1*(d+.5*u-(r+.5*l)),g=-1*(h+.5*p-(a+.5*c)),b=l/u;let v=this.option("zoomOpacity")||!1;return"auto"===v&amp;&amp;(v=Math.abs(l/c-u/p)&gt;.1),{x:m,y:g,scale:b,opacity:v}}attach(){const t=this,e=t.instance;e.on("Carousel.change",t.onChange),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.removeSlide",t.onRemoveSlide),e.on("close",t.onClose)}detach(){const t=this,e=t.instance;e.off("Carousel.change",t.onChange),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.removeSlide",t.onRemoveSlide),e.off("close",t.onClose)}}Object.defineProperty(rt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&amp;&amp;SuppressedError;const lt="html",ct="image",ht="map",dt="youtube",ut="vimeo",pt="html5video",ft=(t,e={})=&gt;{const i=new URL(t),n=new URLSearchParams(i.search),s=new URLSearchParams;for(const[t,i]of[...n,...Object.entries(e)]){let e=i.toString();"t"===t?s.set("start",parseInt(e).toString()):s.set(t,e)}let o=s.toString(),a=t.match(/#t=((.*)?\d+s)/);return a&amp;&amp;(o+=`#t=${a[1]}`),o},mt={ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'&lt;video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}"&gt;\n  &lt;source src="{{src}}" type="{{format}}" /&gt;Sorry, your browser doesn\'t support embedded videos.&lt;/video&gt;',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},gt=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class bt extends N{onInitSlide(t,e,i){this.processType(i)}onCreateSlide(t,e,i){this.setContent(i)}onClearContent(t,e){e.xhr&amp;&amp;(e.xhr.abort(),e.xhr=null);const i=e.iframeEl;i&amp;&amp;(i.onload=i.onerror=null,i.src="//about:blank",e.iframeEl=null);const n=e.contentEl,s=e.placeholderEl;if("inline"===e.type&amp;&amp;n&amp;&amp;s)n.classList.remove("fancybox__content"),"none"!==n.style.display&amp;&amp;(n.style.display="none"),s.parentNode&amp;&amp;s.parentNode.insertBefore(n,s),s.remove(),e.contentEl=void 0,e.placeholderEl=void 0;else for(;e.el&amp;&amp;e.el.firstChild;)e.el.removeChild(e.el.firstChild)}onSelectSlide(t,e,i){i.state===nt.Ready&amp;&amp;this.playVideo()}onUnselectSlide(t,e,i){var n,s;if(i.type===pt){try{null===(s=null===(n=i.el)||void 0===n?void 0:n.querySelector("video"))||void 0===s||s.pause()}catch(t){}return}let o;i.type===ut?o={method:"pause",value:"true"}:i.type===dt&amp;&amp;(o={event:"command",func:"pauseVideo"}),o&amp;&amp;i.iframeEl&amp;&amp;i.iframeEl.contentWindow&amp;&amp;i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&amp;&amp;clearTimeout(i.poller)}onDone(t,e){t.isCurrentSlide(e)&amp;&amp;!t.isClosing()&amp;&amp;this.playVideo()}onRefresh(t,e){e.slides.forEach((t=&gt;{t.el&amp;&amp;(this.resizeIframe(t),this.setAspectRatio(t))}))}onMessage(t){try{let e=JSON.parse(t.data);if("https://player.vimeo.com"===t.origin){if("ready"===e.event)for(let e of Array.from(document.getElementsByClassName("fancybox__iframe")))e instanceof HTMLIFrameElement&amp;&amp;e.contentWindow===t.source&amp;&amp;(e.dataset.ready="true")}else if(t.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&amp;&amp;"onReady"===e.event){const t=document.getElementById(e.id);t&amp;&amp;(t.dataset.ready="true")}}catch(t){}}loadAjaxContent(t){const e=this.instance.optionFor(t,"src")||"";this.instance.showLoading(t);const i=this.instance,n=new XMLHttpRequest;i.showLoading(t),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&amp;&amp;i.state===it.Ready&amp;&amp;(i.hideLoading(t),200===n.status?i.setContent(t,n.responseText):i.setError(t,404===n.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const s=t.ajax||null;n.open(s?"POST":"GET",e+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(s),t.xhr=n}setInlineContent(t){let e=null;if(E(t.src))e=t.src;else if("string"==typeof t.src){const i=t.src.split("#",2).pop();e=i?document.getElementById(i):null}if(e){if("clone"===t.type||e.closest(".fancybox__slide")){e=e.cloneNode(!0);const i=e.dataset.animationName;i&amp;&amp;(e.classList.remove(i),delete e.dataset.animationName);let n=e.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${t.index}`,e.setAttribute("id",n)}else if(e.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),e.parentNode.insertBefore(i,e),t.placeholderEl=i}this.instance.setContent(t,e)}else this.instance.setError(t,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(t){const{src:e,el:i}=t;if(!e||"string"!=typeof e||!i)return;i.classList.add("is-loading");const n=this.instance,s=document.createElement("iframe");s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${t.index}`);for(const[e,i]of Object.entries(this.optionFor(t,"iframeAttr")||{}))s.setAttribute(e,i);s.onerror=()=&gt;{n.setError(t,"{{IFRAME_ERROR}}")},t.iframeEl=s;const o=this.optionFor(t,"preload");if("iframe"!==t.type||!1===o)return s.setAttribute("src",t.src+""),n.setContent(t,s,!1),this.resizeIframe(t),void n.revealContent(t);n.showLoading(t),s.onload=()=&gt;{if(!s.src.length)return;const e="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe(t),e?n.revealContent(t):n.hideLoading(t)},s.setAttribute("src",e),n.setContent(t,s,!1)}resizeIframe(t){const{type:e,iframeEl:i}=t;if(e===dt||e===ut)return;const n=null==i?void 0:i.parentElement;if(!i||!n)return;let s=!1!==t.autoSize,o=t.width||0,a=t.height||0;o&amp;&amp;a&amp;&amp;(s=!1);const r=n&amp;&amp;n.style;if(!1!==t.preload&amp;&amp;!1!==s&amp;&amp;r)try{const t=window.getComputedStyle(n),e=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),s=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),l=i.contentWindow;if(l){const t=l.document,i=t.getElementsByTagName(lt)[0],n=t.body;r.width="",n.style.overflow="hidden",o=o||i.scrollWidth+e,r.width=`${o}px`,n.style.overflow="",r.flex="0 0 auto",r.height=`${n.scrollHeight}px`,a=i.scrollHeight+s}}catch(t){}if(o||a){const t={flex:"0 1 auto",width:"",height:""};o&amp;&amp;"auto"!==o&amp;&amp;(t.width=`${o}px`),a&amp;&amp;"auto"!==a&amp;&amp;(t.height=`${a}px`),Object.assign(r,t)}}playVideo(){const t=this.instance.getSlide();if(!t)return;const{el:e}=t;if(!e||!e.offsetParent)return;if(!this.optionFor(t,"videoAutoplay"))return;if(t.type===pt)try{const t=e.querySelector("video");if(t){const e=t.play();void 0!==e&amp;&amp;e.then((()=&gt;{})).catch((e=&gt;{t.muted=!0,t.play()}))}}catch(t){}if(t.type!==dt&amp;&amp;t.type!==ut)return;const i=()=&gt;{if(t.iframeEl&amp;&amp;t.iframeEl.contentWindow){let e;if("true"===t.iframeEl.dataset.ready)return e=t.type===dt?{event:"command",func:"playVideo"}:{method:"play",value:"true"},e&amp;&amp;t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"),void(t.poller=void 0);t.type===dt&amp;&amp;(e={event:"listening",id:t.iframeEl.getAttribute("id")},t.iframeEl.contentWindow.postMessage(JSON.stringify(e),"*"))}t.poller=setTimeout(i,250)};i()}processType(t){if(t.html)return t.type=lt,t.src=t.html,void(t.html="");const e=this.instance.optionFor(t,"src","");if(!e||"string"!=typeof e)return;let i=t.type,n=null;if(n=e.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&amp;)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&amp;list=(?:.*))(?:.*)/i)){const s=this.optionFor(t,dt),{nocookie:o}=s,a=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&amp;&amp;e.indexOf(n)&lt;0&amp;&amp;(i[n]=t[n]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s&lt;n.length;s++)e.indexOf(n[s])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,n[s])&amp;&amp;(i[n[s]]=t[n[s]])}return i}(s,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=ft(e,a),c=encodeURIComponent(n[2]);t.videoId=c,t.src=`https://${r}/embed/${c}?${l}`,t.thumbSrc=t.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=dt}else if(n=e.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const s=ft(e,this.optionFor(t,ut)),o=encodeURIComponent(n[1]),a=n[4]||"";t.videoId=o,t.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&amp;":""}`:""}${s}`,i=ut}if(!i&amp;&amp;t.triggerEl){const e=t.triggerEl.dataset.type;gt.includes(e)&amp;&amp;(i=e)}i||"string"==typeof e&amp;&amp;("#"===e.charAt(0)?i="inline":(n=e.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=pt,t.videoFormat=t.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):e.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=ct:e.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(t.src=`https://maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&amp;z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&amp;"):""):n[4]+"").replace(/\?/,"&amp;")}&amp;output=${n[4]&amp;&amp;n[4].indexOf("layer=c")&gt;0?"svembed":"embed"}`,i=ht):(n=e.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&amp;&amp;(t.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&amp;output=embed`,i=ht)),i=i||this.instance.option("defaultType"),t.type=i,i===ct&amp;&amp;(t.thumbSrc=t.thumbSrc||t.src)}setContent(t){const e=this.instance.optionFor(t,"src")||"";if(t&amp;&amp;t.type&amp;&amp;e){switch(t.type){case lt:this.instance.setContent(t,e);break;case pt:const i=this.option("videoTpl");i&amp;&amp;this.instance.setContent(t,i.replace(/\{\{src\}\}/gi,e+"").replace(/\{\{format\}\}/gi,this.optionFor(t,"videoFormat")||"").replace(/\{\{poster\}\}/gi,t.poster||t.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(t);break;case"ajax":this.loadAjaxContent(t);break;case"pdf":case ht:case dt:case ut:t.preload=!1;case"iframe":this.setIframeContent(t)}this.setAspectRatio(t)}}setAspectRatio(t){const e=t.contentEl;if(!(t.el&amp;&amp;e&amp;&amp;t.type&amp;&amp;[dt,ut,pt].includes(t.type)))return;let i,n=t.width||"auto",s=t.height||"auto";if("auto"===n||"auto"===s){i=this.optionFor(t,"videoRatio");const e=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=e&amp;&amp;e.length&gt;2?parseFloat(e[1])/parseFloat(e[2]):parseFloat(i+"")}else n&amp;&amp;s&amp;&amp;(i=n/s);if(!i)return;e.style.aspectRatio="",e.style.width="",e.style.height="",e.offsetHeight;const o=e.getBoundingClientRect(),a=o.width||1,r=o.height||1;e.style.aspectRatio=i+"",i&lt;a/r?(s="auto"===s?r:Math.min(r,s),e.style.width="auto",e.style.height=`${s}px`):(n="auto"===n?a:Math.min(a,n),e.style.width=`${n}px`,e.style.height="auto")}attach(){const t=this,e=t.instance;e.on("Carousel.initSlide",t.onInitSlide),e.on("Carousel.createSlide",t.onCreateSlide),e.on("Carousel.selectSlide",t.onSelectSlide),e.on("Carousel.unselectSlide",t.onUnselectSlide),e.on("Carousel.Panzoom.refresh",t.onRefresh),e.on("done",t.onDone),e.on("clearContent",t.onClearContent),window.addEventListener("message",t.onMessage)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlide",t.onInitSlide),e.off("Carousel.createSlide",t.onCreateSlide),e.off("Carousel.selectSlide",t.onSelectSlide),e.off("Carousel.unselectSlide",t.onUnselectSlide),e.off("Carousel.Panzoom.refresh",t.onRefresh),e.off("done",t.onDone),e.off("clearContent",t.onClearContent),window.removeEventListener("message",t.onMessage)}}Object.defineProperty(bt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:mt});const vt="play",yt="pause",wt="ready";class xt extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:wt}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==wt}onReady(t){this.option("autoStart")&amp;&amp;(t.isInfinite||t.page&lt;t.pages.length-1)&amp;&amp;this.start()}onChange(){var t;(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)||(this.removeProgressBar(),this.pause())}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var t;this.inHover=!1,(null===(t=this.instance.panzoom)||void 0===t?void 0:t.isResting)&amp;&amp;this.resume()}onTimerEnd(){const t=this.instance;"play"===this.state&amp;&amp;(t.isInfinite||t.page!==t.pages.length-1?t.slideNext():t.slideTo(0))}removeProgressBar(){this.progressBar&amp;&amp;(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var t;if(!this.option("showProgress"))return null;this.removeProgressBar();const e=this.instance,i=(null===(t=e.pages[e.page])||void 0===t?void 0:t.slides)||[];let n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||e.viewport),!n)return null;const s=document.createElement("div");return P(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){const t=this,e=t.instance;if(e.pages.length&lt;2)return;if(t.timer)return;const i=t.option("timeout");t.state=vt,P(e.container,"has-autoplay");let n=t.createProgressBar();n&amp;&amp;(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),t.timer=setTimeout((()=&gt;{t.timer=null,t.inHover||t.onTimerEnd()}),i),t.emit("set")}clear(){const t=this;t.timer&amp;&amp;(clearTimeout(t.timer),t.timer=null),t.removeProgressBar()}start(){const t=this;if(t.set(),t.state!==wt){if(t.option("pauseOnHover")){const e=t.instance.container;e.addEventListener("mouseenter",t.onMouseEnter,!1),e.addEventListener("mouseleave",t.onMouseLeave,!1)}document.addEventListener("visibilitychange",t.onVisibilityChange,!1),t.emit("start")}}stop(){const t=this,e=t.state,i=t.instance.container;t.clear(),t.state=wt,i.removeEventListener("mouseenter",t.onMouseEnter,!1),i.removeEventListener("mouseleave",t.onMouseLeave,!1),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),S(i,"has-autoplay"),e!==wt&amp;&amp;t.emit("stop")}pause(){const t=this;t.state===vt&amp;&amp;(t.state=yt,t.clear(),t.emit(yt))}resume(){const t=this,e=t.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(t.state!==vt){if(t.state===yt&amp;&amp;!t.inHover){const e=new Event("resume",{bubbles:!0,cancelable:!0});t.emit("resume",e),e.defaultPrevented||t.set()}}else t.set();else t.stop()}toggle(){this.state===vt||this.state===yt?this.stop():this.start()}attach(){const t=this,e=t.instance;e.on("ready",t.onReady),e.on("Panzoom.startAnimation",t.onChange),e.on("Panzoom.endAnimation",t.onSettle),e.on("Panzoom.touchMove",t.onChange)}detach(){const t=this,e=t.instance;e.off("ready",t.onReady),e.off("Panzoom.startAnimation",t.onChange),e.off("Panzoom.endAnimation",t.onSettle),e.off("Panzoom.touchMove",t.onChange),t.stop()}}Object.defineProperty(xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Et extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(t){const e=t.carousel;if(!e)return;const i=t.container;i&amp;&amp;(e.options.Autoplay=p({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=&gt;this.option("progressParentEl")||null,on:{start:()=&gt;{t.emit("startSlideshow")},set:e=&gt;{var n;i.classList.add("has-slideshow"),(null===(n=t.getSlide())||void 0===n?void 0:n.state)!==nt.Ready&amp;&amp;e.pause()},stop:()=&gt;{i.classList.remove("has-slideshow"),t.isCompact||t.endIdle(),t.emit("endSlideshow")},resume:(e,i)=&gt;{var n,s,o;!i||!i.cancelable||(null===(n=t.getSlide())||void 0===n?void 0:n.state)===nt.Ready&amp;&amp;(null===(o=null===(s=t.carousel)||void 0===s?void 0:s.panzoom)||void 0===o?void 0:o.isResting)||i.preventDefault()}}}),e.attachPlugins({Autoplay:xt}),this.ref=e.plugins.Autoplay)}onReady(t){const e=t.carousel,i=this.ref;i&amp;&amp;e&amp;&amp;this.option("playOnStart")&amp;&amp;(e.isInfinite||e.page&lt;e.pages.length-1)&amp;&amp;i.start()}onDone(t,e){const i=this.ref,n=t.carousel;if(!i||!n)return;const s=e.panzoom;s&amp;&amp;s.on("startAnimation",(()=&gt;{t.isCurrentSlide(e)&amp;&amp;i.stop()})),t.isCurrentSlide(e)&amp;&amp;i.resume()}onKeydown(t,e){var i;const n=this.ref;n&amp;&amp;e===this.option("key")&amp;&amp;"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&amp;&amp;n.toggle()}attach(){const t=this,e=t.instance;e.on("Carousel.init",t.onPrepare),e.on("Carousel.ready",t.onReady),e.on("done",t.onDone),e.on("keydown",t.onKeydown)}detach(){const t=this,e=t.instance;e.off("Carousel.init",t.onPrepare),e.off("Carousel.ready",t.onReady),e.off("done",t.onDone),e.off("keydown",t.onKeydown)}}Object.defineProperty(Et,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:t=&gt;{var e;return(null===(e=t.instance.container)||void 0===e?void 0:e.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||t.instance.container},timeout:3e3}});const St={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'&lt;button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"&gt;&lt;img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /&gt;&lt;/button&gt;',type:"modern"};var Pt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Hidden=2]="Hidden"}(Pt||(Pt={}));let Ct=class extends N{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"shouldCenter",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Pt.Init})}formatThumb(t,e){return this.instance.localize(e,[["%i",t.index],["%d",t.index+1],["%s",t.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}getSlides(){const t=[],e=this.option("thumbTpl")||"";if(e)for(const i of this.instance.slides||[]){let n="";i.type&amp;&amp;(n=`for-${i.type}`,i.type&amp;&amp;["video","youtube","vimeo","html5video"].includes(i.type)&amp;&amp;(n+=" for-video")),t.push({html:this.formatThumb(i,e),customClass:n})}return t}onInitSlide(t,e){const i=e.el;i&amp;&amp;(e.thumbSrc=i.dataset.thumbSrc||e.thumbSrc||"",e.thumbClipWidth=parseFloat(i.dataset.thumbClipWidth||"")||e.thumbClipWidth||0,e.thumbHeight=parseFloat(i.dataset.thumbHeight||"")||e.thumbHeight||0)}onInitSlides(){this.build()}onRefreshM(){this.refreshModern()}onChangeM(){"modern"===this.type&amp;&amp;(this.shouldCenter=!0,this.centerModern())}onClickModern(t){t.preventDefault(),t.stopPropagation();const e=this.instance,i=e.page,n=t=&gt;{if(t){const e=t.closest("[data-carousel-index]");if(e)return parseInt(e.dataset.carouselIndex||"",10)||0}return-1},s=(t,e)=&gt;{const i=document.elementFromPoint(t,e);return i?n(i):-1};let o=n(t.target);o&lt;0&amp;&amp;(o=s(t.clientX+this.thumbGap,t.clientY),o===i&amp;&amp;(o=i-1)),o&lt;0&amp;&amp;(o=s(t.clientX-this.thumbGap,t.clientY),o===i&amp;&amp;(o=i+1)),o&lt;0&amp;&amp;(o=(e=&gt;{let n=s(t.clientX-e,t.clientY),a=s(t.clientX+e,t.clientY);return o&lt;0&amp;&amp;n===i&amp;&amp;(o=i+1),o&lt;0&amp;&amp;a===i&amp;&amp;(o=i-1),o})(this.thumbExtraGap)),o===i?this.centerModern():o&gt;-1&amp;&amp;o&lt;e.pages.length&amp;&amp;e.slideTo(o)}onTransformM(){if("modern"!==this.type)return;const{instance:t,container:e,track:i}=this,n=t.panzoom;if(!(e&amp;&amp;i&amp;&amp;n&amp;&amp;this.panzoom))return;a(e,this.cn("isResting"),n.state!==b.Init&amp;&amp;n.isResting);const s=this.thumbGap,o=this.thumbExtraGap,r=this.thumbClipWidth;let l=0,c=0,h=0;for(const e of t.slides){let i=e.index,n=e.thumbSlideEl;if(!n)continue;a(n,this.cn("isSelected"),i===t.page),c=1-Math.abs(t.getProgress(i)),n.style.setProperty("--progress",c?c+"":"");const d=.5*((e.thumbWidth||0)-r);l+=s,l+=d,c&amp;&amp;(l-=c*(d+o)),n.style.setProperty("--shift",l-s+""),l+=d,c&amp;&amp;(l-=c*(d+o)),l-=s,0===i&amp;&amp;(h=o*c)}i&amp;&amp;(i.style.setProperty("--left",h+""),i.style.setProperty("--width",l+h+s+o*c+"")),this.shouldCenter&amp;&amp;this.centerModern()}buildClassic(){const{container:t,track:e}=this,i=this.getSlides();if(!t||!e||!i)return;const n=new this.instance.constructor(t,p({track:e,infinite:!1,center:!0,fill:!0,dragFree:!0,slidesPerPage:1,transition:!1,Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},this.option("Carousel")||{},{Sync:{target:this.instance},slides:i}));this.carousel=n,this.track=e,n.on("ready",(()=&gt;{this.emit("ready")})),n.on("createSlide",((t,e)=&gt;{this.emit("createSlide",e,e.el)}))}buildModern(){if("modern"!==this.type)return;const{container:t,track:e,instance:i}=this,n=this.option("thumbTpl")||"";if(!t||!e||!n)return;t.addEventListener("keydown",(()=&gt;{S(t,"is-using-mouse")})),P(t,"is-horizontal"),this.updateModern();for(const t of i.slides||[]){const i=document.createElement("div");if(P(i,this.cn("slide")),t.type){let e=`for-${t.type}`;["video","youtube","vimeo","html5video"].includes(t.type)&amp;&amp;(e+=" for-video"),P(i,e)}i.appendChild(s(this.formatThumb(t,n))),this.emit("createSlide",t,i),t.thumbSlideEl=i,e.appendChild(i),this.resizeModernSlide(t)}const o=new i.constructor.Panzoom(t,{content:e,lockAxis:"x",zoom:!1,panOnlyZoomed:!1,bounds:()=&gt;{let t=0,e=0,n=i.slides[0],s=i.slides[i.slides.length-1],o=i.slides[i.page];return n&amp;&amp;s&amp;&amp;o&amp;&amp;(e=-1*this.getModernThumbPos(0),0!==i.page&amp;&amp;(e+=.5*(n.thumbWidth||0)),t=-1*this.getModernThumbPos(i.slides.length-1),i.page!==i.slides.length-1&amp;&amp;(t+=(s.thumbWidth||0)-(o.thumbWidth||0)-.5*(s.thumbWidth||0))),{x:{min:t,max:e},y:{min:0,max:0}}}});o.on("touchStart",((t,e)=&gt;{this.shouldCenter=!1,P(this.container,"is-using-mouse")})),o.on("click",((t,e)=&gt;this.onClickModern(e))),o.on("ready",(()=&gt;{this.centerModern(),this.emit("ready")})),o.on(["afterTransform","refresh"],(t=&gt;{this.lazyLoadModern()})),this.panzoom=o,this.refreshModern()}updateModern(){if("modern"!==this.type)return;const{container:t}=this;t&amp;&amp;(this.thumbGap=parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-gap"))||0,this.thumbExtraGap=parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-extra-gap"))||0,this.thumbWidth=parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-width"))||40,this.thumbClipWidth=parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-clip-width"))||40,this.thumbHeight=parseFloat(getComputedStyle(t).getPropertyValue("--f-thumb-height"))||40)}refreshModern(){var t;if("modern"===this.type){this.updateModern();for(const t of this.instance.slides||[])this.resizeModernSlide(t);this.onTransformM(),null===(t=this.panzoom)||void 0===t||t.updateMetrics(!0),this.centerModern(0)}}centerModern(t){const i=this.instance,{container:n,panzoom:s}=this;if(!n||!s||s.state===b.Init)return;const o=i.page;let a=this.getModernThumbPos(o),r=a;for(let t=i.page-3;t&lt;i.page+3;t++){if(t&lt;0||t&gt;i.pages.length-1||t===i.page)continue;const e=1-Math.abs(i.getProgress(t));e&gt;0&amp;&amp;e&lt;1&amp;&amp;(r+=e*(this.getModernThumbPos(t)-a))}let l=100;void 0===t&amp;&amp;(t=.2,i.inTransition.size&gt;0&amp;&amp;(t=.12),Math.abs(-1*s.current.e-r)&gt;s.containerRect.width&amp;&amp;(t=.5,l=0)),s.options.maxVelocity=l,s.applyChange({panX:e(-1*r-s.target.e,1e3),friction:null===i.prevPage?0:t})}lazyLoadModern(){const{instance:t,panzoom:e}=this;if(!e)return;const i=-1*e.current.e||0;let n=this.getModernThumbPos(t.page);if(e.state!==b.Init||0===n)for(const n of t.slides||[]){const t=n.thumbSlideEl;if(!t)continue;const o=t.querySelector("img[data-lazy-src]"),a=n.index,r=this.getModernThumbPos(a),l=i-.5*e.containerRect.innerWidth,c=l+e.containerRect.innerWidth;if(!o||r&lt;l||r&gt;c)continue;let h=o.dataset.lazySrc;if(!h||!h.length)continue;if(delete o.dataset.lazySrc,o.src=h,o.complete)continue;P(t,this.cn("isLoading"));const d=s(x);t.appendChild(d),o.addEventListener("load",(()=&gt;{t.offsetParent&amp;&amp;(t.classList.remove(this.cn("isLoading")),d.remove())}),!1)}}resizeModernSlide(t){if("modern"!==this.type)return;if(!t.thumbSlideEl)return;const e=t.thumbClipWidth&amp;&amp;t.thumbHeight?Math.round(this.thumbHeight*(t.thumbClipWidth/t.thumbHeight)):this.thumbWidth;t.thumbWidth=e}getModernThumbPos(t){const i=this.instance.slides[t],n=this.panzoom;if(!n||!n.contentRect.fitWidth)return 0;let s=n.containerRect.innerWidth,o=n.contentRect.width;2===this.instance.slides.length&amp;&amp;(t-=1,o=2*this.thumbClipWidth);let a=t*(this.thumbClipWidth+this.thumbGap)+this.thumbExtraGap+.5*(i.thumbWidth||0);return a-=o&gt;s?.5*s:.5*o,e(a||0,1)}isDisabled(){const t=this.option("minCount")||0;if(t){const e=this.instance;let i=0;for(const t of e.slides||[])t.thumbSrc&amp;&amp;i++;if(i&lt;t)return!0}const e=this.option("type");return["modern","classic"].indexOf(e)&lt;0}build(){if(this.state!==Pt.Init)return;if(this.isDisabled())return;const t=this.instance.container,e=this.option("type");this.type=e;const i=document.createElement("div");P(i,this.cn("container")),P(i,`is-${e}`);const n=this.option("parentEl");n?n.appendChild(i):t.after(i),this.container=i,P(t,this.cn("hasThumbs"));const s=document.createElement("div");P(s,this.cn("track")),i.appendChild(s),this.track=s,"classic"===e?this.buildClassic():this.buildModern(),this.state=Pt.Ready}cleanup(){this.carousel&amp;&amp;this.carousel.destroy(),this.carousel=null,this.panzoom&amp;&amp;this.panzoom.destroy(),this.panzoom=null,this.container&amp;&amp;this.container.remove(),this.container=null,this.track=null,this.state=Pt.Init,S(this.instance.container,this.cn("hasThumbs"))}attach(){const t=this,e=t.instance;e.on("initSlide",t.onInitSlide),e.state===j.Init?e.on("initSlides",t.onInitSlides):t.onInitSlides(),e.on("Panzoom.afterTransform",t.onTransformM),e.on("Panzoom.refresh",t.onRefreshM),e.on("change",t.onChangeM)}detach(){const t=this,e=t.instance;e.off("initSlide",t.onInitSlide),e.off("initSlides",t.onInitSlides),e.off("Panzoom.afterTransform",t.onTransformM),e.off("Panzoom.refresh",t.onRefreshM),e.off("change",t.onChangeM),t.cleanup()}};Object.defineProperty(Ct,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:St});const Mt=Object.assign(Object.assign({},St),{key:"t",showOnStart:!0,parentEl:null}),Tt="is-masked",Ot="aria-hidden";class At extends N{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){const t=this.ref;return t&amp;&amp;!t.isDisabled()}get isHidden(){return this.hidden}onInit(){var t;const e=this,i=e.instance,n=i.carousel;if(e.ref||!n)return;const s=e.option("parentEl")||i.footer||i.container;if(!s)return;const o=p({},e.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:t=&gt;{const i=t.container;i&amp;&amp;this.hidden&amp;&amp;(e.refresh(),i.style.transition="none",e.hide(),i.offsetHeight,queueMicrotask((()=&gt;{i.style.transition="",e.show()})))}}});o.Carousel=o.Carousel||{},o.Carousel.on=p((null===(t=e.options.Carousel)||void 0===t?void 0:t.on)||{},{click:(t,e)=&gt;{e.stopPropagation()}}),n.options.Thumbs=o,n.attachPlugins({Thumbs:Ct}),e.ref=n.plugins.Thumbs,e.option("showOnStart")||(e.ref.state=Pt.Hidden,e.hidden=!0)}onResize(){var t;const e=null===(t=this.ref)||void 0===t?void 0:t.container;e&amp;&amp;(e.style.maxHeight="")}onKeydown(t,e){const i=this.option("key");i&amp;&amp;i===e&amp;&amp;this.toggle()}toggle(){const t=this.ref;if(t&amp;&amp;!t.isDisabled())return t.state===Pt.Hidden?(t.state=Pt.Init,void t.build()):void(this.hidden?this.show():this.hide())}show(){const t=this.ref;if(!t||t.isDisabled())return;const e=t.container;e&amp;&amp;(this.refresh(),e.offsetHeight,e.removeAttribute(Ot),e.classList.remove(Tt),this.hidden=!1)}hide(){const t=this.ref,e=t&amp;&amp;t.container;e&amp;&amp;(this.refresh(),e.offsetHeight,e.classList.add(Tt),e.setAttribute(Ot,"true")),this.hidden=!0}refresh(){const t=this.ref;if(!t||!t.state)return;const e=t.container,i=(null==e?void 0:e.firstChild)||null;e&amp;&amp;i&amp;&amp;i.childNodes.length&amp;&amp;(e.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const t=this,e=t.instance;e.state===it.Init?e.on("Carousel.init",t.onInit):t.onInit(),e.on("resize",t.onResize),e.on("keydown",t.onKeydown)}detach(){var t;const e=this,i=e.instance;i.off("Carousel.init",e.onInit),i.off("resize",e.onResize),i.off("keydown",e.onKeydown),null===(t=i.carousel)||void 0===t||t.detachPlugins(["Thumbs"]),e.ref=null}}Object.defineProperty(At,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Mt});const zt={panLeft:{icon:'&lt;svg&gt;&lt;path d="M5 12h14M5 12l6 6M5 12l6-6"/&gt;&lt;/svg&gt;',change:{panX:-100}},panRight:{icon:'&lt;svg&gt;&lt;path d="M5 12h14M13 18l6-6M13 6l6 6"/&gt;&lt;/svg&gt;',change:{panX:100}},panUp:{icon:'&lt;svg&gt;&lt;path d="M12 5v14M18 11l-6-6M6 11l6-6"/&gt;&lt;/svg&gt;',change:{panY:-100}},panDown:{icon:'&lt;svg&gt;&lt;path d="M12 5v14M18 13l-6 6M6 13l6 6"/&gt;&lt;/svg&gt;',change:{panY:100}},zoomIn:{icon:'&lt;svg&gt;&lt;circle cx="11" cy="11" r="7.5"/&gt;&lt;path d="m21 21-4.35-4.35M11 8v6M8 11h6"/&gt;&lt;/svg&gt;',action:"zoomIn"},zoomOut:{icon:'&lt;svg&gt;&lt;circle cx="11" cy="11" r="7.5"/&gt;&lt;path d="m21 21-4.35-4.35M8 11h6"/&gt;&lt;/svg&gt;',action:"zoomOut"},toggle1to1:{icon:'&lt;svg&gt;&lt;path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/&gt;&lt;path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/&gt;&lt;/svg&gt;',action:"toggleZoom"},toggleZoom:{icon:'&lt;svg&gt;&lt;g&gt;&lt;line x1="11" y1="8" x2="11" y2="14"&gt;&lt;/line&gt;&lt;/g&gt;&lt;circle cx="11" cy="11" r="7.5"/&gt;&lt;path d="m21 21-4.35-4.35M8 11h6"/&gt;&lt;/svg&gt;',action:"toggleZoom"},iterateZoom:{icon:'&lt;svg&gt;&lt;g&gt;&lt;line x1="11" y1="8" x2="11" y2="14"&gt;&lt;/line&gt;&lt;/g&gt;&lt;circle cx="11" cy="11" r="7.5"/&gt;&lt;path d="m21 21-4.35-4.35M8 11h6"/&gt;&lt;/svg&gt;',action:"iterateZoom"},rotateCCW:{icon:'&lt;svg&gt;&lt;path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/&gt;&lt;/svg&gt;',action:"rotateCCW"},rotateCW:{icon:'&lt;svg&gt;&lt;path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/&gt;&lt;/svg&gt;',action:"rotateCW"},flipX:{icon:'&lt;svg style="stroke-width: 1.3"&gt;&lt;path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/&gt;&lt;/svg&gt;',action:"flipX"},flipY:{icon:'&lt;svg style="stroke-width: 1.3"&gt;&lt;path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/&gt;&lt;/svg&gt;',action:"flipY"},fitX:{icon:'&lt;svg&gt;&lt;path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/&gt;&lt;/svg&gt;',action:"fitX"},fitY:{icon:'&lt;svg&gt;&lt;path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/&gt;&lt;/svg&gt;',action:"fitY"},reset:{icon:'&lt;svg&gt;&lt;path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/&gt;&lt;/svg&gt;',action:"reset"},toggleFS:{icon:'&lt;svg&gt;&lt;g&gt;&lt;path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/&gt;&lt;/g&gt;&lt;g&gt;&lt;path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/&gt;&lt;/g&gt;&lt;/svg&gt;',action:"toggleFS"}};var Lt;!function(t){t[t.Init=0]="Init",t[t.Ready=1]="Ready",t[t.Disabled=2]="Disabled"}(Lt||(Lt={}));const Rt={absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'&lt;div class="fancybox__infobar" tabindex="-1"&gt;&lt;span data-fancybox-current-index&gt;&lt;/span&gt;/&lt;span data-fancybox-count&gt;&lt;/span&gt;&lt;/div&gt;'},download:{tpl:'&lt;a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"&gt;&lt;svg&gt;&lt;path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/&gt;&lt;/svg&gt;&lt;/a&gt;'},prev:{tpl:'&lt;button class="f-button" title="{{PREV}}" data-fancybox-prev&gt;&lt;svg&gt;&lt;path d="m15 6-6 6 6 6"/&gt;&lt;/svg&gt;&lt;/button&gt;'},next:{tpl:'&lt;button class="f-button" title="{{NEXT}}" data-fancybox-next&gt;&lt;svg&gt;&lt;path d="m9 6 6 6-6 6"/&gt;&lt;/svg&gt;&lt;/button&gt;'},slideshow:{tpl:'&lt;button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow&gt;&lt;svg&gt;&lt;g&gt;&lt;path d="M8 4v16l13 -8z"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g&gt;&lt;path d="M8 4v15M17 4v15"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/button&gt;'},fullscreen:{tpl:'&lt;button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen&gt;&lt;svg&gt;&lt;g&gt;&lt;path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/&gt;&lt;/g&gt;&lt;g&gt;&lt;path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/button&gt;'},thumbs:{tpl:'&lt;button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs&gt;&lt;svg&gt;&lt;circle cx="5.5" cy="5.5" r="1"/&gt;&lt;circle cx="12" cy="5.5" r="1"/&gt;&lt;circle cx="18.5" cy="5.5" r="1"/&gt;&lt;circle cx="5.5" cy="12" r="1"/&gt;&lt;circle cx="12" cy="12" r="1"/&gt;&lt;circle cx="18.5" cy="12" r="1"/&gt;&lt;circle cx="5.5" cy="18.5" r="1"/&gt;&lt;circle cx="12" cy="18.5" r="1"/&gt;&lt;circle cx="18.5" cy="18.5" r="1"/&gt;&lt;/svg&gt;&lt;/button&gt;'},close:{tpl:'&lt;button class="f-button" title="{{CLOSE}}" data-fancybox-close&gt;&lt;svg&gt;&lt;path d="m19.5 4.5-15 15M4.5 4.5l15 15"/&gt;&lt;/svg&gt;&lt;/button&gt;'}},parentEl:null},kt={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};class It extends N{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Lt.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(t){var e;if(!t.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){const t=this.instance.carousel;let e=0;if(t)for(const i of t.slides)(i.panzoom||"image"===i.type)&amp;&amp;e++;e||(s=!1)}s||(i=void 0);let o=0;const a={left:[],middle:[],right:[]};if(i)for(const t of["left","middle","right"])for(const n of i[t]){const i=this.createEl(n);i&amp;&amp;(null===(e=a[t])||void 0===e||e.push(i),o++)}let r=null;if(o&amp;&amp;(r=this.createContainer()),r){for(const[t,e]of Object.entries(a)){const i=document.createElement("div");P(i,"fancybox__toolbar__column is-"+t);for(const t of e)i.appendChild(t);"auto"!==n||"middle"!==t||e.length||(n=!0),r.appendChild(i)}!0===n&amp;&amp;P(r,"is-absolute"),this.state=Lt.Ready,this.onRefresh()}else this.state=Lt.Disabled}onClick(t){var e,i;const n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=t.target,r=a&amp;&amp;E(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return t.preventDefault(),t.stopPropagation(),void(null===(e=n.plugins.Thumbs)||void 0===e||e.toggle());if(void 0!==r.fancyboxToggleFullscreen)return t.preventDefault(),t.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){t.preventDefault(),t.stopPropagation();const e=null===(i=n.carousel)||void 0===i?void 0:i.plugins.Autoplay;let s=e.isActive;return o&amp;&amp;"mousemove"===o.panMode&amp;&amp;!s&amp;&amp;o.reset(),void(s?e.stop():e.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&amp;&amp;(t.preventDefault(),t.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(t){}o&amp;&amp;o.applyChange(t)}else l&amp;&amp;o&amp;&amp;o[l]&amp;&amp;o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const t=this.container;if(!t)return;const e=this.instance.getSlide();if(!e||e.state!==nt.Ready)return;const i=e&amp;&amp;!e.error&amp;&amp;e.panzoom;for(const e of t.querySelectorAll("[data-panzoom-action]"))i?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));let n=i&amp;&amp;i.canZoomIn(),s=i&amp;&amp;i.canZoomOut();for(const e of t.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="zoomOut"]'))s?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));for(const e of t.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){s||n?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"));const t=e.querySelector("g");t&amp;&amp;(t.style.display=n?"":"none")}}onDone(t,e){var i;null===(i=e.panzoom)||void 0===i||i.on("afterTransform",(()=&gt;{this.instance.isCurrentSlide(e)&amp;&amp;this.onRefresh()})),this.instance.isCurrentSlide(e)&amp;&amp;this.onRefresh()}createContainer(){const t=this.instance.container;if(!t)return null;const e=this.option("parentEl")||t,i=document.createElement("div");return P(i,"fancybox__toolbar"),e.prepend(i),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),t&amp;&amp;P(t,"has-toolbar"),this.container=i,i}createEl(t){const e=this.instance,i=e.carousel;if(!i)return null;if("toggleFS"===t)return null;if("fullscreen"===t&amp;&amp;!e.fsAPI)return null;let n=null;const o=i.slides.length||0;let a=0,r=0;for(const t of i.slides)(t.panzoom||"image"===t.type)&amp;&amp;a++,("image"===t.type||t.downloadSrc)&amp;&amp;r++;if(o&lt;2&amp;&amp;["infobar","prev","next"].includes(t))return n;if(void 0!==zt[t]&amp;&amp;!a)return null;if("download"===t&amp;&amp;!r)return null;if("thumbs"===t){const t=e.plugins.Thumbs;if(!t||!t.isEnabled)return null}if("slideshow"===t){if(!i.plugins.Autoplay||o&lt;2)return null}if(void 0!==zt[t]){const e=zt[t];n=document.createElement("button"),n.setAttribute("title",this.instance.localize(`{{${t.toUpperCase()}}}`)),P(n,"f-button"),e.action&amp;&amp;(n.dataset.panzoomAction=e.action),e.change&amp;&amp;(n.dataset.panzoomChange=JSON.stringify(e.change)),n.appendChild(s(this.instance.localize(e.icon)))}else{const e=(this.option("items")||[])[t];e&amp;&amp;(n=s(this.instance.localize(e.tpl)),"function"==typeof e.click&amp;&amp;n.addEventListener("click",(t=&gt;{t.preventDefault(),t.stopPropagation(),"function"==typeof e.click&amp;&amp;e.click.call(this,this,t)})))}const l=null==n?void 0:n.querySelector("svg");if(l)for(const[t,e]of Object.entries(kt))l.getAttribute(t)||l.setAttribute(t,String(e));return n}removeContainer(){const t=this.container;t&amp;&amp;t.remove(),this.container=null,this.state=Lt.Disabled;const e=this.instance.container;e&amp;&amp;S(e,"has-toolbar")}attach(){const t=this,e=t.instance;e.on("Carousel.initSlides",t.onReady),e.on("done",t.onDone),e.on("reveal",t.onChange),e.on("Carousel.change",t.onChange),t.onReady(t.instance)}detach(){const t=this,e=t.instance;e.off("Carousel.initSlides",t.onReady),e.off("done",t.onDone),e.off("reveal",t.onChange),e.off("Carousel.change",t.onChange),t.removeContainer()}}Object.defineProperty(It,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:Rt});const Ft={Hash:ot,Html:bt,Images:rt,Slideshow:Et,Thumbs:At,Toolbar:It},Dt="with-fancybox",jt="hide-scrollbar",Ht="--fancybox-scrollbar-compensate",Bt="--fancybox-body-margin",Nt="is-animated",_t="is-compact",Wt="is-loading",$t="disabled",Xt="tabindex",Yt="download",qt="href",Vt="src",Zt=function(){var t=window.getSelection();return t&amp;&amp;"Range"===t.type};let Ut=null,Gt=null;const Kt=new Map;let Jt=0;class Qt extends g{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(t=[],e={},i={}){super(e),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:it.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fsAPI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fsAPI=(()=&gt;{let t,e="",i="",n="";return document.fullscreenEnabled?(e="requestFullscreen",i="exitFullscreen",n="fullscreenElement"):document.webkitFullscreenEnabled&amp;&amp;(e="webkitRequestFullscreen",i="webkitExitFullscreen",n="webkitFullscreenElement"),e&amp;&amp;(t={request:function(t){return"webkitRequestFullscreen"===e?t[e](Element.ALLOW_KEYBOARD_INPUT):t[e]()},exit:function(){return document[n]&amp;&amp;document[i]()},isFullscreen:function(){return document[n]}}),t})(),this.id=e.id||++Jt,Kt.set(this.id,this),this.userSlides=t,this.userPlugins=i,queueMicrotask((()=&gt;{this.init()}))}init(){if(this.state===it.Destroy)return;this.state=it.Init,this.attachPlugins(Object.assign(Object.assign({},Qt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&amp;&amp;(()=&gt;{if(!K)return;const t=document.body;if(t.classList.contains(jt))return;let e=window.innerWidth-document.documentElement.getBoundingClientRect().width;e&lt;0&amp;&amp;(e=0);const i=t.currentStyle||window.getComputedStyle(t),n=parseFloat(i.marginRight);document.documentElement.style.setProperty(Ht,`${e}px`),n&amp;&amp;t.style.setProperty(Bt,`${n}px`),t.classList.add(jt)})(),this.initLayout(),this.scale();const t=()=&gt;{this.initCarousel(this.userSlides),this.state=it.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=&gt;{this.container&amp;&amp;this.container.setAttribute("aria-hidden","false")}),16)},e=this.fsAPI;this.option("Fullscreen.autoStart")&amp;&amp;e&amp;&amp;!e.isFullscreen()?e.request(this.container).then((()=&gt;t())).catch((()=&gt;t())):t()}initLayout(){var t,e;const i=this.option("parentEl")||document.body,n=s(this.localize(this.option("tpl.main")||""));n&amp;&amp;(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(_t,this.isCompact),P(n,this.option("mainClass")||""),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),P(document.documentElement,Dt),Ut&amp;&amp;Gt||(Ut=document.createElement("span"),P(Ut,"fancybox-focus-guard"),Ut.setAttribute(Xt,"0"),Ut.setAttribute("aria-hidden","true"),Ut.setAttribute("aria-label","Focus guard"),Gt=Ut.cloneNode(),null===(t=n.parentElement)||void 0===t||t.insertBefore(Ut,n),null===(e=n.parentElement)||void 0===e||e.append(Gt)),this.option("animated")&amp;&amp;(P(n,Nt),setTimeout((()=&gt;{this.isClosing()||S(n,Nt)}),350)),this.emit("initLayout"))}initCarousel(t){const e=this.container;if(!e)return;const n=e.querySelector(".fancybox__carousel");if(!n)return;const s=this.carousel=new U(n,p({},{slides:t,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&amp;&amp;"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));s.on("*",((t,e,...i)=&gt;{this.emit(`Carousel.${e}`,t,...i)})),s.on(["ready","change"],(()=&gt;{this.manageCaption()})),this.on("Carousel.removeSlide",((t,e,i)=&gt;{this.clearContent(i),i.state=void 0})),s.on("Panzoom.touchStart",(()=&gt;{var t,e;this.isCompact||this.endIdle(),(null===(t=document.activeElement)||void 0===t?void 0:t.closest(".f-thumbs"))&amp;&amp;(null===(e=this.container)||void 0===e||e.focus())})),s.on("settle",(()=&gt;{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&amp;&amp;!this.isClosing&amp;&amp;this.checkFocus()})),this.option("dragToClose")&amp;&amp;(s.on("Panzoom.afterTransform",((t,e)=&gt;{const n=this.getSlide();if(n&amp;&amp;i(n.el))return;const s=this.container;if(s){const t=Math.abs(e.current.f),i=t&lt;1?"":Math.max(.5,Math.min(1,1-t/e.contentRect.fitHeight*1.5));s.style.setProperty("--fancybox-ts",i?"0s":""),s.style.setProperty("--fancybox-opacity",i+"")}})),s.on("Panzoom.touchEnd",((t,e,n)=&gt;{var s;const o=this.getSlide();if(o&amp;&amp;i(o.el))return;if(e.isMobile&amp;&amp;document.activeElement&amp;&amp;-1!==["TEXTAREA","INPUT"].indexOf(null===(s=document.activeElement)||void 0===s?void 0:s.nodeName))return;const a=Math.abs(e.dragOffset.y);"y"===e.lockedAxis&amp;&amp;(a&gt;=200||a&gt;=50&amp;&amp;e.dragOffset.time&lt;300)&amp;&amp;(n&amp;&amp;n.cancelable&amp;&amp;n.preventDefault(),this.close(n,"f-throwOut"+(e.current.f&lt;0?"Up":"Down")))}))),s.on("change",(t=&gt;{var e;let i=null===(e=this.getSlide())||void 0===e?void 0:e.triggerEl;if(i){const e=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:t.page});i.dispatchEvent(e)}})),s.on(["refresh","change"],(t=&gt;{const e=this.container;if(!e)return;for(const i of e.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=t.page+1;for(const i of e.querySelectorAll("[data-fancybox-count]"))i.innerHTML=t.pages.length;if(!t.isInfinite){for(const i of e.querySelectorAll("[data-fancybox-next]"))t.page&lt;t.pages.length-1?(i.removeAttribute($t),i.removeAttribute(Xt)):(i.setAttribute($t,""),i.setAttribute(Xt,"-1"));for(const i of e.querySelectorAll("[data-fancybox-prev]"))t.page&gt;0?(i.removeAttribute($t),i.removeAttribute(Xt)):(i.setAttribute($t,""),i.setAttribute(Xt,"-1"))}const i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";n||"image"!==i.type||i.error||"string"!=typeof i[Vt]||(n=i[Vt]);for(const t of e.querySelectorAll("[data-fancybox-download]")){const e=i.downloadFilename;n?(t.removeAttribute($t),t.removeAttribute(Xt),t.setAttribute(qt,n),t.setAttribute(Yt,e||n),t.setAttribute("target","_blank")):(t.setAttribute($t,""),t.setAttribute(Xt,"-1"),t.removeAttribute(qt),t.removeAttribute(Yt))}})),this.emit("initCarousel")}attachEvents(){const t=this,e=t.container;if(!e)return;e.addEventListener("click",t.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",t.onVisibilityChange,!1),document.addEventListener("mousemove",t.onMousemove),t.option("trapFocus")&amp;&amp;document.addEventListener("focus",t.onFocus,!0),window.addEventListener("resize",t.onResize);const i=window.visualViewport;i&amp;&amp;(i.addEventListener("scroll",t.onResize),i.addEventListener("resize",t.onResize))}detachEvents(){const t=this,e=t.container;if(!e)return;document.removeEventListener("keydown",t.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",t.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",t.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",t.onMousemove),window.removeEventListener("resize",t.onResize);const i=window.visualViewport;i&amp;&amp;(i.removeEventListener("resize",t.onResize),i.removeEventListener("scroll",t.onResize)),document.removeEventListener("visibilitychange",t.onVisibilityChange,!1),document.removeEventListener("focus",t.onFocus,!0)}scale(){const t=this.container;if(!t)return;const e=window.visualViewport,i=Math.max(1,(null==e?void 0:e.scale)||1);let n="",s="",o="";if(e&amp;&amp;i&gt;1){let t=`${e.offsetLeft}px`,a=`${e.offsetTop}px`;n=e.width*i+"px",s=e.height*i+"px",o=`translate3d(${t}, ${a}, 0) scale(${1/i})`}t.style.transform=o,t.style.width=n,t.style.height=s}onClick(t){var e,i;const{container:n,isCompact:s}=this;if(!n||this.isClosing())return;!s&amp;&amp;this.option("idle")&amp;&amp;this.resetIdle();const o=t.composedPath()[0];if(o.closest(".f-spinner")||o.closest("[data-fancybox-close]"))return t.preventDefault(),void this.close(t);if(o.closest("[data-fancybox-prev]"))return t.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return t.preventDefault(),void this.next();const a=document.activeElement;if(Zt()&amp;&amp;a&amp;&amp;n.contains(a))return;if(o===(null===(e=this.carousel)||void 0===e?void 0:e.container))return;if(s&amp;&amp;"image"===(null===(i=this.getSlide())||void 0===i?void 0:i.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=&gt;{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",t),t.defaultPrevented)return;let r=!1;if(o.closest(".fancybox__content")){if(a){if(a.closest("[contenteditable]"))return;o.matches(Q)||a.blur()}if(Zt())return;r=this.option("contentClick")}else o.closest(".fancybox__carousel")&amp;&amp;!o.matches(Q)&amp;&amp;(r=this.option("backdropClick"));"close"===r?(t.preventDefault(),this.close(t)):"next"===r?(t.preventDefault(),this.next()):"prev"===r&amp;&amp;(t.preventDefault(),this.prev())}onWheel(t){var e;let i=this.option("wheel",t);(null===(e=t.target)||void 0===e?void 0:e.closest(".fancybox__thumbs"))&amp;&amp;(i="slide");const n="slide"===i,s=[-t.deltaX||0,-t.deltaY||0,-t.detail||0].reduce((function(t,e){return Math.abs(e)&gt;Math.abs(t)?e:t})),o=Math.max(-1,Math.min(1,s)),a=Date.now();this.pwt&amp;&amp;a-this.pwt&lt;300?n&amp;&amp;t.preventDefault():(this.pwt=a,this.emit("wheel",t),t.defaultPrevented||("close"===i?(t.preventDefault(),this.close(t)):"slide"===i&amp;&amp;(t.preventDefault(),this[o&gt;0?"prev":"next"]())))}onKeydown(t){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const e=t.key,i=this.option("keyboard");if(!i||t.ctrlKey||t.altKey||t.shiftKey)return;const n=t.composedPath()[0],s=document.activeElement&amp;&amp;document.activeElement.classList,o=s&amp;&amp;s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==e&amp;&amp;!o&amp;&amp;E(n)){if(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))return}this.emit("keydown",e,t);const a=i[e];"function"==typeof this[a]&amp;&amp;(t.preventDefault(),this[a]())}onResize(){const t=_t,e=this.container;if(!e)return;const i=this.isCompact;e.classList.toggle(t,i),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(t){this.isTopmost()&amp;&amp;this.checkFocus(t)}onMousemove(t){this.prevMouseMoveEvent=t,!this.isCompact&amp;&amp;this.option("idle")&amp;&amp;this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(t){const e=this.optionFor(t,"closeButton")||!1;if("auto"===e){const t=this.plugins.Toolbar;if(t&amp;&amp;t.state===Lt.Ready)return}if(!e)return;if(!t.contentEl||t.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const e=s(this.localize(i));t.closeBtnEl=t.contentEl.appendChild(e),t.el&amp;&amp;P(t.el,"has-close-btn")}}manageCaption(t=void 0){var e,i;const n="fancybox__caption",s="has-caption",o=this.container;if(!o)return;S(o,s);const a=this.isCompact||this.option("commonCaption"),r=!a;if(this.caption&amp;&amp;this.stop(this.caption),r&amp;&amp;this.caption&amp;&amp;(this.caption.remove(),this.caption=null),a&amp;&amp;!this.caption)for(const t of(null===(e=this.carousel)||void 0===e?void 0:e.slides)||[])t.captionEl&amp;&amp;(t.captionEl.remove(),t.captionEl=void 0,S(t.el,s),null===(i=t.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(t||(t=this.getSlide()),!t||a&amp;&amp;!this.isCurrentSlide(t))return;const l=t.el;let c=this.optionFor(t,"caption","");if(!c)return void(a&amp;&amp;this.caption&amp;&amp;this.animate(this.caption,"f-fadeOut",(()=&gt;{this.caption&amp;&amp;(this.caption.innerHTML="")})));let h=null;if(r){if(h=t.captionEl||null,l&amp;&amp;!h){const e=n+`_${this.id}_${t.index}`;h=document.createElement("div"),P(h,n),h.setAttribute("id",e),t.captionEl=l.appendChild(h),P(l,s),l.setAttribute("aria-labelledby",e)}}else{if(h=this.caption,h||(h=o.querySelector("."+n)),!h){h=document.createElement("div"),h.dataset.fancyboxCaption="",P(h,n);(this.footer||o).prepend(h)}P(o,s),this.caption=h}h&amp;&amp;(h.innerHTML="","string"==typeof c||"number"==typeof c?h.innerHTML=c+"":c instanceof HTMLElement&amp;&amp;h.appendChild(c))}checkFocus(t){var e;const i=document.activeElement||null;i&amp;&amp;(null===(e=this.container)||void 0===e?void 0:e.contains(i))||this.focus(t)}focus(t){var e;if(this.ignoreFocusChange)return;const i=document.activeElement||null,n=(null==t?void 0:t.target)||null,s=this.container,o=this.getSlide();if(!s||!(null===(e=this.carousel)||void 0===e?void 0:e.viewport))return;if(!t&amp;&amp;i&amp;&amp;s.contains(i))return;const a=o&amp;&amp;o.state===nt.Ready?o.el:null;if(!a||a.contains(i)||s===i)return;t&amp;&amp;t.cancelable&amp;&amp;t.preventDefault(),this.ignoreFocusChange=!0;const r=Array.from(s.querySelectorAll(Q));let l=[],c=null;for(let t of r){const e=!t.offsetParent||t.closest('[aria-hidden="true"]'),i=a&amp;&amp;a.contains(t),n=!this.carousel.viewport.contains(t);if(t===s||(i||n)&amp;&amp;!e){l.push(t);const e=t.dataset.origTabindex;void 0!==e&amp;&amp;e&amp;&amp;(t.tabIndex=parseFloat(e)),t.removeAttribute("data-orig-tabindex"),!t.hasAttribute("autoFocus")&amp;&amp;c||(c=t)}else{const e=void 0===t.dataset.origTabindex?t.getAttribute("tabindex")||"":t.dataset.origTabindex;e&amp;&amp;(t.dataset.origTabindex=e),t.tabIndex=-1}}let h=null;t?(!n||l.indexOf(n)&lt;0)&amp;&amp;(h=c||s,l.length&amp;&amp;(i===Gt?h=l[0]:this.lastFocus!==s&amp;&amp;i!==Ut||(h=l[l.length-1]))):h=o&amp;&amp;"image"===o.type?s:c||s,h&amp;&amp;tt(h),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const t=this.carousel;t&amp;&amp;t.pages.length&gt;1&amp;&amp;t.slideNext()}prev(){const t=this.carousel;t&amp;&amp;t.pages.length&gt;1&amp;&amp;t.slidePrev()}jumpTo(...t){this.carousel&amp;&amp;this.carousel.slideTo(...t)}isTopmost(){var t;return(null===(t=Qt.getInstance())||void 0===t?void 0:t.id)==this.id}animate(t=null,e="",i){if(!t||!e)return void(i&amp;&amp;i());this.stop(t);const n=s=&gt;{s.target===t&amp;&amp;t.dataset.animationName&amp;&amp;(t.removeEventListener("animationend",n),delete t.dataset.animationName,i&amp;&amp;i(),S(t,e))};t.dataset.animationName=e,t.addEventListener("animationend",n),P(t,e)}stop(t){t&amp;&amp;t.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:t}))}setContent(t,e="",i=!0){if(this.isClosing())return;const n=t.el;if(!n)return;let o=null;if(E(e)?o=e:(o=s(e+""),E(o)||(o=document.createElement("div"),o.innerHTML=e+"")),["img","picture","iframe","video","audio"].includes(o.nodeName.toLowerCase())){const t=document.createElement("div");t.appendChild(o),o=t}E(o)&amp;&amp;t.filter&amp;&amp;!t.error&amp;&amp;(o=o.querySelector(t.filter)),o&amp;&amp;E(o)?(P(o,"fancybox__content"),t.id&amp;&amp;o.setAttribute("id",t.id),"none"!==o.style.display&amp;&amp;"none"!==getComputedStyle(o).getPropertyValue("display")||(o.style.display=t.display||this.option("defaultDisplay")||"flex"),n.classList.add(`has-${t.error?"error":t.type||"unknown"}`),n.prepend(o),t.contentEl=o,i&amp;&amp;this.revealContent(t),this.manageCloseBtn(t),this.manageCaption(t)):this.setError(t,"{{ELEMENT_NOT_FOUND}}")}revealContent(t,e){const i=t.el,n=t.contentEl;i&amp;&amp;n&amp;&amp;(this.emit("reveal",t),this.hideLoading(t),t.state=nt.Opening,(e=this.isOpeningSlide(t)?void 0===e?this.optionFor(t,"showClass"):e:"f-fadeIn")?this.animate(n,e,(()=&gt;{this.done(t)})):this.done(t))}done(t){this.isClosing()||(t.state=nt.Ready,this.emit("done",t),P(t.el,"is-done"),this.isCurrentSlide(t)&amp;&amp;this.option("autoFocus")&amp;&amp;queueMicrotask((()=&gt;{var e;null===(e=t.panzoom)||void 0===e||e.updateControls(),this.option("autoFocus")&amp;&amp;(this.option("autoFocus")?this.focus():this.checkFocus())})),this.isOpeningSlide(t)&amp;&amp;!this.isCompact&amp;&amp;this.option("idle")&amp;&amp;this.setIdle())}isCurrentSlide(t){const e=this.getSlide();return!(!t||!e)&amp;&amp;e.index===t.index}isOpeningSlide(t){var e,i;return null===(null===(e=this.carousel)||void 0===e?void 0:e.prevPage)&amp;&amp;t.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(t){t.state=nt.Loading;const e=t.el;if(!e)return;P(e,Wt),this.emit("loading",t),t.spinnerEl||setTimeout((()=&gt;{if(!this.isClosing()&amp;&amp;!t.spinnerEl&amp;&amp;t.state===nt.Loading){let i=s(x);t.spinnerEl=i,e.prepend(i),this.animate(i,"f-fadeIn")}}),250)}hideLoading(t){const e=t.el;if(!e)return;const i=t.spinnerEl;this.isClosing()?null==i||i.remove():(S(e,Wt),i&amp;&amp;this.animate(i,"f-fadeOut",(()=&gt;{i.remove()})),t.state===nt.Loading&amp;&amp;(this.emit("loaded",t),t.state=nt.Ready))}setError(t,e){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,t),i.defaultPrevented)return;t.error=e,this.hideLoading(t),this.clearContent(t);const n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(e||"&lt;p&gt;{{ERROR}}&lt;/p&gt;"),this.setContent(t,n)}clearContent(t){if(void 0===t.state)return;this.emit("clearContent",t),t.contentEl&amp;&amp;(t.contentEl.remove(),t.contentEl=void 0);const e=t.el;e&amp;&amp;(S(e,"has-error"),S(e,"has-unknown"),S(e,`has-${t.type||"unknown"}`)),t.closeBtnEl&amp;&amp;t.closeBtnEl.remove(),t.closeBtnEl=void 0,t.captionEl&amp;&amp;t.captionEl.remove(),t.captionEl=void 0,t.spinnerEl&amp;&amp;t.spinnerEl.remove(),t.spinnerEl=void 0}getSlide(){var t;const e=this.carousel;return(null===(t=null==e?void 0:e.pages[null==e?void 0:e.page])||void 0===t?void 0:t.slides[0])||void 0}close(t,e){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,t),i.defaultPrevented)return;t&amp;&amp;t.cancelable&amp;&amp;(t.preventDefault(),t.stopPropagation());const n=this.fsAPI,s=()=&gt;{this.proceedClose(t,e)};n&amp;&amp;n.isFullscreen()===this.container?Promise.resolve(n.exit()).then((()=&gt;s())):s()}clearIdle(){this.idleTimer&amp;&amp;clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(t=!1){const e=()=&gt;{this.clearIdle(),this.idle=!0,P(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(t)e();else{const t=this.option("idle");t&amp;&amp;(this.idleTimer=setTimeout(e,t))}}endIdle(){this.clearIdle(),this.idle&amp;&amp;!this.isClosing()&amp;&amp;(this.idle=!1,S(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){const t=this.fsAPI;t&amp;&amp;(t.isFullscreen()?t.exit():this.container&amp;&amp;t.request(this.container))}isClosing(){return[it.Closing,it.CustomClosing,it.Destroy].includes(this.state)}proceedClose(t,e){var i,n;this.state=it.Closing,this.clearIdle(),this.detachEvents();const s=this.container,o=this.carousel,a=this.getSlide(),r=a&amp;&amp;this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&amp;&amp;(G(r)?tt(r):r.focus()),s&amp;&amp;(P(s,"is-closing"),s.setAttribute("aria-hidden","true"),this.option("animated")&amp;&amp;P(s,Nt),s.style.pointerEvents="none"),o){o.clearTransitions(),null===(i=o.panzoom)||void 0===i||i.destroy(),null===(n=o.plugins.Navigation)||void 0===n||n.detach();for(const t of o.slides){t.state=nt.Closing,this.hideLoading(t);const e=t.contentEl;e&amp;&amp;this.stop(e);const i=null==t?void 0:t.panzoom;i&amp;&amp;(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(t)||o.emit("removeSlide",t)}}this.emit("close",t),this.state!==it.CustomClosing?(void 0===e&amp;&amp;a&amp;&amp;(e=this.optionFor(a,"hideClass")),e&amp;&amp;a?(this.animate(a.contentEl,e,(()=&gt;{o&amp;&amp;o.emit("removeSlide",a)})),setTimeout((()=&gt;{this.destroy()}),500)):this.destroy()):setTimeout((()=&gt;{this.destroy()}),500)}destroy(){var t;if(this.state===it.Destroy)return;this.state=it.Destroy,null===(t=this.carousel)||void 0===t||t.destroy();const e=this.container;e&amp;&amp;e.remove(),Kt.delete(this.id);const i=Qt.getInstance();i?i.focus():(Ut&amp;&amp;(Ut.remove(),Ut=null),Gt&amp;&amp;(Gt.remove(),Gt=null),S(document.documentElement,Dt),(()=&gt;{if(!K)return;const t=document,e=t.body;e.classList.remove(jt),e.style.setProperty(Bt,""),t.documentElement.style.setProperty(Ht,"")})(),this.emit("destroy"))}static bind(t,e,i){if(!K)return;let n,s="",o={};if(void 0===t?n=document.body:"string"==typeof t?(n=document.body,s=t,"object"==typeof e&amp;&amp;(o=e||{})):(n=t,"string"==typeof e&amp;&amp;(s=e),"object"==typeof i&amp;&amp;(o=i||{})),!n||!E(n))return;s=s||"[data-fancybox]";const a=Qt.openers.get(n)||new Map;a.set(s,o),Qt.openers.set(n,a),1===a.size&amp;&amp;n.addEventListener("click",Qt.fromEvent)}static unbind(t,e){let i,n="";if("string"==typeof t?(i=document.body,n=t):(i=t,"string"==typeof e&amp;&amp;(n=e)),!i)return;const s=Qt.openers.get(i);s&amp;&amp;n&amp;&amp;s.delete(n),n&amp;&amp;s||(Qt.openers.delete(i),i.removeEventListener("click",Qt.fromEvent))}static destroy(){let t;for(;t=Qt.getInstance();)t.destroy();for(const t of Qt.openers.keys())t.removeEventListener("click",Qt.fromEvent);Qt.openers=new Map}static fromEvent(t){if(t.defaultPrevented)return;if(t.button&amp;&amp;0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey)return;let e=t.composedPath()[0];const i=e.closest("[data-fancybox-trigger]");if(i){const t=i.dataset.fancyboxTrigger||"",n=document.querySelectorAll(`[data-fancybox="${t}"]`),s=parseInt(i.dataset.fancyboxIndex||"",10)||0;e=n[s]||e}if(!(e&amp;&amp;e instanceof Element))return;let n,s,o,a;if([...Qt.openers].reverse().find((([t,i])=&gt;!(!t.contains(e)||![...i].reverse().find((([i,r])=&gt;{let l=e.closest(i);return!!l&amp;&amp;(n=t,s=i,o=l,a=r,!0)}))))),!n||!s||!o)return;a=a||{},t.preventDefault(),e=o;let r=[],l=p({},et,a);l.event=t,l.triggerEl=e,l.delegate=i;const c=l.groupAll,h=l.groupAttr,d=h&amp;&amp;e?e.getAttribute(`${h}`):"";if((!e||d||c)&amp;&amp;(r=[].slice.call(n.querySelectorAll(s))),e&amp;&amp;!c&amp;&amp;(r=d?r.filter((t=&gt;t.getAttribute(`${h}`)===d)):[e]),!r.length)return;const u=Qt.getInstance();return u&amp;&amp;u.options.triggerEl&amp;&amp;r.indexOf(u.options.triggerEl)&gt;-1?void 0:(e&amp;&amp;(l.startIndex=r.indexOf(e)),Qt.fromNodes(r,l))}static fromSelector(t,e){let i=null,n="";if("string"==typeof t?(i=document.body,n=t):t instanceof HTMLElement&amp;&amp;"string"==typeof e&amp;&amp;(i=t,n=e),!i||!n)return!1;const s=Qt.openers.get(i);if(!s)return!1;const o=s.get(n);return!!o&amp;&amp;Qt.fromNodes(Array.from(i.querySelectorAll(n)),o)}static fromNodes(t,e){e=p({},et,e||{});const i=[];for(const n of t){const t=n.dataset||{},s=t[Vt]||n.getAttribute(qt)||n.getAttribute("currentSrc")||n.getAttribute(Vt)||void 0;let o;const a=e.delegate;let r;a&amp;&amp;i.length===e.startIndex&amp;&amp;(o=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),o||(o=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),o&amp;&amp;(r=o.currentSrc||o[Vt]||void 0,!r&amp;&amp;o.dataset&amp;&amp;(r=o.dataset.lazySrc||o.dataset[Vt]||void 0));const l={src:s,triggerEl:n,thumbEl:o,thumbElSrc:r,thumbSrc:r};for(const e in t)l[e]=t[e]+"";i.push(l)}return new Qt(i,e)}static getInstance(t){if(t)return Kt.get(t);return Array.from(Kt.values()).reverse().find((t=&gt;!t.isClosing()&amp;&amp;t))||null}static getSlide(){var t;return(null===(t=Qt.getInstance())||void 0===t?void 0:t.getSlide())||null}static show(t=[],e={}){return new Qt(t,e)}static next(){const t=Qt.getInstance();t&amp;&amp;t.next()}static prev(){const t=Qt.getInstance();t&amp;&amp;t.prev()}static close(t=!0,...e){if(t)for(const t of Kt.values())t.close(...e);else{const t=Qt.getInstance();t&amp;&amp;t.close(...e)}}}Object.defineProperty(Qt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.24"}),Object.defineProperty(Qt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:et}),Object.defineProperty(Qt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Ft}),Object.defineProperty(Qt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),t.Carousel=U,t.Fancybox=Qt,t.Panzoom=k}));
/* End */
;
; /* Start:"a:4:{s:4:"full";s:55:"/local/templates/agency_ux/js/imask.js?1684760375113739";s:6:"source";s:38:"/local/templates/agency_ux/js/imask.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
(function (global, factory) {
    typeof exports === 'object' &amp;&amp; typeof module !== 'undefined' ? factory(exports) :
    typeof define === 'function' &amp;&amp; define.amd ? define(['exports'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.IMask = {}));
  })(this, (function (exports) { 'use strict';
  
    function _objectWithoutPropertiesLoose(source, excluded) {
      if (source == null) return {};
      var target = {};
      var sourceKeys = Object.keys(source);
      var key, i;
      for (i = 0; i &lt; sourceKeys.length; i++) {
        key = sourceKeys[i];
        if (excluded.indexOf(key) &gt;= 0) continue;
        target[key] = source[key];
      }
      return target;
    }
  
    /**
     * Applies mask on element.
     * @constructor
     * @param {HTMLInputElement|HTMLTextAreaElement|MaskElement} el - Element to apply mask
     * @param {Object} opts - Custom mask options
     * @return {InputMask}
     */
    function IMask(el) {
      let opts = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
      // currently available only for input-like elements
      return new IMask.InputMask(el, opts);
    }
  
    /**
      Provides details of changing model value
      @param {Object} [details]
      @param {string} [details.inserted] - Inserted symbols
      @param {boolean} [details.skip] - Can skip chars
      @param {number} [details.removeCount] - Removed symbols count
      @param {number} [details.tailShift] - Additional offset if any changes occurred before tail
    */
    class ChangeDetails {
      /** Inserted symbols */
  
      /** Can skip chars */
  
      /** Additional offset if any changes occurred before tail */
  
      /** Raw inserted is used by dynamic mask */
  
      constructor(details) {
        Object.assign(this, {
          inserted: '',
          rawInserted: '',
          skip: false,
          tailShift: 0
        }, details);
      }
  
      /**
        Aggregate changes
        @returns {ChangeDetails} `this`
      */
      aggregate(details) {
        this.rawInserted += details.rawInserted;
        this.skip = this.skip || details.skip;
        this.inserted += details.inserted;
        this.tailShift += details.tailShift;
        return this;
      }
  
      /** Total offset considering all changes */
      get offset() {
        return this.tailShift + this.inserted.length;
      }
    }
    IMask.ChangeDetails = ChangeDetails;
  
    /** Checks if value is string */
    function isString(str) {
      return typeof str === 'string' || str instanceof String;
    }
  
    /**
      Direction
      @prop {string} NONE
      @prop {string} LEFT
      @prop {string} FORCE_LEFT
      @prop {string} RIGHT
      @prop {string} FORCE_RIGHT
    */
    const DIRECTION = {
      NONE: 'NONE',
      LEFT: 'LEFT',
      FORCE_LEFT: 'FORCE_LEFT',
      RIGHT: 'RIGHT',
      FORCE_RIGHT: 'FORCE_RIGHT'
    };
  
    /** */
    function forceDirection(direction) {
      switch (direction) {
        case DIRECTION.LEFT:
          return DIRECTION.FORCE_LEFT;
        case DIRECTION.RIGHT:
          return DIRECTION.FORCE_RIGHT;
        default:
          return direction;
      }
    }
  
    /** Escapes regular expression control chars */
    function escapeRegExp(str) {
      return str.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
    }
    function normalizePrepare(prep) {
      return Array.isArray(prep) ? prep : [prep, new ChangeDetails()];
    }
  
    // cloned from https://github.com/epoberezkin/fast-deep-equal with small changes
    function objectIncludes(b, a) {
      if (a === b) return true;
      var arrA = Array.isArray(a),
        arrB = Array.isArray(b),
        i;
      if (arrA &amp;&amp; arrB) {
        if (a.length != b.length) return false;
        for (i = 0; i &lt; a.length; i++) if (!objectIncludes(a[i], b[i])) return false;
        return true;
      }
      if (arrA != arrB) return false;
      if (a &amp;&amp; b &amp;&amp; typeof a === 'object' &amp;&amp; typeof b === 'object') {
        var dateA = a instanceof Date,
          dateB = b instanceof Date;
        if (dateA &amp;&amp; dateB) return a.getTime() == b.getTime();
        if (dateA != dateB) return false;
        var regexpA = a instanceof RegExp,
          regexpB = b instanceof RegExp;
        if (regexpA &amp;&amp; regexpB) return a.toString() == b.toString();
        if (regexpA != regexpB) return false;
        var keys = Object.keys(a);
        // if (keys.length !== Object.keys(b).length) return false;
  
        for (i = 0; i &lt; keys.length; i++)
        // $FlowFixMe ... ???
        if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
        for (i = 0; i &lt; keys.length; i++) if (!objectIncludes(b[keys[i]], a[keys[i]])) return false;
        return true;
      } else if (a &amp;&amp; b &amp;&amp; typeof a === 'function' &amp;&amp; typeof b === 'function') {
        return a.toString() === b.toString();
      }
      return false;
    }
  
    /** Selection range */
  
    /** Provides details of changing input */
    class ActionDetails {
      /** Current input value */
  
      /** Current cursor position */
  
      /** Old input value */
  
      /** Old selection */
  
      constructor(value, cursorPos, oldValue, oldSelection) {
        this.value = value;
        this.cursorPos = cursorPos;
        this.oldValue = oldValue;
        this.oldSelection = oldSelection;
  
        // double check if left part was changed (autofilling, other non-standard input triggers)
        while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {
          --this.oldSelection.start;
        }
      }
  
      /**
        Start changing position
        @readonly
      */
      get startChangePos() {
        return Math.min(this.cursorPos, this.oldSelection.start);
      }
  
      /**
        Inserted symbols count
        @readonly
      */
      get insertedCount() {
        return this.cursorPos - this.startChangePos;
      }
  
      /**
        Inserted symbols
        @readonly
      */
      get inserted() {
        return this.value.substr(this.startChangePos, this.insertedCount);
      }
  
      /**
        Removed symbols count
        @readonly
      */
      get removedCount() {
        // Math.max for opposite operation
        return Math.max(this.oldSelection.end - this.startChangePos ||
        // for Delete
        this.oldValue.length - this.value.length, 0);
      }
  
      /**
        Removed symbols
        @readonly
      */
      get removed() {
        return this.oldValue.substr(this.startChangePos, this.removedCount);
      }
  
      /**
        Unchanged head symbols
        @readonly
      */
      get head() {
        return this.value.substring(0, this.startChangePos);
      }
  
      /**
        Unchanged tail symbols
        @readonly
      */
      get tail() {
        return this.value.substring(this.startChangePos + this.insertedCount);
      }
  
      /**
        Remove direction
        @readonly
      */
      get removeDirection() {
        if (!this.removedCount || this.insertedCount) return DIRECTION.NONE;
  
        // align right if delete at right
        return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) &amp;&amp;
        // if not range removed (event with backspace)
        this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;
      }
    }
  
    /** Provides details of continuous extracted tail */
    class ContinuousTailDetails {
      /** Tail value as string */
  
      /** Tail start position */
  
      /** Start position */
  
      constructor() {
        let value = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : '';
        let from = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : 0;
        let stop = arguments.length &gt; 2 ? arguments[2] : undefined;
        this.value = value;
        this.from = from;
        this.stop = stop;
      }
      toString() {
        return this.value;
      }
      extend(tail) {
        this.value += String(tail);
      }
      appendTo(masked) {
        return masked.append(this.toString(), {
          tail: true
        }).aggregate(masked._appendPlaceholder());
      }
      get state() {
        return {
          value: this.value,
          from: this.from,
          stop: this.stop
        };
      }
      set state(state) {
        Object.assign(this, state);
      }
      unshift(beforePos) {
        if (!this.value.length || beforePos != null &amp;&amp; this.from &gt;= beforePos) return '';
        const shiftChar = this.value[0];
        this.value = this.value.slice(1);
        return shiftChar;
      }
      shift() {
        if (!this.value.length) return '';
        const shiftChar = this.value[this.value.length - 1];
        this.value = this.value.slice(0, -1);
        return shiftChar;
      }
    }
  
    /** Supported mask type */
  
    /** Append flags */
  
    /** Extract flags */
  
    /** Provides common masking stuff */
    class Masked {
      // $Shape&lt;MaskedOptions&gt;; TODO after fix https://github.com/facebook/flow/issues/4773
  
      /** @type {Mask} */
  
      /** */ // $FlowFixMe no ideas
      /** Transforms value before mask processing */
      /** Validates if value is acceptable */
      /** Does additional processing in the end of editing */
      /** Format typed value to string */
      /** Parse strgin to get typed value */
      /** Enable characters overwriting */
      /** */
      /** */
      /** */
      constructor(opts) {
        this._value = '';
        this._update(Object.assign({}, Masked.DEFAULTS, opts));
        this.isInitialized = true;
      }
  
      /** Sets and applies new options */
      updateOptions(opts) {
        if (!Object.keys(opts).length) return;
        // $FlowFixMe
        this.withValueRefresh(this._update.bind(this, opts));
      }
  
      /**
        Sets new options
        @protected
      */
      _update(opts) {
        Object.assign(this, opts);
      }
  
      /** Mask state */
      get state() {
        return {
          _value: this.value
        };
      }
      set state(state) {
        this._value = state._value;
      }
  
      /** Resets value */
      reset() {
        this._value = '';
      }
  
      /** */
      get value() {
        return this._value;
      }
      set value(value) {
        this.resolve(value);
      }
  
      /** Resolve new value */
      resolve(value) {
        this.reset();
        this.append(value, {
          input: true
        }, '');
        this.doCommit();
        return this.value;
      }
  
      /** */
      get unmaskedValue() {
        return this.value;
      }
      set unmaskedValue(value) {
        this.reset();
        this.append(value, {}, '');
        this.doCommit();
      }
  
      /** */
      get typedValue() {
        return this.doParse(this.value);
      }
      set typedValue(value) {
        this.value = this.doFormat(value);
      }
  
      /** Value that includes raw user input */
      get rawInputValue() {
        return this.extractInput(0, this.value.length, {
          raw: true
        });
      }
      set rawInputValue(value) {
        this.reset();
        this.append(value, {
          raw: true
        }, '');
        this.doCommit();
      }
      get displayValue() {
        return this.value;
      }
  
      /** */
      get isComplete() {
        return true;
      }
  
      /** */
      get isFilled() {
        return this.isComplete;
      }
  
      /** Finds nearest input position in direction */
      nearestInputPos(cursorPos, direction) {
        return cursorPos;
      }
      totalInputPositions() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        return Math.min(this.value.length, toPos - fromPos);
      }
  
      /** Extracts value in range considering flags */
      extractInput() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        return this.value.slice(fromPos, toPos);
      }
  
      /** Extracts tail in range */
      extractTail() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos);
      }
  
      /** Appends tail */
      // $FlowFixMe no ideas
      appendTail(tail) {
        if (isString(tail)) tail = new ContinuousTailDetails(String(tail));
        return tail.appendTo(this);
      }
  
      /** Appends char */
      _appendCharRaw(ch) {
        if (!ch) return new ChangeDetails();
        this._value += ch;
        return new ChangeDetails({
          inserted: ch,
          rawInserted: ch
        });
      }
  
      /** Appends char */
      _appendChar(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let checkTail = arguments.length &gt; 2 ? arguments[2] : undefined;
        const consistentState = this.state;
        let details;
        [ch, details] = normalizePrepare(this.doPrepare(ch, flags));
        details = details.aggregate(this._appendCharRaw(ch, flags));
        if (details.inserted) {
          let consistentTail;
          let appended = this.doValidate(flags) !== false;
          if (appended &amp;&amp; checkTail != null) {
            // validation ok, check tail
            const beforeTailState = this.state;
            if (this.overwrite === true) {
              consistentTail = checkTail.state;
              checkTail.unshift(this.value.length - details.tailShift);
            }
            let tailDetails = this.appendTail(checkTail);
            appended = tailDetails.rawInserted === checkTail.toString();
  
            // not ok, try shift
            if (!(appended &amp;&amp; tailDetails.inserted) &amp;&amp; this.overwrite === 'shift') {
              this.state = beforeTailState;
              consistentTail = checkTail.state;
              checkTail.shift();
              tailDetails = this.appendTail(checkTail);
              appended = tailDetails.rawInserted === checkTail.toString();
            }
  
            // if ok, rollback state after tail
            if (appended &amp;&amp; tailDetails.inserted) this.state = beforeTailState;
          }
  
          // revert all if something went wrong
          if (!appended) {
            details = new ChangeDetails();
            this.state = consistentState;
            if (checkTail &amp;&amp; consistentTail) checkTail.state = consistentTail;
          }
        }
        return details;
      }
  
      /** Appends optional placeholder at end */
      _appendPlaceholder() {
        return new ChangeDetails();
      }
  
      /** Appends optional eager placeholder at end */
      _appendEager() {
        return new ChangeDetails();
      }
  
      /** Appends symbols considering flags */
      // $FlowFixMe no ideas
      append(str, flags, tail) {
        if (!isString(str)) throw new Error('value should be string');
        const details = new ChangeDetails();
        const checkTail = isString(tail) ? new ContinuousTailDetails(String(tail)) : tail;
        if (flags !== null &amp;&amp; flags !== void 0 &amp;&amp; flags.tail) flags._beforeTailState = this.state;
        for (let ci = 0; ci &lt; str.length; ++ci) {
          const d = this._appendChar(str[ci], flags, checkTail);
          if (!d.rawInserted &amp;&amp; !this.doSkipInvalid(str[ci], flags, checkTail)) break;
          details.aggregate(d);
        }
  
        // append tail but aggregate only tailShift
        if (checkTail != null) {
          details.tailShift += this.appendTail(checkTail).tailShift;
          // TODO it's a good idea to clear state after appending ends
          // but it causes bugs when one append calls another (when dynamic dispatch set rawInputValue)
          // this._resetBeforeTailState();
        }
  
        if ((this.eager === true || this.eager === 'append') &amp;&amp; flags !== null &amp;&amp; flags !== void 0 &amp;&amp; flags.input &amp;&amp; str) {
          details.aggregate(this._appendEager());
        }
        return details;
      }
  
      /** */
      remove() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        this._value = this.value.slice(0, fromPos) + this.value.slice(toPos);
        return new ChangeDetails();
      }
  
      /** Calls function and reapplies current value */
      withValueRefresh(fn) {
        if (this._refreshing || !this.isInitialized) return fn();
        this._refreshing = true;
        const rawInput = this.rawInputValue;
        const value = this.value;
        const ret = fn();
        this.rawInputValue = rawInput;
        // append lost trailing chars at end
        if (this.value &amp;&amp; this.value !== value &amp;&amp; value.indexOf(this.value) === 0) {
          this.append(value.slice(this.value.length), {}, '');
        }
        delete this._refreshing;
        return ret;
      }
  
      /** */
      runIsolated(fn) {
        if (this._isolated || !this.isInitialized) return fn(this);
        this._isolated = true;
        const state = this.state;
        const ret = fn(this);
        this.state = state;
        delete this._isolated;
        return ret;
      }
  
      /** */
      doSkipInvalid(ch) {
        return this.skipInvalid;
      }
  
      /**
        Prepares string before mask processing
        @protected
      */
      doPrepare(str) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        return this.prepare ? this.prepare(str, this, flags) : str;
      }
  
      /**
        Validates if value is acceptable
        @protected
      */
      doValidate(flags) {
        return (!this.validate || this.validate(this.value, this, flags)) &amp;&amp; (!this.parent || this.parent.doValidate(flags));
      }
  
      /**
        Does additional processing in the end of editing
        @protected
      */
      doCommit() {
        if (this.commit) this.commit(this.value, this);
      }
  
      /** */
      doFormat(value) {
        return this.format ? this.format(value, this) : value;
      }
  
      /** */
      doParse(str) {
        return this.parse ? this.parse(str, this) : str;
      }
  
      /** */
      splice(start, deleteCount, inserted, removeDirection) {
        let flags = arguments.length &gt; 4 &amp;&amp; arguments[4] !== undefined ? arguments[4] : {
          input: true
        };
        const tailPos = start + deleteCount;
        const tail = this.extractTail(tailPos);
        const eagerRemove = this.eager === true || this.eager === 'remove';
        let oldRawValue;
        if (eagerRemove) {
          removeDirection = forceDirection(removeDirection);
          oldRawValue = this.extractInput(0, tailPos, {
            raw: true
          });
        }
        let startChangePos = start;
        const details = new ChangeDetails();
  
        // if it is just deletion without insertion
        if (removeDirection !== DIRECTION.NONE) {
          startChangePos = this.nearestInputPos(start, deleteCount &gt; 1 &amp;&amp; start !== 0 &amp;&amp; !eagerRemove ? DIRECTION.NONE : removeDirection);
  
          // adjust tailShift if start was aligned
          details.tailShift = startChangePos - start;
        }
        details.aggregate(this.remove(startChangePos));
        if (eagerRemove &amp;&amp; removeDirection !== DIRECTION.NONE &amp;&amp; oldRawValue === this.rawInputValue) {
          if (removeDirection === DIRECTION.FORCE_LEFT) {
            let valLength;
            while (oldRawValue === this.rawInputValue &amp;&amp; (valLength = this.value.length)) {
              details.aggregate(new ChangeDetails({
                tailShift: -1
              })).aggregate(this.remove(valLength - 1));
            }
          } else if (removeDirection === DIRECTION.FORCE_RIGHT) {
            tail.unshift();
          }
        }
        return details.aggregate(this.append(inserted, flags, tail));
      }
      maskEquals(mask) {
        return this.mask === mask;
      }
      typedValueEquals(value) {
        const tval = this.typedValue;
        return value === tval || Masked.EMPTY_VALUES.includes(value) &amp;&amp; Masked.EMPTY_VALUES.includes(tval) || this.doFormat(value) === this.doFormat(this.typedValue);
      }
    }
    Masked.DEFAULTS = {
      format: String,
      parse: v =&gt; v,
      skipInvalid: true
    };
    Masked.EMPTY_VALUES = [undefined, null, ''];
    IMask.Masked = Masked;
  
    /** Get Masked class by mask type */
    function maskedClass(mask) {
      if (mask == null) {
        throw new Error('mask property should be defined');
      }
  
      // $FlowFixMe
      if (mask instanceof RegExp) return IMask.MaskedRegExp;
      // $FlowFixMe
      if (isString(mask)) return IMask.MaskedPattern;
      // $FlowFixMe
      if (mask instanceof Date || mask === Date) return IMask.MaskedDate;
      // $FlowFixMe
      if (mask instanceof Number || typeof mask === 'number' || mask === Number) return IMask.MaskedNumber;
      // $FlowFixMe
      if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic;
      // $FlowFixMe
      if (IMask.Masked &amp;&amp; mask.prototype instanceof IMask.Masked) return mask;
      // $FlowFixMe
      if (mask instanceof IMask.Masked) return mask.constructor;
      // $FlowFixMe
      if (mask instanceof Function) return IMask.MaskedFunction;
      console.warn('Mask not found for mask', mask); // eslint-disable-line no-console
      // $FlowFixMe
      return IMask.Masked;
    }
  
    /** Creates new {@link Masked} depending on mask type */
    function createMask(opts) {
      // $FlowFixMe
      if (IMask.Masked &amp;&amp; opts instanceof IMask.Masked) return opts;
      opts = Object.assign({}, opts);
      const mask = opts.mask;
  
      // $FlowFixMe
      if (IMask.Masked &amp;&amp; mask instanceof IMask.Masked) return mask;
      const MaskedClass = maskedClass(mask);
      if (!MaskedClass) throw new Error('Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.');
      return new MaskedClass(opts);
    }
    IMask.createMask = createMask;
  
    const _excluded$4 = ["parent", "isOptional", "placeholderChar", "displayChar", "lazy", "eager"];
  
    /** */
  
    const DEFAULT_INPUT_DEFINITIONS = {
      '0': /\d/,
      'a': /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
      // http://stackoverflow.com/a/22075070
      '*': /./
    };
  
    /** */
    class PatternInputDefinition {
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      constructor(opts) {
        const {
            parent,
            isOptional,
            placeholderChar,
            displayChar,
            lazy,
            eager
          } = opts,
          maskOpts = _objectWithoutPropertiesLoose(opts, _excluded$4);
        this.masked = createMask(maskOpts);
        Object.assign(this, {
          parent,
          isOptional,
          placeholderChar,
          displayChar,
          lazy,
          eager
        });
      }
      reset() {
        this.isFilled = false;
        this.masked.reset();
      }
      remove() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        if (fromPos === 0 &amp;&amp; toPos &gt;= 1) {
          this.isFilled = false;
          return this.masked.remove(fromPos, toPos);
        }
        return new ChangeDetails();
      }
      get value() {
        return this.masked.value || (this.isFilled &amp;&amp; !this.isOptional ? this.placeholderChar : '');
      }
      get unmaskedValue() {
        return this.masked.unmaskedValue;
      }
      get displayValue() {
        return this.masked.value &amp;&amp; this.displayChar || this.value;
      }
      get isComplete() {
        return Boolean(this.masked.value) || this.isOptional;
      }
      _appendChar(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        if (this.isFilled) return new ChangeDetails();
        const state = this.masked.state;
        // simulate input
        const details = this.masked._appendChar(ch, flags);
        if (details.inserted &amp;&amp; this.doValidate(flags) === false) {
          details.inserted = details.rawInserted = '';
          this.masked.state = state;
        }
        if (!details.inserted &amp;&amp; !this.isOptional &amp;&amp; !this.lazy &amp;&amp; !flags.input) {
          details.inserted = this.placeholderChar;
        }
        details.skip = !details.inserted &amp;&amp; !this.isOptional;
        this.isFilled = Boolean(details.inserted);
        return details;
      }
      append() {
        // TODO probably should be done via _appendChar
        return this.masked.append(...arguments);
      }
      _appendPlaceholder() {
        const details = new ChangeDetails();
        if (this.isFilled || this.isOptional) return details;
        this.isFilled = true;
        details.inserted = this.placeholderChar;
        return details;
      }
      _appendEager() {
        return new ChangeDetails();
      }
      extractTail() {
        return this.masked.extractTail(...arguments);
      }
      appendTail() {
        return this.masked.appendTail(...arguments);
      }
      extractInput() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        let flags = arguments.length &gt; 2 ? arguments[2] : undefined;
        return this.masked.extractInput(fromPos, toPos, flags);
      }
      nearestInputPos(cursorPos) {
        let direction = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;
        const minPos = 0;
        const maxPos = this.value.length;
        const boundPos = Math.min(Math.max(cursorPos, minPos), maxPos);
        switch (direction) {
          case DIRECTION.LEFT:
          case DIRECTION.FORCE_LEFT:
            return this.isComplete ? boundPos : minPos;
          case DIRECTION.RIGHT:
          case DIRECTION.FORCE_RIGHT:
            return this.isComplete ? boundPos : maxPos;
          case DIRECTION.NONE:
          default:
            return boundPos;
        }
      }
      totalInputPositions() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        return this.value.slice(fromPos, toPos).length;
      }
      doValidate() {
        return this.masked.doValidate(...arguments) &amp;&amp; (!this.parent || this.parent.doValidate(...arguments));
      }
      doCommit() {
        this.masked.doCommit();
      }
      get state() {
        return {
          masked: this.masked.state,
          isFilled: this.isFilled
        };
      }
      set state(state) {
        this.masked.state = state.masked;
        this.isFilled = state.isFilled;
      }
    }
  
    /** */
  
    class PatternFixedDefinition {
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      /** */
  
      constructor(opts) {
        Object.assign(this, opts);
        this._value = '';
        this.isFixed = true;
      }
      get value() {
        return this._value;
      }
      get unmaskedValue() {
        return this.isUnmasking ? this.value : '';
      }
      get displayValue() {
        return this.value;
      }
      reset() {
        this._isRawInput = false;
        this._value = '';
      }
      remove() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this._value.length;
        this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);
        if (!this._value) this._isRawInput = false;
        return new ChangeDetails();
      }
      nearestInputPos(cursorPos) {
        let direction = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;
        const minPos = 0;
        const maxPos = this._value.length;
        switch (direction) {
          case DIRECTION.LEFT:
          case DIRECTION.FORCE_LEFT:
            return minPos;
          case DIRECTION.NONE:
          case DIRECTION.RIGHT:
          case DIRECTION.FORCE_RIGHT:
          default:
            return maxPos;
        }
      }
      totalInputPositions() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this._value.length;
        return this._isRawInput ? toPos - fromPos : 0;
      }
      extractInput() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this._value.length;
        let flags = arguments.length &gt; 2 &amp;&amp; arguments[2] !== undefined ? arguments[2] : {};
        return flags.raw &amp;&amp; this._isRawInput &amp;&amp; this._value.slice(fromPos, toPos) || '';
      }
      get isComplete() {
        return true;
      }
      get isFilled() {
        return Boolean(this._value);
      }
      _appendChar(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        const details = new ChangeDetails();
        if (this.isFilled) return details;
        const appendEager = this.eager === true || this.eager === 'append';
        const appended = this.char === ch;
        const isResolved = appended &amp;&amp; (this.isUnmasking || flags.input || flags.raw) &amp;&amp; (!flags.raw || !appendEager) &amp;&amp; !flags.tail;
        if (isResolved) details.rawInserted = this.char;
        this._value = details.inserted = this.char;
        this._isRawInput = isResolved &amp;&amp; (flags.raw || flags.input);
        return details;
      }
      _appendEager() {
        return this._appendChar(this.char, {
          tail: true
        });
      }
      _appendPlaceholder() {
        const details = new ChangeDetails();
        if (this.isFilled) return details;
        this._value = details.inserted = this.char;
        return details;
      }
      extractTail() {
        arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        return new ContinuousTailDetails('');
      }
  
      // $FlowFixMe no ideas
      appendTail(tail) {
        if (isString(tail)) tail = new ContinuousTailDetails(String(tail));
        return tail.appendTo(this);
      }
      append(str, flags, tail) {
        const details = this._appendChar(str[0], flags);
        if (tail != null) {
          details.tailShift += this.appendTail(tail).tailShift;
        }
        return details;
      }
      doCommit() {}
      get state() {
        return {
          _value: this._value,
          _isRawInput: this._isRawInput
        };
      }
      set state(state) {
        Object.assign(this, state);
      }
    }
  
    const _excluded$3 = ["chunks"];
    class ChunksTailDetails {
      /** */
  
      constructor() {
        let chunks = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : [];
        let from = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : 0;
        this.chunks = chunks;
        this.from = from;
      }
      toString() {
        return this.chunks.map(String).join('');
      }
  
      // $FlowFixMe no ideas
      extend(tailChunk) {
        if (!String(tailChunk)) return;
        if (isString(tailChunk)) tailChunk = new ContinuousTailDetails(String(tailChunk));
        const lastChunk = this.chunks[this.chunks.length - 1];
        const extendLast = lastChunk &amp;&amp; (
        // if stops are same or tail has no stop
        lastChunk.stop === tailChunk.stop || tailChunk.stop == null) &amp;&amp;
        // if tail chunk goes just after last chunk
        tailChunk.from === lastChunk.from + lastChunk.toString().length;
        if (tailChunk instanceof ContinuousTailDetails) {
          // check the ability to extend previous chunk
          if (extendLast) {
            // extend previous chunk
            lastChunk.extend(tailChunk.toString());
          } else {
            // append new chunk
            this.chunks.push(tailChunk);
          }
        } else if (tailChunk instanceof ChunksTailDetails) {
          if (tailChunk.stop == null) {
            // unwrap floating chunks to parent, keeping `from` pos
            let firstTailChunk;
            while (tailChunk.chunks.length &amp;&amp; tailChunk.chunks[0].stop == null) {
              firstTailChunk = tailChunk.chunks.shift();
              firstTailChunk.from += tailChunk.from;
              this.extend(firstTailChunk);
            }
          }
  
          // if tail chunk still has value
          if (tailChunk.toString()) {
            // if chunks contains stops, then popup stop to container
            tailChunk.stop = tailChunk.blockIndex;
            this.chunks.push(tailChunk);
          }
        }
      }
      appendTo(masked) {
        // $FlowFixMe
        if (!(masked instanceof IMask.MaskedPattern)) {
          const tail = new ContinuousTailDetails(this.toString());
          return tail.appendTo(masked);
        }
        const details = new ChangeDetails();
        for (let ci = 0; ci &lt; this.chunks.length &amp;&amp; !details.skip; ++ci) {
          const chunk = this.chunks[ci];
          const lastBlockIter = masked._mapPosToBlock(masked.value.length);
          const stop = chunk.stop;
          let chunkBlock;
          if (stop != null &amp;&amp; (
          // if block not found or stop is behind lastBlock
          !lastBlockIter || lastBlockIter.index &lt;= stop)) {
            if (chunk instanceof ChunksTailDetails ||
            // for continuous block also check if stop is exist
            masked._stops.indexOf(stop) &gt;= 0) {
              const phDetails = masked._appendPlaceholder(stop);
              details.aggregate(phDetails);
            }
            chunkBlock = chunk instanceof ChunksTailDetails &amp;&amp; masked._blocks[stop];
          }
          if (chunkBlock) {
            const tailDetails = chunkBlock.appendTail(chunk);
            tailDetails.skip = false; // always ignore skip, it will be set on last
            details.aggregate(tailDetails);
            masked._value += tailDetails.inserted;
  
            // get not inserted chars
            const remainChars = chunk.toString().slice(tailDetails.rawInserted.length);
            if (remainChars) details.aggregate(masked.append(remainChars, {
              tail: true
            }));
          } else {
            details.aggregate(masked.append(chunk.toString(), {
              tail: true
            }));
          }
        }
        return details;
      }
      get state() {
        return {
          chunks: this.chunks.map(c =&gt; c.state),
          from: this.from,
          stop: this.stop,
          blockIndex: this.blockIndex
        };
      }
      set state(state) {
        const {
            chunks
          } = state,
          props = _objectWithoutPropertiesLoose(state, _excluded$3);
        Object.assign(this, props);
        this.chunks = chunks.map(cstate =&gt; {
          const chunk = "chunks" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails();
          // $FlowFixMe already checked above
          chunk.state = cstate;
          return chunk;
        });
      }
      unshift(beforePos) {
        if (!this.chunks.length || beforePos != null &amp;&amp; this.from &gt;= beforePos) return '';
        const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;
        let ci = 0;
        while (ci &lt; this.chunks.length) {
          const chunk = this.chunks[ci];
          const shiftChar = chunk.unshift(chunkShiftPos);
          if (chunk.toString()) {
            // chunk still contains value
            // but not shifted - means no more available chars to shift
            if (!shiftChar) break;
            ++ci;
          } else {
            // clean if chunk has no value
            this.chunks.splice(ci, 1);
          }
          if (shiftChar) return shiftChar;
        }
        return '';
      }
      shift() {
        if (!this.chunks.length) return '';
        let ci = this.chunks.length - 1;
        while (0 &lt;= ci) {
          const chunk = this.chunks[ci];
          const shiftChar = chunk.shift();
          if (chunk.toString()) {
            // chunk still contains value
            // but not shifted - means no more available chars to shift
            if (!shiftChar) break;
            --ci;
          } else {
            // clean if chunk has no value
            this.chunks.splice(ci, 1);
          }
          if (shiftChar) return shiftChar;
        }
        return '';
      }
    }
  
    class PatternCursor {
      constructor(masked, pos) {
        this.masked = masked;
        this._log = [];
        const {
          offset,
          index
        } = masked._mapPosToBlock(pos) || (pos &lt; 0 ?
        // first
        {
          index: 0,
          offset: 0
        } :
        // last
        {
          index: this.masked._blocks.length,
          offset: 0
        });
        this.offset = offset;
        this.index = index;
        this.ok = false;
      }
      get block() {
        return this.masked._blocks[this.index];
      }
      get pos() {
        return this.masked._blockStartPos(this.index) + this.offset;
      }
      get state() {
        return {
          index: this.index,
          offset: this.offset,
          ok: this.ok
        };
      }
      set state(s) {
        Object.assign(this, s);
      }
      pushState() {
        this._log.push(this.state);
      }
      popState() {
        const s = this._log.pop();
        this.state = s;
        return s;
      }
      bindBlock() {
        if (this.block) return;
        if (this.index &lt; 0) {
          this.index = 0;
          this.offset = 0;
        }
        if (this.index &gt;= this.masked._blocks.length) {
          this.index = this.masked._blocks.length - 1;
          this.offset = this.block.value.length;
        }
      }
      _pushLeft(fn) {
        this.pushState();
        for (this.bindBlock(); 0 &lt;= this.index; --this.index, this.offset = ((_this$block = this.block) === null || _this$block === void 0 ? void 0 : _this$block.value.length) || 0) {
          var _this$block;
          if (fn()) return this.ok = true;
        }
        return this.ok = false;
      }
      _pushRight(fn) {
        this.pushState();
        for (this.bindBlock(); this.index &lt; this.masked._blocks.length; ++this.index, this.offset = 0) {
          if (fn()) return this.ok = true;
        }
        return this.ok = false;
      }
      pushLeftBeforeFilled() {
        return this._pushLeft(() =&gt; {
          if (this.block.isFixed || !this.block.value) return;
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);
          if (this.offset !== 0) return true;
        });
      }
      pushLeftBeforeInput() {
        // cases:
        // filled input: 00|
        // optional empty input: 00[]|
        // nested block: XX&lt;[]&gt;|
        return this._pushLeft(() =&gt; {
          if (this.block.isFixed) return;
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);
          return true;
        });
      }
      pushLeftBeforeRequired() {
        return this._pushLeft(() =&gt; {
          if (this.block.isFixed || this.block.isOptional &amp;&amp; !this.block.value) return;
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);
          return true;
        });
      }
      pushRightBeforeFilled() {
        return this._pushRight(() =&gt; {
          if (this.block.isFixed || !this.block.value) return;
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);
          if (this.offset !== this.block.value.length) return true;
        });
      }
      pushRightBeforeInput() {
        return this._pushRight(() =&gt; {
          if (this.block.isFixed) return;
  
          // const o = this.offset;
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);
          // HACK cases like (STILL DOES NOT WORK FOR NESTED)
          // aa|X
          // aa&lt;X|[]&gt;X_    - this will not work
          // if (o &amp;&amp; o === this.offset &amp;&amp; this.block instanceof PatternInputDefinition) continue;
          return true;
        });
      }
      pushRightBeforeRequired() {
        return this._pushRight(() =&gt; {
          if (this.block.isFixed || this.block.isOptional &amp;&amp; !this.block.value) return;
  
          // TODO check |[*]XX_
          this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);
          return true;
        });
      }
    }
  
    /** Masking by RegExp */
    class MaskedRegExp extends Masked {
      /**
        @override
        @param {Object} opts
      */
      _update(opts) {
        if (opts.mask) opts.validate = value =&gt; value.search(opts.mask) &gt;= 0;
        super._update(opts);
      }
    }
    IMask.MaskedRegExp = MaskedRegExp;
  
    const _excluded$2 = ["_blocks"];
  
    /**
      Pattern mask
      @param {Object} opts
      @param {Object} opts.blocks
      @param {Object} opts.definitions
      @param {string} opts.placeholderChar
      @param {string} opts.displayChar
      @param {boolean} opts.lazy
    */
    class MaskedPattern extends Masked {
      /** */
  
      /** */
  
      /** Single char for empty input */
  
      /** Single char for filled input */
  
      /** Show placeholder only when needed */
  
      constructor() {
        let opts = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : {};
        // TODO type $Shape&lt;MaskedPatternOptions&gt;={} does not work
        opts.definitions = Object.assign({}, DEFAULT_INPUT_DEFINITIONS, opts.definitions);
        super(Object.assign({}, MaskedPattern.DEFAULTS, opts));
      }
  
      /**
        @override
        @param {Object} opts
      */
      _update() {
        let opts = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : {};
        opts.definitions = Object.assign({}, this.definitions, opts.definitions);
        super._update(opts);
        this._rebuildMask();
      }
  
      /** */
      _rebuildMask() {
        const defs = this.definitions;
        this._blocks = [];
        this._stops = [];
        this._maskedBlocks = {};
        let pattern = this.mask;
        if (!pattern || !defs) return;
        let unmaskingBlock = false;
        let optionalBlock = false;
        for (let i = 0; i &lt; pattern.length; ++i) {
          var _defs$char, _defs$char2;
          if (this.blocks) {
            const p = pattern.slice(i);
            const bNames = Object.keys(this.blocks).filter(bName =&gt; p.indexOf(bName) === 0);
            // order by key length
            bNames.sort((a, b) =&gt; b.length - a.length);
            // use block name with max length
            const bName = bNames[0];
            if (bName) {
              // $FlowFixMe no ideas
              const maskedBlock = createMask(Object.assign({
                parent: this,
                lazy: this.lazy,
                eager: this.eager,
                placeholderChar: this.placeholderChar,
                displayChar: this.displayChar,
                overwrite: this.overwrite
              }, this.blocks[bName]));
              if (maskedBlock) {
                this._blocks.push(maskedBlock);
  
                // store block index
                if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = [];
                this._maskedBlocks[bName].push(this._blocks.length - 1);
              }
              i += bName.length - 1;
              continue;
            }
          }
          let char = pattern[i];
          let isInput = (char in defs);
          if (char === MaskedPattern.STOP_CHAR) {
            this._stops.push(this._blocks.length);
            continue;
          }
          if (char === '{' || char === '}') {
            unmaskingBlock = !unmaskingBlock;
            continue;
          }
          if (char === '[' || char === ']') {
            optionalBlock = !optionalBlock;
            continue;
          }
          if (char === MaskedPattern.ESCAPE_CHAR) {
            ++i;
            char = pattern[i];
            if (!char) break;
            isInput = false;
          }
          const maskOpts = (_defs$char = defs[char]) !== null &amp;&amp; _defs$char !== void 0 &amp;&amp; _defs$char.mask &amp;&amp; !(((_defs$char2 = defs[char]) === null || _defs$char2 === void 0 ? void 0 : _defs$char2.mask.prototype) instanceof IMask.Masked) ? defs[char] : {
            mask: defs[char]
          };
          const def = isInput ? new PatternInputDefinition(Object.assign({
            parent: this,
            isOptional: optionalBlock,
            lazy: this.lazy,
            eager: this.eager,
            placeholderChar: this.placeholderChar,
            displayChar: this.displayChar
          }, maskOpts)) : new PatternFixedDefinition({
            char,
            eager: this.eager,
            isUnmasking: unmaskingBlock
          });
          this._blocks.push(def);
        }
      }
  
      /**
        @override
      */
      get state() {
        return Object.assign({}, super.state, {
          _blocks: this._blocks.map(b =&gt; b.state)
        });
      }
      set state(state) {
        const {
            _blocks
          } = state,
          maskedState = _objectWithoutPropertiesLoose(state, _excluded$2);
        this._blocks.forEach((b, bi) =&gt; b.state = _blocks[bi]);
        super.state = maskedState;
      }
  
      /**
        @override
      */
      reset() {
        super.reset();
        this._blocks.forEach(b =&gt; b.reset());
      }
  
      /**
        @override
      */
      get isComplete() {
        return this._blocks.every(b =&gt; b.isComplete);
      }
  
      /**
        @override
      */
      get isFilled() {
        return this._blocks.every(b =&gt; b.isFilled);
      }
      get isFixed() {
        return this._blocks.every(b =&gt; b.isFixed);
      }
      get isOptional() {
        return this._blocks.every(b =&gt; b.isOptional);
      }
  
      /**
        @override
      */
      doCommit() {
        this._blocks.forEach(b =&gt; b.doCommit());
        super.doCommit();
      }
  
      /**
        @override
      */
      get unmaskedValue() {
        return this._blocks.reduce((str, b) =&gt; str += b.unmaskedValue, '');
      }
      set unmaskedValue(unmaskedValue) {
        super.unmaskedValue = unmaskedValue;
      }
  
      /**
        @override
      */
      get value() {
        // TODO return _value when not in change?
        return this._blocks.reduce((str, b) =&gt; str += b.value, '');
      }
      set value(value) {
        super.value = value;
      }
      get displayValue() {
        return this._blocks.reduce((str, b) =&gt; str += b.displayValue, '');
      }
  
      /**
        @override
      */
      appendTail(tail) {
        return super.appendTail(tail).aggregate(this._appendPlaceholder());
      }
  
      /**
        @override
      */
      _appendEager() {
        var _this$_mapPosToBlock;
        const details = new ChangeDetails();
        let startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.value.length)) === null || _this$_mapPosToBlock === void 0 ? void 0 : _this$_mapPosToBlock.index;
        if (startBlockIndex == null) return details;
  
        // TODO test if it works for nested pattern masks
        if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;
        for (let bi = startBlockIndex; bi &lt; this._blocks.length; ++bi) {
          const d = this._blocks[bi]._appendEager();
          if (!d.inserted) break;
          details.aggregate(d);
        }
        return details;
      }
  
      /**
        @override
      */
      _appendCharRaw(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        const blockIter = this._mapPosToBlock(this.value.length);
        const details = new ChangeDetails();
        if (!blockIter) return details;
        for (let bi = blockIter.index;; ++bi) {
          var _flags$_beforeTailSta, _flags$_beforeTailSta2;
          const block = this._blocks[bi];
          if (!block) break;
          const blockDetails = block._appendChar(ch, Object.assign({}, flags, {
            _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) === null || _flags$_beforeTailSta === void 0 ? void 0 : (_flags$_beforeTailSta2 = _flags$_beforeTailSta._blocks) === null || _flags$_beforeTailSta2 === void 0 ? void 0 : _flags$_beforeTailSta2[bi]
          }));
          const skip = blockDetails.skip;
          details.aggregate(blockDetails);
          if (skip || blockDetails.rawInserted) break; // go next char
        }
  
        return details;
      }
  
      /**
        @override
      */
      extractTail() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        const chunkTail = new ChunksTailDetails();
        if (fromPos === toPos) return chunkTail;
        this._forEachBlocksInRange(fromPos, toPos, (b, bi, bFromPos, bToPos) =&gt; {
          const blockChunk = b.extractTail(bFromPos, bToPos);
          blockChunk.stop = this._findStopBefore(bi);
          blockChunk.from = this._blockStartPos(bi);
          if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;
          chunkTail.extend(blockChunk);
        });
        return chunkTail;
      }
  
      /**
        @override
      */
      extractInput() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        let flags = arguments.length &gt; 2 &amp;&amp; arguments[2] !== undefined ? arguments[2] : {};
        if (fromPos === toPos) return '';
        let input = '';
        this._forEachBlocksInRange(fromPos, toPos, (b, _, fromPos, toPos) =&gt; {
          input += b.extractInput(fromPos, toPos, flags);
        });
        return input;
      }
      _findStopBefore(blockIndex) {
        let stopBefore;
        for (let si = 0; si &lt; this._stops.length; ++si) {
          const stop = this._stops[si];
          if (stop &lt;= blockIndex) stopBefore = stop;else break;
        }
        return stopBefore;
      }
  
      /** Appends placeholder depending on laziness */
      _appendPlaceholder(toBlockIndex) {
        const details = new ChangeDetails();
        if (this.lazy &amp;&amp; toBlockIndex == null) return details;
        const startBlockIter = this._mapPosToBlock(this.value.length);
        if (!startBlockIter) return details;
        const startBlockIndex = startBlockIter.index;
        const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;
        this._blocks.slice(startBlockIndex, endBlockIndex).forEach(b =&gt; {
          if (!b.lazy || toBlockIndex != null) {
            // $FlowFixMe `_blocks` may not be present
            const args = b._blocks != null ? [b._blocks.length] : [];
            const bDetails = b._appendPlaceholder(...args);
            this._value += bDetails.inserted;
            details.aggregate(bDetails);
          }
        });
        return details;
      }
  
      /** Finds block in pos */
      _mapPosToBlock(pos) {
        let accVal = '';
        for (let bi = 0; bi &lt; this._blocks.length; ++bi) {
          const block = this._blocks[bi];
          const blockStartPos = accVal.length;
          accVal += block.value;
          if (pos &lt;= accVal.length) {
            return {
              index: bi,
              offset: pos - blockStartPos
            };
          }
        }
      }
  
      /** */
      _blockStartPos(blockIndex) {
        return this._blocks.slice(0, blockIndex).reduce((pos, b) =&gt; pos += b.value.length, 0);
      }
  
      /** */
      _forEachBlocksInRange(fromPos) {
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        let fn = arguments.length &gt; 2 ? arguments[2] : undefined;
        const fromBlockIter = this._mapPosToBlock(fromPos);
        if (fromBlockIter) {
          const toBlockIter = this._mapPosToBlock(toPos);
          // process first block
          const isSameBlock = toBlockIter &amp;&amp; fromBlockIter.index === toBlockIter.index;
          const fromBlockStartPos = fromBlockIter.offset;
          const fromBlockEndPos = toBlockIter &amp;&amp; isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].value.length;
          fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);
          if (toBlockIter &amp;&amp; !isSameBlock) {
            // process intermediate blocks
            for (let bi = fromBlockIter.index + 1; bi &lt; toBlockIter.index; ++bi) {
              fn(this._blocks[bi], bi, 0, this._blocks[bi].value.length);
            }
  
            // process last block
            fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);
          }
        }
      }
  
      /**
        @override
      */
      remove() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        const removeDetails = super.remove(fromPos, toPos);
        this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) =&gt; {
          removeDetails.aggregate(b.remove(bFromPos, bToPos));
        });
        return removeDetails;
      }
  
      /**
        @override
      */
      nearestInputPos(cursorPos) {
        let direction = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : DIRECTION.NONE;
        if (!this._blocks.length) return 0;
        const cursor = new PatternCursor(this, cursorPos);
        if (direction === DIRECTION.NONE) {
          // -------------------------------------------------
          // NONE should only go out from fixed to the right!
          // -------------------------------------------------
          if (cursor.pushRightBeforeInput()) return cursor.pos;
          cursor.popState();
          if (cursor.pushLeftBeforeInput()) return cursor.pos;
          return this.value.length;
        }
  
        // FORCE is only about a|* otherwise is 0
        if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) {
          // try to break fast when *|a
          if (direction === DIRECTION.LEFT) {
            cursor.pushRightBeforeFilled();
            if (cursor.ok &amp;&amp; cursor.pos === cursorPos) return cursorPos;
            cursor.popState();
          }
  
          // forward flow
          cursor.pushLeftBeforeInput();
          cursor.pushLeftBeforeRequired();
          cursor.pushLeftBeforeFilled();
  
          // backward flow
          if (direction === DIRECTION.LEFT) {
            cursor.pushRightBeforeInput();
            cursor.pushRightBeforeRequired();
            if (cursor.ok &amp;&amp; cursor.pos &lt;= cursorPos) return cursor.pos;
            cursor.popState();
            if (cursor.ok &amp;&amp; cursor.pos &lt;= cursorPos) return cursor.pos;
            cursor.popState();
          }
          if (cursor.ok) return cursor.pos;
          if (direction === DIRECTION.FORCE_LEFT) return 0;
          cursor.popState();
          if (cursor.ok) return cursor.pos;
          cursor.popState();
          if (cursor.ok) return cursor.pos;
  
          // cursor.popState();
          // if (
          //   cursor.pushRightBeforeInput() &amp;&amp;
          //   // TODO HACK for lazy if has aligned left inside fixed and has came to the start - use start position
          //   (!this.lazy || this.extractInput())
          // ) return cursor.pos;
  
          return 0;
        }
        if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) {
          // forward flow
          cursor.pushRightBeforeInput();
          cursor.pushRightBeforeRequired();
          if (cursor.pushRightBeforeFilled()) return cursor.pos;
          if (direction === DIRECTION.FORCE_RIGHT) return this.value.length;
  
          // backward flow
          cursor.popState();
          if (cursor.ok) return cursor.pos;
          cursor.popState();
          if (cursor.ok) return cursor.pos;
          return this.nearestInputPos(cursorPos, DIRECTION.LEFT);
        }
        return cursorPos;
      }
  
      /**
        @override
      */
      totalInputPositions() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        let total = 0;
        this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) =&gt; {
          total += b.totalInputPositions(bFromPos, bToPos);
        });
        return total;
      }
  
      /** Get block by name */
      maskedBlock(name) {
        return this.maskedBlocks(name)[0];
      }
  
      /** Get all blocks by name */
      maskedBlocks(name) {
        const indices = this._maskedBlocks[name];
        if (!indices) return [];
        return indices.map(gi =&gt; this._blocks[gi]);
      }
    }
    MaskedPattern.DEFAULTS = {
      lazy: true,
      placeholderChar: '_'
    };
    MaskedPattern.STOP_CHAR = '`';
    MaskedPattern.ESCAPE_CHAR = '\\';
    MaskedPattern.InputDefinition = PatternInputDefinition;
    MaskedPattern.FixedDefinition = PatternFixedDefinition;
    IMask.MaskedPattern = MaskedPattern;
  
    /** Pattern which accepts ranges */
    class MaskedRange extends MaskedPattern {
      /**
        Optionally sets max length of pattern.
        Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
      */
  
      /** Min bound */
  
      /** Max bound */
  
      /** */
  
      get _matchFrom() {
        return this.maxLength - String(this.from).length;
      }
  
      /**
        @override
      */
      _update(opts) {
        // TODO type
        opts = Object.assign({
          to: this.to || 0,
          from: this.from || 0,
          maxLength: this.maxLength || 0
        }, opts);
        let maxLength = String(opts.to).length;
        if (opts.maxLength != null) maxLength = Math.max(maxLength, opts.maxLength);
        opts.maxLength = maxLength;
        const fromStr = String(opts.from).padStart(maxLength, '0');
        const toStr = String(opts.to).padStart(maxLength, '0');
        let sameCharsCount = 0;
        while (sameCharsCount &lt; toStr.length &amp;&amp; toStr[sameCharsCount] === fromStr[sameCharsCount]) ++sameCharsCount;
        opts.mask = toStr.slice(0, sameCharsCount).replace(/0/g, '\\0') + '0'.repeat(maxLength - sameCharsCount);
        super._update(opts);
      }
  
      /**
        @override
      */
      get isComplete() {
        return super.isComplete &amp;&amp; Boolean(this.value);
      }
      boundaries(str) {
        let minstr = '';
        let maxstr = '';
        const [, placeholder, num] = str.match(/^(\D*)(\d*)(\D*)/) || [];
        if (num) {
          minstr = '0'.repeat(placeholder.length) + num;
          maxstr = '9'.repeat(placeholder.length) + num;
        }
        minstr = minstr.padEnd(this.maxLength, '0');
        maxstr = maxstr.padEnd(this.maxLength, '9');
        return [minstr, maxstr];
      }
  
      // TODO str is a single char everytime
      /**
        @override
      */
      doPrepare(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let details;
        [ch, details] = normalizePrepare(super.doPrepare(ch.replace(/\D/g, ''), flags));
        if (!this.autofix || !ch) return ch;
        const fromStr = String(this.from).padStart(this.maxLength, '0');
        const toStr = String(this.to).padStart(this.maxLength, '0');
        let nextVal = this.value + ch;
        if (nextVal.length &gt; this.maxLength) return '';
        const [minstr, maxstr] = this.boundaries(nextVal);
        if (Number(maxstr) &lt; this.from) return fromStr[nextVal.length - 1];
        if (Number(minstr) &gt; this.to) {
          if (this.autofix === 'pad' &amp;&amp; nextVal.length &lt; this.maxLength) {
            return ['', details.aggregate(this.append(fromStr[nextVal.length - 1] + ch, flags))];
          }
          return toStr[nextVal.length - 1];
        }
        return ch;
      }
  
      /**
        @override
      */
      doValidate() {
        const str = this.value;
        const firstNonZero = str.search(/[^0]/);
        if (firstNonZero === -1 &amp;&amp; str.length &lt;= this._matchFrom) return true;
        const [minstr, maxstr] = this.boundaries(str);
        return this.from &lt;= Number(maxstr) &amp;&amp; Number(minstr) &lt;= this.to &amp;&amp; super.doValidate(...arguments);
      }
    }
    IMask.MaskedRange = MaskedRange;
  
    /** Date mask */
    class MaskedDate extends MaskedPattern {
      /** Pattern mask for date according to {@link MaskedDate#format} */
  
      /** Start date */
  
      /** End date */
  
      /** */
  
      /**
        @param {Object} opts
      */
      constructor(opts) {
        super(Object.assign({}, MaskedDate.DEFAULTS, opts));
      }
  
      /**
        @override
      */
      _update(opts) {
        if (opts.mask === Date) delete opts.mask;
        if (opts.pattern) opts.mask = opts.pattern;
        const blocks = opts.blocks;
        opts.blocks = Object.assign({}, MaskedDate.GET_DEFAULT_BLOCKS());
        // adjust year block
        if (opts.min) opts.blocks.Y.from = opts.min.getFullYear();
        if (opts.max) opts.blocks.Y.to = opts.max.getFullYear();
        if (opts.min &amp;&amp; opts.max &amp;&amp; opts.blocks.Y.from === opts.blocks.Y.to) {
          opts.blocks.m.from = opts.min.getMonth() + 1;
          opts.blocks.m.to = opts.max.getMonth() + 1;
          if (opts.blocks.m.from === opts.blocks.m.to) {
            opts.blocks.d.from = opts.min.getDate();
            opts.blocks.d.to = opts.max.getDate();
          }
        }
        Object.assign(opts.blocks, this.blocks, blocks);
  
        // add autofix
        Object.keys(opts.blocks).forEach(bk =&gt; {
          const b = opts.blocks[bk];
          if (!('autofix' in b) &amp;&amp; 'autofix' in opts) b.autofix = opts.autofix;
        });
        super._update(opts);
      }
  
      /**
        @override
      */
      doValidate() {
        const date = this.date;
        return super.doValidate(...arguments) &amp;&amp; (!this.isComplete || this.isDateExist(this.value) &amp;&amp; date != null &amp;&amp; (this.min == null || this.min &lt;= date) &amp;&amp; (this.max == null || date &lt;= this.max));
      }
  
      /** Checks if date is exists */
      isDateExist(str) {
        return this.format(this.parse(str, this), this).indexOf(str) &gt;= 0;
      }
  
      /** Parsed Date */
      get date() {
        return this.typedValue;
      }
      set date(date) {
        this.typedValue = date;
      }
  
      /**
        @override
      */
      get typedValue() {
        return this.isComplete ? super.typedValue : null;
      }
      set typedValue(value) {
        super.typedValue = value;
      }
  
      /**
        @override
      */
      maskEquals(mask) {
        return mask === Date || super.maskEquals(mask);
      }
    }
    MaskedDate.DEFAULTS = {
      pattern: 'd{.}`m{.}`Y',
      format: date =&gt; {
        if (!date) return '';
        const day = String(date.getDate()).padStart(2, '0');
        const month = String(date.getMonth() + 1).padStart(2, '0');
        const year = date.getFullYear();
        return [day, month, year].join('.');
      },
      parse: str =&gt; {
        const [day, month, year] = str.split('.');
        return new Date(year, month - 1, day);
      }
    };
    MaskedDate.GET_DEFAULT_BLOCKS = () =&gt; ({
      d: {
        mask: MaskedRange,
        from: 1,
        to: 31,
        maxLength: 2
      },
      m: {
        mask: MaskedRange,
        from: 1,
        to: 12,
        maxLength: 2
      },
      Y: {
        mask: MaskedRange,
        from: 1900,
        to: 9999
      }
    });
    IMask.MaskedDate = MaskedDate;
  
    /**
      Generic element API to use with mask
      @interface
    */
    class MaskElement {
      /** */
  
      /** */
  
      /** */
  
      /** Safely returns selection start */
      get selectionStart() {
        let start;
        try {
          start = this._unsafeSelectionStart;
        } catch (e) {}
        return start != null ? start : this.value.length;
      }
  
      /** Safely returns selection end */
      get selectionEnd() {
        let end;
        try {
          end = this._unsafeSelectionEnd;
        } catch (e) {}
        return end != null ? end : this.value.length;
      }
  
      /** Safely sets element selection */
      select(start, end) {
        if (start == null || end == null || start === this.selectionStart &amp;&amp; end === this.selectionEnd) return;
        try {
          this._unsafeSelect(start, end);
        } catch (e) {}
      }
  
      /** Should be overriden in subclasses */
      _unsafeSelect(start, end) {}
      /** Should be overriden in subclasses */
      get isActive() {
        return false;
      }
      /** Should be overriden in subclasses */
      bindEvents(handlers) {}
      /** Should be overriden in subclasses */
      unbindEvents() {}
    }
    IMask.MaskElement = MaskElement;
  
    /** Bridge between HTMLElement and {@link Masked} */
    class HTMLMaskElement extends MaskElement {
      /** Mapping between HTMLElement events and mask internal events */
  
      /** HTMLElement to use mask on */
  
      /**
        @param {HTMLInputElement|HTMLTextAreaElement} input
      */
      constructor(input) {
        super();
        this.input = input;
        this._handlers = {};
      }
  
      /** */
      // $FlowFixMe https://github.com/facebook/flow/issues/2839
      get rootElement() {
        var _this$input$getRootNo, _this$input$getRootNo2, _this$input;
        return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) === null || _this$input$getRootNo2 === void 0 ? void 0 : _this$input$getRootNo2.call(_this$input)) !== null &amp;&amp; _this$input$getRootNo !== void 0 ? _this$input$getRootNo : document;
      }
  
      /**
        Is element in focus
        @readonly
      */
      get isActive() {
        //$FlowFixMe
        return this.input === this.rootElement.activeElement;
      }
  
      /**
        Returns HTMLElement selection start
        @override
      */
      get _unsafeSelectionStart() {
        return this.input.selectionStart;
      }
  
      /**
        Returns HTMLElement selection end
        @override
      */
      get _unsafeSelectionEnd() {
        return this.input.selectionEnd;
      }
  
      /**
        Sets HTMLElement selection
        @override
      */
      _unsafeSelect(start, end) {
        this.input.setSelectionRange(start, end);
      }
  
      /**
        HTMLElement value
        @override
      */
      get value() {
        return this.input.value;
      }
      set value(value) {
        this.input.value = value;
      }
  
      /**
        Binds HTMLElement events to mask internal events
        @override
      */
      bindEvents(handlers) {
        Object.keys(handlers).forEach(event =&gt; this._toggleEventHandler(HTMLMaskElement.EVENTS_MAP[event], handlers[event]));
      }
  
      /**
        Unbinds HTMLElement events to mask internal events
        @override
      */
      unbindEvents() {
        Object.keys(this._handlers).forEach(event =&gt; this._toggleEventHandler(event));
      }
  
      /** */
      _toggleEventHandler(event, handler) {
        if (this._handlers[event]) {
          this.input.removeEventListener(event, this._handlers[event]);
          delete this._handlers[event];
        }
        if (handler) {
          this.input.addEventListener(event, handler);
          this._handlers[event] = handler;
        }
      }
    }
    HTMLMaskElement.EVENTS_MAP = {
      selectionChange: 'keydown',
      input: 'input',
      drop: 'drop',
      click: 'click',
      focus: 'focus',
      commit: 'blur'
    };
    IMask.HTMLMaskElement = HTMLMaskElement;
  
    class HTMLContenteditableMaskElement extends HTMLMaskElement {
      /**
        Returns HTMLElement selection start
        @override
      */
      get _unsafeSelectionStart() {
        const root = this.rootElement;
        const selection = root.getSelection &amp;&amp; root.getSelection();
        const anchorOffset = selection &amp;&amp; selection.anchorOffset;
        const focusOffset = selection &amp;&amp; selection.focusOffset;
        if (focusOffset == null || anchorOffset == null || anchorOffset &lt; focusOffset) {
          return anchorOffset;
        }
        return focusOffset;
      }
  
      /**
        Returns HTMLElement selection end
        @override
      */
      get _unsafeSelectionEnd() {
        const root = this.rootElement;
        const selection = root.getSelection &amp;&amp; root.getSelection();
        const anchorOffset = selection &amp;&amp; selection.anchorOffset;
        const focusOffset = selection &amp;&amp; selection.focusOffset;
        if (focusOffset == null || anchorOffset == null || anchorOffset &gt; focusOffset) {
          return anchorOffset;
        }
        return focusOffset;
      }
  
      /**
        Sets HTMLElement selection
        @override
      */
      _unsafeSelect(start, end) {
        if (!this.rootElement.createRange) return;
        const range = this.rootElement.createRange();
        range.setStart(this.input.firstChild || this.input, start);
        range.setEnd(this.input.lastChild || this.input, end);
        const root = this.rootElement;
        const selection = root.getSelection &amp;&amp; root.getSelection();
        if (selection) {
          selection.removeAllRanges();
          selection.addRange(range);
        }
      }
  
      /**
        HTMLElement value
        @override
      */
      get value() {
        // $FlowFixMe
        return this.input.textContent;
      }
      set value(value) {
        this.input.textContent = value;
      }
    }
    IMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;
  
    const _excluded$1 = ["mask"];
  
    /** Listens to element events and controls changes between element and {@link Masked} */
    class InputMask {
      /**
        View element
        @readonly
      */
  
      /**
        Internal {@link Masked} model
        @readonly
      */
  
      /**
        @param {MaskElement|HTMLInputElement|HTMLTextAreaElement} el
        @param {Object} opts
      */
      constructor(el, opts) {
        this.el = el instanceof MaskElement ? el : el.isContentEditable &amp;&amp; el.tagName !== 'INPUT' &amp;&amp; el.tagName !== 'TEXTAREA' ? new HTMLContenteditableMaskElement(el) : new HTMLMaskElement(el);
        this.masked = createMask(opts);
        this._listeners = {};
        this._value = '';
        this._unmaskedValue = '';
        this._saveSelection = this._saveSelection.bind(this);
        this._onInput = this._onInput.bind(this);
        this._onChange = this._onChange.bind(this);
        this._onDrop = this._onDrop.bind(this);
        this._onFocus = this._onFocus.bind(this);
        this._onClick = this._onClick.bind(this);
        this.alignCursor = this.alignCursor.bind(this);
        this.alignCursorFriendly = this.alignCursorFriendly.bind(this);
        this._bindEvents();
  
        // refresh
        this.updateValue();
        this._onChange();
      }
  
      /** Read or update mask */
      get mask() {
        return this.masked.mask;
      }
      maskEquals(mask) {
        var _this$masked;
        return mask == null || ((_this$masked = this.masked) === null || _this$masked === void 0 ? void 0 : _this$masked.maskEquals(mask));
      }
      set mask(mask) {
        if (this.maskEquals(mask)) return;
  
        // $FlowFixMe No ideas ... after update
        if (!(mask instanceof IMask.Masked) &amp;&amp; this.masked.constructor === maskedClass(mask)) {
          this.masked.updateOptions({
            mask
          });
          return;
        }
        const masked = createMask({
          mask
        });
        masked.unmaskedValue = this.masked.unmaskedValue;
        this.masked = masked;
      }
  
      /** Raw value */
      get value() {
        return this._value;
      }
      set value(str) {
        if (this.value === str) return;
        this.masked.value = str;
        this.updateControl();
        this.alignCursor();
      }
  
      /** Unmasked value */
      get unmaskedValue() {
        return this._unmaskedValue;
      }
      set unmaskedValue(str) {
        if (this.unmaskedValue === str) return;
        this.masked.unmaskedValue = str;
        this.updateControl();
        this.alignCursor();
      }
  
      /** Typed unmasked value */
      get typedValue() {
        return this.masked.typedValue;
      }
      set typedValue(val) {
        if (this.masked.typedValueEquals(val)) return;
        this.masked.typedValue = val;
        this.updateControl();
        this.alignCursor();
      }
  
      /** Display value */
      get displayValue() {
        return this.masked.displayValue;
      }
  
      /**
        Starts listening to element events
        @protected
      */
      _bindEvents() {
        this.el.bindEvents({
          selectionChange: this._saveSelection,
          input: this._onInput,
          drop: this._onDrop,
          click: this._onClick,
          focus: this._onFocus,
          commit: this._onChange
        });
      }
  
      /**
        Stops listening to element events
        @protected
       */
      _unbindEvents() {
        if (this.el) this.el.unbindEvents();
      }
  
      /**
        Fires custom event
        @protected
       */
      _fireEvent(ev) {
        for (var _len = arguments.length, args = new Array(_len &gt; 1 ? _len - 1 : 0), _key = 1; _key &lt; _len; _key++) {
          args[_key - 1] = arguments[_key];
        }
        const listeners = this._listeners[ev];
        if (!listeners) return;
        listeners.forEach(l =&gt; l(...args));
      }
  
      /**
        Current selection start
        @readonly
      */
      get selectionStart() {
        return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;
      }
  
      /** Current cursor position */
      get cursorPos() {
        return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;
      }
      set cursorPos(pos) {
        if (!this.el || !this.el.isActive) return;
        this.el.select(pos, pos);
        this._saveSelection();
      }
  
      /**
        Stores current selection
        @protected
      */
      _saveSelection( /* ev */
      ) {
        if (this.displayValue !== this.el.value) {
          console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console
        }
  
        this._selection = {
          start: this.selectionStart,
          end: this.cursorPos
        };
      }
  
      /** Syncronizes model value from view */
      updateValue() {
        this.masked.value = this.el.value;
        this._value = this.masked.value;
      }
  
      /** Syncronizes view from model value, fires change events */
      updateControl() {
        const newUnmaskedValue = this.masked.unmaskedValue;
        const newValue = this.masked.value;
        const newDisplayValue = this.displayValue;
        const isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue;
        this._unmaskedValue = newUnmaskedValue;
        this._value = newValue;
        if (this.el.value !== newDisplayValue) this.el.value = newDisplayValue;
        if (isChanged) this._fireChangeEvents();
      }
  
      /** Updates options with deep equal check, recreates @{link Masked} model if mask type changes */
      updateOptions(opts) {
        const {
            mask
          } = opts,
          restOpts = _objectWithoutPropertiesLoose(opts, _excluded$1);
        const updateMask = !this.maskEquals(mask);
        const updateOpts = !objectIncludes(this.masked, restOpts);
        if (updateMask) this.mask = mask;
        if (updateOpts) this.masked.updateOptions(restOpts);
        if (updateMask || updateOpts) this.updateControl();
      }
  
      /** Updates cursor */
      updateCursor(cursorPos) {
        if (cursorPos == null) return;
        this.cursorPos = cursorPos;
  
        // also queue change cursor for mobile browsers
        this._delayUpdateCursor(cursorPos);
      }
  
      /**
        Delays cursor update to support mobile browsers
        @private
      */
      _delayUpdateCursor(cursorPos) {
        this._abortUpdateCursor();
        this._changingCursorPos = cursorPos;
        this._cursorChanging = setTimeout(() =&gt; {
          if (!this.el) return; // if was destroyed
          this.cursorPos = this._changingCursorPos;
          this._abortUpdateCursor();
        }, 10);
      }
  
      /**
        Fires custom events
        @protected
      */
      _fireChangeEvents() {
        this._fireEvent('accept', this._inputEvent);
        if (this.masked.isComplete) this._fireEvent('complete', this._inputEvent);
      }
  
      /**
        Aborts delayed cursor update
        @private
      */
      _abortUpdateCursor() {
        if (this._cursorChanging) {
          clearTimeout(this._cursorChanging);
          delete this._cursorChanging;
        }
      }
  
      /** Aligns cursor to nearest available position */
      alignCursor() {
        this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));
      }
  
      /** Aligns cursor only if selection is empty */
      alignCursorFriendly() {
        if (this.selectionStart !== this.cursorPos) return; // skip if range is selected
        this.alignCursor();
      }
  
      /** Adds listener on custom event */
      on(ev, handler) {
        if (!this._listeners[ev]) this._listeners[ev] = [];
        this._listeners[ev].push(handler);
        return this;
      }
  
      /** Removes custom event listener */
      off(ev, handler) {
        if (!this._listeners[ev]) return this;
        if (!handler) {
          delete this._listeners[ev];
          return this;
        }
        const hIndex = this._listeners[ev].indexOf(handler);
        if (hIndex &gt;= 0) this._listeners[ev].splice(hIndex, 1);
        return this;
      }
  
      /** Handles view input event */
      _onInput(e) {
        this._inputEvent = e;
        this._abortUpdateCursor();
  
        // fix strange IE behavior
        if (!this._selection) return this.updateValue();
        const details = new ActionDetails(
        // new state
        this.el.value, this.cursorPos,
        // old state
        this.displayValue, this._selection);
        const oldRawValue = this.masked.rawInputValue;
        const offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, {
          input: true,
          raw: true
        }).offset;
  
        // force align in remove direction only if no input chars were removed
        // otherwise we still need to align with NONE (to get out from fixed symbols for instance)
        const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;
        let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);
        if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);
        this.updateControl();
        this.updateCursor(cursorPos);
        delete this._inputEvent;
      }
  
      /** Handles view change event and commits model value */
      _onChange() {
        if (this.displayValue !== this.el.value) {
          this.updateValue();
        }
        this.masked.doCommit();
        this.updateControl();
        this._saveSelection();
      }
  
      /** Handles view drop event, prevents by default */
      _onDrop(ev) {
        ev.preventDefault();
        ev.stopPropagation();
      }
  
      /** Restore last selection on focus */
      _onFocus(ev) {
        this.alignCursorFriendly();
      }
  
      /** Restore last selection on focus */
      _onClick(ev) {
        this.alignCursorFriendly();
      }
  
      /** Unbind view events and removes element reference */
      destroy() {
        this._unbindEvents();
        // $FlowFixMe why not do so?
        this._listeners.length = 0;
        // $FlowFixMe
        delete this.el;
      }
    }
    IMask.InputMask = InputMask;
  
    /** Pattern which validates enum values */
    class MaskedEnum extends MaskedPattern {
      /**
        @override
        @param {Object} opts
      */
      _update(opts) {
        // TODO type
        if (opts.enum) opts.mask = '*'.repeat(opts.enum[0].length);
        super._update(opts);
      }
  
      /**
        @override
      */
      doValidate() {
        return this.enum.some(e =&gt; e.indexOf(this.unmaskedValue) &gt;= 0) &amp;&amp; super.doValidate(...arguments);
      }
    }
    IMask.MaskedEnum = MaskedEnum;
  
    /**
      Number mask
      @param {Object} opts
      @param {string} opts.radix - Single char
      @param {string} opts.thousandsSeparator - Single char
      @param {Array&lt;string&gt;} opts.mapToRadix - Array of single chars
      @param {number} opts.min
      @param {number} opts.max
      @param {number} opts.scale - Digits after point
      @param {boolean} opts.signed - Allow negative
      @param {boolean} opts.normalizeZeros - Flag to remove leading and trailing zeros in the end of editing
      @param {boolean} opts.padFractionalZeros - Flag to pad trailing zeros after point in the end of editing
    */
    class MaskedNumber extends Masked {
      /** Single char */
  
      /** Single char */
  
      /** Array of single chars */
  
      /** */
  
      /** */
  
      /** Digits after point */
  
      /** */
  
      /** Flag to remove leading and trailing zeros in the end of editing */
  
      /** Flag to pad trailing zeros after point in the end of editing */
  
      constructor(opts) {
        super(Object.assign({}, MaskedNumber.DEFAULTS, opts));
      }
  
      /**
        @override
      */
      _update(opts) {
        super._update(opts);
        this._updateRegExps();
      }
  
      /** */
      _updateRegExps() {
        let start = '^' + (this.allowNegative ? '[+|\\-]?' : '');
        let mid = '\\d*';
        let end = (this.scale ? "(".concat(escapeRegExp(this.radix), "\\d{0,").concat(this.scale, "})?") : '') + '$';
        this._numberRegExp = new RegExp(start + mid + end);
        this._mapToRadixRegExp = new RegExp("[".concat(this.mapToRadix.map(escapeRegExp).join(''), "]"), 'g');
        this._thousandsSeparatorRegExp = new RegExp(escapeRegExp(this.thousandsSeparator), 'g');
      }
  
      /** */
      _removeThousandsSeparators(value) {
        return value.replace(this._thousandsSeparatorRegExp, '');
      }
  
      /** */
      _insertThousandsSeparators(value) {
        // https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript
        const parts = value.split(this.radix);
        parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandsSeparator);
        return parts.join(this.radix);
      }
  
      /**
        @override
      */
      doPrepare(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        ch = this._removeThousandsSeparators(this.scale &amp;&amp; this.mapToRadix.length &amp;&amp; (
        /*
          radix should be mapped when
          1) input is done from keyboard = flags.input &amp;&amp; flags.raw
          2) unmasked value is set = !flags.input &amp;&amp; !flags.raw
          and should not be mapped when
          1) value is set = flags.input &amp;&amp; !flags.raw
          2) raw value is set = !flags.input &amp;&amp; flags.raw
        */
        flags.input &amp;&amp; flags.raw || !flags.input &amp;&amp; !flags.raw) ? ch.replace(this._mapToRadixRegExp, this.radix) : ch);
        const [prepCh, details] = normalizePrepare(super.doPrepare(ch, flags));
        if (ch &amp;&amp; !prepCh) details.skip = true;
        return [prepCh, details];
      }
  
      /** */
      _separatorsCount(to) {
        let extendOnSeparators = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : false;
        let count = 0;
        for (let pos = 0; pos &lt; to; ++pos) {
          if (this._value.indexOf(this.thousandsSeparator, pos) === pos) {
            ++count;
            if (extendOnSeparators) to += this.thousandsSeparator.length;
          }
        }
        return count;
      }
  
      /** */
      _separatorsCountFromSlice() {
        let slice = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : this._value;
        return this._separatorsCount(this._removeThousandsSeparators(slice).length, true);
      }
  
      /**
        @override
      */
      extractInput() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        let flags = arguments.length &gt; 2 ? arguments[2] : undefined;
        [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);
        return this._removeThousandsSeparators(super.extractInput(fromPos, toPos, flags));
      }
  
      /**
        @override
      */
      _appendCharRaw(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        if (!this.thousandsSeparator) return super._appendCharRaw(ch, flags);
        const prevBeforeTailValue = flags.tail &amp;&amp; flags._beforeTailState ? flags._beforeTailState._value : this._value;
        const prevBeforeTailSeparatorsCount = this._separatorsCountFromSlice(prevBeforeTailValue);
        this._value = this._removeThousandsSeparators(this.value);
        const appendDetails = super._appendCharRaw(ch, flags);
        this._value = this._insertThousandsSeparators(this._value);
        const beforeTailValue = flags.tail &amp;&amp; flags._beforeTailState ? flags._beforeTailState._value : this._value;
        const beforeTailSeparatorsCount = this._separatorsCountFromSlice(beforeTailValue);
        appendDetails.tailShift += (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length;
        appendDetails.skip = !appendDetails.rawInserted &amp;&amp; ch === this.thousandsSeparator;
        return appendDetails;
      }
  
      /** */
      _findSeparatorAround(pos) {
        if (this.thousandsSeparator) {
          const searchFrom = pos - this.thousandsSeparator.length + 1;
          const separatorPos = this.value.indexOf(this.thousandsSeparator, searchFrom);
          if (separatorPos &lt;= pos) return separatorPos;
        }
        return -1;
      }
      _adjustRangeWithSeparators(from, to) {
        const separatorAroundFromPos = this._findSeparatorAround(from);
        if (separatorAroundFromPos &gt;= 0) from = separatorAroundFromPos;
        const separatorAroundToPos = this._findSeparatorAround(to);
        if (separatorAroundToPos &gt;= 0) to = separatorAroundToPos + this.thousandsSeparator.length;
        return [from, to];
      }
  
      /**
        @override
      */
      remove() {
        let fromPos = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : 0;
        let toPos = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : this.value.length;
        [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);
        const valueBeforePos = this.value.slice(0, fromPos);
        const valueAfterPos = this.value.slice(toPos);
        const prevBeforeTailSeparatorsCount = this._separatorsCount(valueBeforePos.length);
        this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(valueBeforePos + valueAfterPos));
        const beforeTailSeparatorsCount = this._separatorsCountFromSlice(valueBeforePos);
        return new ChangeDetails({
          tailShift: (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length
        });
      }
  
      /**
        @override
      */
      nearestInputPos(cursorPos, direction) {
        if (!this.thousandsSeparator) return cursorPos;
        switch (direction) {
          case DIRECTION.NONE:
          case DIRECTION.LEFT:
          case DIRECTION.FORCE_LEFT:
            {
              const separatorAtLeftPos = this._findSeparatorAround(cursorPos - 1);
              if (separatorAtLeftPos &gt;= 0) {
                const separatorAtLeftEndPos = separatorAtLeftPos + this.thousandsSeparator.length;
                if (cursorPos &lt; separatorAtLeftEndPos || this.value.length &lt;= separatorAtLeftEndPos || direction === DIRECTION.FORCE_LEFT) {
                  return separatorAtLeftPos;
                }
              }
              break;
            }
          case DIRECTION.RIGHT:
          case DIRECTION.FORCE_RIGHT:
            {
              const separatorAtRightPos = this._findSeparatorAround(cursorPos);
              if (separatorAtRightPos &gt;= 0) {
                return separatorAtRightPos + this.thousandsSeparator.length;
              }
            }
        }
        return cursorPos;
      }
  
      /**
        @override
      */
      doValidate(flags) {
        // validate as string
        let valid = Boolean(this._removeThousandsSeparators(this.value).match(this._numberRegExp));
        if (valid) {
          // validate as number
          const number = this.number;
          valid = valid &amp;&amp; !isNaN(number) &amp;&amp; (
          // check min bound for negative values
          this.min == null || this.min &gt;= 0 || this.min &lt;= this.number) &amp;&amp; (
          // check max bound for positive values
          this.max == null || this.max &lt;= 0 || this.number &lt;= this.max);
        }
        return valid &amp;&amp; super.doValidate(flags);
      }
  
      /**
        @override
      */
      doCommit() {
        if (this.value) {
          const number = this.number;
          let validnum = number;
  
          // check bounds
          if (this.min != null) validnum = Math.max(validnum, this.min);
          if (this.max != null) validnum = Math.min(validnum, this.max);
          if (validnum !== number) this.unmaskedValue = this.doFormat(validnum);
          let formatted = this.value;
          if (this.normalizeZeros) formatted = this._normalizeZeros(formatted);
          if (this.padFractionalZeros &amp;&amp; this.scale &gt; 0) formatted = this._padFractionalZeros(formatted);
          this._value = formatted;
        }
        super.doCommit();
      }
  
      /** */
      _normalizeZeros(value) {
        const parts = this._removeThousandsSeparators(value).split(this.radix);
  
        // remove leading zeros
        parts[0] = parts[0].replace(/^(\D*)(0*)(\d*)/, (match, sign, zeros, num) =&gt; sign + num);
        // add leading zero
        if (value.length &amp;&amp; !/\d$/.test(parts[0])) parts[0] = parts[0] + '0';
        if (parts.length &gt; 1) {
          parts[1] = parts[1].replace(/0*$/, ''); // remove trailing zeros
          if (!parts[1].length) parts.length = 1; // remove fractional
        }
  
        return this._insertThousandsSeparators(parts.join(this.radix));
      }
  
      /** */
      _padFractionalZeros(value) {
        if (!value) return value;
        const parts = value.split(this.radix);
        if (parts.length &lt; 2) parts.push('');
        parts[1] = parts[1].padEnd(this.scale, '0');
        return parts.join(this.radix);
      }
  
      /** */
      doSkipInvalid(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let checkTail = arguments.length &gt; 2 ? arguments[2] : undefined;
        const dropFractional = this.scale === 0 &amp;&amp; ch !== this.thousandsSeparator &amp;&amp; (ch === this.radix || ch === MaskedNumber.UNMASKED_RADIX || this.mapToRadix.includes(ch));
        return super.doSkipInvalid(ch, flags, checkTail) &amp;&amp; !dropFractional;
      }
  
      /**
        @override
      */
      get unmaskedValue() {
        return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, MaskedNumber.UNMASKED_RADIX);
      }
      set unmaskedValue(unmaskedValue) {
        super.unmaskedValue = unmaskedValue;
      }
  
      /**
        @override
      */
      get typedValue() {
        return this.doParse(this.unmaskedValue);
      }
      set typedValue(n) {
        this.rawInputValue = this.doFormat(n).replace(MaskedNumber.UNMASKED_RADIX, this.radix);
      }
  
      /** Parsed Number */
      get number() {
        return this.typedValue;
      }
      set number(number) {
        this.typedValue = number;
      }
  
      /**
        Is negative allowed
        @readonly
      */
      get allowNegative() {
        return this.signed || this.min != null &amp;&amp; this.min &lt; 0 || this.max != null &amp;&amp; this.max &lt; 0;
      }
  
      /**
        @override
      */
      typedValueEquals(value) {
        // handle  0 -&gt; '' case (typed = 0 even if value = '')
        // for details see https://github.com/uNmAnNeR/imaskjs/issues/134
        return (super.typedValueEquals(value) || MaskedNumber.EMPTY_VALUES.includes(value) &amp;&amp; MaskedNumber.EMPTY_VALUES.includes(this.typedValue)) &amp;&amp; !(value === 0 &amp;&amp; this.value === '');
      }
    }
    MaskedNumber.UNMASKED_RADIX = '.';
    MaskedNumber.DEFAULTS = {
      radix: ',',
      thousandsSeparator: '',
      mapToRadix: [MaskedNumber.UNMASKED_RADIX],
      scale: 2,
      signed: false,
      normalizeZeros: true,
      padFractionalZeros: false,
      parse: Number,
      format: n =&gt; n.toLocaleString('en-US', {
        useGrouping: false,
        maximumFractionDigits: 20
      })
    };
    MaskedNumber.EMPTY_VALUES = [...Masked.EMPTY_VALUES, 0];
    IMask.MaskedNumber = MaskedNumber;
  
    /** Masking by custom Function */
    class MaskedFunction extends Masked {
      /**
        @override
        @param {Object} opts
      */
      _update(opts) {
        if (opts.mask) opts.validate = opts.mask;
        super._update(opts);
      }
    }
    IMask.MaskedFunction = MaskedFunction;
  
    const _excluded = ["compiledMasks", "currentMaskRef", "currentMask"],
      _excluded2 = ["mask"];
    /** Dynamic mask for choosing apropriate mask in run-time */
    class MaskedDynamic extends Masked {
      /** Currently chosen mask */
  
      /** Compliled {@link Masked} options */
  
      /** Chooses {@link Masked} depending on input value */
  
      /**
        @param {Object} opts
      */
      constructor(opts) {
        super(Object.assign({}, MaskedDynamic.DEFAULTS, opts));
        this.currentMask = null;
      }
  
      /**
        @override
      */
      _update(opts) {
        super._update(opts);
        if ('mask' in opts) {
          // mask could be totally dynamic with only `dispatch` option
          this.compiledMasks = Array.isArray(opts.mask) ? opts.mask.map(m =&gt; createMask(m)) : [];
  
          // this.currentMask = this.doDispatch(''); // probably not needed but lets see
        }
      }
  
      /**
        @override
      */
      _appendCharRaw(ch) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        const details = this._applyDispatch(ch, flags);
        if (this.currentMask) {
          details.aggregate(this.currentMask._appendChar(ch, this.currentMaskFlags(flags)));
        }
        return details;
      }
      _applyDispatch() {
        let appended = arguments.length &gt; 0 &amp;&amp; arguments[0] !== undefined ? arguments[0] : '';
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let tail = arguments.length &gt; 2 &amp;&amp; arguments[2] !== undefined ? arguments[2] : '';
        const prevValueBeforeTail = flags.tail &amp;&amp; flags._beforeTailState != null ? flags._beforeTailState._value : this.value;
        const inputValue = this.rawInputValue;
        const insertValue = flags.tail &amp;&amp; flags._beforeTailState != null ?
        // $FlowFixMe - tired to fight with type system
        flags._beforeTailState._rawInputValue : inputValue;
        const tailValue = inputValue.slice(insertValue.length);
        const prevMask = this.currentMask;
        const details = new ChangeDetails();
        const prevMaskState = prevMask === null || prevMask === void 0 ? void 0 : prevMask.state;
  
        // clone flags to prevent overwriting `_beforeTailState`
        this.currentMask = this.doDispatch(appended, Object.assign({}, flags), tail);
  
        // restore state after dispatch
        if (this.currentMask) {
          if (this.currentMask !== prevMask) {
            // if mask changed reapply input
            this.currentMask.reset();
            if (insertValue) {
              // $FlowFixMe - it's ok, we don't change current mask above
              const d = this.currentMask.append(insertValue, {
                raw: true
              });
              details.tailShift = d.inserted.length - prevValueBeforeTail.length;
            }
            if (tailValue) {
              // $FlowFixMe - it's ok, we don't change current mask above
              details.tailShift += this.currentMask.append(tailValue, {
                raw: true,
                tail: true
              }).tailShift;
            }
          } else {
            // Dispatch can do something bad with state, so
            // restore prev mask state
            this.currentMask.state = prevMaskState;
          }
        }
        return details;
      }
      _appendPlaceholder() {
        const details = this._applyDispatch(...arguments);
        if (this.currentMask) {
          details.aggregate(this.currentMask._appendPlaceholder());
        }
        return details;
      }
  
      /**
       @override
      */
      _appendEager() {
        const details = this._applyDispatch(...arguments);
        if (this.currentMask) {
          details.aggregate(this.currentMask._appendEager());
        }
        return details;
      }
      appendTail(tail) {
        const details = new ChangeDetails();
        if (tail) details.aggregate(this._applyDispatch('', {}, tail));
        return details.aggregate(this.currentMask ? this.currentMask.appendTail(tail) : super.appendTail(tail));
      }
      currentMaskFlags(flags) {
        var _flags$_beforeTailSta, _flags$_beforeTailSta2;
        return Object.assign({}, flags, {
          _beforeTailState: ((_flags$_beforeTailSta = flags._beforeTailState) === null || _flags$_beforeTailSta === void 0 ? void 0 : _flags$_beforeTailSta.currentMaskRef) === this.currentMask &amp;&amp; ((_flags$_beforeTailSta2 = flags._beforeTailState) === null || _flags$_beforeTailSta2 === void 0 ? void 0 : _flags$_beforeTailSta2.currentMask) || flags._beforeTailState
        });
      }
  
      /**
        @override
      */
      doDispatch(appended) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let tail = arguments.length &gt; 2 &amp;&amp; arguments[2] !== undefined ? arguments[2] : '';
        return this.dispatch(appended, this, flags, tail);
      }
  
      /**
        @override
      */
      doValidate(flags) {
        return super.doValidate(flags) &amp;&amp; (!this.currentMask || this.currentMask.doValidate(this.currentMaskFlags(flags)));
      }
  
      /**
        @override
      */
      doPrepare(str) {
        let flags = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : {};
        let [s, details] = normalizePrepare(super.doPrepare(str, flags));
        if (this.currentMask) {
          let currentDetails;
          [s, currentDetails] = normalizePrepare(super.doPrepare(s, this.currentMaskFlags(flags)));
          details = details.aggregate(currentDetails);
        }
        return [s, details];
      }
  
      /**
        @override
      */
      reset() {
        var _this$currentMask;
        (_this$currentMask = this.currentMask) === null || _this$currentMask === void 0 ? void 0 : _this$currentMask.reset();
        this.compiledMasks.forEach(m =&gt; m.reset());
      }
  
      /**
        @override
      */
      get value() {
        return this.currentMask ? this.currentMask.value : '';
      }
      set value(value) {
        super.value = value;
      }
  
      /**
        @override
      */
      get unmaskedValue() {
        return this.currentMask ? this.currentMask.unmaskedValue : '';
      }
      set unmaskedValue(unmaskedValue) {
        super.unmaskedValue = unmaskedValue;
      }
  
      /**
        @override
      */
      get typedValue() {
        return this.currentMask ? this.currentMask.typedValue : '';
      }
  
      // probably typedValue should not be used with dynamic
      set typedValue(value) {
        let unmaskedValue = String(value);
  
        // double check it
        if (this.currentMask) {
          this.currentMask.typedValue = value;
          unmaskedValue = this.currentMask.unmaskedValue;
        }
        this.unmaskedValue = unmaskedValue;
      }
      get displayValue() {
        return this.currentMask ? this.currentMask.displayValue : '';
      }
  
      /**
        @override
      */
      get isComplete() {
        var _this$currentMask2;
        return Boolean((_this$currentMask2 = this.currentMask) === null || _this$currentMask2 === void 0 ? void 0 : _this$currentMask2.isComplete);
      }
  
      /**
        @override
      */
      get isFilled() {
        var _this$currentMask3;
        return Boolean((_this$currentMask3 = this.currentMask) === null || _this$currentMask3 === void 0 ? void 0 : _this$currentMask3.isFilled);
      }
  
      /**
        @override
      */
      remove() {
        const details = new ChangeDetails();
        if (this.currentMask) {
          details.aggregate(this.currentMask.remove(...arguments))
          // update with dispatch
          .aggregate(this._applyDispatch());
        }
        return details;
      }
  
      /**
        @override
      */
      get state() {
        var _this$currentMask4;
        return Object.assign({}, super.state, {
          _rawInputValue: this.rawInputValue,
          compiledMasks: this.compiledMasks.map(m =&gt; m.state),
          currentMaskRef: this.currentMask,
          currentMask: (_this$currentMask4 = this.currentMask) === null || _this$currentMask4 === void 0 ? void 0 : _this$currentMask4.state
        });
      }
      set state(state) {
        const {
            compiledMasks,
            currentMaskRef,
            currentMask
          } = state,
          maskedState = _objectWithoutPropertiesLoose(state, _excluded);
        this.compiledMasks.forEach((m, mi) =&gt; m.state = compiledMasks[mi]);
        if (currentMaskRef != null) {
          this.currentMask = currentMaskRef;
          this.currentMask.state = currentMask;
        }
        super.state = maskedState;
      }
  
      /**
        @override
      */
      extractInput() {
        return this.currentMask ? this.currentMask.extractInput(...arguments) : '';
      }
  
      /**
        @override
      */
      extractTail() {
        return this.currentMask ? this.currentMask.extractTail(...arguments) : super.extractTail(...arguments);
      }
  
      /**
        @override
      */
      doCommit() {
        if (this.currentMask) this.currentMask.doCommit();
        super.doCommit();
      }
  
      /**
        @override
      */
      nearestInputPos() {
        return this.currentMask ? this.currentMask.nearestInputPos(...arguments) : super.nearestInputPos(...arguments);
      }
      get overwrite() {
        return this.currentMask ? this.currentMask.overwrite : super.overwrite;
      }
      set overwrite(overwrite) {
        console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings');
      }
      get eager() {
        return this.currentMask ? this.currentMask.eager : super.eager;
      }
      set eager(eager) {
        console.warn('"eager" option is not available in dynamic mask, use this option in siblings');
      }
      get skipInvalid() {
        return this.currentMask ? this.currentMask.skipInvalid : super.skipInvalid;
      }
      set skipInvalid(skipInvalid) {
        if (this.isInitialized || skipInvalid !== Masked.DEFAULTS.skipInvalid) {
          console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings');
        }
      }
  
      /**
        @override
      */
      maskEquals(mask) {
        return Array.isArray(mask) &amp;&amp; this.compiledMasks.every((m, mi) =&gt; {
          if (!mask[mi]) return;
          const _mask$mi = mask[mi],
            {
              mask: oldMask
            } = _mask$mi,
            restOpts = _objectWithoutPropertiesLoose(_mask$mi, _excluded2);
          return objectIncludes(m, restOpts) &amp;&amp; m.maskEquals(oldMask);
        });
      }
  
      /**
        @override
      */
      typedValueEquals(value) {
        var _this$currentMask5;
        return Boolean((_this$currentMask5 = this.currentMask) === null || _this$currentMask5 === void 0 ? void 0 : _this$currentMask5.typedValueEquals(value));
      }
    }
    MaskedDynamic.DEFAULTS = {
      dispatch: (appended, masked, flags, tail) =&gt; {
        if (!masked.compiledMasks.length) return;
        const inputValue = masked.rawInputValue;
  
        // simulate input
        const inputs = masked.compiledMasks.map((m, index) =&gt; {
          const isCurrent = masked.currentMask === m;
          const startInputPos = isCurrent ? m.value.length : m.nearestInputPos(m.value.length, DIRECTION.FORCE_LEFT);
          if (m.rawInputValue !== inputValue) {
            m.reset();
            m.append(inputValue, {
              raw: true
            });
          } else if (!isCurrent) {
            m.remove(startInputPos);
          }
          m.append(appended, masked.currentMaskFlags(flags));
          m.appendTail(tail);
          return {
            index,
            weight: m.rawInputValue.length,
            totalInputPositions: m.totalInputPositions(0, Math.max(startInputPos, m.nearestInputPos(m.value.length, DIRECTION.FORCE_LEFT)))
          };
        });
  
        // pop masks with longer values first
        inputs.sort((i1, i2) =&gt; i2.weight - i1.weight || i2.totalInputPositions - i1.totalInputPositions);
        return masked.compiledMasks[inputs[0].index];
      }
    };
    IMask.MaskedDynamic = MaskedDynamic;
  
    /** Mask pipe source and destination types */
    const PIPE_TYPE = {
      MASKED: 'value',
      UNMASKED: 'unmaskedValue',
      TYPED: 'typedValue'
    };
  
    /** Creates new pipe function depending on mask type, source and destination options */
    function createPipe(mask) {
      let from = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : PIPE_TYPE.MASKED;
      let to = arguments.length &gt; 2 &amp;&amp; arguments[2] !== undefined ? arguments[2] : PIPE_TYPE.MASKED;
      const masked = createMask(mask);
      return value =&gt; masked.runIsolated(m =&gt; {
        m[from] = value;
        return m[to];
      });
    }
  
    /** Pipes value through mask depending on mask type, source and destination options */
    function pipe(value) {
      for (var _len = arguments.length, pipeArgs = new Array(_len &gt; 1 ? _len - 1 : 0), _key = 1; _key &lt; _len; _key++) {
        pipeArgs[_key - 1] = arguments[_key];
      }
      return createPipe(...pipeArgs)(value);
    }
    IMask.PIPE_TYPE = PIPE_TYPE;
    IMask.createPipe = createPipe;
    IMask.pipe = pipe;
  
    try {
      globalThis.IMask = IMask;
    } catch (e) {}
  
    exports.ChangeDetails = ChangeDetails;
    exports.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;
    exports.HTMLMaskElement = HTMLMaskElement;
    exports.InputMask = InputMask;
    exports.MaskElement = MaskElement;
    exports.Masked = Masked;
    exports.MaskedDate = MaskedDate;
    exports.MaskedDynamic = MaskedDynamic;
    exports.MaskedEnum = MaskedEnum;
    exports.MaskedFunction = MaskedFunction;
    exports.MaskedNumber = MaskedNumber;
    exports.MaskedPattern = MaskedPattern;
    exports.MaskedRange = MaskedRange;
    exports.MaskedRegExp = MaskedRegExp;
    exports.PIPE_TYPE = PIPE_TYPE;
    exports.createMask = createMask;
    exports.createPipe = createPipe;
    exports["default"] = IMask;
    exports.pipe = pipe;
  
    Object.defineProperty(exports, '__esModule', { value: true });
  
  }));
  //# sourceMappingURL=imask.js.map
/* End */
;
; /* Start:"a:4:{s:4:"full";s:53:"/local/templates/agency_ux/js/main.js?171802413811946";s:6:"source";s:37:"/local/templates/agency_ux/js/main.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
document.addEventListener('DOMContentLoaded', () =&gt; {
    scrollDoc();
    initPhone();
    initMobileMenu();
    initTabs('.js-tab', '.js-tab-block');
    window.addEventListener('scroll', () =&gt; {
        scrollDoc()
    })

    const cityMain = document.querySelector('.js-city-main')
    const cityDouble = document.querySelector('.js-city-double')

    cityDouble.innerHTML = cityMain.innerHTML;

    const mainBanner = new Swiper('.js-main-bannerslider', {
        slidesPerView: 1,
        navigation: {
            nextEl: '.js-main-banner-next',
            prevEl: '.js-main-banner-prev',
        },
        pagination: {
            el: '.js-main-banner-pagination',
        },
    });
    const itemsSlider = new Swiper('.js-items-slider', {
        slidesPerView: 1,
        spaceBetween: 20,
        breakpoints: {
            1250: {
                slidesPerView: 4,
            },
            900: {
                slidesPerView: 3,
            },
            577: {
                slidesPerView: 2,
            }
        }
    });

    const calendars = document.querySelectorAll('.js-calendar input');
    var date = new Date();
    date.setDate(date.getDate());
    calendars.forEach(calendar =&gt; {
        let dpPeriod = new AirDatepicker(calendar, {
            multipleDates: true,
            minDate: date,
        });
    })

    Fancybox.bind("[data-fancybox]", {compact: false})
    Fancybox.bind("[data-fancybox-item]",
        {
            on: {
                "ready": (fancybox, eventName) =&gt; {
                    const parent = fancybox.options.event.target.closest('div');
                    const calendarItemVal = parent.querySelector('.js-field-calendar').value;
                    const itemID = parent.querySelector('input[name=product]').value;
                    const itemModalID = document.querySelector('#order-modal-form .js-field-item');
                    const formCalendar = document.querySelector('#order-modal-form .js-calendar .js-field-calendar');
                    itemModalID.value = itemID;
                    let newDateAr = [];
                    calendarItemVal.split(",").forEach(element =&gt; {
                        let dateSelect = element.split('.');
                        let newDate = dateSelect.reverse().join('-');
                        newDateAr.push(newDate);
                    });
                    let modalDate = new AirDatepicker(formCalendar, {
                        multipleDates: true,
                        minDate: date,
                        selectedDates: newDateAr
                    })
                },
                "close": (fancybox, eventName) =&gt; {
                    const parent = fancybox.options.event.target.closest('div');
                    const calendarPopup = document.querySelector('#order-modal-form .js-calendar .js-field-calendar');
                    const itemModalID = document.querySelector('#order-modal-form .js-field-item');
                    const calendarPopupVal = document.querySelector('#order-modal-form .js-calendar .js-field-calendar').value;
                    const calendarItem = parent.querySelector('.js-field-calendar')
                    let newDateAr = [];
                    calendarPopupVal.split(",").forEach(element =&gt; {
                        let dateSelect = element.split('.');
                        let newDate = dateSelect.reverse().join('-');
                        newDateAr.push(newDate);
                    });
                    let item = new AirDatepicker(calendarItem, {
                        multipleDates: true,
                        minDate: date,
                        selectedDates: newDateAr
                    })
                    itemModalID.value = '';
                    calendarPopup.value = '';
                }
            },
            compact: false,
        },
    );

    let toggleBlocks = document.querySelectorAll('.js-toggle-block');
    toggleBlocks.forEach(block =&gt; {
        block.addEventListener('click', function(){
            this.classList.toggle('active')
        })
    })
    const phoneMobile = document.querySelectorAll('.js-toggle-mobile-top-content');
    const topMobileContent = document.querySelector('.js-mobile-top-content');
    phoneMobile.forEach(btn =&gt; {
        btn.addEventListener('click', function(){
            topMobileContent.classList.toggle('active')
        });
    })
    const menuList = document.querySelectorAll('.js-main-menu li')
    const bodyWrapper = document.querySelector('.js-body-wrap')
    menuList.forEach(item =&gt; {
        let subMenu = null
        item.addEventListener('mouseover', function(){
            subMenu = item.querySelector('.menu__sub');
            if(subMenu){
                subMenu.style.visibility = 'visible'
                subMenu.style.opacity = '1'
                subMenu.style.left = '100%'
                bodyWrapper.classList.add('hover')
                if(subMenu.getBoundingClientRect().top &lt; window.innerHeight){
                    subMenu.style.top = '-50px'
                    subMenu.style.bottom = 'inherit'
                }
                if(subMenu.getBoundingClientRect().bottom &gt; window.innerHeight){
                    subMenu.style.top = 'inherit'
                    subMenu.style.bottom = -Math.abs(window.innerHeight - subMenu.getBoundingClientRect().top)+'px'
                }
            }
        })
        item.addEventListener('mouseout', function(){
            subMenu = item.querySelector('.menu__sub');
            if(subMenu){
                subMenu.style.visibility = 'hidden'
                subMenu.style.opacity = '0'
                subMenu.style.left = '-1000%'
                bodyWrapper.classList.remove('hover')
            }
        })
    })
})
function calcTopMobileMenu(){
    const mobileMenuContent = document.querySelector('.js-mobile-menu')
    const mobileMenuPage = document.querySelectorAll('.js-mobile-menu-page')
    const headerHeight = document.querySelector('.header').getBoundingClientRect().height
    const headerFixedHeight = document.querySelector('.fixed-header').getBoundingClientRect().height
    const scrollY = window.scrollY;
    if(scrollY &gt;= 150){
        if(mobileMenuContent){
            mobileMenuContent.style.position = 'fixed'
            mobileMenuContent.style.top = headerFixedHeight + 'px';

            mobileMenuPage.forEach(block =&gt; {
                block.style.position = 'fixed'
                block.style.top = headerFixedHeight + 'px';
            })
            
        }
    }else{
        if(mobileMenuContent){
            mobileMenuContent.style.position = 'absolute'
            mobileMenuContent.style.top = headerHeight + 'px';

            mobileMenuPage.forEach(block =&gt; {
                block.style.position = 'fixed'
                block.style.top = headerHeight + 'px';
            })
        }
    }
}
function scrollDoc(){
    const header = document.querySelector('.js-header-fixed')
    const scrollY = window.scrollY;
    if(scrollY &gt;= 150){
        header.classList.add('active')
    }else{
        header.classList.remove('active')
    }
    calcTopMobileMenu()
}
function initPhone(){
    let maskOptions7 = {
        mask: '+{7}(000)000-00-00'
    };
    let maskOptions8 = {
        mask: '{8}(000)000-00-00'
    };
    let phoneField = document.querySelectorAll('.js-phone');
    phoneField.forEach(field =&gt; {
        field.addEventListener("keyup", function(){
            if(field.value.length == 1 &amp;&amp; field.value[0] == 8){
                var mask = IMask(field, maskOptions8);
            }else if(field.value.length == 1 &amp;&amp; field.value[0] != 8){
                var mask = IMask(field, maskOptions7);
            }else if(field.value.length == 0){
                var mask = IMask(field, maskOptions7);
            }
        })
    });
}
function runClickMobileMenu(element){
    let mobileMenuContent,
        mobileMenuSections;

    mobileMenuContent = document.querySelector('.js-mobile-menu')
    mobileMenuSections = document.querySelector('.js-mobile-menu-sections')

    element.classList.toggle('active');
    mobileMenuContent.classList.toggle('active');
    if(element.classList.contains('active')){
        document.querySelector('body').style.overflowY = 'hidden'
        element.querySelector('.icon use').setAttribute("xlink:href", "#icon-close");
    }else{
        document.querySelector('body').style.overflowY = 'auto'
        element.querySelector('.icon use').setAttribute("xlink:href", "#icon-menu-button");
        if(mobileMenuSections.closest('.mobile-menu__link.active')){
            mobileMenuSections.closest('.mobile-menu__link').classList.remove('active');
        }
        if(mobileMenuContent.querySelector('li.active')){
            mobileMenuContent.querySelector('li.active').classList.remove('active');
        }
    }
}
function initMobileMenu(){
    let mobileMenuContent,
        mobileMenuSections,
        mobileBtnMenuSub,
        mobileBtnMenuSubClose;

    mobileMenuContent = document.querySelector('.js-mobile-menu')
    mobileMenuSections = document.querySelector('.js-mobile-menu-sections')
    mobileBtnMenuSub = document.querySelectorAll('.js-mobile-button-sub')
    mobileBtnMenuSubClose = document.querySelectorAll('.js-mobile-button-sub-close')

    if(mobileMenuSections){
        mobileMenuSections.addEventListener('click', function(){
            this.closest('.mobile-menu__link').classList.toggle('active');
        });
        mobileBtnMenuSub.forEach(element =&gt; {
            element.addEventListener('click', function(){
                this.closest('li').classList.add('active');
            });
        })
        mobileBtnMenuSubClose.forEach(element =&gt; {
            element.addEventListener('click', function(){
                this.closest('li.active').classList.remove('active');
            });
        })
    }

    calcTopMobileMenu()
    window.addEventListener('resize', function(event) {
        calcTopMobileMenu();
    }, true);
}
function filterCity() {
    let input = document.querySelector('.js-search-city');
    let filter = input.value.toUpperCase();
    let listCityBlock = document.querySelectorAll('.js-city-link');
    let listCityText = document.querySelectorAll('.js-city-link a');
    for (let i = 0; i &lt; listCityBlock.length; i++) {
        let value = listCityText[i].innerText;
      
        if (value.toUpperCase().includes(filter)) {
            listCityBlock[i].style.display = '';
        } else {
            listCityBlock[i].style.display = 'none';
        }
    }
}
function initTabs(buttons, contents){
    const tabsButton = document.querySelectorAll(buttons);
    const tabsContent = document.querySelectorAll(contents);
    tabsButton.forEach(btn =&gt; {
        btn.addEventListener('click', function(e) {
            parent = this.closest('[data-list]');
            parent.querySelectorAll(buttons).forEach(el =&gt; {
                el.classList.remove('active');
            });
            this.classList.add('active');
            let valIndexTabBtn = this.getAttribute('data-target');

            parentContent = this.closest('[data-tab]')
            if(parentContent){
                parentContent.querySelectorAll(contents).forEach(tab =&gt; {
                    tab.classList.remove('active');
                    let valIndexTabContent = tab.getAttribute('data-tab');
                    if(valIndexTabBtn == valIndexTabContent){
                        tab.classList.add('active');
                    }
                })
            }else{
                tabsContent.forEach(tab =&gt; {
                    tab.classList.remove('active');
                    let valIndexTabContent = tab.getAttribute('data-tab');
                    if(valIndexTabBtn == valIndexTabContent){
                        tab.classList.add('active');
                    }
                })
            }
        })
    })
}

/* End */
;
; /* Start:"a:4:{s:4:"full";s:54:"/local/templates/agency_ux/js/custom.js?17437720784487";s:6:"source";s:39:"/local/templates/agency_ux/js/custom.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
$(document).ready(function(){
    /*const btnCity = document.querySelectorAll('.js-city-select-btn');
    const btnCityClose = document.querySelector('.js-city-select-btn-close');
    
    const cities = document.querySelectorAll('.js-city-link a');
    cities.forEach(element =&gt; {
        element.addEventListener('click', function(e){
            e.preventDefault();
            const href = this.getAttribute('href');
            let date = new Date();
            date.setMonth(date.getMonth() + 1);
            document.cookie = "BX_CITY=" + this.getAttribute("data-city") + "; expires="  + date + "; domain=.стахановец.рф; path=/;";
            if(getCookie("BX_CITY")){
                window.location.replace(href);
            }
        })
    })

    if(btnCity){
        btnCity.forEach(element =&gt; {
            element.addEventListener('click', function(){
                setTimeout(() =&gt; {
                    this.closest('.js-city-select').remove();
                }, 200);
            })
        })
    }
    if(btnCityClose){
        btnCityClose.addEventListener('click', function(e){
            e.preventDefault();
            const href = this.getAttribute('href');
            let date = new Date();
            date.setMonth(date.getMonth() + 1);
            document.cookie = "BX_CITY=" + this.getAttribute("data-city") + "; expires=" + date + ";domain=.стахановец.рф; path=/";
            if(getCookie("BX_CITY")){
                this.closest('.js-city-select').remove();
                window.location.replace(href);
            }
        })
    }*/

    let mobileBtnMenu = document.querySelectorAll('.js-button-mobile-menu')
    mobileBtnMenu.forEach(element =&gt; {
        element.addEventListener('click', function(){
            runClickMobileMenu(this)
            if(this.classList.contains('active')){
                $.ajax({
                    type: "POST",
                    url: "/ajax/mobileMenu.php",
                    dataType: 'html',
                    success: function(data) {
                        document.querySelector('.js-mobile-menu').innerHTML = data;
                        initMobileMenu();
                    }
                });
            }else{
                document.querySelector('.js-mobile-menu').innerHTML = '';
            }
        });
    })
    let viewCard = document.querySelectorAll('.js-view-card')
    viewCard.forEach(element =&gt; {
        element.addEventListener('click', function(){
            let dataParams = this.getAttribute('data-view')
            let dataType = this.getAttribute('data-type')
            $.post('/ajax/view_catalog.php', {
                    LIST_PRODUCT_ROW_VARIANTS: dataParams,
                    TYPE_VIEW_CARD: dataType,
            },  function (data) {
                location.reload();
            });
        })
    });
    let search = document.querySelectorAll('.js-search')
    search.forEach(element =&gt; {
        let input = element.querySelector('input')
        let content = element.querySelector('.js-search-content')
        input.addEventListener('input', function(){
            document.querySelectorAll('.js-search input').forEach(field =&gt;{
                field.value = this.value
            })
            viewResSearch(this, content, input);
        })
        input.addEventListener('click', function(){
            viewResSearch(this, content, input);
        })
    });
    let mapButtons = document.querySelectorAll('.js-tab');
    let mapBlock = document.querySelector('.js-map');
    mapButtons.forEach(element =&gt; {
        element.addEventListener('click', function(){
            BX.ajax.insertToNode('/ajax/filials_map.php?id=' + this.dataset.id, mapBlock);
        })
    });
})
function viewResSearch(element, content, input){
    if(element.value){
        content.classList.add('active')
        BX.ajax.insertToNode('/ajax/search.php?s=' + element.value, content);
    }else{
        content.classList.remove('active')
    }
    document.onclick = function(e){
        if(e.target !== input){
            content.classList.remove('active')
        }else{
            content.classList.add('active')
        }
    }
}
function getCookie (name,value) {
    var found = false;
    document.cookie.split(";").forEach(function(e) {
        var cookie = e.split("=");
        if(name == cookie[0].trim() &amp;&amp; (!value || value == cookie[1].trim())) {
            found = true;
        }
    })
    return found;
}
/* End */
;
; /* Start:"a:4:{s:4:"full";s:67:"/bitrix/components/bitrix/search.title/script.min.js?16031707316443";s:6:"source";s:48:"/bitrix/components/bitrix/search.title/script.js";s:3:"min";s:52:"/bitrix/components/bitrix/search.title/script.min.js";s:3:"map";s:52:"/bitrix/components/bitrix/search.title/script.map.js";}"*/
function JCTitleSearch(t){var e=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN)};if(t.WAIT_IMAGE)this.arParams.WAIT_IMAGE=t.WAIT_IMAGE;if(t.MIN_QUERY_LEN&lt;=0)t.MIN_QUERY_LEN=1;this.cache=[];this.cache_key=null;this.startText="";this.running=false;this.runningCall=false;this.currentRow=-1;this.RESULT=null;this.CONTAINER=null;this.INPUT=null;this.WAIT=null;this.ShowResult=function(t){if(BX.type.isString(t)){e.RESULT.innerHTML=t}e.RESULT.style.display=e.RESULT.innerHTML!==""?"block":"none";var s=e.adjustResultNode();var i;var n;var l=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(l){n=BX.findChild(l,{tag:"th"},true)}if(n){var r=BX.pos(l);r.width=r.right-r.left;var a=BX.pos(n);a.width=a.right-a.left;n.style.width=a.width+"px";e.RESULT.style.width=s.width+a.width+"px";e.RESULT.style.left=s.left-a.width-1+"px";if(r.width-a.width&gt;s.width)e.RESULT.style.width=s.width+a.width-1+"px";r=BX.pos(l);i=BX.pos(e.RESULT);if(i.right&gt;r.right){e.RESULT.style.width=r.right-r.left+"px"}}var o;if(l)o=BX.findChild(e.RESULT,{class:"title-search-fader"},true);if(o&amp;&amp;n){i=BX.pos(e.RESULT);o.style.left=i.right-i.left-18+"px";o.style.width=18+"px";o.style.top=0+"px";o.style.height=i.bottom-i.top+"px";o.style.display="block"}};this.onKeyPress=function(t){var s=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(!s)return false;var i;var n=s.rows.length;switch(t){case 27:e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll();return true;case 40:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var l=-1;for(i=0;i&lt;n;i++){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(l==-1)l=i;if(e.currentRow&lt;i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i==n&amp;&amp;e.currentRow!=i)e.currentRow=l;s.rows[e.currentRow].className="title-search-selected";return true;case 38:if(e.RESULT.style.display=="none")e.RESULT.style.display="block";var r=-1;for(i=n-1;i&gt;=0;i--){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){if(r==-1)r=i;if(e.currentRow&gt;i){e.currentRow=i;break}else if(s.rows[i].className=="title-search-selected"){s.rows[i].className=""}}}if(i&lt;0&amp;&amp;e.currentRow!=i)e.currentRow=r;s.rows[e.currentRow].className="title-search-selected";return true;case 13:if(e.RESULT.style.display=="block"){for(i=0;i&lt;n;i++){if(e.currentRow==i){if(!BX.findChild(s.rows[i],{class:"title-search-separator"},true)){var a=BX.findChild(s.rows[i],{tag:"a"},true);if(a){window.location=a.href;return true}}}}}return false}return false};this.onTimeout=function(){e.onChange(function(){setTimeout(e.onTimeout,500)})};this.onChange=function(t){if(e.running){e.runningCall=true;return}e.running=true;if(e.INPUT.value!=e.oldValue&amp;&amp;e.INPUT.value!=e.startText){e.oldValue=e.INPUT.value;if(e.INPUT.value.length&gt;=e.arParams.MIN_QUERY_LEN){e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value;if(e.cache[e.cache_key]==null){if(e.WAIT){var s=BX.pos(e.INPUT);var i=s.bottom-s.top-2;e.WAIT.style.top=s.top+1+"px";e.WAIT.style.height=i+"px";e.WAIT.style.width=i+"px";e.WAIT.style.left=s.right-i+2+"px";e.WAIT.style.display="block"}BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParams.INPUT_ID,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN},function(s){e.cache[e.cache_key]=s;e.ShowResult(s);e.currentRow=-1;e.EnableMouseEvents();if(e.WAIT)e.WAIT.style.display="none";if(!!t)t();e.running=false;if(e.runningCall){e.runningCall=false;e.onChange()}});return}else{e.ShowResult(e.cache[e.cache_key]);e.currentRow=-1;e.EnableMouseEvents()}}else{e.RESULT.style.display="none";e.currentRow=-1;e.UnSelectAll()}}if(!!t)t();e.running=false};this.onScroll=function(){if(BX.type.isElementNode(e.RESULT)&amp;&amp;e.RESULT.style.display!=="none"&amp;&amp;e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.UnSelectAll=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i&lt;s;i++)t.rows[i].className=""}};this.EnableMouseEvents=function(){var t=BX.findChild(e.RESULT,{tag:"table",class:"title-search-result"},true);if(t){var s=t.rows.length;for(var i=0;i&lt;s;i++)if(!BX.findChild(t.rows[i],{class:"title-search-separator"},true)){t.rows[i].id="row_"+i;t.rows[i].onmouseover=function(t){if(e.currentRow!=this.id.substr(4)){e.UnSelectAll();this.className="title-search-selected";e.currentRow=this.id.substr(4)}};t.rows[i].onmouseout=function(t){this.className="";e.currentRow=-1}}}};this.onFocusLost=function(t){setTimeout(function(){e.RESULT.style.display="none"},250)};this.onFocusGain=function(){if(e.RESULT.innerHTML.length)e.ShowResult()};this.onKeyDown=function(t){if(!t)t=window.event;if(e.RESULT.style.display=="block"){if(e.onKeyPress(t.keyCode))return BX.PreventDefault(t)}};this.adjustResultNode=function(){if(!(BX.type.isElementNode(e.RESULT)&amp;&amp;BX.type.isElementNode(e.CONTAINER))){return{top:0,right:0,bottom:0,left:0,width:0,height:0}}var t=BX.pos(e.CONTAINER);e.RESULT.style.position="absolute";e.RESULT.style.top=t.bottom+2+"px";e.RESULT.style.left=t.left+"px";e.RESULT.style.width=t.width+"px";return t};this._onContainerLayoutChange=function(){if(BX.type.isElementNode(e.RESULT)&amp;&amp;e.RESULT.style.display!=="none"&amp;&amp;e.RESULT.innerHTML!==""){e.adjustResultNode()}};this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID);BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange);this.RESULT=document.body.appendChild(document.createElement("DIV"));this.RESULT.className="title-search-result";this.INPUT=document.getElementById(this.arParams.INPUT_ID);this.startText=this.oldValue=this.INPUT.value;BX.bind(this.INPUT,"focus",function(){e.onFocusGain()});BX.bind(this.INPUT,"blur",function(){e.onFocusLost()});this.INPUT.onkeydown=this.onKeyDown;if(this.arParams.WAIT_IMAGE){this.WAIT=document.body.appendChild(document.createElement("DIV"));this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')";if(!BX.browser.IsIE())this.WAIT.style.backgroundRepeat="none";this.WAIT.style.display="none";this.WAIT.style.position="absolute";this.WAIT.style.zIndex="1100"}BX.bind(this.INPUT,"bxchange",function(){e.onChange()});var t=BX.findParent(this.CONTAINER,BX.is_fixed);if(BX.type.isElementNode(t)){BX.bind(window,"scroll",BX.throttle(this.onScroll,100,this))}};BX.ready(function(){e.Init(t)})}
/* End */
;; /* /local/templates/agency_ux/js/swiper.js?1683192949139426*/
; /* /local/templates/agency_ux/js/air-datepicker.js?168976566947472*/
; /* /local/templates/agency_ux/js/fancybox.umd.js?1697027848143773*/
; /* /local/templates/agency_ux/js/imask.js?1684760375113739*/
; /* /local/templates/agency_ux/js/main.js?171802413811946*/
; /* /local/templates/agency_ux/js/custom.js?17437720784487*/
; /* /bitrix/components/bitrix/search.title/script.min.js?16031707316443*/

//# sourceMappingURL=template_ed93efff781aa29bb5f452e664a29f1a.map.js</pre></body></html>