1var e=e=>"object"==typeof e&&!!e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),t=e=>"string"==typeof e,n=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,r=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var n=document.createElement("div");t.firstChild;)n.appendChild(t.firstChild);return n}let i=t.firstChild;return!i||i instanceof HTMLElement?i:((n=document.createElement("div")).appendChild(i),n)},i=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=!1,n=!1;if(e.scrollWidth>e.clientWidth){let n=window.getComputedStyle(e).overflowX,i=-1!==n.indexOf("hidden"),s=-1!==n.indexOf("clip"),r=-1!==n.indexOf("visible");t=!i&&!s&&!r}if(e.scrollHeight>e.clientHeight){let t=window.getComputedStyle(e).overflowY,i=-1!==t.indexOf("hidden"),s=-1!==t.indexOf("clip"),r=-1!==t.indexOf("visible");n=!i&&!s&&!r}return t||n},a=function(e,t=void 0){return!e||e===document.body||t&&e===t?null:i(e)?e:a(e.parentElement,t)},o=(e=!0,t="--f-scrollbar-compensate",n="--f-body-margin",i="hide-scrollbar")=>{let s=document,r=s.body,a=s.documentElement;if(e){if(r.classList.contains(i))return;let e=window.innerWidth-a.getBoundingClientRect().width;e<0&&(e=0),a.style.setProperty(t,`${e}px`);let s=parseFloat(window.getComputedStyle(r).marginRight);s&&r.style.setProperty(n,`${s}px`),r.classList.add(i)}else r.classList.remove(i),r.style.setProperty(n,""),s.documentElement.style.setProperty(t,"")},s=(t,...n)=>{let i=n.length;for(let r=0;r<i;r++){let i=n[r]||{};Object.entries(i).forEach(([n,i])=>{let r=Array.isArray(i)?[]:{};t[n]||Object.assign(t,{[n]:r}),e(i)?Object.assign(t[n],s(t[n],i)):Array.isArray(i)?Object.assign(t,{[n]:[...i]}):Object.assign(t,{[n]:i})})}return t};function c(){return!(typeof window>"u"||!window.document||!window.document.createElement)}var l=function(e=0,t=0,n=0){return Math.max(Math.min(t,n),e)},u=function(e=0,t=0,n=0,i=0,s=0,r=!1){let a=(e-t)/(n-t)*(s-i)+i;return r?i<s?l(i,a,s):l(s,a,i):a},d=(e,t="")=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.add(t)})},f=(e,t="")=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.remove(t)})},p=(e,t="",n)=>{e&&e.classList&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,n||!1)})};function m(t){return e(t)||Array.isArray(t)}function h(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&n.every(n=>{let i=e[n],s=t[n];return"function"==typeof i?`${i}`==`${s}`:m(i)&&m(s)?h(i,s):i===s})}var _,v,y,g=function(e){for(let t of b)t.getState()===_.Running&&t.tick(S?e-S:0);S=e,x=window.requestAnimationFrame(g)};(function(e){e[e.Initializing=0]="Initializing",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Completed=3]="Completed",e[e.Destroyed=4]="Destroyed"})(_||={}),function(e){e[e.Spring=0]="Spring",e[e.Ease=1]="Ease"}(v||={}),function(e){e[e.Loop=0]="Loop",e[e.Reverse=1]="Reverse"}(y||={});var b=new Set,x=null,S=0;function ee(){let e=_.Initializing,t=v.Ease,n=0,i=0,s=ee.Easings.Linear,r=500,a=0,o=0,u=0,d=0,c=1/0,f=.01,p=.01,m=!1,E={},k=null,w={},C={},S={},A=0,M=0,F=y.Loop,L=ee.Easings.Linear,T=new Map;function R(e,...t){for(let n of T.get(e)||[])n(...t)}function P(e){return i=0,e?k=setTimeout(()=>{I()},e):I(),D}function I(){e=_.Running,R("start",w,C)}function O(){if(e=_.Completed,S={},R("end",w),e===_.Completed)if(n<A){if(n++,F===y.Reverse){let e={...E};E={...C},C=e}P(M)}else n=0;return D}let D={getState:function(){return e},easing:function(e){return s=e,t=v.Ease,S={},D},duration:function(e){return r=e,D},spring:function(e={}){t=v.Spring;let{velocity:n,mass:i,tension:s,friction:r,restDelta:l,restSpeed:h,maxSpeed:g,clamp:y}={velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0,...e};return a=n,o=i,u=s,d=r,p=l,f=h,c=g,m=y,S={},D},isRunning:function(){return e===_.Running},isSpring:function(){return t===v.Spring},from:function(e){return w={...e},D},to:function(e){return C=e,D},repeat:function(e,t=0,n=y.Loop,i){return A=e,M=t,F=n,L=i||s,D},on:function(e,t){var n=e,i=t;return T.set(n,[...T.get(n)||[],i]),D},off:function(e,t){var n=e,i=t;return T.has(n)&&T.set(n,T.get(n).filter(e=>e!==i)),D},start:function(t){return h(w,C)||(e=_.Initializing,E={...w},b.add(this),x||=window.requestAnimationFrame(g),P(t)),D},pause:function(){return k&&=(clearTimeout(k),null),e===_.Running&&(e=_.Paused,R("pause",w)),D},end:O,tick:function(n){n>50&&(n=50),i+=n;let g=0,b=!1;
1if(e!==_.Running)return D;if(t===v.Ease){g=l(0,i/r,1),b=1===g;let e=F===y.Reverse?L:s;for(let t in w)w[t]=E[t]+(C[t]-E[t])*e(g)}if(t===v.Spring){let e=.001*n,t=0;for(let n in w){let i=C[n],s=w[n];if("number"!=typeof i||isNaN(i)||"number"!=typeof s||isNaN(s))continue;if(Math.abs(i-s)<=p){w[n]=i,S[n]=0;continue}S[n]||("object"==typeof a&&"number"==typeof a[n]?S[n]=a[n]:S[n]="number"==typeof a?a:0);let r=S[n];r=l(-1*Math.abs(c),r,Math.abs(c));let h=r*o*d;r+=((s>i?-1:1)*(Math.abs(i-s)*u)-h)/o*e,s+=r*e;let g=w[n]>i?s<i:s>i,v=Math.abs(r)<f&&Math.abs(i-s)<=p;m&&g&&(v=!0),v?(s=i,r=0):t++,w[n]=s,S[n]=r}b=!t}let k={...C};return R("step",w,E,C,g),b&&e===_.Running&&h(C,k)&&(e=_.Completed,O()),D},getStartValues:function(){return E},getCurrentValues:function(){return w},getCurrentVelocities:function(){return S},getEndValues:function(){return C},destroy:function(){e=_.Destroyed,k&&=(clearTimeout(k),null),E=w=C={},b.delete(this)}};return D}function C(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}function w(e,t){let n=[],i=C(e)?e[t]:e instanceof MouseEvent&&("changedTouches"===t||"mouseup"!==e.type)?[e]:[];for(let e of i)n.push({x:e.clientX,y:e.clientY,ts:Date.now()});return n}function T(e){return w(e,"touches")}function E(e){return w(e,"targetTouches")}function te(e){return w(e,"changedTouches")}function D(e){let t=e[0],n=e[1]||t;return{x:(t.x+n.x)/2,y:(t.y+n.y)/2,ts:n.ts}}function O(e){let t=e[0],n=e[1]||e[0];return t&&n?-1*Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)):0}ee.destroy=()=>{for(let e of b)e.destroy();x&&=(cancelAnimationFrame(x),null)},ee.Easings={Linear:function(e){return e},EaseIn:function(e){return 0===e?0:2**(10*e-10)},EaseOut:function(e){return 1===e?1:1-2**(-10*e)},EaseInOut:function(e){return 0===e?0:1===e?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}};var k=e=>{e.cancelable&&e.preventDefault()},A={passive:!1},ne={panThreshold:5,swipeThreshold:3,ignore:["textarea","input","select","[contenteditable]","[data-selectable]","[data-draggable]"]},j=!1,M=!0,re=(e,t)=>{let n,i,s,r,a,o={...ne,...t},l=!0,u=[],d=[],c=[],h=!1,f=!1,p=!1,g=!1,m=0,v=0,y=0,b=0,_=0,x=0,w=0,C=0,S=0,F=[],L=new Map;function R(e){let t=O(d),r=O(c),a=t&&r?t/r:0,o={srcEvent:n,isPanRecognized:h,isSwipeRecognized:f,firstTouch:u,previousTouch:c,currentTouch:d,deltaX:y,deltaY:b,offsetX:_,offsetY:x,velocityX:w,velocityY:C,velocity:Math.abs(w)>Math.abs(C)?w:C,angle:S,axis:s,scale:a,center:i};for(let t of L.get(e)||[])t(o)}function P(e){let t=e.target,n=e.composedPath()[0],i=o.ignore.join(","),s=e=>e&&e instanceof HTMLElement&&(e.matches(i)||e.closest(i));if(s(t)||s(n))return!1}function I(e){let t=Date.now();if(F=F.filter(e=>!e.ts||e.ts>t-100),e&&F.push(e),w=0,C=0,F.length>3){let e=F[0],t=F[F.length-1];if(e&&t){let n=t.x-e.x,i=t.y-e.y,s=e.ts&&t.ts?t.ts-e.ts:0;s>0&&(w=Math.abs(n)>3?n/(s/30):0,C=Math.abs(i)>3?i/(s/30):0)}}}function B(e){if(!l||!1===P(e))return;if(typeof MouseEvent<"u"&&e instanceof MouseEvent){if(j)return}else j=!0;if(typeof MouseEvent<"u"&&e instanceof MouseEvent){if(!e.buttons||0!==e.button)return;k(e)}e instanceof MouseEvent&&(window.addEventListener("mousemove",V),window.addEventListener("mouseup",z)),window.addEventListener("blur",$),n=e,d=E(e),u=[...d],c=[],v=d.length,i=D(d),1===v&&(h=!1,f=!1,p=!1),v&&I(D(d));let t=Date.now(),s=t-(m||t);g=s>0&&s<=250&&1===v,m=t,clearTimeout(r),R("start")}function V(e){if(!u.length||e.defaultPrevented||!1===P(e))return;n=e,c=[...d],d=T(e);let t=D(c),r=D(T(e));if(I(r),v=d.length,i=r,c.length===d.length?(y=r.x-t.x,b=r.y-t.y):(y=0,b=0),u.length){let e=D(u);_=r.x-e.x,x=r.y-e.y}if(d.length>1){let e=O(d),t=O(c);Math.abs(e-t)>=.1&&(p=!0,R("pinch"))}h||(h=Math.abs(_)>=o.panThreshold||Math.abs(x)>=o.panThreshold,h&&(M=!1,clearTimeout(a),a=void 0,S=Math.abs(180*Math.atan2(x,_)/Math.PI),s=S>45&&S<135?"y":"x",u=[...d],c=[...d],_=0,x=0,y=0,b=0,window.getSelection()?.removeAllRanges(),R("panstart"))),h&&(y||b)&&R("pan"),R("move")}function z(e){if(n=e,!u.length)return;let t=E(e),s=te(e);if(v=t.length,i=D(s),s.length&&I(D(s)),c=[...d],d=[...t],u=[...t],v>0)R("end"),h=!1,f=!1,F=[];else{let e=o.swipeThreshold;(Math.abs(w)>e||Math.abs(C)>e)&&(f=!0),h&&R("panend"),f&&R("swipe"),h||f||p||(R("tap"),g?R("doubleTap"):r=setTimeout(function(){R("singleTap")},250)),R("end"),N()}}function $(){clearTimeout(r),N(),h&&R("panend"),R("end")}function N(){j=!1,h=!1,f=!1,g=!1,v=0,F=[],d=[],c=[],u=[],y=0,b=0,_=0,x=0,w=0,C=0,S=0,s=void 0,window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",z),window.removeEventListener("blur",$),M||a||(a=setTimeout(()=>{M=!0,a=void 0},100))}function H(e){let t=e.target;j=!1,t&&!e.defaultPrevented&&(M||(k(e),e.stopPropagation()))}let Z={init:function(){return e&&(e.addEventListener("click",H,A),e.addEventListener("mousedown",B,A),e.addEventListener("touchstart",B,A),e.addEventListener("touchmove",V,A),e.addEventListener("touchend",z),e.addEventListener("touchcancel",z)),Z},on:function(e,t){return function(e,t){L.set(e,[...L.get(e)||[],t])}(e,t),Z},off:function(e,t){return L.has(e)&&L.set(e,L.get(e).filter(e=>e!==t)),Z},enable:function(){return l=!0,Z},disable:function(){return l=!1,u.length&&(f=!1,w=0,C=0,y=0,b=0,R("end")),N(),Z},isPointerDown:()=>v>0,destroy:function(){clearTimeout(r),clearTimeout(a),a=void 0,e&&(e.removeEventListener("click",H,A),e.removeEventListener("mousedown",B,A),e.removeEventListener("touchstart",B,A),e.removeEventListener("touchmove",V,A),e.removeEventListener("touchend",z),e.removeEventListener("touchcancel",z)),e=null,N()}};return Z};re.isClickAllowed=()=>M;var L,R,N={IMAGE_ERROR:"This image couldn't be loaded. <br /> Please try again later.",MOVE_UP:"Move up",MOVE_DOWN:"Move down",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",TOGGLE_FULL:"Toggle zoom level",TOGGLE_1TO1:"Toggle zoom level",ITERATE_ZOOM:"Toggle zoom level",ROTATE_CCW:"Rotate counterclockwise",ROTATE_CW:"Rotate clockwise",FLIP_X:"Flip horizontally",FLIP_Y:"Flip vertically",RESET:"Reset",TOGGLE_FS:"Toggle fullscreen"},P=e=>{e.cancelable&&e.preventDefault()},F=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+2**-52)*t)/t),I=e=>e instanceof HTMLImageElement;
1(function(e){e.Reset="reset",e.Zoom="zoom",e.ZoomIn="zoomIn",e.ZoomOut="zoomOut",e.ZoomTo="zoomTo",e.ToggleCover="toggleCover",e.ToggleFull="toggleFull",e.ToggleMax="toggleMax",e.IterateZoom="iterateZoom",e.Pan="pan",e.Swipe="swipe",e.Move="move",e.MoveLeft="moveLeft",e.MoveRight="moveRight",e.MoveUp="moveUp",e.MoveDown="moveDown",e.RotateCCW="rotateCCW",e.RotateCW="rotateCW",e.FlipX="flipX",e.FlipY="flipY",e.ToggleFS="toggleFS"})(L||={}),function(e){e.Cover="cover",e.Full="full",e.Max="max"}(R||={});var ie,z={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1};!function(e){e[e.Init=0]="Init",e[e.Loading=1]="Loading",e[e.Error=2]="Error",e[e.Ready=3]="Ready",e[e.Destroyed=4]="Destroyed"}(ie||={});var B,ae={bounds:!0,classes:{container:"f-panzoom",wrapper:"f-panzoom__wrapper",content:"f-panzoom__content",viewport:"f-panzoom__viewport"},clickAction:L.ToggleFull,dblClickAction:!1,gestures:{},height:"auto",l10n:N,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:"drag",protected:!1,singleClickAction:!1,spinnerTpl:'<div class="f-spinner"></div>',wheelAction:L.Zoom,width:"auto"},oe=0,se=0,ce=0,V=(e,i={},s={})=>{let o,u,c,g,m,v,y,E,b=0,k={...ae,...i},_={},x={...z},w={...z},C=[];function S(e){let t=k[e];return t&&"function"==typeof t?t(we):t}function A(){return e&&e.parentElement&&o&&3===b}let M=new Map;function T(e,...t){let n=[...M.get(e)||[]];k.on&&n.push(k.on[e]);for(let e of n)e&&"function"==typeof e&&e(we,...t);"*"!==e&&T("*",e,...t)}function R(e){if(!A())return;let t=e.target;if(a(t))return;let n=Date.now(),i=l(-1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),1);T("wheel",e,i);let s=S("wheelAction");if(!s||e.defaultPrevented)return;let r=w.scale,o=r*(i>0?1.5:.5);if(s===L.Zoom){let t=Math.abs(e.deltaY)<100&&Math.abs(e.deltaX)<100;if(n-se<(t?200:45))return void P(e);se=n;let s=X(),a=K();if(F(o)<F(s)&&F(r)<=F(s)?(ce+=Math.abs(i),o=s):F(o)>F(a)&&F(r)>=F(a)?(ce+=Math.abs(i),o=a):(ce=0,o=l(s,o,a)),ce>7)return}switch(P(e),s){case L.Pan:le(s,{srcEvent:e,deltaX:2*-e.deltaX,deltaY:2*-e.deltaY});break;case L.Zoom:le(L.ZoomTo,{srcEvent:e,scale:o,center:{x:e.clientX,y:e.clientY}});break;default:le(s,{srcEvent:e})}}function O(t){let i=t.composedPath()[0];if(!re.isClickAllowed()||!n(i)||t.defaultPrevented||!e?.contains(i)||i.hasAttribute("disabled")||i.hasAttribute("aria-disabled")||i.hasAttribute("data-carousel-go-prev")||i.hasAttribute("data-carousel-go-next"))return;let s=i.closest("[data-panzoom-action]"),r=s?.dataset?.panzoomAction,a=s?.dataset?.panzoomValue||"";if(r){switch(P(t),r){case L.ZoomTo:case L.ZoomIn:case L.ZoomOut:le(r,{scale:parseFloat(a||"")||void 0});break;case L.MoveLeft:case L.MoveRight:le(r,{deltaX:parseFloat(a||"")||void 0});break;case L.MoveUp:case L.MoveDown:le(r,{deltaY:parseFloat(a||"")||void 0});break;case L.ToggleFS:_e();break;default:le(r)}return}if(!o?.contains(i))return;let l={srcEvent:t};if(le(S("clickAction"),l),S("dblClickAction")){let e=Date.now(),t=e-(oe||e);oe=e,t>0&&t<=250?(B&&=void clearTimeout(B),le(S("dblClickAction"),l)):B=setTimeout(()=>{le(S("singleClickAction"),l)},250)}}function V(e){if(E=e,!A()||!G()||x.scale<=1||w.scale<=1||(o?.dataset.animationName||"").indexOf("zoom")>-1)return;let t=U(w.scale);if(!t)return;let{x:n,y:i}=t;le(L.Pan,{deltaX:n-w.x,deltaY:i-w.y})}function $(){e&&(f(e,"is-loading"),e.querySelector(".f-spinner")?.remove())}function N(){if(!e||!u)return;if($(),I(u)&&(!u.complete||!u.naturalWidth))return b=2,o?.classList.add("has-error"),void T("error");T("loaded");let{width:t,height:n}=Z();I(u)&&(u.setAttribute("width",t+""),u.setAttribute("height",n+"")),o&&(f(o,"has-error"),I(u)&&(o.setAttribute("width",t+""),o.setAttribute("height",n+""),o.style.aspectRatio=`${t/n||""}`)),v=ee().on("start",(e,t)=>{void 0!==t.angle&&(t.angle=90*Math.round(t.angle/90)),void 0!==t.flipX&&(t.flipX=t.flipX>0?1:-1),void 0!==t.flipY&&(t.flipY=t.flipY>0?1:-1),w={...z,...t},ie(),T("animationStart")}).on("pause",e=>{w={...z,...e}}).on("step",e=>{if(!A())return void v?.end();if(x={...z,...e},G()||!S("bounds")||Ee()||w.scale>x.scale||w.scale<W())return void ue();let t=J(w.scale),n=!1,i=!1,s=!1,r=!1;x.x<t.x[0]&&(n=!0),x.x>t.x[1]&&(i=!0),x.y<t.y[0]&&(r=!0),x.y>t.y[1]&&(s=!0);let a=!1,o=!1,u=!1,d=!1;w.x<t.x[0]&&(a=!0),w.x>t.x[1]&&(o=!0),w.y<t.y[0]&&(d=!0),w.y>t.y[1]&&(u=!0);let c=!1;(i&&o||n&&a)&&(w.x=l(t.x[0],w.x,t.x[1]),c=!0),(s&&u||r&&d)&&(w.y=l(t.y[0],w.y,t.y[1]),c=!0),c&&v&&v.spring({tension:94,friction:17,maxSpeed:555*w.scale,restDelta:.1,restSpeed:.1,velocity:v.getCurrentVelocities()}).from(x).to(w).start(),ue()}).on("end",()=>{m?.isPointerDown()||ne(),v?.isRunning()||(ie(),T("animationEnd"))}),function(){let e=S("gestures");if(!e||!g||!u)return;let t=!1;m=re(g,e).on("start",e=>{if(!S("gestures")||!v||!A()||G())return;let n=e.srcEvent;(x.scale>1||ye(x.angle)||e.currentTouch.length>1)&&(n?.stopPropagation(),v.pause(),t=!0),1===e.currentTouch.length&&T("touchStart")}).on("move",e=>{t&&(1!==w.scale||ye(w.angle)||e.currentTouch.length>1)&&(P(e.srcEvent),e.srcEvent?.stopPropagation())}).on("pan",e=>{if(!t)return;let n=e.srcEvent;(1!==w.scale||ye(w.angle)||e.currentTouch.length>1)&&(P(n),le(L.Pan,e))}).on("swipe",e=>{t&&(w.scale>1||ye(w.angle))&&le(L.Swipe,e)}).on("tap",e=>{T("click",e)}).on("singleTap",e=>{T("singleClick",e)}).on("doubleTap",e=>{T("dblClick",e)}).on("pinch",e=>{t&&(e.scale>W()?le(L.ZoomIn,e):e.scale<W()?le(L.ZoomOut,e):le(L.Pan,e))}).on("end",e=>{t&&(e.currentTouch.length?(e.srcEvent.stopPropagation(),P(e.srcEvent),v?.end()):(t=!1,ie(),ne(),T("touchEnd")))}).init()}(),g&&(g.addEventListener("wheel",R,{passive:!1}),C.push(()=>{g?.removeEventListener("wheel",R,{passive:!1})}
1)),e?.addEventListener("click",O),document?.addEventListener("mousemove",V),C.push(()=>{e?.removeEventListener("click",O),document?.removeEventListener("mousemove",V)});let i=H();x={...i},w={...i},b=3,ue(),ie(),T("ready"),requestAnimationFrame(()=>{3===b&&($(),g&&(g.style.visibility=""))})}function H(){let e={...S("startPos")||{}},t=e.scale,n=1;n="string"==typeof t?Y(t):"number"==typeof t?t:W();let i={...z,...e,scale:n},s=G()?U(n):void 0;if(s){let{x:e,y:t}=s;i.x=e,i.y=t}return i}function j(){let e={top:0,left:0,width:0,height:0};if(o){let t=o.getBoundingClientRect();ye(w.angle)?(e.top=t.top+.5*t.height-.5*t.width,e.left=t.left+.5*t.width-.5*t.height,e.width=t.height,e.height=t.width):(e.top=t.top,e.left=t.left,e.width=t.width,e.height=t.height)}return e}function Z(){let e=S("width"),n=S("height");if(u&&"auto"===e){let t=u.getAttribute("width");e=t?parseFloat(t+""):void 0===u.dataset.width?I(g)?g.naturalWidth:I(u)?u.naturalWidth:o?.getBoundingClientRect().width||0:parseFloat(u.dataset.width+"")}else e=t(e)?parseFloat(e):e;if(u&&"auto"===n){let e=u.getAttribute("height");n=e?parseFloat(e+""):void 0===u.dataset.height?I(g)?g.naturalHeight:I(u)?u.naturalHeight:o?.getBoundingClientRect().height||0:parseFloat(u.dataset.height+"")}else n=t(n)?parseFloat(n):n;return{width:e,height:n}}function q(){let e=j();return{width:e.width,height:e.height}}function G(){return"mousemove"===S("panMode")&&matchMedia("(hover: hover)").matches}function U(e){let t=E||S("event"),n=o?.getBoundingClientRect();if(!t||!n||e<=1)return{x:0,y:0};let i=(t.clientX||0)-n.left,s=(t.clientY||0)-n.top,{width:r,height:a}=q(),u=J(e);if(e>1){let t=S("mouseMoveFactor");t>1&&(e*=t)}let d=r*e,c=a*e,h=.5*(d-r)-i/r*100/100*(d-r),f=.5*(c-a)-s/a*100/100*(c-a);return h=l(u.x[0],h,u.x[1]),f=l(u.y[0],f,u.y[1]),{x:h,y:f}}function Y(t){if(!t)return w.scale;if(!e)return 1;let n=e.getBoundingClientRect(),i=j(),{width:s,height:r}=Z(),a=e=>{if("number"==typeof e)return e;switch(e){case"min":case"base":return 1;case"cover":return Math.max(n.height/i.height,n.width/i.width)||1;case"full":case"max":{let e=ye(w.angle)?r:s;return e&&i.width?e/i.width:1}}},o=S("minScale"),u=S("maxScale"),d=Math.min(a("full"),a(o)),c="number"==typeof u?a("full")*u:Math.min(a("full"),a(u));switch(t){case"min":return d;case"base":return l(d,1,c);case"cover":return a("cover");case"full":return Math.min(c,a("full"));case"max":return c}}function X(){return Y("min")}function W(){return Y("base")}function Q(){return Y("full")}function K(){return Y("max")}function J(t){let n={x:[0,0],y:[0,0]},i=e?.getBoundingClientRect();if(!i)return n;let s=j(),r=i.width,a=i.height,o=s.width,l=s.height,u=t=void 0===t?w.scale:t,d=t;if(G()&&t>1){let e=S("mouseMoveFactor");e>1&&(o*t>r+.01&&(u*=e),l*t>a+.01&&(d*=e))}if(o*=u,l*=d,o>r){n.x[0]=.5*(r-o),n.x[1]=.5*(o-r);let e=.5*(s.left-i.left),t=.5*(s.left+s.width-i.right);n.x[0]-=e+t,n.x[1]-=e+t}if(l>a){n.y[0]=.5*(a-l),n.y[1]=.5*(l-a);let e=.5*(s.top-i.top),t=.5*(s.top+s.height-i.bottom);n.y[0]-=e+t,n.y[1]-=e+t}return n}function ne(){if(!A()||!S("bounds")||!v)return;let e=X(),t=K(),n=l(e,w.scale,t);if(w.scale<e-.01||w.scale>t+.01)return void le(L.ZoomTo,{scale:n});if(v.isRunning()||Ee())return;let i=J(n);w.x<i.x[0]||w.x>i.x[1]||w.y<i.y[0]||w.y>i.y[1]?(w.x=l(i.x[0],w.x,i.x[1]),w.y=l(i.y[0],w.y,i.y[1]),v.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:v.getCurrentVelocities()}),v.from(x).to(w).start()):ue()}function ie(t){if(!A())return;let n=ve(),i=Ee(),s=be(),r=ke(),a=he(),l=fe();p(o,"is-fullsize",r),p(o,"is-expanded",s),p(o,"is-dragging",i),p(o,"can-drag",n),p(o,"will-zoom-in",a),p(o,"will-zoom-out",l);let u=ge(),d=me(),c=pe(),h=!A();for(let n of(t||e)?.querySelectorAll("[data-panzoom-action]")||[]){let e=n.dataset.panzoomAction,t=!1;if(h)t=!0;else switch(e){case L.ZoomIn:u||(t=!0);break;case L.ZoomOut:c||(t=!0);break;case L.ToggleFull:{d||c||(t=!0);let e=n.querySelector("g");e&&(e.style.display=r&&!t?"none":"");break}case L.IterateZoom:{u||c||(t=!0);let e=n.querySelector("g");e&&(e.style.display=u||t?"":"none");break}case L.ToggleCover:case L.ToggleMax:u||c||(t=!0)}t?(n.setAttribute("aria-disabled",""),n.setAttribute("tabindex","-1")):(n.removeAttribute("aria-disabled"),n.removeAttribute("tabindex"))}}function le(t,n){if(!(t&&e&&u&&v&&A())||t===L.Swipe&&Math.abs(v.getCurrentVelocities().scale)>.01)return;let i={...w},s={...w},r=J(G()?i.scale:x.scale),a=v.getCurrentVelocities(),o=j();n||={};let d=(n.currentTouch?.length||0)>1,c=n.velocityX||0,f=n.velocityY||0,p=n.center;n.srcEvent&&(p=D(te(n.srcEvent)));let g=n.deltaX||0,m=n.deltaY||0;switch(t){case L.MoveRight:g=n.deltaX||100;break;case L.MoveLeft:g=n.deltaX||-100;break;case L.MoveUp:m=n.deltaY||-100;break;case L.MoveDown:m=n.deltaY||100}let y=[];if("number"==typeof t)s.scale=t;else switch(t){case L.Reset:s={...z},s.scale=W();break;case L.ZoomTo:case L.ZoomIn:case L.ZoomOut:case L.ToggleCover:case L.ToggleFull:case L.ToggleMax:case L.IterateZoom:case L.Zoom:s.scale=de(t,n);break;case L.Pan:case L.Move:case L.MoveLeft:case L.MoveRight:case L.MoveUp:case L.MoveDown:if(Ee()){let e=1,t=1;s.x<=r.x[0]&&c<=0&&(e=Math.max(.01,1-Math.abs(1/o.width*Math.abs(s.x-r.x[0]))),e*=.2),s.x>=r.x[1]&&c>=0&&(e=Math.max(.01,1-Math.abs(1/o.width*Math.abs(s.x-r.x[1]))),e*=.2),s.y<=r.y[0]&&f<=0&&(t=Math.max(.01,1-Math.abs(1/o.height*Math.abs(s.y-r.y[0]))),t*=.2),s.y>=r.y[1]&&f>=0&&(t=Math.max(.01,1-Math.abs(1/o.height*Math.abs(s.y-r.y[1]))),t*=.2),s.x+=g*e,s.y+=m*t}else s.x=l(r.x[0],s.x+g,r.x[1]),s.y=l(r.y[0],s.y+m,r.y[1]);break;case L.Swipe:let e=(e=0)=>Math.sign(e)*Math.abs(e)**1.5;s.x+=l(-1e3,e(c),1e3),s.y+=l(-1e3,e(f),1e3),f&&!c&&(s.x=l(r.x[0],s.x,r.x[1])),!f&&c&&(s.y=l(r.y[0],s.y,r.y[1])),a.x=c,a.y=f;break;case L.RotateCW:s.angle+=90;break;case L.RotateCCW:s.angle-=90;break;case L.FlipX:s.flipX*=-1;break;case L.FlipY:s.flipY*=-1}if(void 0!==x.angle&&Math.abs(x.angle)>=360&&(s.angle-=360*Math.floor(x.angle/360),x.angle-=360*Math.floor(x.angle/360)),y.length){let e=y.findIndex(e=>e>s.scale+1e-4);s.scale=y[e]||y[0]}
1if(d&&(s.scale=l(X()*(d?.8:1),s.scale,K()*(d?1.6:1))),G()){let e=U(s.scale);if(e){let{x:t,y:n}=e;s.x=t,s.y=n}}else if(Math.abs(s.scale-i.scale)>1e-4){let t=0,n=0;if(p)t=p.x,n=p.y;else{let i=e.getBoundingClientRect();t=i.x+.5*i.width,n=i.y+.5*i.height}let a=t-o.left,u=n-o.top;a-=.5*o.width,u-=.5*o.height;let c=(a-i.x)/i.scale,h=(u-i.y)/i.scale;s.x=a-c*s.scale,s.y=u-h*s.scale,!d&&S("bounds")&&(r=J(s.scale),s.x=l(r.x[0],s.x,r.x[1]),s.y=l(r.y[0],s.y,r.y[1]))}if(t===L.Swipe){let e=500*s.scale,t=a;v.spring({tension:94,friction:17,maxSpeed:e,restDelta:.1,restSpeed:.1,velocity:t})}else t===L.Pan||d?v.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):v.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:a});if(0===n.velocity||h(x,s))x={...s},w={...s},v.end(),ue(),ie();else{if(h(w,s))return;v.from(x).to(s).start()}T("action",t)}function ue(){if(!u||!o||!g)return;let{width:t,height:n}=Z();Object.assign(o.style,{maxWidth:`min(${t}px, 100%)`,maxHeight:`min(${n}px, 100%)`});let{x:i,y:s,width:r,height:a,scale:l,angle:d,flipX:c,flipY:h}=function(){let{width:t,height:n}=Z(),{width:i,height:s}=q();if(!e)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:i,fitHeight:s,fullWidth:t,fullHeight:n};let{x:r,y:a,scale:o,angle:l,flipX:u,flipY:d}=x,c=1/Q(),h=t,f=n,p=x.scale*c,g=w.scale*c,m=Math.max(i,s),v=Math.min(i,s);t>n?(h=m,f=v):(h=v,f=m),p=t>n?m*o/t||1:m*o/n||1;let y=h?t*g:0,E=f?n*g:0;return r=r+.5*h-.5*y,a=a+.5*f-.5*E,{x:r,y:a,width:y,height:E,scale:h&&f?t*p/y:0,flipX:u,flipY:d,angle:l,fitWidth:i,fitHeight:s,fullWidth:t,fullHeight:n}}(),f=`translate(${F(i,100)}px, ${F(s,100)}px)`;f+=1!==c||1!==h?` scaleX(${F(l*c)}) scaleY(${F(l*h)})`:` scale(${F(l)})`,0!==d&&(f+=` rotate(${d}deg)`),g.style.width=`${F(r)}px`,g.style.height=`${F(a)}px`,g.style.transform=`${f}`,T("render")}function de(e=S("clickAction"),t={}){let n=w.scale,i=W(),s=[];if("number"==typeof e)i=e;else if(e){switch(e){case L.ZoomTo:i=t.scale||1;break;case L.ZoomIn:i=n*(t.scale||2);break;case L.ZoomOut:i=n*(t.scale||.5);break;case L.ToggleCover:s=[W(),Y("cover")];break;case L.ToggleFull:s=[W(),Q()];break;case L.ToggleMax:s=[W(),K()];break;case L.IterateZoom:s=[W(),Q(),K()];break;case L.Zoom:{let e=Q();i=n>=e-.05?W():Math.min(e,n*(t.scale||2));break}}s.length&&(i=s.find(e=>e>n+1e-4)??W())}return e!==L.ZoomTo&&(i=l(X(),i,K())),i}function he(){return!!(A()&&de()>w.scale)}function fe(){return!!(A()&&de()<w.scale)}function pe(){return!!(A()&&w.scale>X())}function ge(){return!!(A()&&w.scale<K())}function me(){return!!(A()&&w.scale<Q())}function ve(){return!(!A()||!be()&&!ye(w.angle)||!m||G())}function ye(e){return 90===Math.abs(e%180)}function Ee(){return!(!A()||!m?.isPointerDown()||G())}function be(){return!!(A()&&w.scale>W())}function ke(){return!!(A()&&w.scale>=Q())}function _e(){let t="in-fullscreen",n="with-panzoom-in-fullscreen";e?.classList.toggle(t);let i=e?.classList.contains(t);i?(document.documentElement.classList.add(n),document.addEventListener("keydown",xe,!0)):(document.documentElement.classList.remove(n),document.removeEventListener("keydown",xe,!0)),ue(),T(i?"enterFS":"exitFS")}function xe(e){"Escape"!==e.key||e.defaultPrevented||_e()}let we={canDrag:ve,canZoomIn:ge,canZoomOut:pe,canZoomToFull:me,destroy:function(){T("destroy");for(let e of Object.values(_))e?.destroy(we);for(let e of C)e();return o&&(o.style.aspectRatio="",o.style.maxWidth="",o.style.maxHeight=""),g&&(g.style.width="",g.style.height="",g.style.transform=""),o=void 0,u=void 0,g=void 0,x={...z},w={...z},v?.destroy(),v=void 0,m?.destroy(),m=void 0,b=4,we},emit:T,execute:le,getBoundaries:J,getContainer:function(){return e},getContent:function(){return u},getFullDim:Z,getGestures:function(){return m},getMousemovePos:U,getOptions:function(){return k},getPlugins:function(){return _},getScale:Y,getStartPosition:H,getState:function(){return b},getTransform:function(e){return!0===e?w:x},getTween:function(){return v},getViewport:function(){return g},getWrapper:function(){return o},init:function(){return b=0,T("init"),function(){for(let[e,t]of Object.entries({...s,...k.plugins||{}}))if(e&&!_[e]&&t instanceof Function){let n=t();n.init(we),_[e]=n}T("initPlugins")}(),function(){let t={...ae.classes,...S("classes")},n=t.content?.split(" ").shift(),i=t.wrapper?.split(" ").shift(),s=t.viewport?.split(" ").shift();if(n&&i&&s&&e&&(d(e,t.container),u=e.querySelector(`.${n}:not(.is-clone)`),u)){if(u.setAttribute("draggable","false"),o=e.querySelector(`.${i}`),o||(o=document.createElement("div"),d(o,t.wrapper),u.insertAdjacentElement("beforebegin",o),o.insertAdjacentElement("afterbegin",u)),g=e.querySelector(`.${s}`),g||(g=document.createElement("div"),d(g,t.viewport),o.insertAdjacentElement("beforeend",g)),g.contains(u)||g.insertAdjacentElement("afterbegin",u),c=e.querySelector(`.${n}.is-clone`),c||(c=u.cloneNode(!0),c.removeAttribute("id"),d(c,"is-clone"),o.insertAdjacentElement("afterbegin",c)),u instanceof HTMLPictureElement&&(u=u.querySelector("img")),c instanceof HTMLPictureElement&&(c=c.querySelector("img")),g instanceof HTMLPictureElement&&(g=g.querySelector("img")),g&&(g.style.visibility="hidden",S("protected"))){g.addEventListener("contextmenu",e=>{P(e)});let e=document.createElement("div");d(e,"f-panzoom__protected"),g.appendChild(e)}T("initLayout")}}(),function(){if(e&&o&&!y){let e=null;y=new ResizeObserver(()=>{A()&&(e||=requestAnimationFrame(()=>{A()&&(ie(),ne(),T("refresh")),e=null}))}),y.observe(o),C.push(()=>{y?.disconnect(),y=void 0,e&&=(cancelAnimationFrame(e),null)})}}(),function(){if(!e||!u)return;if(!I(u)||!I(c))return void N();let t=()=>{u&&I(u)&&u.decode().then(()=>{N()}).catch(()=>{N()})};b=1,e.classList.add("is-loading"),T("loading"),c.src&&c.complete?t():(function(){if(!e||e?.querySelector(".f-spinner"))return;let t=r(S("spinnerTpl"));t&&(t.classList.add("f-spinner"),e.classList.add("is-loading"),o?.insertAdjacentElement("afterbegin",t))}(),c.addEventListener("load",t,!1),c.addEventListener("error",t,!1),C.push(()=>{c?.removeEventListener("load",t,!1),c?.removeEventListener("error",t,!1)}))}(),we},isDragging:Ee,isExpanded:be,isFullsize:ke,isMousemoveMode:G,localize:function(e,t=[]){let n=S("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)},off:function(e,t){for(let n of e instanceof Array?e:[e])M.has(n)&&M.set(n,M.get(n).filter(e=>e!==t));return we},on:function(e,t){for(let n of e instanceof Array?e:[e])M.set(n,[...M.get(n)||[],t]);return we},toggleFS:_e,updateControls:ie,version:"6.1.15",willZoomIn:he,willZoomOut:fe};return we};V.l10n={en_EN:N},V.getDefaults=()=>ae;var H,U,le=(e,t)=>
1{let n=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||n.push(e)}),n},ue={...N,ERROR:"Something went wrong. <br /> Please try again later.",NEXT:"Next page",PREV:"Previous page",GOTO:"Go to page #%d",DOWNLOAD:"Download",TOGGLE_FULLSCREEN:"Toggle full-screen mode",TOGGLE_EXPAND:"Toggle full-size mode",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_AUTOPLAY:"Toggle slideshow"};(function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroyed=2]="Destroyed"})(H||={}),function(e){e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Error=2]="Error"}(U||={});var W,pe,de=e=>{e.cancelable&&e.preventDefault()},fe={adaptiveHeight:!1,center:!0,classes:{container:"f-carousel",isEnabled:"is-enabled",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",hasAdaptiveHeight:"has-adaptive-height",viewport:"f-carousel__viewport",slide:"f-carousel__slide",isSelected:"is-selected"},dragFree:!1,enabled:!0,errorTpl:'<div class="f-html">{{ERROR}}</div>',fill:!0,infinite:!0,initialPage:0,l10n:ue,rtl:!1,slides:[],slidesPerPage:"auto",spinnerTpl:'<div class="f-spinner"></div>',transition:"fade",tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1},me=0,he=e=>document.getElementById(`${e.split("#").pop()}`),ge=(i,o={},c={})=>{me++;let h,g,m,v,y,E=0,b={...fe},k={...fe},_={},x=null,w=null,S=0,A=0,M=0,F=!1,L=!1,T=!1,R="height",P=0,I=!0,O=0,D=0,B=0,V=0,z="*",$=[],N=[],H=new Set,j=[],Z=[],q=0,G=0,U=0;function Y(e,...t){let n=k[e];return n&&n instanceof Function?n(Ne,...t):n}function X(e,t=[]){let n=Y("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}let Q=new Map;function K(e,...t){let n=[...Q.get(e)||[]];k.on&&n.push(k.on[e]);for(let e of n)e&&e instanceof Function&&e(Ne,...t);"click"===e&&Te(t[0]),"*"!==e&&K("*",e,...t)}function J(){let t=s({},fe,b),n="",i=b.breakpoints||{};for(let[e,r]of Object.entries(i))window.matchMedia(e).matches&&(n+=e,s(t,r));if(void 0===y||n!==y){if(y=n,0!==E){let e=Z[O]?.slides[0]?.index;void 0===e&&(e=k.initialSlide),t.initialSlide=e,t.slides=[];for(let e of $)e.isVirtual&&t.slides.push(e)}Ve(),k=t,!1!==Y("enabled")&&(E=0,K("init"),function(){for(let[e,t]of Object.entries({...c,...k.plugins||{}}))if(e&&!_[e]&&t instanceof Function){let n=t();n.init(Ne,ge),_[e]=n}K("initPlugins")}(),function(){if(!x)return;let t=Y("classes")||{};d(x,t.container);let n=Y("style");if(n&&e(n))for(let[e,t]of Object.entries(n))x.style.setProperty(e,t);w=Array.from(x.querySelectorAll(`.${t.viewport}`)).filter(e=>e.closest(`.${t.container}`)===x).pop()||null,w||(w=document.createElement("div"),d(w,t.viewport),w.append(...le(x,`.${t.slide}`)),x.insertAdjacentElement("afterbegin",w)),x.carousel=Ne,K("initLayout")}(),function(){if(!w)return;let e=Y("classes")||{};$=[],[...le(w,`.${e.slide}`)].forEach(e=>{if(e.parentElement){let t=ke({el:e,isVirtual:!1,...e.dataset||{}});K("createSlide",t),$.push(t)}}),Ce();for(let e of $)K("addSlide",e);be(Y("slides"));for(let e of $){let t=e.el;t?.parentElement===w&&(d(t,k.classes.slide),d(t,e.class),Ie(e),K("attachSlideEl",e))}K("initSlides")}(),Se(),E=1,d(x,(Y("classes")||{}).isEnabled||""),Be(),ae(),g=ee().on("start",()=>{h&&h.isPointerDown()||(se(),Be())}).on("step",e=>{let t=P;P=e.pos,P!==t&&(I=!1,Be())}).on("end",e=>{h?.isPointerDown()||(P=e.pos,g&&!F&&(P<B||P>V)?g.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:P}).to({pos:l(B,P,V)}).start():I||(I=!0,K("settle")))}),ne(),function(){if(!x||!w)return;x.addEventListener("click",Le),document.addEventListener("mousemove",te),pe||(pe=function(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest("[data-carousel-target]")?.dataset?.carouselTarget;n&&(he(n)?.carousel)?.emit("click",e)},document.addEventListener("click",pe));let e=w.getBoundingClientRect();if(q=e.height,G=e.width,!m){let e=null;m=new ResizeObserver(()=>{e||=requestAnimationFrame(()=>{(function(){if(1!==E||!w)return;let e=Z.length,t=w.getBoundingClientRect(),n=t.height,i=t.width;e>1&&(T&&Math.abs(n-q)<.5||!T&&Math.abs(i-G)<.5)||(Se(),ne(),q=n,G=i,T&&!q||!T&&!G||x&&w&&(e===Z.length&&h?.isPointerDown()||(Y("dragFree")&&(F||P>B&&P<V)?(se(),Be()):Oe(O,{transition:!1}))))})(),e=null})}),m.observe(w)}}(),K("ready"))}}function te(e){W=e}function ne(){!1===Y("gestures")?h&&=void h.destroy():h||function(){let e=Y("gestures");!h&&!1!==e&&w&&(h=re(w,e).on("start",e=>{if(!g||!1===Y("gestures",e))return;let{srcEvent:t}=e;T&&C(t)&&!a(t.target)&&de(t),g.pause(),g.getCurrentVelocities().pos=0;let n=Z[O]?.slides[0],i=n?.el;n&&H.has(n.index)&&i&&(P=n.offset||0,P+=(function(e){let t=window.getComputedStyle(e),n=new DOMMatrixReadOnly(t.transform);return{width:n.m41||0,height:n.m42||0}}(i)[R]||0)*(L&&!T?1:-1)),Me(),F||(P<B||P>V)&&g.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:g.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:P}).to({pos:l(B,P,V)}).start()}).on("move",e=>{if(!1===Y("gestures",e))return;let{srcEvent:t,axis:n,deltaX:i,deltaY:s}=e;if(C(t)&&t.touches?.length>1)return;let r=t.target,o=a(r),l=o?o.scrollHeight>o.clientHeight?"y":"x":void 0;if(o&&o!==w&&(!n||n===l))return;if(!n)return de(t),t.stopPropagation(),void t.stopImmediatePropagation();if("y"===n&&!T||"x"===n&&T||(de(t),t.stopPropagation(),!g))return;let u=L&&!T?1:-1,d=T?s:i,c=g?.isRunning()?g.getEndValues().pos:P,h=1;F||(c<=B&&d*u<0?(h=Math.max(.01,1-(Math.abs(1/ve()*Math.abs(c-B))||0)),h*=.2):c>=V&&d*u>0&&(h=Math.max(.01,1-(Math.abs(1/ve()*Math.abs(c-V))||0)),h*=.2)),c+=d*h*u,g.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:g.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:P}).to({pos:c}).start()}).on("panstart",e=>{!1!==Y("gestures",e)&&e?.axis===(T?"y":"x")&&d(w,"is-dragging")}).on("panend",e=>{!1!==Y("gestures",e)&&f(w,"is-dragging")}).on("end",e=>{if(!1===Y("gestures",e))return;let{srcEvent:t,axis:n,velocityX:i,velocityY:s,currentTouch:r}=e;if(r.length>0||!g)return;let o=t.target,u=a(o),d=u?u.scrollHeight>u.clientHeight?"y":"x":void 0,c=u&&(!n||n===d);T&&C(t)&&!n&&Le(t);let h=Z.length,f=Y("dragFree");if(!h)return;let p=c?0:Y("vertical")?s:i;n!==(T?"y":"x")&&(p=0);let m=g?.isRunning()?g.getEndValues().pos:P,v=L&&!T?1:-1;if(c||(m+=p*(f?5:1)*v),!F&&(p*v<=0&&m<B||p*v>=0&&m>V)){let e=0;return Math.abs(p)>0&&(e=2*Math.abs(p),e=Math.min(.3*ve(),e)),m=l(B+-1*e,m,V+e),void g.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*p,restDelta:1,restSpeed:1}).from({pos:P}).to({pos:m}).start()}if(f||_.Autoscroll?.isEnabled())return void(Math.abs(p)>10?g.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*p,restDelta:1,restSpeed:1}).from({pos:P}).to({pos:m}).start():g.isRunning()||I||(I=!0,K("settle")));if(!f&&!_.Autoscroll?.isEnabled()&&(!e.offsetX&&!e.offsetY||"y"===n&&!T||"x"===n&&T))return void Oe(O,{transition:"tween"});
1let y=ue(m);Math.abs(p)>10&&y===O&&(y+=p>0?L&&!T?1:-1:L&&!T?-1:1),Oe(y,{transition:"tween",tween:{velocity:-1*p}})}).init())}(),p(w,"is-draggable",!!h&&Z.length>0)}function ie(e="*"){let t=[];for(let n of $)("*"===e||n.class&&n.class.includes(e)||n.el&&n.el?.classList.contains(e))&&t.push(n);v=void 0,z=e,N=[...t]}function se(){if(!g)return;let e=ue(g?.isRunning()?g.getEndValues().pos:P);e!==O&&(v=O,O=e,Ie(),ae(),oe(),K("change",O,v))}function ae(){if(!x)return;for(let e of x.querySelectorAll("[data-carousel-index]"))e.innerHTML=O+"";for(let e of x.querySelectorAll("[data-carousel-page]"))e.innerHTML=O+1+"";for(let e of x.querySelectorAll("[data-carousel-pages]"))e.innerHTML=Z.length+"";let e=Y("classes")||{},t=Array.from(x.querySelectorAll("[data-carousel-go-to]")).filter(t=>t.closest(`.${e.container}`)===x);for(let e of t)parseInt(e.dataset?.carouselGoTo||"-1",10)===O?e.setAttribute("aria-current","true"):e.removeAttribute("aria-current");for(let e of x.querySelectorAll("[data-carousel-go-prev]"))e.toggleAttribute("aria-disabled",!ze()),ze()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");for(let e of x.querySelectorAll("[data-carousel-go-next]"))e.toggleAttribute("aria-disabled",!$e()),$e()?e.removeAttribute("tabindex"):e.setAttribute("tabindex","-1");let n=!1,i=Z[O]?.slides[0];i&&(i.downloadSrc||"image"===i.type&&i.src)&&(n=!0);for(let e of x.querySelectorAll("[data-carousel-download]"))e.toggleAttribute("aria-disabled",!n)}function oe(e){e||=Z[O]?.slides[0];let t=e?.el;if(t)for(let n of t.querySelectorAll("[data-slide-index]"))n.innerHTML=e.index+1+""}function ue(e){if(!Z.length)return 0;let t=ye(),n=e;F?n-=Math.floor((e-Z[0]?.pos)/t)*t||0:n=l(Z[0]?.pos,e,Z[Z.length-1]?.pos);let i=new Map,s=0;for(let e of Z){let r=Math.abs(e.pos-n),a=Math.abs(e.pos-n-t),o=Math.abs(e.pos-n+t),l=Math.min(r,a,o);i.set(s,l),s++}let r=i.size>0?[...i.entries()].reduce((e,t)=>t[1]<e[1]?t:e):[O,0];return parseInt(r[0])}function ce(){return U}function ve(){return S}function ye(e=!0){return N.length?N.reduce((e,t)=>e+t.dim,0)+(N.length-(F&&e?0:1))*U:0}function Ee(e){let t=ye(),n=ve();if(!t||!w||!n)return[];let i=[];e=void 0===e?P:e,F&&(e-=Math.floor(e/t)*t||0);let s=0;for(let r of N){let a=(t=0)=>{i.indexOf(r)>-1||(r.pos=s-e+t||0,r.offset+t>e-r.dim-A+.51&&r.offset+t<e+n+M-.51&&i.push(r))};r.offset=s,F&&(a(t),a(-1*t)),a(),s+=r.dim+U}return i}function be(e,t){let n=[];for(let t of Array.isArray(e)?e:[e]){let e=ke({...t,isVirtual:!0});e.el||=document.createElement("div"),K("createSlide",e),n.push(e)}$.splice(void 0===t?$.length:t,0,...n),Ce();for(let e of n)K("addSlide",e),_e(e);return ie(z),n}function ke(e){return(t(e)||e instanceof HTMLElement)&&(e={html:e}),{index:-1,el:void 0,class:"",isVirtual:!0,dim:0,pos:0,offset:0,html:"",src:"",...e}}function _e(e){let t=e.el;if(!e||!t)return;let n=e.html?e.html instanceof HTMLElement?e.html:r(e.html):void 0;n&&(d(n,"f-html"),e.htmlEl=n,d(t,"has-html"),t.append(n),K("contentReady",e))}function xe(e){if(!w||!e)return;let t=e.el;if(t){if(t.setAttribute("index",e.index+""),t.parentElement!==w){let n;d(t,k.classes.slide),d(t,e.class),Ie(e);for(let t of $)if(t.index>e.index){n=t.el;break}w.insertBefore(t,n&&w.contains(n)?n:null),K("attachSlideEl",e)}return oe(e),t}}function we(e){let t=e?.el;t&&(t.remove(),Ae(t),K("detachSlideEl",e))}function Ce(){for(let e=0;e<$.length;e++){let t=$[e],n=t.el;n&&(t.index!==e&&Ae(n),n.setAttribute("index",`${e}`)),t.index=e}}function Se(){if(!x||!w)return;L=Y("rtl"),T=Y("vertical"),R=T?"height":"width";let e=Y("classes");if(p(x,e.isLTR,!L),p(x,e.isRTL,L),p(x,e.isHorizontal,!T),p(x,e.isVertical,T),p(x,e.hasAdaptiveHeight,Y("adaptiveHeight")),S=0,A=0,M=0,U=0,w){w.childElementCount||(w.style.display="grid");let e=w.getBoundingClientRect();S=w.getBoundingClientRect()[R]||0;let t=window.getComputedStyle(w);U=parseFloat(t.getPropertyValue("--f-carousel-gap"))||0,"visible"===t.getPropertyValue("overflow-"+(T?"y":"x"))&&(A=Math.abs(e[T?"top":"left"]),M=Math.abs(window[T?"innerHeight":"innerWidth"]-e[T?"bottom":"right"])),w.style.display=""}if(!S)return;let t=function(){let e=0;if(w){let t=document.createElement("div");t.style.display="block",d(t,k.classes.slide),w.appendChild(t),e=t.getBoundingClientRect()[R],t.remove(),t=void 0}return e}();for(let e of N){let i=e.el,s=0;if(!e.isVirtual&&i&&n(i)){let e=!1;i.parentElement&&i.parentElement===w||(w.appendChild(i),e=!0),s=i.getBoundingClientRect()[R],e&&i.parentElement?.removeChild(i)}else s=t;e.dim=s}if(F=!1,Y("infinite")){F=!0;let e=ye(),t=S+A+M;for(let n=0;n<N.length;n++){let i=N[n]?.dim+U;if(e-i<t&&e-i-t<i){F=!1;break}}}(function(){if(!x)return;let e=ve(),t=ye(!1),n=Y("slidesPerPage");n="auto"===n?1/0:parseFloat(n+""),Z=[];let i=0,s=0;for(let t of N)(!Z.length||i+t.dim-e>.05||s>=n)&&(Z.push({index:Z.length,slides:[],dim:0,offset:0,pos:0}),i=0,s=0),Z[Z.length-1]?.slides.push(t),i+=t.dim+U,s++;let r=Y("center"),a=Y("fill"),o=0;for(let n of Z){n.dim=(n.slides.length-1)*U;for(let e of n.slides)n.dim+=e.dim;n.offset=o,n.pos=o,!1!==r&&(n.pos-=.5*(e-n.dim)),a&&!F&&t>e&&(n.pos=l(0,n.pos,t-e)),o+=n.dim+U}let u,d=[];for(let e of Z){let t={...e};u&&Math.abs(t.pos-u.pos)<.1?(u.dim+=t.dim,u.slides=[...u.slides,...t.slides]):(u=t,t.index=d.length,d.push(t))}
1Z=d,O=l(0,O,Z.length-1)})(),B=Z[0]?.pos||0,V=Z[Z.length-1]?.pos||0,0===E?function(){v=void 0,O=Y("initialPage");let e=Y("initialSlide")||void 0;void 0!==e&&(O=Ne.getPageIndex(e)||0),O=l(0,O,Z.length-1),P=Z[O]?.pos||0,D=P}():D=Z[O||0]?.pos||0,K("refresh"),ae()}function Ae(e){if(!e||!n(e))return;let t=parseInt(e.getAttribute("index")||"-1"),i="";for(let t of Array.from(e.classList)){let e=t.match(/^f-(\w+)(Out|In)$/);e&&e[1]&&(i=e[1]+"")}if(!e||!i)return;let s=[`f-${i}Out`,`f-${i}In`,"to-prev","to-next","from-prev","from-next"];e.removeEventListener("animationend",Fe),f(e,s.join(" ")),H.delete(t)}function Me(){if(!w)return;let e=H.size>0;for(let e of N)Ae(e.el);H.clear(),e&&Be()}function Fe(e){"f-"===e.animationName?.substring(0,2)&&(Ae(e.target),H.size||(f(x,"in-transition"),!I&&Math.abs(Ne.getPosition(!0)-D)<.5&&(I=!0,K("settle"))),Be())}function Le(e){Te(e),K("click",e)}function Te(e){if(e.defaultPrevented)return;let t=e.composedPath()[0],n=t.closest("[data-carousel-target]")?.dataset?.carouselTarget;if(n&&he(n)!==x)return;if(t.closest("[data-carousel-go-prev]"))return de(e),void Ne.prev();if(t.closest("[data-carousel-go-next]"))return de(e),void Ne.next();let i=t.closest("[data-carousel-go-to]");if(i)return de(e),void Ne.goTo(parseFloat(i.dataset.carouselGoTo||"")||0);if(t.closest("[data-carousel-download]")){de(e);let t=Z[O]?.slides[0];if(t&&(t.downloadSrc||"image"===t.type&&t.src)){let e=t.downloadFilename,n=document.createElement("a"),i=t.downloadSrc||t.src||"";n.href=i,n.target="_blank",n.download=e||i,n.click()}return}}function Re(e){let t=e.el;t&&t.querySelector(".f-spinner")?.remove()}function Pe(e){let t=e.el;t&&(t.querySelector(".f-html.is-error")?.remove(),f(t,"has-error"))}function Ie(e){e||=Z[O]?.slides[0];let n=e?.el;if(!n)return;let i=Y("formatCaption",e);void 0===i&&(i=e.caption),i||="";let s=Y("captionEl");if(s&&s instanceof HTMLElement){if(e.index!==O)return;if(t(i)&&(s.innerHTML=X(i+"")),i instanceof HTMLElement){if(i.parentElement===s)return;s.innerHTML="",i.parentElement&&(i=i.cloneNode(!0)),s.append(i)}return}if(!i)return;let r=e.captionEl||n.querySelector(".f-caption");!r&&i instanceof HTMLElement&&i.classList.contains("f-caption")&&(r=i),r||(r=document.createElement("div"),d(r,"f-caption"),t(i)?r.innerHTML=X(i+""):i instanceof HTMLElement&&(i.parentElement&&(i=i.cloneNode(!0)),r.append(i)));let a=`f-caption-${me}_${e.index}`;r.setAttribute("id",a),r.dataset.selectable="true",d(n,"has-caption"),n.setAttribute("aria-labelledby",a),e.captionEl=r,n.insertAdjacentElement("beforeend",r)}function Oe(n,i={}){let{transition:r,tween:a}={transition:k.transition,tween:k.tween,...i||{}};if(!x||!g)return;let o=Z.length;if(!o||function(e,n){if(!(x&&S&&g&&n&&t(n)&&"tween"!==n))return!1;for(let e of j)if(S-e.dim>.5)return!1;if(A>.5||M>.5)return;let i=Z.length,s=e>O?1:-1;e=F?(e%i+i)%i:l(0,e,i-1),L&&(s*=-1);let r=Z[O]?.slides[0],a=r?.index,o=Z[e]?.slides[0],u=o?.index,c=Z[e]?.pos;if(void 0===u||void 0===a||a===u||P===c||Math.abs(S-(o?.dim||0))>1)return!1;I=!1,g.pause(),Me(),d(x,"in-transition"),P=D=c;let h=xe(r),p=xe(o);return se(),h&&(H.add(a),h.style.transform="",h.addEventListener("animationend",Fe),f(h,k.classes.isSelected),h.inert=!1,d(h,`f-${n}Out to-${s>0?"next":"prev"}`)),p&&(H.add(u),p.style.transform="",p.addEventListener("animationend",Fe),d(p,k.classes.isSelected),p.inert=!1,d(p,`f-${n}In from-${s>0?"prev":"next"}`)),Be(),!0}(n,r))return;n=F?(n%o+o)%o:l(0,n,o-1),D=Z[n||0]?.pos||0;let u=g.isRunning()?g.getEndValues().pos:P;if(Math.abs(D-u)<1)return P=D,O!==n&&(Ie(),v=O,O=n,ae(),oe(),K("change",O,v)),Be(),void(I||(I=!0,K("settle")));if(g.pause(),Me(),F){let e=ye(),t=Math.floor((u-Z[0]?.pos)/e)||0,n=D+t*e;D=[n+e,n,n-e].reduce(function(e,t){return Math.abs(t-u)<Math.abs(e-u)?t:e})}!1!==r&&e(a)?g.spring(s({},k.tween,a)).from({pos:P}).to({pos:D}).start():(P=D,se(),Be(),I||(I=!0,K("settle")))}function De(e){let t=P;if(F&&!0!==e){let e=ye();t-=(Math.floor((P-Z[0]?.pos||0)/e)||0)*e}return t}function Be(){if(!x||!w)return;j=Ee();let e,t=new Set,n=[],i=Z[O],s=k.setTransform;for(let s of N){let r=H.has(s.index),a=j.indexOf(s)>-1,o=i?.slides?.indexOf(s)>-1;if(s.isVirtual&&!r&&!a)continue;let l=xe(s);if(l&&(n.push(s),o&&t.add(l),Y("adaptiveHeight")&&o)){let t=(l.lastElementChild||l).getBoundingClientRect().height;e=null==e?t:Math.max(e,t)}}w&&e&&(w.style.height=`${e}px`),[...le(w,`.${k.classes.slide}
1`)].forEach(e=>{p(e,k.classes.isSelected,t.has(e));let n=$[parseInt(e.getAttribute("index")||"-1")];if(!n)return e.remove(),void Ae(e);let i=H.has(n.index),r=j.indexOf(n)>-1;if(n.isVirtual&&!i&&!r)return void we(n);if(e.inert=!r,!1===s)return;let a=n.pos?Math.round(1e4*n.pos)/1e4:0,o=0,l=0,d=0,c=0;i||(o=T?0:L?-1*a:a,l=T?a:0,d=u(o,0,n.dim,0,100),c=u(l,0,n.dim,0,100)),s instanceof Function&&!i?s(Ne,n,{x:o,y:l,xPercent:d,yPercent:c}):e.style.transform=o||l?`translate3d(${d}%, ${c}%,0)`:""}),K("render",n)}function Ve(){x?.removeEventListener("click",Le),document.removeEventListener("mousemove",te),H.clear(),m?.disconnect(),m=void 0;for(let e of $){let t=e.el;t&&n(t)&&(e.state=void 0,Re(e),Pe(e),e.isVirtual?(we(e),e.el=void 0):(Ae(t),t.style.transform="",w&&!w.contains(t)&&w.appendChild(t)))}for(let e of Object.values(_))e?.destroy();_={},h?.destroy(),h=void 0,g?.destroy(),g=void 0;for(let[e,t]of Object.entries(k.classes||{}))"container"!==e&&f(x,t);f(w,"is-draggable")}function ze(){return F||O>0}function $e(){return F||O<Z.length-1}let Ne={add:function(e,t){let n=P,i=O,s=ye(),r=g?.isRunning()?g.getEndValues().pos:P,a=s&&Math.floor((r-(Z[0]?.pos||0))/s)||0;return be(e,t),ie(z),Se(),g&&s&&(i===O&&(n-=a*s),n===D?P=D:g.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:n}).to({pos:D}).start()),Be(),Ne},canGoPrev:ze,canGoNext:$e,destroy:function(){return K("destroy"),window.removeEventListener("resize",J),Ve(),Q.clear(),x=null,Z=[],$=[],k={...fe},_={},N=[],y=void 0,z="*",E=2,Ne},emit:K,filter:function(e="*"){return ie(e),Se(),P=l(B,P,V),Be(),K("filter",e),Ne},getContainer:function(){return x},getGapDim:ce,getGestures:function(){return h},getLastMouseMove:function(){return W},getOption:function(e){return Y(e)},getOptions:function(){return k},getPage:function(){return Z[O]},getPageIndex:function(e){if(void 0!==e){for(let t of Z||[])for(let n of t.slides)if(n.index===e)return t.index;return-1}return O},getPageIndexFromPosition:ue,getPageProgress:function(e,t){void 0===e&&(e=O);let n=Z[e];if(!n)return e>O?-1:1;let i=ye(),s=ce(),r=n.pos,a=De();if(F&&!0!==t){let e=Math.floor((a-Z[0]?.pos)/i)||0;a-=e*i,r=[r+i,r,r-i].reduce(function(e,t){return Math.abs(t-a)<Math.abs(e-a)?t:e})}return(a-r)/(n.dim+s)||0},getPageVisibility:function(e){void 0===e&&(e=O);let t=Z[e];if(!t)return e>O?-1:1;let n=De(),i=ve(),s=t.pos;if(F){let e=ye(),t=s+(Math.floor((n-Z[0]?.pos)/e)||0)*e;s=[t+e,t,t-e].reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e})}return s>n&&s+t.dim<n+i?1:s<n?(s+t.dim-n)/t.dim||0:s+t.dim>n+i&&(n+i-s)/t.dim||0},getPages:function(){return Z},getPlugins:function(){return _},getPosition:De,getSlides:function(){return $},getState:function(){return E},getTotalSlideDim:ye,getTween:function(){return g},getViewport:function(){return w},getViewportDim:ve,getVisibleSlides:function(e){return void 0===e?j:Ee(e)},goTo:Oe,hasNavigated:function(){return void 0!==v},hideError:Pe,hideLoading:Re,init:function(){if(!i||!n(i))throw Error("No Element found");return 0!==E&&(Ve(),E=0),x=i,b=o,window.removeEventListener("resize",J),b.breakpoints&&window.addEventListener("resize",J),J(),Ne},isInfinite:function(){return F},isInTransition:function(){return H.size>0},isRTL:function(){return L},isSettled:function(){return I},isVertical:function(){return T},localize:X,next:function(e={}){return Oe(O+1,e),Ne},off:function(e,t){for(let n of e instanceof Array?e:[e])Q.has(n)&&Q.set(n,Q.get(n).filter(e=>e!==t));return Ne},on:function(e,t){for(let n of e instanceof Array?e:[e])Q.set(n,[...Q.get(n)||[],t]);return Ne},prev:function(e={}){return Oe(O-1,e),Ne},reInit:function(t={},n){return Ve(),E=0,y=void 0,z="*",o=t,b=t,e(n)&&(c=n),J(),Ne},remove:function(e){void 0===e&&(e=$.length-1);let t=$[e];return t&&(K("removeSlide",t),t.el&&=(Ae(t.el),void t.el.remove()),$.splice(e,1),ie(z),Se(),P=l(B,P,V),Be()),Ne},setPosition:function(e){P=e,se(),Be()},showError:function(e,t){if(1===E){Re(e),Pe(e);let n=e.el;if(n){let i=document.createElement("div");d(i,"f-html"),d(i,"is-error"),i.innerHTML=X(t||"<p>{{ERROR}}</p>"),e.htmlEl=i,d(n,"has-html has-error"),n.insertAdjacentElement("afterbegin",i),K("contentReady",e)}}return Ne},showLoading:function(e){let t=e.el,n=t?.querySelector(".f-spinner");if(!t||n)return Ne;let i=r(Y("spinnerTpl"));return i&&(d(i,"f-spinner"),t.insertAdjacentElement("beforeend",i)),Ne},version:"6.1.15"};return Ne};ge.l10n={en_EN:ue},ge.getDefaults=()=>fe;var Me,G=function(e="",t="",n=""){return e.split(t).join(n)},K={tpl:e=>`<img class="f-panzoom__content" \n ${e.srcset?'data-lazy-srcset="{{srcset}}"':""} \n ${e.sizes?'data-lazy-sizes="{{sizes}}"':""} \n data-lazy-src="{{src}}" alt="{{alt}}" />`},_e=()=>{let n;
1function i(t,i){let s=n?.getOptions().Zoomable,r=(e(s)?{...K,...s}:K)[t];return r&&"function"==typeof r&&i?r(i):r}function s(){n&&!1!==n.getOptions().Zoomable&&(n.on("addSlide",o),n.on("removeSlide",l),n.on("attachSlideEl",u),n.on("click",a),n.on("change",r),n.on("ready",r))}function r(){d();let e=n?.getVisibleSlides()||[];if(e.length>1||"slide"===n?.getOption("transition"))for(let t of e){let e=t.panzoomRef;e&&(n?.getPage().slides||[]).indexOf(t)<0&&e.execute(L.ZoomTo,{...e.getStartPosition()})}}function a(e,t){let n=t.target;n&&!t.defaultPrevented&&n.dataset.panzoomAction&&c(n.dataset.panzoomAction)}function o(e,s){let r=s.el;if(!n||!r||s.panzoomRef)return;let a=s.src||s.lazySrc||"",o=s.alt||s.caption||`Image #${s.index}`,l=s.srcset||s.lazySrcset||"",u=s.sizes||s.lazySizes||"";if(a&&t(a)&&!s.html&&(!s.type||"image"===s.type)){s.type="image",s.thumbSrc=s.thumbSrc||a;let e=i("tpl",s);e=G(e,"{{src}}",a+""),e=G(e,"{{srcset}}",l+""),e=G(e,"{{sizes}}",u+""),r.insertAdjacentHTML("afterbegin",e)}let c=r.querySelector(".f-panzoom__content");if(!c)return;c.setAttribute("alt",o+"");let h=V(r,{width:s.width&&"auto"!==s.width?parseFloat(s.width+""):"auto",height:s.height&&"auto"!==s.height?parseFloat(s.height+""):"auto",classes:{container:"f-zoomable"},event:()=>n?.getLastMouseMove(),spinnerTpl:()=>n?.getOption("spinnerTpl")||"",...i("Panzoom")});h.on("*",(e,t,...i)=>{n&&("loading"===t&&(s.state=0),"loaded"===t&&(s.state=1),"error"===t&&(s.state=2,n?.showError(s,"{{IMAGE_ERROR}}")),n.emit(`panzoom:${t}`,s,...i),"loading"===t&&n.emit("contentLoading",s),"ready"===t&&n.emit("contentReady",s),s.index===n?.getPageIndex()&&d())}),s.panzoomRef=h}function l(e,t){t.panzoomRef&&=void t.panzoomRef.destroy()}function u(e,t){let n=t.panzoomRef;if(n)switch(n.getState()){case 0:n.init();break;case 3:n.execute(L.ZoomTo,{...n.getStartPosition(),velocity:0})}}function d(){let e=n?.getContainer()||void 0,t=n?.getPage()?.slides[0]?.panzoomRef;if(e)if(t)t.updateControls(e);else for(let t of e.querySelectorAll("[data-panzoom-action]")||[])t.setAttribute("aria-disabled",""),t.setAttribute("tabindex","-1")}function c(e,...t){n?.getPage().slides[0].panzoomRef?.execute(e,...t)}return{init:function(e){n=e,n.on("initPlugins",s)},destroy:function(){if(n){n.off("initPlugins",s),n.off("addSlide",o),n.off("removeSlide",l),n.off("attachSlideEl",u),n.off("click",a),n.off("change",r),n.off("ready",r);for(let e of n.getSlides())l(0,e)}n=void 0},execute:c}},ve={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},ye=()=>{let t,n;function i(){let n=t?.getOptions().Sync;return e(n)?{...ve,...n}:ve}function s(){let e=i().target;t&&e&&function(e){t&&e&&(n=e,t.getOptions().classes={...t.getOptions().classes,isSelected:""},t.getOptions().initialSlide=n.getPage()?.slides[0]?.index||0,i().syncOnChange&&t.on("change",a),i().syncOnClick&&t.on("click",l),i().syncOnHover&&t.getViewport()?.addEventListener("mouseover",u),t&&n&&(t.on("ready",r),t.on("refresh",d),n.on("change",o),n.on("filter",c)))}(e)}function r(){h()}function a(){if(t&&n){let e=t.getPage()?.slides||[],i=n.getPageIndex(e[0].index||0);i>-1&&n.goTo(i,t.hasNavigated()?void 0:{tween:!1,transition:!1}),h()}}function o(){if(t&&n){let e=t.getPageIndex(n.getPage()?.slides[0].index||0);e>-1&&t.goTo(e,n.hasNavigated()?void 0:{tween:!1,transition:!1}),h()}}function l(e,i){if(!t||!n||t.getTween()?.isRunning())return;let s=t?.getOptions().classes.slide;if(!s)return;let r=i.target.closest(`.${s}`);
1if(r){let e=parseInt(r.getAttribute("index")||"")||0,t=n.getPageIndex(e);n.goTo(t)}}function u(e){t&&l(0,e)}function d(){if(t&&n){let e=t.getPageIndex(n.getPage()?.slides[0].index||0);e>-1&&t.goTo(e,{tween:!1,transition:!1}),h()}}function c(e,i){t&&n&&(t.filter(i),o())}function h(){if(!n)return;let e=n.getPage()?.slides[0]?.index||0;for(let n of t?.getSlides()||[])n.el?.classList.toggle("is-selected",n.index===e)}return{init:function(e){t=e,t.on("initSlides",s)},destroy:function(){t?.off("ready",r),t?.off("refresh",d),t?.off("change",a),t?.off("click",l),t?.getViewport()?.removeEventListener("mouseover",u),n?.off("change",o),n?.off("filter",c),n=void 0,t?.off("initSlides",s),t=void 0},getTarget:function(){return n}}},be={showLoading:!0,preload:1},xe="is-lazyloading",Se="is-lazyloaded",Ce="has-lazyerror",we=()=>{let t;function n(){let n=t?.getOptions().Lazyload;return e(n)?{...be,...n}:be}function i(e){let i=e.el;if(!i)return;let s=n(),r="[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]",a=Array.from(i.querySelectorAll(r));i.matches(r)&&a.push(i);for(let n of a){let i=n.dataset.lazySrc,r=n.dataset.lazySrcset,a=n.dataset.lazySizes,o=n.dataset.lazyBg,l=(n instanceof HTMLImageElement||n instanceof HTMLSourceElement)&&(i||r),u=!!o;if(!l&&!u)continue;let c=i||r||o;if(c){if(l){let o=n.parentElement?.classList.contains("f-panzoom__wrapper");s.showLoading&&t?.showLoading(e),n.addEventListener("load",()=>{t?.hideLoading(e),f(n,Ce),n instanceof HTMLImageElement?n.decode().finally(()=>{f(n,xe),d(n,Se)}).catch(()=>{}):(f(n,xe),d(n,Se)),o||t?.emit("lazyLoad:loaded",e,n,c)}),n.addEventListener("error",()=>{t?.hideLoading(e),f(n,xe),d(n,Ce),o||t?.emit("lazyLoad:error",e,n,c)}),n.classList.add("f-lazyload"),n.classList.add(xe),o||t?.emit("lazyLoad:load",e,n,c),i&&(n.src=i),r&&(n.srcset=r),a&&(n.sizes=a)}else u&&(n.style.backgroundImage=`url('${o}')`);delete n.dataset.lazySrc,delete n.dataset.lazySrcset,delete n.dataset.lazySizes,delete n.dataset.lazyBg}}}function s(){if(!t)return;let e=[...t.getVisibleSlides()],s=n().preload;if(s>0){let n=t.getPosition(),i=t.getViewportDim();e.push(...t.getVisibleSlides(n+i*s),...t.getVisibleSlides(n-i*s))}for(let t of e)i(t)}return{init:function(e){t=e,t.on("render",s)},destroy:function(){t?.off("render",s),t=void 0}}},q='<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1">',Te="</svg>",Ee={prevTpl:q+'<path d="M15 3l-9 9 9 9"></path>'+Te,nextTpl:q+'<path d="M9 3l9 9-9 9"></path>'+Te},De=()=>{let t,n,i;function s(n){let i=function(){let n=t?.getOptions().Arrows;return e(n)?{...Ee,...n}:Ee}(),s=`<button data-carousel-go-${n} tabindex="0" class="f-button is-arrow is-${n}" title="{{${n.toUpperCase()}}}">`+i[`${n}Tpl`]+"</button>",a=r(t.localize(s))||void 0;return a&&d(a,i[`${n}Class`]),a}function a(){n?.remove(),n=void 0,i?.remove(),i=void 0,t?.getContainer()?.classList.remove("has-arrows")}function o(){t&&!1!==t.getOptions().Arrows&&t.getPages().length>1?(function(){if(!t)return;let e=t.getViewport();e&&(n||(n=s("prev"),n&&e.insertAdjacentElement("beforebegin",n)),i||(i=s("next"),i&&e.insertAdjacentElement("afterend",i)),p(t.getContainer(),"has-arrows",!0))}(),t&&(n?.toggleAttribute("aria-disabled",!t.canGoPrev()),i?.toggleAttribute("aria-disabled",!t.canGoNext()))):a()}return{init:function(e){t=e.on(["change","refresh"],o)},destroy:function(){a(),t?.off(["change","refresh"],o),t=void 0}}},Oe='<circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>',ke='<g><line x1="11" y1="8" x2="11" y2="14"></line></g>'+Oe,Ae={moveLeft:["moveLeft","MOVE_LEFT",'<path d="M5 12h14M5 12l6 6M5 12l6-6"/>'],moveRight:["moveRight","MOVE_RIGHT",'<path d="M5 12h14M13 18l6-6M13 6l6 6"/>'],moveUp:["moveUp","MOVE_UP",'<path d="M12 5v14M18 11l-6-6M6 11l6-6"/>'],moveDown:["moveDown","MOVE_DOWN",'<path d="M12 5v14M18 13l-6 6M6 13l6 6"/>'],zoomOut:["zoomOut","ZOOM_OUT",Oe],zoomIn:["zoomIn","ZOOM_IN",ke],toggleFull:["toggleFull","TOGGLE_FULL",ke],iterateZoom:["iterateZoom","ITERATE_ZOOM",ke],toggle1to1:["toggleFull","TOGGLE_FULL",'<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"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/>'],rotateCCW:["rotateCCW","ROTATE_CCW",'<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"/>'],rotateCW:["rotateCW","ROTATE_CW",'<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"/>'],flipX:["flipX","FLIP_X",'<path d="M12 3v18M16 7v10h5L16 7M8 7v10
1H3L8 7"/>'],flipY:["flipY","FLIP_Y",'<path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/>'],reset:["reset","RESET",'<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"/>'],toggleFS:["toggleFS","TOGGLE_FS",'<g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g>']},je={};for(let e of Object.keys(Ae)){let t=Ae[e];je[e]={tpl:`<button data-panzoom-action="${t[0]}" class="f-button" title="{{${t[1]}}}"><svg>${t[2]}</svg></button>`}}!function(e){e.Left="left",e.middle="middle",e.right="right"}(Me||={});var ze,Je,Ye,st,Ne={counter:{tpl:'<div class="f-counter"><span data-carousel-page></span>/<span data-carousel-pages></span></div>'},download:{tpl:'<button data-carousel-download class="f-button" title="{{DOWNLOAD}}"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></button>'},autoplay:{tpl:'<button data-autoplay-action="toggle" class="f-button" title="{{TOGGLE_AUTOPLAY}}"><svg><g><path d="M5 3.5 19 12 5 20.5Z"/></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>'},thumbs:{tpl:'<button data-thumbs-action="toggle" class="f-button" title="{{TOGGLE_THUMBS}}"><svg><rect width="18" height="14" x="3" y="3" rx="2"/><path d="M4 21h1M9 21h1M14 21h1M19 21h1"/></svg></button>'},...je},Pe={absolute:!1,display:{left:[],middle:["zoomIn","zoomOut","toggle1to1","rotateCCW","rotateCW","flipX","flipY","reset"],right:[]},enabled:"auto",items:{}},Fe=()=>{let n,i;function a(t){let i=n?.getOptions().Toolbar,s=(e(i)?{...Pe,...i}:Pe)[t];return s&&"function"==typeof s&&n?s(n):s}function o(){if(!n||i||!1===n?.getOptions().Toolbar)return;let o=n.getContainer();if(!o)return;let l=a("enabled");if(!l)return;let u=a("absolute"),c=n.getSlides().length>1,h=!1,f=!1;for(let e of n.getSlides())e.panzoomRef&&(h=!0),(e.downloadSrc||"image"===e.type&&e.src)&&(f=!0);let p=n.getPlugins().Thumbs?.isEnabled()||!1,g=c&&n.getPlugins().Autoplay||!1,m=n.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if("auto"===l&&(l=h),!l)return;i=o.querySelector(".f-carousel__toolbar")||void 0,i||(i=document.createElement("div"),d(i,"f-carousel__toolbar"));let v=a("display"),y=s({},Ne,a("items"));for(let s of["left","middle","right"]){let a=v[s]||[],o=document.createElement("div");d(o,`f-carousel__toolbar__column is-${s}`);for(let i of a){let s;if(t(i)){if("counter"===i&&!c||"autoplay"===i&&!g||Object.prototype.hasOwnProperty.call(je,i)&&!h||"fullscreen"===i&&!m||"thumbs"===i&&!p||"download"===i&&!f)continue;s=y[i]}if(e(i)&&(s=i),s&&s.tpl){let e=n.localize(s.tpl);e=e.split("<svg>").join('<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24">');let t=r(e);t&&("function"==typeof s.click&&n&&t.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof s.click&&n&&s.click(n,e)}),o.append(t))}}i.append(o)}if(i.childElementCount){if(u&&d(i,"is-absolute"),!i.parentElement){let e=a("parentEl");e?e.insertAdjacentElement("afterbegin",i):o.insertAdjacentElement("afterbegin",i)}o.contains(i)&&(d(o,"has-toolbar"),u&&d(o,"has-absolute-toolbar"))}}return{init:function(e){n=e,n?.on("initSlides",o)},destroy:function(){n?.off("initSlides",o),f(n?.getContainer(),"has-toolbar has-absolute-toolbar"),i?.remove(),i=void 0},add:function(e,t){Ne[e]=t},isEnabled:function(){return!!i}}},Ie={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},Le=()=>{let t,n,i=!1,s=!1,r=!1,a=null;function o(n){let i=t?.getOptions().Autoplay,s=(e(i)?{...Ie,...i}:Ie)[n];return s&&"function"==typeof s&&t?s(t):s}function l(){clearTimeout(n),n=void 0}function u(){if(!t||!i||r||s||n||!t.isSettled()||function(){let e=t?.getPage()?.slides||[];for(let t of e)if(0===t.state)return!0;return!1}())return;!function(){if(!t||(f(),!o("showProgressbar")))return;let e=o("progressbarParentEl");if(!e&&t.getPlugins().Toolbar?.isEnabled()&&(e=t.getContainer()),!e&&!0!==t.getPlugins().Toolbar?.isEnabled()){let n=t.getPages()[0]?.slides||[],i=t.getPage()?.slides||[];1===n.length&&1===i.length&&(e=i[0].el)}if(e||=t.getViewport(),!e)return;a=document.createElement("div"),d(a,"f-progressbar"),e.prepend(a);let n=o("timeout")||1e3;a.style.animationDuration=`${n}ms`}();let e=o("timeout");n=setTimeout(()=>{t&&i&&!s&&(t.isInfinite()||t.getPageIndex()!==t.getPages().length-1?t.next():t.goTo(0))},e)}function c(){if(!t||t.getPages().length<2||!1===t.getOptions().Autoplay||i)return;i=!0,t.emit("autoplay:start",o("timeout")),d(t.getContainer(),"has-autoplay"),t.getTween()?.on("start",E);let e=t?.getContainer();e&&o("pauseOnHover")&&matchMedia("(hover: hover)").matches&&(e.addEventListener("mouseenter",b,!1),e.addEventListener("mouseleave",k,!1)),t.on("change",v),t.on("settle",y),t.on("contentReady",g),t.on("panzoom:touchStart",h),t.on("panzoom:wheel",h),t.isSettled()&&u()}
1function h(){if(l(),f(),t){if(i){t.emit("autoplay:end"),t.getTween()?.off("start",E);let e=t.getContainer();e&&(e.classList.remove("has-autoplay"),e.removeEventListener("mouseenter",b,!1),e.removeEventListener("mouseleave",k,!1))}t.off("change",v),t.off("settle",y),t.off("contentReady",g),t.off("panzoom:touchStart",h),t.off("panzoom:wheel",h)}i=!1,s=!1}function f(){a&&=(a.remove(),null)}function p(){t&&t.getPages().length>1&&o("autoStart")&&c()}function g(){u()}function m(e,t){let n=t.target;n&&!t.defaultPrevented&&"toggle"===n.dataset.autoplayAction&&_.toggle()}function v(){!t||!t?.isInfinite()&&t.getPageIndex()===t.getPages().length-1?h():(l(),f())}function y(){u()}function E(){l(),f()}function b(){r=!0,i&&(l(),f())}function k(){r=!1,i&&!s&&t?.isSettled()&&u()}let _={init:function(e){t=e,t.on("ready",p),t.on("click",m)},destroy:function(){h(),t?.off("ready",p),t?.off("click",m),t=void 0},isEnabled:()=>i,pause:function(){s=!0,l(),f()},resume:function(){s=!1,i&&!r&&u()},start(){c()},stop(){h()},toggle(){i?h():c()}};return _},Re={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:'<button aria-label="Slide to #{{page}}"><img draggable="false" alt="{{alt}}" data-lazy-src="{{src}}" /></button>',type:"modern"},Be=()=>{let t,n,i,a,o,u=0,c=0,h=!0;function f(n){let i=t?.getOptions().Thumbs,s=(e(i)?{...Re,...i}:Re)[n];return s&&"function"==typeof s&&t?s(t):s}function p(){if(!t||!1===t?.getOptions().Thumbs)return!1;let e=0;for(let n of t.getSlides())n.thumbSrc&&e++;return e>=f("minCount")}function g(){return"modern"===f("type")}function m(){return"scrollable"===f("type")}function v(){let e=[],n=t?.getSlides()||[];for(let t of n)e.push({index:t.index,class:t.thumbClass,html:y(t)});return e}function y(e){let t=e.thumb?e.thumb instanceof HTMLImageElement?e.thumb.src:e.thumb:e.thumbSrc||void 0,n=void 0===e.thumbAlt?`Thumbnail #${(e.index||0)+1}`:e.thumbAlt+"",i=f("thumbTpl");return i=G(i,"{{alt}}",n),i=G(i,"{{src}}",t+""),i=G(i,"{{index}}",`${e.index||0}`),i=G(i,"{{page}}",`${(e.index||0)+1}`),i}function E(e){return`<div index="${e.index||0}" class="f-thumbs__slide ${e.class||""}">${e.html||""}</div>`}function b(e=!1){let n=t?.getContainer();if(!t||!n||i||!p())return;let s=f("Carousel")?.classes||{};if(s.container=s.container||"f-thumbs",!i){let e=n.nextElementSibling;e?.classList.contains(s.container)&&(i=e)}if(!i){i=document.createElement("div");let e=f("parentEl");e?e.insertAdjacentElement("beforeend",i):n.insertAdjacentElement("afterend",i)}d(i,s.container),d(i,"f-thumbs"),d(i,`is-${f("type")}`),e&&d(i,"is-hidden")}function k(){if(!i||!m())return;a=document.createElement("div"),d(a,"f-thumbs__viewport");let e="";for(let t of v())"string"==typeof(t.html||"")&&(e+=E(t));a.innerHTML=e,i.append(a),i.addEventListener("click",e=>{e.preventDefault();let n=e.target.closest("[index]"),i=parseInt(n?.getAttribute("index")||"-1");t&&i>-1&&t.goTo(i)}),o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target instanceof HTMLImageElement&&(e.target.src=e.target.getAttribute("data-lazy-src")+"",e.target.removeAttribute("data-lazy-src"),o?.unobserve(e.target))})},{root:a,rootMargin:"100px"}),i.querySelectorAll("[data-lazy-src]").forEach(e=>{o?.observe(e)}),t?.emit("thumbs:ready")}function _(){if(!ze||!t||!i||m()||n)return;let e=v();if(!e.length)return;let r=s({},{Sync:{target:t},Lazyload:{preload:1},slides:e,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",slide:"f-thumbs__slide"},center:!0,fill:!g(),infinite:!1,dragFree:!0,rtl:t.getOptions().rtl||!1,slidesPerPage:e=>{let t=0;return g()&&(function(){if(!g()||!i)return;let e=e=>i&&parseFloat(getComputedStyle(i).getPropertyValue("--f-thumb-"+e))||0;u=e("width"),c=e("clip-width")}(),t=4*(u-c)),e&&e.getTotalSlideDim()<=e.getViewportDim()-t?1/0:1}},Re.Carousel||{},f("Carousel")||{});n=ze(i,r,{Sync:ye,Lazyload:we}),n.on("ready",()=>{d(i,"is-syncing"),t?.emit("thumbs:ready"),g()&&t?.on("render",S)}),n.on("destroy",()=>{t?.emit("thumbs:destroy")}),n.init(),n.getGestures()?.on("start",()=>{h=!1}),n.on("click",(e,t)=>{let n=t.target;if(n){let e=n.matches("button")?n:n.firstElementChild;e&&e.matches("button")&&(t.preventDefault(),e.focus({preventScroll:!0}))}}),d(t.getContainer(),"has-thumbs"),P()}function x(){p()&&f("showOnStart")&&(b(),k())}function w(){p()&&(_(),t?.on("addSlide",M),t?.on("removeSlide",F),t?.on("click",L),t?.on("refresh",T),t?.getGestures()?.on("start",C),R(!0))}function C(){h=!0,document.activeElement?.closest(".f-thumbs")&&document.activeElement?.blur()}function S(){i?.classList.toggle("is-syncing",!1===t?.hasNavigated()||t?.getTween()?.isRunning()),P(),t?.getGestures()?.isPointerDown()&&function(){if(!(g(
1)&&t&&n&&h))return;let e=n.getTween(),i=n.getPages(),s=t.getPageIndex()||0,r=t.getPageProgress()||0;if(!(t&&i&&i[s]&&e))return;let a=e.isRunning()?e.getCurrentValues().pos:n.getPosition();if(void 0===a)return;let o=i[s].pos+r*(u-c);o=l(i[0].pos,o,i[i.length-1].pos),e.from({pos:a}).to({pos:o}).start()}()}function A(){h=!0,R()}function M(e,t){let i={html:y(t)};if(n)n.add(i,t.index);else if(a){let e=r(E(i));if(e){a.append(e);let t=e.querySelector("img");t&&o?.observe(t)}}}function F(e,t){n?n.remove(t.index):a&&a.querySelector(`[index="${t.index}"]`)?.remove()}function L(e,t){let n=t.target;t.defaultPrevented||"toggle"!==n?.dataset?.thumbsAction||(i||(b(!0),k(),_()),i&&i.classList.toggle("is-hidden"))}function T(){R()}function R(e=!1){if(!t||!a||!m())return;let n=t.getPageIndex();a.querySelectorAll(".is-selected").forEach(e=>{e.classList.remove("is-selected")});let i=a.querySelector(`[index="${n}"]`);if(i){i.classList.add("is-selected");let t=a.getBoundingClientRect(),n=i.getBoundingClientRect(),s=i.offsetTop-a.offsetTop-.5*t.height+.5*n.height,r=i.scrollLeft-a.scrollLeft-.5*t.width+.5*n.width;a.scrollTo({top:s,left:r,behavior:e?"instant":"smooth"})}}function P(){if(!g()||!t||!n)return;let e=n?.getSlides()||[],i=-.5*u;for(let n of e){let e=n.el;if(!e)continue;let s=t.getPageProgress(n.index)||0;s=Math.max(-1,Math.min(1,s)),s>-1&&s<1&&(i+=.5*u*(1-Math.abs(s))),s=Math.round(1e4*s)/1e4,i=Math.round(1e4*i)/1e4,e.style.setProperty("--progress",`${Math.abs(s)}`),e.style.setProperty("--shift",`${t?.isRTL()?-1*i:i}px`),s>-1&&s<1&&(i+=.5*u*(1-Math.abs(s)))}}return{init:function(e,n){ze=n,t=e,t.on("ready",w),t.on("initSlides",x),t.on("change",A)},destroy:function(){m()&&t?.emit("thumbs:destroy"),t?.off("ready",w),t?.off("initSlides",x),t?.off("change",A),t?.off("render",S),t?.off("addSlide",M),t?.off("click",L),t?.off("refresh",T),t?.getGestures()?.off("start",C),t?.getContainer()?.classList.remove("has-thumbs"),t=void 0,n?.destroy(),n=void 0,i?.remove(),i=void 0},getCarousel:function(){return n},getContainer:function(){return i},getType:function(){return f("type")},isEnabled:p}},Ve={autosize:!1,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!1},He=()=>{let n;function i(){let t=n?.getOptions().Html;return e(t)?s({},Ve,t):Ve}function r(){return!1!==n?.getOptions().Html}function a(e){return"iframe"===e.type||"pdf"===e.type||"gmap"===e.type}function o(e){let t=`${e}`;return t.match(/^\d+$/)?`${t}px`:t}function l(e){if(void 0===e||""===e)return;let t=`${e}`.trim();if(!t.match(/^\d+(\.\d+)?(px)?$/))return;let n=parseFloat(t);return Number.isFinite(n)?n:void 0}function u(e,t){let n=e[t]??i()[t];return"true"===n||"false"!==n&&n}function c(e,n){if(!r())return;let i=n.type,s=n.src;if(!i&&t(s)){if("#"===s.charAt(0)?i="inline":s.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?i="image":s.match(/\.(pdf)((\?|#).*)?$/i)?i="pdf":s.match(/\.(html|php)((\?|#).*)?$/i)&&(i="iframe"),!i){let e=s.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+\.?\d+?)z))|(?:\?ll=))(.*)?/i);e&&(s=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+"&z="+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^\//,"&"):""):e[4]+"").replace(/\?/,"&")}&output=${e[4]&&e[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="gmap")}if(!i){let e=s.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);e&&(s=`https://maps.google.${e[1]}/maps?q=${e[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="gmap")}i&&(n.src=s,n.type=i)}}function h(e,t){r()&&a(t)&&function(e){let t=e.el,s=e.src;if(!n||!t||!s)return;let r=document.createElement("iframe");d(r,"f-iframe");for(let[e,t]of Object.entries(i().iframeAttr||{}))r.setAttribute(e,t);r.onerror=()=>{e.state=2,n?.showError(e,"{{IFRAME_ERROR}}")};let a=document.createElement("div");d(a,"f-html"),a.append(r),e.htmlEl=a,e.contentEl=r,d(t,`has-html has-iframe has-${e.type}`),t.prepend(a),m(e);let o=u(e,"preload"),l=u(e,"autosize");"iframe"===e.type&&(o||l)?(e.state=0,n.showLoading(e),d(t,"is-loading"),r.onload=()=>
1{if(!n||2===n.getState()||!r.src.length||e.contentEl!==r||!r.isConnected)return;e.state=1;let i="true"!==r.dataset.ready;r.dataset.ready="true",v(e),n.hideLoading(e),i&&n.emit("contentReady",e),f(t,"is-loading")},r.src=`${s}`):(r.src=`${s}`,n.emit("contentReady",e))}(t)}function p(e,t){if(a(t)){let e=t.el;n?.hideError(t),t.contentEl?.remove(),t.contentEl=void 0,t.htmlEl?.remove(),t.htmlEl=void 0,e&&(f(e,"has-html has-iframe has-pdf has-gmap"),f(e,"is-loading"))}}function g(){for(let e of n?.getSlides()||[])a(e)&&(m(e),1===e.state&&v(e))}function m(e){let t=e.htmlEl;if(t&&a(e)&&(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width&&(t.style.maxWidth=o(e.width)),e.height&&(t.style.maxHeight=o(e.height)),e.aspectRatio)){let n=e.aspectRatio.split("/"),i=parseFloat(n[0].trim()),s=n[1]?parseFloat(n[1].trim()):0,r=i&&s?i/s:i;t.offsetHeight;let a=t.getBoundingClientRect(),o=r<(a.width||1)/(a.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=o?"auto":"",t.style.height=o?"":"auto"}}function v(e){let t=e.contentEl,n=t?.parentElement,i=n?.style,s=u(e,"autosize"),r=l(e.width)||0,a=l(e.height)||0;if(r&&a&&(s=!1),t&&n&&i&&s){try{let e=window.getComputedStyle(n),s=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),o=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=t.contentWindow;if(l){let e=l.document,t=e.getElementsByTagName("html")[0],n=e.body;i.width="";let u=window.getComputedStyle(n),d=parseFloat(u.marginLeft)+parseFloat(u.marginRight),c=n.style.overflow||"";n.style.overflow="hidden",r||=n.scrollWidth+d+s,i.flex="0 0 auto",i.width=`${r}px`,i.height=`${n.scrollHeight}px`,n.style.overflow=c,a=Math.max(t.scrollHeight,Math.ceil(t.getBoundingClientRect().height))+o}}catch{}(r||a)&&Object.assign(i,{flex:"0 1 auto",width:r?`${r}px`:"",height:a?`${a}px`:""})}}return{init:function(e){n=e,n.on("addSlide",c),n.on("attachSlideEl",h),n.on("detachSlideEl",p),n.on("refresh",g)},destroy:function(){n?.off("addSlide",c),n?.off("attachSlideEl",h),n?.off("detachSlideEl",p),n?.off("refresh",g),n=void 0}}},Ue=(e,t={})=>{let n=new URL(e),i=new URLSearchParams(n.search),s=new URLSearchParams;for(let[e,n]of[...i,...Object.entries(t)]){let t=n+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&s.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else s.set(e,t)}let r=s+"",a=e.match(/#t=((.*)?\d+s)/);return a&&(r+=`#t=${a[1]}`),r},We={autoplay:!1,html5videoTpl:'<video class="f-html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',iframeAttr:{allow:"autoplay; fullscreen",scrolling:"no",referrerPolicy:"strict-origin-when-cross-origin",credentialless:""},vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},Ge=()=>{let n,i=!1;function s(){let t=n?.getOptions().Video;return e(t)?{...We,...t}:We}function a(){return n?.getPage()?.slides[0]}let o=e=>{try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(n?.getContainer()?.getElementsByClassName("f-iframe")||[]))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){let e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch{}};function l(e,n){let i=n.src;if(!t(i))return;let r=n.type;if(!r||"html5video"===r){let e=i.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i);e&&(r="html5video",n.html5videoFormat=n.html5videoFormat||"video/"+("ogv"===e[1]?"ogg":e[1]))}if(!r||"youtube"===r){let e=i.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i);if(e){let t={...s().youtube,...n.youtube||{}},a=`www.youtube${t.nocookie?"-nocookie":""}.com`,o=Ue(i,t),l=encodeURIComponent(e[2]);n.videoId=l,n.src=`https://${a}/embed/${l}?${o}`,n.thumb=n.thumb||`https://i.ytimg.com/vi/${l}/mqdefault.jpg`,r="youtube"}}if(!r||"vimeo"===r){let e=i.match(/^.+vimeo.com\/(?:\/)?(video\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/);if(e){let t=Ue(i,{...s().vimeo,...n.vimeo||{}}),a=encodeURIComponent(e[2]),o=e[5]||"";n.videoId=a,n.src=`https://player.vimeo.com/video/${a}?${o?`h=${o}${t?"&":""}`:""}${t}`,r="vimeo"}}n.type=r}
1function u(e,i){"html5video"===i.type&&function(e){let i=e.el,a=e.src;if(!n||!i||!a)return;let o=e.html5videoTpl||s().html5videoTpl,l=e.html5videoFormat||s().html5videoFormat;if(!o)return;let u=e.poster||(e.thumb&&t(e.thumb)?e.thumb:""),c=r(o.replace(/\{\{src\}\}/gi,a+"").replace(/\{\{format\}\}/gi,l||"").replace(/\{\{poster\}\}/gi,u+""));if(!c)return;let h=document.createElement("div");d(h,"f-html"),h.append(c),e.contentEl=c,e.htmlEl=h,d(i,`has-${e.type}`),i.prepend(h),p(e),n.emit("contentReady",e)}(i),"youtube"!==i.type&&"vimeo"!==i.type||function(e){let t=e.el,i=e.src;if(!n||!t||!i)return;let r=document.createElement("iframe");d(r,"f-iframe"),r.setAttribute("id",`f-iframe_${e.videoId}`);for(let[e,t]of Object.entries(s().iframeAttr||{}))r.setAttribute(e,t);"youtube"===e.type&&(r.onload=()=>{1===n?.getState()&&r.contentWindow?.postMessage(JSON.stringify({event:"listening",id:r.getAttribute("id")}),"*")}),r.onerror=()=>{n?.showError(e,"{{IFRAME_ERROR}}")};let a=document.createElement("div");d(a,"f-html"),a.append(r),e.contentEl=r,e.htmlEl=a,d(t,`has-html has-iframe has-${e.type}`),r.src=`${e.src}`,t.prepend(a),p(e),n.emit("contentReady",e)}(i)}function c(e,t){"html5video"!==t.type&&"youtube"!==t.type&&"vimeo"!==t.type||(t.contentEl?.remove(),t.contentEl=void 0,t.htmlEl?.remove(),t.htmlEl=void 0),t.poller&&clearTimeout(t.poller)}function h(){i=!1}function f(){if(i)return;i=!0;let e=a();(e&&void 0!==e.autoplay?e.autoplay:s().autoplay)&&(function(){let e=a(),t=e?.el;if(t&&"html5video"===e?.type)try{let e=t.querySelector("video");if(e){let t=e.play();void 0!==t&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch{}let n=e?.htmlEl;n instanceof HTMLIFrameElement&&n.contentWindow?.postMessage('{"event":"command","func":"stopVideo","args":""}',"*")}(),function(){let e=a(),t=e?.type;if(!e?.el||"youtube"!==t&&"vimeo"!==t)return;let n=()=>{if(e.contentEl&&e.contentEl instanceof HTMLIFrameElement&&e.contentEl.contentWindow){let t;if("true"===e.contentEl.dataset.ready)return t="youtube"===e.type?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);"youtube"===e.type&&(t={event:"listening",id:e.contentEl.getAttribute("id")},e.contentEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(n,250)};n()}())}function p(e){let t=e?.htmlEl;if(e&&t&&("html5video"===e.type||"youtube"===e.type||"vimeo"===e.type)){if(t.style.aspectRatio="",t.style.width="",t.style.height="",t.style.maxWidth="",t.style.maxHeight="",e.width){let n=`${e.width}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxWidth=`${n}`}if(e.height){let n=`${e.height}`;n.match(/^\d+$/)&&(n+="px"),t.style.maxHeight=`${n}`}if(e.aspectRatio){let n=e.aspectRatio.split("/"),i=parseFloat(n[0].trim()),s=n[1]?parseFloat(n[1].trim()):0,r=i&&s?i/s:i;t.offsetHeight;let a=t.getBoundingClientRect(),o=r<(a.width||1)/(a.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=o?"auto":"",t.style.height=o?"":"auto"}}}function g(){p(a())}return{init:function(e){n=e,n.on("addSlide",l),n.on("attachSlideEl",u),n.on("detachSlideEl",c),n.on("ready",f),n.on("change",h),n.on("settle",f),n.on("refresh",g),window.addEventListener("message",o)},destroy:function(){n?.off("addSlide",l),n?.off("attachSlideEl",u),n?.off("detachSlideEl",c),n?.off("ready",f),n?.off("change",h),n?.off("settle",f),n?.off("refresh",g),window.removeEventListener("message",o),n=void 0}}},Ke={autoStart:!1,btnTpl:'<button data-fullscreen-action="toggle" class="f-button" title="{{TOGGLE_FULLSCREEN}}"><svg><g><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></g><g><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"/></g></svg></button>'},J="in-fullscreen-mode",qe=()=>{let t;function n(n){let i=t?.getOptions().Fullscreen,s=(e(i)?{...Ke,...i}:Ke)[n];return s&&"function"==typeof s&&t?s(t):s}function i(){t?.getPlugins().Toolbar?.add("fullscreen",{tpl:n("btnTpl")})}function s(){if(n("autoStart")){let e=a();e&&l(e)}}function r(e,t){let n=t.target;
1n&&!t.defaultPrevented&&"toggle"===n.dataset.fullscreenAction&&d()}function a(){return n("el")||t?.getContainer()||void 0}function o(){let e=document;return e.fullscreenEnabled?!!e.fullscreenElement:!!e.webkitFullscreenEnabled&&!!e.webkitFullscreenElement}function l(e){let t,n=document;return e||=n.documentElement,n.fullscreenEnabled?t=e.requestFullscreen():n.webkitFullscreenEnabled&&(t=e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)),t&&t.then(()=>{e.classList.add(J)}),t}function u(){let e,t=document;return t.fullscreenEnabled?e=t.fullscreenElement&&t.exitFullscreen():t.webkitFullscreenEnabled&&(e=t.webkitFullscreenElement&&t.webkitExitFullscreen()),e&&e.then(()=>{a()?.classList.remove(J)}),e}function d(){if(o())u();else{let e=a();e&&l(e)}}return{init:function(e){t=e,t.on("initPlugins",i),t.on("ready",s),t.on("click",r)},destroy:function(){t?.off("initPlugins",i),t?.off("ready",s),t?.off("click",r)},exit:u,inFullscreen:o,request:l,toggle:d}},Xe=!1,Ze=!1,Qe=!1,$e=!1,et=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split("-"),n=t[t.length-1],i=n&&/^\+?\d+$/.test(n)&&parseInt(t.pop()||"1",10)||1;return{urlHash:e,urlSlug:t.join("-"),urlIndex:i}},tt=()=>{let e=Je?.getInstance(),t=e?.getState();return!(!e||0!==t&&1!==t)},nt=()=>
1{if(!Je||tt())return;let{urlSlug:e,urlIndex:t}=et();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);n&&Je.fromTriggerEl(n),tt()||(n=document.querySelectorAll(`[data-fancybox="${e}"]`)[t-1],n&&Je.fromTriggerEl(n,{startIndex:t-1})),tt()&&n&&!n.closest("[inert]")&&n.scrollIntoView({behavior:"instant",block:"center",inline:"center"})},rt=t=>{let n=t.getOptions().Hash,i=t.getSlide();return i&&(i.slug||i.fancybox||(e(n)?n.slug:""))||""},it=e=>{let t=rt(e),n=e.getSlide();if(!n||!t)return"";let i=parseInt(n.index+"",10)+1,s=n.slug?`#${n.slug}`:`#${t}-${i}`;return(e.getCarousel()?.getPages()?.length||0)<2&&(s=`#${t}`),s},at=()=>{if(!Je||Qe)return;let t=Je?.getInstance(),n=t?.getCarousel(),{urlSlug:i,urlIndex:s}=et(),r=t?.getOptions().Hash;if(!1!==r){if(t&&1===t.getState()&&n){let a=n.getSlides();for(let t of a||[])if(t.slug===i||(t.fancybox===i||e(r)&&r.slug===i)&&t.index===s-1)return Ze=!1,void n.goTo(t.index);$e=!0,t.close(),$e=!1}nt()}},ot=()=>{Je&&(Ye=setTimeout(()=>{Xe=!0,nt(),Xe=!1},300),window.addEventListener("hashchange",at,!1))};function ct(){history.scrollRestoration&&st&&(history.scrollRestoration=st,st=void 0)}var lt=()=>{let e,t="";function n(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;if(Xe){let t=e.getOptions().sync;t&&t.goTo(e?.getCarousel()?.getPageIndex()||0,{transition:!1,tween:!1})}let n=e.getCarousel();if(!n||!e.getSlide())return;let s=rt(e);if(!s)return;let{urlHash:r,urlSlug:a}=et(),o=it(e);r!==o&&(t=r),history.scrollRestoration&&!st&&(st=history.scrollRestoration,history.scrollRestoration="manual",window.addEventListener("beforeunload",ct)),n.on("change",i);let l=s!==a;try{window.history[l?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+o),l&&(Ze=!0)}catch{}}function i(){if(!(e&&e.isTopMost()&&!1!==e.getOptions().Hash&&e.getSlide()&&rt(e)))return;let t=it(e);Qe=!0;try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch{}Qe=!1}function s(){if(e&&e.isTopMost()&&!1!==e.getOptions().Hash&&!$e&&rt(e)){Qe=!0;try{Ze&&!function(){if(window.parent===window)return!1;try{var e=window.frameElement}catch{e=null}return null===e?"data:"===location.protocol:e.hasAttribute("sandbox")}()&&"IFRAME"!==document.activeElement?.nodeName?window.history.back():window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch{}Qe=!1}}return{init:function(t){clearTimeout(Ye),e=t,e.on("ready",n),e.on("close",s)}
1,destroy:function(){e?.off("ready",n),e?.off("close",s);let t=e?.getCarousel();t&&t.off("change",i),e=void 0,Je?.getInstance()||(ct(),window.removeEventListener("beforeunload",ct))}}};lt.getInfoFromURL=et,lt.startFromUrl=nt,lt.setup=function(e){Je||(Je=e,c()&&(/complete|interactive|loaded/.test(document.readyState)?ot():document.addEventListener("DOMContentLoaded",ot)))};var ut={...ue,CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ELEMENT_NOT_FOUND:"HTML Element Not Found",IFRAME_ERROR:"Error Loading Page",NO_CAPTION:"No Caption",TOGGLE_SIDEBAR:"Toggle sidebar"},dt='<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.286 4.714 4.714 19.286M4.714 4.714l14.572 14.572" /></svg></button>';Fe().add("close",{tpl:dt});var Y,ft=e=>{e.cancelable&&e.preventDefault()},pt=(e=null,t="",n)=>{if(!e||!e.parentElement||!t)return void(n&&n());mt(e);let i=s=>{s.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",i),delete e.dataset.animationName,n&&n(),e.classList.remove(t))};e.dataset.animationName=t,e.addEventListener("animationend",i),d(e,t)},mt=e=>{e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))};!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.Destroyed=3]="Destroyed"}(Y||={});var ht={ajax:null,backdropClick:"close",Carousel:{},closeButton:"auto",closeButtonTpl:dt,closeExisting:!1,delegateEl:void 0,dragToClose:!0,fadeEffect:!0,groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,id:void 0,idle:!1,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:ut,mainClass:"",mainStyle:{},mainTpl:'<dialog class="fancybox__dialog">\n <div class="fancybox__container" tabindex="0" aria-label="{{MODAL}}">\n <div class="fancybox__backdrop"></div>\n <div class="fancybox__carousel"></div>\n </div>\n </dialog>',modal:!0,on:{},parentEl:void 0,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,sync:void 0,theme:"dark",triggerEl:void 0,triggerEvent:void 0,zoomEffect:!0},gt=new Map,_t=0,vt="with-fancybox",yt=()=>{let i,l,c,h,g,m,v,y,E=Y.Init,b={...ht},k=-1,_={},x=[],w=!1,S=!0,A=0;function M(e,...t){let n=b[e];return n&&"function"==typeof n?n(Ee,...t):n}function F(e,t=[]){let n=M("l10n")||{};e=String(e).replace(/\{\{(\w+)\}\}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}let T=new Map;function R(e,...t){let n=[...T.get(e)||[]];for(let[t,i]of Object.entries(b.on||{}))(t===e||t.split(" ").indexOf(e)>-1)&&n.push(i);for(let e of n)e&&"function"==typeof e&&e(Ee,...t);"*"!==e&&R("*",e,...t)}function P(){f(l,"is-revealing");try{document.activeElement===i&&(l?.querySelector("[autofocus]")||l).focus()}catch{}}function I(e,n){J(n),Z(),n.el?.addEventListener("click",D),"inline"!==n.type&&"clone"!==n.type||function(e){if(!h||!e||!e.el)return;let n=null;if(t(e.src)){let t=e.src.split("#",2).pop();n=t?document.getElementById(t):null}if(n){if(d(n,"f-html"),"clone"===e.type||n.closest(".fancybox__carousel")){n=n.cloneNode(!0);let t=n.dataset.animationName;t&&(n.classList.remove(t),delete n.dataset.animationName);let i=n.getAttribute("id");i=i?`${i}--clone`:`clone-${k}-${e.index}`,n.setAttribute("id",i)}else if(n.parentNode){let t=document.createElement("div");t.inert=!0,n.parentNode.insertBefore(t,n),e.placeholderEl=t}e.htmlEl=n,d(e.el,"has-html"),e.el.prepend(n),n.classList.remove("hidden"),"none"===n.style.display&&(n.style.display=""),"none"===getComputedStyle(n).getPropertyValue("display")&&(n.style.display=n.dataset.display||"flex"),h?.emit("contentReady",e)}else h?.showError(e,"{{ELEMENT_NOT_FOUND}}")}(n),"ajax"===n.type&&function(e){let t=e.el;if(!t||e.htmlEl||e.xhr)return;h?.showLoading(e),e.state=0;let n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&E===Y.Ready)if(h?.hideLoading(e),e.state=1,200===n.status){let i=n.responseText+"",s=null,r=null;if(e.filter){let t=document.createElement("div");t.innerHTML=i,r=t.querySelector(e.filter+"")}r&&r instanceof HTMLElement?s=r:(s=document.createElement("div"),s.innerHTML=i),s.classList.add("f-html"),e.htmlEl=s,t.classList.add("has-html"),t.classList.add("has-ajax"),t.prepend(s),h?.emit("contentReady",e)}else h?.showError(e)};let i=M("ajax")||null;n.open(i?"POST":"GET",e.src+""),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(i),e.xhr=n}(n)}function O(e,t){te(t),t.el?.removeEventListener("click",D),"inline"!==t.type&&"clone"!==t.type||function(e){let t=e.htmlEl,n=e.placeholderEl;t&&("none"!==getComputedStyle(t).getPropertyValue("display")&&(t.style.display="none"),t.offsetHeight),n&&(t&&n.parentNode&&n.parentNode.insertBefore(t,n),n.remove()),e.htmlEl=void 0,e.placeholderEl=void 0}(t),t.xhr&&=void t.xhr.abort()}function D(e){if(!ie())return;if(E!==Y.Ready)return ft(e),void e.stopPropagation();if(e.defaultPrevented||!re.isClickAllowed())return;let t=e.composedPath()[0];t.closest(".fancybox__carousel")&&t.classList.contains("fancybox__slide")&&G(e)}function B(){S=!1,l&&h&&l.classList.remove("is-revealing"),Z();let e=M("sync");if(h&&e){let t=e.getPageIndex(h.getPageIndex())||0;e.goTo(t,{transition:!1,tween:!1})}}function V(){(function(){let e=h?.getViewport();if(!h||!e||(g=re(e).init(),!g))return;K();let t=!1,n=0,i=0,s={},r=1;function o(){m?.spring({clamp:!0,mass:1,tension:0===i?140:960,friction:17,restDelta:.1,restSpeed:.1,maxSpeed:1/0}).from({y:n}).to({y:i}).start();let e=h?.getViewport()?.getBoundingClientRect().height||0,t=se()?.panzoomRef;if(e&&t)if(0===i)t.execute(L.Reset);else{let i=u(Math.abs(n),0,.33*e,r,.77*r,!1);t.execute(L.ZoomTo,{scale:i})}}let d=e=>{let t=e.srcEvent,n=t.target;return M("dragToClose")&&h&&!(C(t)&&t.touches?.length>1)&&n&&!a(n)};m=ee().on("step",t=>{if(l&&e&&E===Y.Ready){let i=e.getBoundingClientRect().height;n=Math.min(i,Math.max(-1*i,t.y));let s=u(Math.abs(n),0,.65*i,1,.2,!0);l.style.setProperty("--f-drag-opacity",s+""),l.style.setProperty("--f-drag-offset",n+"px")}}),g.on("start",function(){t||(m?.pause(),i=n)}).on("panstart",e=>{if(!t&&d(e)&&"y"===e.axis){ft(e.srcEvent),t=!0,fe(),h?.getViewport()?.classList.add("is-dragging");let n=se()?.panzoomRef;if(n){r=n.getTransform().scale||1;let e=n.getOptions();s={...e},e.bounds=!1,e.gestures=!1}}else t=!1}).on("pan",function(e){t&&d(e)&&(ft(e.srcEvent),e.srcEvent.stopPropagation(),"y"===e.axis&&(i+=e.deltaY,o()))}).on("end",e=>{if(h?.getViewport()?.classList.remove("is-dragging"),t){let t=se()?.panzoomRef;if(t){t.getTween()?.end();let e=t.getOptions();
1e.bounds=s.bounds||!1,e.gestures=s.gestures||!1}d(e)&&"y"===e.axis&&(Math.abs(e.velocityY)>5||Math.abs(n)>50)&&pe(e.srcEvent,"f-throwOut"+(e.velocityY>0?"Down":"Up"))}t=!1,E===Y.Ready&&0!==n&&(i=0,o())})})(),document.body.addEventListener("click",Q),document.body.addEventListener("pointerdown",q,{capture:!0}),document.body.addEventListener("keydown",W,{passive:!1,capture:!0}),Z(),ue();let e=M("sync");h&&e&&e.getTween()?.start(),ne(se())}function $(){h?.canGoNext()?ue():he()}function N(e,t){J(t)}function H(e,t){J(t),ne(t)}function j(){let e=h?.getPlugins().Thumbs;p(l,"has-thumbs",e?.isEnabled()||!1),p(l,"has-vertical-thumbs",!!e&&("scrollable"===e.getType()||!0===e.getCarousel()?.isVertical()))}function Z(){if(!l)return;let e=h?.getPages().length||0,t=h?.getPageIndex()||0,n=l.querySelectorAll("[data-fancybox-index],[data-fancybox-page],[data-fancybox-pages]");for(let i of n)i.textContent=i.hasAttribute("data-fancybox-index")?String(t):i.hasAttribute("data-fancybox-page")?String(t+1):String(e)}function q(e){K(),y={x:e.clientX,y:e.clientY}}function G(e){e.composedPath()[0].closest("[data-fancybox-close]")?pe(e):function(e){if(!y)return!1;let t="clientX"in e?e:e.changedTouches[0];return!!t&&(Math.abs(t.clientX-y.x)>10||Math.abs(t.clientY-y.y)>10)}(e)||(R("backdropClick",e),!e.defaultPrevented&&M("backdropClick")&&pe(e))}function U(){ce()}function W(e){if(!ie()||E!==Y.Ready)return;let t=e.key,i=M("keyboard");if(!i||e.ctrlKey||e.altKey||e.shiftKey)return;let s=e.composedPath()[0];if(!n(s)||"Escape"!==t&&(e=>{let t=["input","textarea","select","option","video","iframe","[contenteditable]","[data-selectable]","[data-draggable]"].join(",");return e.matches(t)||e.closest(t)})(s)||(R("keydown",e),e.defaultPrevented))return;let r=i[t];if(r)switch(r){case"close":pe(e);break;case"next":ft(e),h?.next();break;case"prev":ft(e),h?.prev()}}function Q(e){if(!ie()||E!==Y.Ready||(ce(),e.defaultPrevented))return;let t=e.composedPath()[0],n=!!t.closest("[data-fancybox-close]"),i=t.classList.contains("fancybox__backdrop");(n||i)&&G(e)}function K(){g&&(M("dragToClose")?g.enable():g.disable())}function J(e){let{el:t,htmlEl:n,panzoomRef:i,closeButtonEl:s}=e,a=i?i.getWrapper():n;if(!t||!t.parentElement||!a)return;let o=M("closeButton");if("auto"===o&&(o=!0!==h?.getPlugins().Toolbar?.isEnabled()),o){if(!s){let n=r(F(M("closeButtonTpl")));n&&(d(n,"is-close-button"),e.closeButtonEl=a.insertAdjacentElement("afterbegin",n),d(t,"has-close-btn"))}}else te(e)}function te(e){e.closeButtonEl&&=void e.closeButtonEl.remove(),f(e.el,"has-close-btn")}function ne(e){if(!(S&&h&&1===h.getState()&&e&&e.index===h.getOptions().initialPage&&e.el&&e.el.parentElement)||void 0!==e.state&&1!==e.state)return;S=!1;let t=e.panzoomRef,n=t?.getTween(),i=M("zoomEffect")&&n?oe(e):void 0;if(t&&n&&i){let{x:e,y:s,scale:r}=t.getStartPosition();return void n.spring({tension:215,friction:25,restDelta:.001,restSpeed:.001,maxSpeed:1/0}).from(i).to({x:e,y:s,scale:r}).start()}let s=t?.getContent()||e.htmlEl;s&&pt(s,M("showClass",e))}function ie(){return X.getInstance()?.getId()===k}function se(){return h?.getPage()?.slides[0]}function ae(){let e=se();return e?e.triggerEl||M("triggerEl"):void 0}function oe(e){let t=e.thumbEl;if(!t||!(e=>{let t=e.getBoundingClientRect(),n=e.closest("[style]"),i=n?.parentElement;if(n&&n.style.transform&&i){let e=i.getBoundingClientRect();if(t.left<e.left||t.left>e.left+e.width-t.width||t.top<e.top||t.top>e.top+e.height-t.height)return!1}let s=Math.max(document.documentElement.clientHeight,window.innerHeight),r=Math.max(document.documentElement.clientWidth,window.innerWidth);return!(t.bottom<0||t.top-s>=0||t.right<0||t.left-r>=0)})(t))return;let n=e.panzoomRef?.getWrapper()?.getBoundingClientRect(),i=n?.width,s=n?.height;if(!i||!s)return;let r=t.getBoundingClientRect(),a=r.width,o=r.height,l=r.left,u=r.top;if(r&&a&&o){if(t instanceof HTMLImageElement){let e=window.getComputedStyle(t).getPropertyValue("object-fit");if("contain"===e||"scale-down"===e){let{width:n,height:i}=((e,t,n,i,s="contain")=>{if("contain"===s||e>n||t>i){let s=n/e,r=i/t,a=Math.min(s,r);e*=a,t*=a}return{width:e,height:t}}
1)(t.naturalWidth,t.naturalHeight,a,o,e);l+=.5*(a-n),u+=.5*(o-i),a=n,o=i}}if(!(Math.abs(i/s-a/o)>.1))return{x:l+.5*a-(n.left+.5*i),y:u+.5*o-(n.top+.5*s),scale:a/i}}}function le(){v&&clearTimeout(v),v=void 0,document.removeEventListener("mousemove",U)}function ue(){if(w||v)return;let e=M("idle");e&&(v=setTimeout(de,e))}function de(){l&&(le(),d(l,"is-idle"),document.addEventListener("mousemove",U),w=!0)}function ce(){w&&(he(),ue())}function he(){le(),l?.classList.remove("is-idle"),w=!1}function fe(){let e=ae();var t;!e||(t=e.getBoundingClientRect()).bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)||e.closest("[inert]")||e.scrollIntoView({behavior:"instant",block:"center",inline:"center"})}function pe(e,t){if(E===Y.Closing||E===Y.Destroyed)return;let n=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(R("shouldClose",n,e),n.defaultPrevented)return;if(le(),e){if(e.defaultPrevented)return;ft(e),e.stopPropagation(),e.stopImmediatePropagation()}if(E=Y.Closing,m?.pause(),g?.destroy(),h){h.getGestures()?.destroy(),h.getTween()?.pause();for(let e of h.getSlides()){let t=e.panzoomRef;t&&(s(t.getOptions(),{clickAction:!1,dblClickAction:!1,wheelAction:!1,bounds:!1,minScale:0,maxScale:1/0}),t.getGestures()?.destroy(),t.getTween()?.pause())}}let i=h?.getPlugins();i?.Autoplay?.stop();let r=i?.Fullscreen;r&&r.inFullscreen()?Promise.resolve(r.exit()).then(()=>{setTimeout(()=>{me(e,t)},150)}):me(e,t)}function me(e,t){if(E!==Y.Closing)return;R("close",e),S=!1,document.body.removeEventListener("click",Q),document.body.removeEventListener("pointerdown",q,{capture:!0}),document.body.removeEventListener("keydown",W,{passive:!1,capture:!0}),y=void 0,M("placeFocusBack")&&fe();let n=document.activeElement;n&&i?.contains(n)&&n.blur(),M("fadeEffect")&&(l?.classList.remove("is-ready"),l?.classList.add("is-hiding")),l?.classList.add("is-closing");let s=se(),r=s?.el,a=s?.panzoomRef,o=s?.panzoomRef?.getTween(),u=t||M("hideClass"),d=!1,c=!1;if(h&&s&&r&&a&&o){let e;if(M("zoomEffect")&&1===s.state&&(e=oe(s)),e){d=!0;let t=()=>{e=oe(s),e?o.to({...z,...e}):ve()};a.on("refresh",()=>{t()}),o.easing(ee.Easings.EaseOut).duration(350).from({...a.getTransform()}).to({...z,...e}).start(),r?.getAnimations()&&(r.style.animationPlayState="paused",requestAnimationFrame(()=>{t()}))}}let f=s?.htmlEl||s?.panzoomRef?.getWrapper();f&&mt(f),!d&&u&&f&&(c=!0,pt(f,u,()=>{ve()})),d||c?setTimeout(()=>{ve()},350):ve()}function ve(){if(E===Y.Destroyed)return;E=Y.Destroyed;let e=ae();R("destroy"),M("sync")?.getPlugins().Autoplay?.resume(),M("sync")?.getPlugins().Autoscroll?.resume(),i instanceof HTMLDialogElement&&i.close(),h?.getContainer()?.classList.remove("is-idle"),h?.destroy();for(let e of Object.values(_))e?.destroy();if(_={},i?.remove(),i=void 0,l=void 0,h=void 0,gt.delete(k),!gt.size&&(o(!1),document.documentElement.classList.remove(vt),M("placeFocusBack")&&e&&!e.closest("[inert]")))try{e?.focus({preventScroll:!0})}catch{}}let Ee={close:pe,destroy:ve,getCarousel:function(){return h},getContainer:function(){return l},getId:function(){return k},getOptions:function(){return b},getPlugins:function(){return _},getSlide:function(){return se()},getState:function(){return E},init:function(t=[],n={}){E!==Y.Init&&(Ee.destroy(),E=Y.Init),b=s({},ht,n),k=M("id")||"fancybox-"+ ++_t;let u=gt.get(k);if(u&&u.destroy(),gt.set(k,Ee),R("init"),function(){for(let[e,t]of Object.entries({...X.Plugins,...b.plugins||{}}))if(e&&!_[e]&&t instanceof Function){let n=t();n.init(Ee),_[e]=n}R("initPlugins")}(),function(e=[]){R("initSlides",e),x=[...e]}(t),function(){let t=M("parentEl")||document.body;if(!(t&&t instanceof HTMLElement&&(i=r(F(M("mainTpl")||""))||void 0,i)&&(l=i.querySelector(".fancybox__container"),l&&l instanceof HTMLElement)))return;let n=M("mainClass");n&&d(l,n);let s=M("mainStyle");if(s&&e(s))for(let[e,t]of Object.entries(s))l.style.setProperty(e,t);let u=M("theme"),c="auto"===u?window.matchMedia("(prefers-color-scheme:light)").matches:"light"===u;l.setAttribute("theme",c?"light":"dark"),i.setAttribute("id",`${k}`),i.addEventListener("keydown",e=>{"Escape"===e.key&&ft(e)}),i.addEventListener("wheel",e=>{let t=e.target,n=M("wheel",e);t.closest(".f-thumbs")&&(n="slide");let i="slide"===n,s=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),r=Math.max(-1,Math.min(1,s)),o=Date.now();A&&o-A<300?i&&ft(e):(A=o,R("wheel",e,r),e.defaultPrevented||("close"===n?pe(e):"slide"===n&&h&&!a(t)&&(ft(e),h[r>0?"prev":"next"]())))},{capture:!0,passive:!1}),i.addEventListener("cancel",e=>{pe(e)}),t.append(i),1===gt.size&&(M("hideScrollbar")&&o(!0),document.documentElement.classList.add(vt)),R("initLayout"),i instanceof HTMLDialogElement&&(M("modal")?i.showModal():i.show())}(),function(){if(c=i?.querySelector(".fancybox__carousel")||void 0,!c)return;c.fancybox=Ee;let e=s({},{Autoplay:{autoStart:!1,pauseOnHover:!1,progressbarParentEl:e=>{let t=e.getContainer();return t?.querySelector(".f-carousel__toolbar [data-autoplay-action]")||t}},Fullscreen:{el:l},Toolbar:{absolute:!0,items:{counter:{tpl:'<div class="f-counter"><span data-fancybox-page></span>/<span data-fancybox-pages></span></div>'}},display:{left:["counter"],right:["toggleFull","autoplay","fullscreen","thumbs","close"]}},Video:{autoplay:!0},Thumbs:{minCount:2,Carousel:{classes:{container:"fancybox__thumbs"}}},classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",slide:"fancybox__slide"},spinnerTpl:'<div class="f-spinner" data-fancybox-close></div>',dragFree:!1,slidesPerPage:1,plugins:{Sync:ye,Arrows:De,Lazyload:we,Zoomable:_e,Html:He,Video:Ge,Autoplay:Le,Fullscreen:qe,Thumbs:Be,Toolbar:Fe}},M("Carousel")||{},{slides:x,enabled:!0,initialPage:M("startIndex")||0,l10n:M("l10n")});h=ge(c,e),R("initCarousel",h),h.on("*",(e,t,...n)=>{R(`Carousel.${t}`,e,...n)}),h.on("attachSlideEl",I),h.on("detachSlideEl",O),h.on("contentLoading",N),h.on("contentReady",H),h.on("ready",V),h.on("change",B),h.on("settle",$),h.on("thumbs:ready",j),h.on("thumbs:destroy",j),h.init()}(),i&&l){if(M("closeExisting"))for(let[e,t]of gt.entries())e!==k&&t.close();M("fadeEffect")?(setTimeout(()=>{P()},500),d(l,"is-revealing")):P(),l.classList.add("is-ready"),E=Y.Ready,R("ready")}},isCurrentSlide:function(e){let t=se();return!(!e||!t)&&t.index===e.index},isTopMost:function(){return ie()},localize:F,off:function(e,t){return T.has(e)&&T.set(e,T.get(e).filter(e=>e!==t)),Ee}
1,on:function(e,t){return T.set(e,[...T.get(e)||[],t]),Ee},toggleIdle(e){(w||!0===e)&&de(),w&&!1!==e||he()}};return Ee};function bt(){for(let e of Object.values(X.Plugins)){let t=e.setup;"function"==typeof t&&t(X)}}function xt(e,t={}){if(!(e&&e instanceof Element))return;let n,i,r,a,o={};for(let[t,l]of X.openers)if(t.contains(e))for(let[u,d]of l){let l;if(u){for(let n of t.querySelectorAll(u))if(n.contains(e)){l=n;break}if(!l)continue}for(let[u,c]of d){let d=null;try{d=e.closest(u)}catch{}d&&(i=t,r=l,n=d,a=u,s(o,c||{}))}}if(!i||!a||!n)return;let l=s({},ht,t,o,{triggerEl:n}),u=[].slice.call((r||i).querySelectorAll(a)),d=n.closest(".f-carousel"),c=d?.carousel;if(c&&(!r||!d.contains(r))){let e=[];for(let t of c?.getSlides()){let n=t.el;n&&(n.matches(a)?e.push(n):e.push(...[].slice.call(n.querySelectorAll(a))))}e.length&&(u=[...e],c.getPlugins().Autoplay?.pause(),c.getPlugins().Autoscroll?.pause(),l.sync=c)}if(!1===l.groupAll){let e=l.groupAttr,t=e&&n?n.getAttribute(`${e}`):"";u=e&&t&&"true"!==t?u.filter(n=>n.getAttribute(`${e}`)===t):[n]}if(!u.length)return;l.triggerEvent?.preventDefault();let h=X.getInstance(),f=h?.getState();if(h&&(f===Y.Init||f===Y.Ready)){let e=h.getOptions().triggerEl;if(e&&u.indexOf(e)>-1)return}return{...l.Carousel||{}}.rtl&&(u=u.reverse()),n&&void 0===t.startIndex&&(l.startIndex=u.indexOf(n)),X.fromNodes(u,l)}var X={Plugins:{Hash:lt},version:"6.1.15",openers:new Map,bind:function(e,n,i,s){if(!c())return;let r=document.body,a=null,o="[data-fancybox]",l={};e instanceof Element&&(r=e),t(e)&&t(n)?(a=e,o=n):t(n)&&t(i)?(a=n,o=i):t(n)?o=n:t(e)&&(o=e),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{}),"object"==typeof s&&(l=s||{}),function(e,t,n,i={}){if(!(e&&e instanceof Element&&n))return;let s=X.openers.get(e)||new Map,r=s.get(t)||new Map;r.set(n,i),s.set(t,r),X.openers.set(e,s),1===s.size&&e.addEventListener("click",X.fromEvent),bt()}(r,a,o,l)},close:function(e=!0,...t){if(e)for(let e of gt.values())e.close(...t);else{let e=X.getInstance();e&&e.close(...t)}},destroy:function(){let e;for(;e=X.getInstance();)e.destroy();for(let e of X.openers.keys())e.removeEventListener("click",X.fromEvent);X.openers.clear()},fromEvent:function(e){if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0],n={triggerEvent:e};if(t.closest(".fancybox__container.is-hiding"))return ft(e),void e.stopPropagation();let i=t.closest("[data-fancybox-delegate]")||void 0;if(i){let e=i.dataset.fancyboxDelegate||"",r=document.querySelectorAll(`[data-fancybox="${e}"]`),a=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=r[a]||r[0],s(n,{delegateEl:i,startIndex:a})}return xt(t,n)},fromNodes:function(e,t){t=s({},ht,t||{});let n=[],i=e=>e instanceof HTMLImageElement?e:e instanceof HTMLElement?e.querySelector("img:not([aria-hidden])"):void 0;for(let s of e){let r=s.dataset||{},a=t.delegateEl&&e.indexOf(s)===t.startIndex?t.delegateEl:void 0,o=i(s),l=i(a)||o||void 0,u=r.src||s.getAttribute("href")||s.getAttribute("currentSrc")||s.getAttribute("src")||void 0,d=r.thumb||r.thumbSrc||l?.getAttribute("currentSrc")||l?.getAttribute("src")||l?.dataset.lazySrc||void 0,c={src:u,alt:r.alt||o?.getAttribute("alt")||l?.getAttribute("alt")||void 0,thumbSrc:d,thumbEl:l,triggerEl:s,delegateEl:a};for(let e in r){let t=r[e]+"";c[e]="true"===t?"fancybox"!==e||"":"false"!==t&&t}n.push(c)}return X.show(n,t)},fromSelector:function(e,n,i,s){if(!c())return;let r=document.body,a=null,o="[data-fancybox]",l={};e instanceof Element&&(r=e),t(e)&&t(n)?(a=e,o=n):t(n)&&t(i)?(a=n,o=i):t(n)?o=n:t(e)&&(o=e),"object"==typeof n&&(l=n||{}),"object"==typeof i&&(l=i||{}),"object"==typeof s&&(l=s||{});for(let[e,t]of X.openers)for(let[n,i]of t)for(let[t,s]of i)if(e===r&&n===a){let e=r.querySelector((n?`${n} `:"")+o);if(e&&e.matches(t))return X.fromTriggerEl(e,l)}},fromTriggerEl:xt,getCarousel:function(){return X.getInstance()?.getCarousel()||void 0},getDefaults:function(){return ht},getInstance:function(e){if(e){let t=gt.get(e);return t&&t.getState()!==Y.Destroyed?t:void 0}return Array.from(gt.values()).reverse().find(e=>{if(e.getState()!==Y.Destroyed)return e})||void 0},getSlide:function(){return X.getInstance()?.getSlide()||void 0},show:function(e=[],t={}){return bt(),yt().init(e,t)},unbind:function(e,n,i){if(!c())return;let s=document.body,r=null,a="[data-fancybox]";e instanceof Element&&(s=e),t(e)&&t(n)?(r=e,a=n):t(n)&&t(i)?(r=n,a=i):t(n)?a=n:t(e)&&(a=e),function(e,t,n){if(!(e&&e instanceof Element&&n))return;let i=X.openers.get(e)||new Map,s=i.get(t)||new Map;s&&n&&s.delete(n),s.size&&n||i.delete(t),i.size||(X.openers.delete(e),e.removeEventListener("click",X.fromEvent))}(s,r,a)}};function St(e){return"string"==typeof e||e instanceof String}function Ct(e){var t;return"object"==typeof e&&!!e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}
1function wt(e,t){return Array.isArray(t)?wt(e,(e,n)=>t.includes(n)):Object.entries(e).reduce((e,n)=>{let[i,s]=n;return t(s,i)&&(e[i]=s),e},{})}var Z={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Tt(e){switch(e){case Z.LEFT:return Z.FORCE_LEFT;case Z.RIGHT:return Z.FORCE_RIGHT;default:return e}}function Et(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Dt(e,t){if(t===e)return!0;let n,i=Array.isArray(t),s=Array.isArray(e);if(i&&s){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Dt(t[n],e[n]))return!1;return!0}if(i!=s)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){let i=t instanceof Date,s=e instanceof Date;if(i&&s)return t.getTime()==e.getTime();if(i!=s)return!1;let r=t instanceof RegExp,a=e instanceof RegExp;if(r&&a)return t.toString()==e.toString();if(r!=a)return!1;let o=Object.keys(t);for(n=0;n<o.length;n++)if(!Object.prototype.hasOwnProperty.call(e,o[n]))return!1;for(n=0;n<o.length;n++)if(!Dt(e[o[n]],t[o[n]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}var Ot=class{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Z.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?Z.LEFT:Z.RIGHT}};function Q(e,t){return new Q.InputMask(e,t)}function kt(e){if(null==e)throw Error("mask property should be defined");return e instanceof RegExp?Q.MaskedRegExp:St(e)?Q.MaskedPattern:e===Date?Q.MaskedDate:e===Number?Q.MaskedNumber:Array.isArray(e)||e===Array?Q.MaskedDynamic:Q.Masked&&e.prototype instanceof Q.Masked?e:Q.Masked&&e instanceof Q.Masked?e.constructor:e instanceof Function?Q.MaskedFunction:(console.warn("Mask not found for mask",e),Q.Masked)}function At(e){if(!e)throw Error("Options in not defined");if(Q.Masked){if(e.prototype instanceof Q.Masked)return{mask:e};let{mask:t,...n}=e instanceof Q.Masked?{mask:e}:Ct(e)&&e.mask instanceof Q.Masked?e:{};if(t){let e=t.mask;return{...wt(t,(e,t)=>!t.startsWith("_")),mask:t.constructor,_mask:e,...n}}}return Ct(e)?{...e}:{mask:e}}function jt(e){if(Q.Masked&&e instanceof Q.Masked)return e;let t=At(e),n=kt(t.mask);if(!n)throw Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}Q.createMask=jt;var Mt=class{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}};Q.MaskElement=Mt;var Nt=90,Pt=89,Ft=class extends Mt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e;return(e=this.input).getRootNode?.call(e)??document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(e.keyCode===Nt&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Pt&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&e.keyCode===Nt&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Q.HTMLMaskElement=Ft;var It=class extends Ft{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null==this.input.selectionStart?this.value.length:this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}};Q.HTMLMaskElement=Ft;var Lt=class extends Ft{get _unsafeSelectionStart(){let e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==n||n<i?n:i}get _unsafeSelectionEnd(){let e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==n||n>i?n:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;let n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.last
1Child||this.input,t);let i=this.rootElement,s=i.getSelection&&i.getSelection();s&&(s.removeAllRanges(),s.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}};Q.HTMLContenteditableMaskElement=Lt;var Rt=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};Rt.MAX_LENGTH=100,Q.InputMask=class{constructor(e,t){this.el=e instanceof Mt?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new Lt(e):new It(e),this.masked=jt(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Rt,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._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){return null==e||this.masked?.maskEquals(e)}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof Q.Masked)&&this.masked.constructor===kt(e))return void this.masked.updateOptions({mask:e});let t=e instanceof Q.Masked?e:jt({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){let n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){let t=this.masked.unmaskedValue,n=this.masked.value,i=this.masked.rawInputValue,s=this.displayValue,r=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==i;this._unmaskedValue=t,this._value=n,this._rawInputValue=i,this.el.value!==s&&(this.el.value=s),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),r&&this._fireChangeEvents(),!this._historyChanging&&(r||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){let{mask:t,...n}=e,i=!this.maskEquals(t),s=this.masked.optionsIsChanged(n);i&&(this.mask=t),s&&this.masked.updateOptions(n),(i||s)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}
vendor: 7,960 bytes, line 1
1_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Z.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;let n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();let t=new Ot({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=n===this.masked.rawInputValue?t.removeDirection:Z.NONE,r=this.masked.nearestInputPos(t.startChangePos+i,s);s!==Z.NONE&&(r=this.masked.nearestInputPos(r,Z.NONE)),this.updateControl(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};var $=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}};Q.ChangeDetails=$;var zt=class{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";let t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";let e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}},Bt=class e{constructor(t){this._value="",this._update({...e.DEFAULTS,...t}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new zt(this.extractInput(e,t),e)}appendTail(e){return St(e)&&(e=new zt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new $({inserted:e,rawInserted:e})):new $}_appendChar(e,t,n){void 0===t&&(t={});let i,s=this.state;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&"pad"===this.autofix)){let n=this.state;this.state=s;let r=this.pad(t),a=this._appendCharRaw(e,t);r=r.aggregate(a),a.rawInserted||r.equals(i)?i=r:this.state=n}if(i.inserted){let e,r=!1!==this.doValidate(t);if(r&&null!=n){let t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.unshift(this.displayValue.length-i.tailShift)}let s=this.appendTail(n);if(r=s.rawInserted.length===n.toString().length,!(r&&s.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.shift();s=this.appendTail(n),r=s.rawInserted.length===n.toString().length}r&&s.inserted&&(this.state=t)}r||(i=new $,this.state=s,n&&e&&(n.state=e))}return i}_appendPlaceholder(){return new $}_appendEager(){return new $}append(e,t,n){if(!St(e))throw Error("value should be string");let i,s=St(n)?new zt(String(n)):n;null!=t&&t.tail&&(t._beforeTailState=this.state),[e,i]=this.doPrepare(e,t);for(let n=0;n<e.length;++n){let r=this._appendChar(e[n],t,s);if(!r.rawInserted&&!this.doSkipInvalid(e[n],t,s))break;i.aggregate(r)}return(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&i.aggregate(this._appendEager()),null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new $}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;let t=this.rawInputValue,n=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;let t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return!!this.skipInvalid}doPrepare(e,t){return void 0===t&&(t={}),$.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),$.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,i,s){void 0===n&&(n=""),void 0===i&&(i=Z.NONE),void 0===s&&(s={input:!0});let r,a=e+t,o=this.extractTail(a),l=!0===this.eager||"remove"===this.eager;l&&(i=Tt(i),r=this.extractInput(0,a,{raw:!0}));let u=e,d=new $;if(i!==Z.NONE&&(u=this.nearestInputPos(e,t>1&&0!==e&&!l?Z.NONE:i),d.tailShift=u-e),d.aggregate(this.remove(u)),l&&i!==Z.NONE&&r===this.rawInputValue)if(i===Z.FORCE_LEFT){let e;for(;r===this.rawInputValue&&(e=this.displayValue.length);)d.aggregate(new $({tailShift:-1})).aggregate(this.remove(e-1))}else i===Z.FORCE_RIGHT&&o.unshift();return d.aggregate(this.append(n,s,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Dt(this,e)}typedValueEquals(t){let n=this.typedValue;return t===n||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(n)||!!this.format&&this.format(t,this)===this.format(this.t
1ypedValue,this)}pad(e){return new $}};Bt.DEFAULTS={skipInvalid:!0},Bt.EMPTY_VALUES=[void 0,null,""],Q.Masked=Bt;var Vt=class e{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=St(t)?new zt(String(t)):t;let n=this.chunks[this.chunks.length-1],i=n&&(n.stop===t.stop||null==t.stop)&&t.from===n.from+n.toString().length;if(t instanceof zt)i?n.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Q.MaskedPattern))return new zt(this.toString()).appendTo(t);let n=new $;for(let i=0;i<this.chunks.length;++i){let s,r=this.chunks[i],a=t._mapPosToBlock(t.displayValue.length),o=r.stop;if(null!=o&&(!a||a.index<=o)&&((r instanceof e||t._stops.indexOf(o)>=0)&&n.aggregate(t._appendPlaceholder(o)),s=r instanceof e&&t._blocks[o]),s){let e=s.appendTail(r);n.aggregate(e);let i=r.toString().slice(e.rawInserted.length);i&&n.aggregate(t.append(i,{tail:!0}))}else n.aggregate(t.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let{chunks:n,...i}=t;Object.assign(this,i),this.chunks=n.map(t=>{let n="chunks"in t?new e:new zt;return n.state=t,n})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";let t=null==e?e:e-this.from,n=0;for(;n<this.chunks.length;){let e=this.chunks[n],i=e.unshift(t);if(e.toString()){if(!i)break;++n}else this.chunks.splice(n,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){let t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}},Ht=class{constructor(e,t){this.masked=e,this._log=[];let{offset:n,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=i,this.ok=!1}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(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){let e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=this.block?.displayValue.length||0){if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!this.block.isFixed&&this.block.value&&(this.offset=this.block.nearestInputPos(this.offset,Z.FORCE_LEFT),0!==this.offset))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Z.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Z.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value&&(this.offset=this.block.nearestInputPos(this.offset,Z.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Z.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Z.NONE),!0})}},Ut=class{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new $}nearestInputPos(e,t){void 0===t&&(t=Z.NONE);let n=this._value.length;switch(t){case Z.LEFT:case Z.FORCE_LEFT:return 0;case Z.NONE:case Z.RIGHT:case Z.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new $;let n=!0===this.eager||"append"===this.eager,i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&
1!t.tail,s=new $({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let e=new $;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new zt("")}appendTail(e){return St(e)&&(e=new zt(String(e))),e.appendTo(this)}append(e,t,n){let i=this._appendChar(e[0],t);return null!=n&&(i.tailShift+=this.appendTail(n).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}},Wt=class{constructor(e){let{parent:t,isOptional:n,placeholderChar:i,displayChar:s,lazy:r,eager:a,...o}=e;this.masked=jt(o),Object.assign(this,{parent:t,isOptional:n,placeholderChar:i,displayChar:s,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new $}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new $;let n=this.masked.state,i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new $,this.masked.state=n),!i.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=!!i.inserted,i}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new $:(this.isFilled=!0,new $({inserted:this.placeholderChar}))}_appendEager(){return new $}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=Z.NONE);let n=this.value.length,i=Math.min(Math.max(e,0),n);switch(t){case Z.LEFT:case Z.FORCE_LEFT:return this.isComplete?i:0;case Z.RIGHT:case Z.FORCE_RIGHT:return this.isComplete?i:n;case Z.NONE:default:return i}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||e?._beforeTailState}}pad(e){return new $}};Wt.DEFAULT_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\u
10EB3\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]/,"*":/./},Q.MaskedRegExp=class extends Bt{updateOptions(e){super.updateOptions(e)}_update(e){let t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};var Gt=class e extends Bt{constructor(t){super({...e.DEFAULTS,...t,definitions:Object.assign({},Wt.DEFAULT_DEFINITIONS,t?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let n=this.mask;if(!n||!t)return;let i=!1,s=!1;for(let r=0;r<n.length;++r){if(this.blocks){let e=n.slice(r),t=Object.keys(this.blocks).filter(t=>0===e.indexOf(t));t.sort((e,t)=>t.length-e.length);let i=t[0];if(i){let{expose:e,repeat:t,...n}=At(this.blocks[i]),s={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},a=null==t?jt(s):new Q.RepeatBlock(s);a&&(this._blocks.push(a),e&&(this.exposeBlock=a),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),r+=i.length-1;continue}}let a=n[r],o=a in t;if(a===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===a||"}"===a){i=!i;continue}if("["===a||"]"===a){s=!s;continue}if(a===e.ESCAPE_CHAR){if(++r,a=n[r],!a)break;o=!1}let l=o?new Wt({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...At(t[a]),parent:this}):new Ut({char:a,eager:this.eager,isUnmasking:i});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e)return void this.reset();let{_blocks:t,...n}=e;this._blocks.forEach((e,n)=>e.state=t[n]),super.state=n}
1reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+t.value,"")}set value(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){let t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){let e=new $,t=this._mapPosToBlock(this.displayValue.length)?.index;if(null==t)return e;this._blocks[t].isFilled&&++t;for(let n=t;n<this._blocks.length;++n){let t=this._blocks[n]._appendEager();if(!t.inserted)break;e.aggregate(t)}return e}_appendCharRaw(e,t){void 0===t&&(t={});let n=this._mapPosToBlock(this.displayValue.length),i=new $;if(!n)return i;for(let r,a=n.index;r=this._blocks[a];++a){var s;let n=r._appendChar(e,{...t,_beforeTailState:null==(s=t._beforeTailState)||null==(s=s._blocks)?void 0:s[a]});if(i.aggregate(n),n.consumed)break}return i}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=new Vt;return e===t||this._forEachBlocksInRange(e,t,(e,t,i,s)=>{let r=e.extractTail(i,s);r.stop=this._findStopBefore(t),r.from=this._blockStartPos(t),r instanceof Vt&&(r.blockIndex=t),n.extend(r)}),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let i="";return this._forEachBlocksInRange(e,t,(e,t,s,r)=>{i+=e.extractInput(s,r,n)}),i}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){let i=this._stops[n];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){let t=new $;if(this.lazy&&null==e)return t;let n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;let i=n.index,s=e??this._blocks.length;return this._blocks.slice(i,s).forEach(n=>{(!n.lazy||null!=e)&&t.aggregate(n._appendPlaceholder(n._blocks?.length))}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){let i=this._blocks[n],s=t.length;if(t+=i.displayValue,e<=t.length)return{index:n,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((e,t)=>e+t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);let i=this._mapPosToBlock(e);if(i){let e=this._mapPosToBlock(t),s=e&&i.index===e.index,r=i.offset,a=e&&s?e.offset:this._blocks[i.index].displayValue.length;if(n(this._blocks[i.index],i.index,r,a),e&&!s){for(let t=i.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(e,t,i,s)=>{n.aggregate(e.remove(i,s))}),n}nearestInputPos(e,t){if(void 0===t&&(t=Z.NONE),!this._blocks.length)return 0;let n=new Ht(this,e);if(t===Z.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(t===Z.LEFT||t===Z.FORCE_LEFT){if(t===Z.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===Z.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e||(n.popState(),n.ok&&n.pos<=e))return n.pos;n.popState()}return n.ok?n.pos:t===Z.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return t===Z.RIGHT||t===Z.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===Z.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(e,Z.LEFT))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;
1return this._forEachBlocksInRange(e,t,(e,t,i,s)=>{n+=e.totalInputPositions(i,s)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){let t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(e){let t=new $;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}};Gt.DEFAULTS={...Bt.DEFAULTS,lazy:!0,placeholderChar:"_"},Gt.STOP_CHAR="`",Gt.ESCAPE_CHAR="\\",Gt.InputDefinition=Wt,Gt.FixedDefinition=Ut,Q.MaskedPattern=Gt;var Kt=class extends Gt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){let{to:t=this.to||0,from:n=this.from||0,maxLength:i=this.maxLength||0,autofix:s=this.autofix,...r}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,i),this.autofix=s;let a=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),l=0;for(;l<o.length&&o[l]===a[l];)++l;r.mask=o.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",n="",[,i,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(i.length)+s,n="9".repeat(i.length)+s),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);let n=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[s,r]=this.boundaries(this.value+e);return Number(r)<this.from?super._appendCharRaw(n[this.value.length],t):Number(s)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(i[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){let t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;let[n,i]=this.boundaries(t);return this.from<=Number(i)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){let t=new $;if(this.value.length===this.maxLength)return t;let n=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let n=0;n<i;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(e=>this._appendCharRaw(e))}return t}};Q.MaskedRange=Kt;var qt="d{.}`m{.}`Y",Jt=class e extends Gt{static extractPatternOptions(e){let{mask:t,pattern:n,...i}=e;return{...i,mask:St(t)?t:n}}constructor(t){super(e.extractPatternOptions({...e.DEFAULTS,...t}))}updateOptions(e){super.updateOptions(e)}_update(t){let{mask:n,pattern:i,blocks:s,...r}={...e.DEFAULTS,...t},a=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(a.Y.from=t.min.getFullYear()),t.max&&(a.Y.to=t.max.getFullYear()),t.min&&t.max&&a.Y.from===a.Y.to&&(a.m.from=t.min.getMonth()+1,a.m.to=t.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=t.min.getDate(),a.d.to=t.max.getDate())),Object.assign(a,this.blocks,s),super._update({...r,mask:St(n)?n:i,blocks:a})}doValidate(e){let t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};Jt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Kt,from:1,to:31,maxLength:2},m:{mask:Kt,from:1,to:12,maxLength:2},Y:{mask:Kt,from:1900,to:9999}}),Jt.DEFAULTS={...Gt.DEFAULTS,mask:Date,pattern:qt,format:(e,t)=>e?[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join("."):"",parse:(e,t)=>{let[n,i,s]=e.split(".").map(Number);return new Date(s,i-1,n)}},Q.MaskedDate=Jt;var Yt=class e extends Bt{constructor(t){super({...e.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{let{expose:t,...n}=At(e),i=jt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=i),i}):[])}_appendCharRaw(e,t){void 0===t&&(t={});let n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}
1_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");let i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,s=this.rawInputValue,r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:s,a=s.slice(r.length),o=this.currentMask,l=new $,u=o?.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask===o?u&&(this.currentMask.state=u):(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift))),l}_appendPlaceholder(){let e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){let e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){let t=new $;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){return{...e,_beforeTailState:e._beforeTailState?.currentMaskRef===this.currentMask&&e._beforeTailState?.currentMask||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,i]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),i=i.aggregate(e)}return[n,i]}doPrepareChar(e,t){void 0===t&&(t={});let[n,i]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),i=i.aggregate(e)}return[n,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){return!!this.currentMask?.isComplete}get isFilled(){return!!this.currentMask?.isFilled}remove(e,t){let n=new $;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:this.currentMask?.state}}set state(e){let{compiledMasks:t,currentMaskRef:n,currentMask:i,...s}=e;t&&this.compiledMasks.forEach((e,n)=>e.state=t[n]),null!=n&&(this.currentMask=n,this.currentMask.state=i),super.state=s}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;let{mask:i,...s}=e[n];return Dt(t,s)&&t.maskEquals(i)}):super.maskEquals(e)}typedValueEquals(e){return!!this.currentMask?.typedValueEquals(e)}};Yt.DEFAULTS={...Bt.DEFAULTS,dispatch:(e,t,n,i)=>{if(!t.compiledMasks.length)return;let s=t.rawInputValue,r=t.compiledMasks.map((r,a)=>{let o=t.currentMask===r,l=o?r.displayValue.length:r.nearestInputPos(r.displayValue.length,Z.FORCE_LEFT);return r.rawInputValue===s?o||r.remove(l):(r.reset(),r.append(s,{raw:!0})),r.append(e,t.currentMaskFlags(n)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(l,r.nearestInputPos(r.displayValue.length,Z.FORCE_LEFT)))}});return r.sort((e,t)=>
1t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),t.compiledMasks[r[0].index]}},Q.MaskedDynamic=Yt;var Xt=class e extends Gt{constructor(t){super({...e.DEFAULTS,...t})}updateOptions(e){super.updateOptions(e)}_update(e){let{enum:t,...n}=e;if(t){let e=t.map(e=>e.length),i=Math.min(...e),s=Math.max(...e)-i;n.mask="*".repeat(i),s&&(n.mask+="["+"*".repeat(s)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});let n=Math.min(this.nearestInputPos(0,Z.FORCE_RIGHT),this.value.length),i=this.enum.filter(t=>this.matchValue(t,this.unmaskedValue+e,n));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,(e,n)=>{let s=i[0][n];n>=this.value.length||s===e.value||(e.reset(),e._appendChar(s,t))});let e=super._appendCharRaw(i[0][this.value.length],t);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach(t=>e.aggregate(super._appendCharRaw(t))),e}return new $({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new zt("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new $;let n,i=Math.min(super.nearestInputPos(0,Z.FORCE_RIGHT),this.value.length);for(n=e;n>=0&&!(this.enum.filter(e=>this.matchValue(e,this.value.slice(i,n),i)).length>1);--n);let s=super.remove(n,t);return s.tailShift+=n-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}};Xt.DEFAULTS={...Gt.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},Q.MaskedEnum=Xt,Q.MaskedFunction=class extends Bt{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};var Zt,Qt=class e extends Bt{constructor(t){super({...e.DEFAULTS,...t})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+Et(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=RegExp(e+"\\d*"+t),this._mapToRadixRegExp=RegExp("["+this.mapToRadix.map(Et).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Et(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){let t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});let[n,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(i.skip=!0),n&&!this.allowPositive&&!this.value&&"-"!==n&&i.aggregate(this._appendChar("-")),[n,i]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(t,n){void 0===n&&(n={});let i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);let r=this._value;this._value+=t;let a,o=this.number,l=!isNaN(o),u=!1;if(l){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix),u||=r===this._value&&!n.tail):l=!1),l&&=!!this._value.match(this._numberRegExp)}l?a=new $({inserted:this._value.slice(r.length),rawInserted:u?"":t,skip:u}):(this._value=r,a=new $),this._value=this._insertThousandsSeparators(this._value);let d=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(d);return a.tailShift+=(c-s)*this.thousandsSeparator.length,a}_findSeparatorAround(e){if(this.thousandsSeparator){let t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){let n=this._findSeparatorAround(e);n>=0&&(e=n);let i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);let n=this.value.slice(0,e),i=this.value.slice(t),s=this._separatorsCount(n.length);return this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+i)),new $({tailShift:(this._separatorsCountFromSlice(n)-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case Z.NONE:case Z.LEFT:case Z.FORCE_LEFT:{let n=this._findSeparatorAround(e-1);if(n>=0){let i=n+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===Z.FORCE_LEFT)return n}break}case Z.RIGHT:case Z.FORCE_RIGHT:{let t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){let e=this.number,t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){let t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(e,t,n,i)=>t+i),e.length&&!/\d$/.test(t[0])&&(t[0]+="0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;let t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(t,n,i){void 0===n&&(n={});let s=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,n,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&(0!==t||""!==this.value)}};Zt=Qt,Qt.UNMASKED_RADIX=".",Qt.EMPTY_VALUES=[...Bt.EMPTY_VALUES,0],Qt.DEFAULTS={...Bt.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Zt.UNMASKED_RADIX],min:-(2**53-1),max:2**53-1,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>
1e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Q.MaskedNumber=Qt;var $t={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function en(e,t,n){void 0===t&&(t=$t.MASKED),void 0===n&&(n=$t.MASKED);let i=jt(e);return e=>i.runIsolated(i=>(i[t]=e,i[n]))}function tn(e,t,n,i){return en(t,n,i)(e)}Q.PIPE_TYPE=$t,Q.createPipe=en,Q.pipe=tn,Q.RepeatBlock=class extends Gt{get repeatFrom(){return(Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)??0}get repeatTo(){return(Array.isArray(this.repeat)?this.repeat[1]:this.repeat)??1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){let{repeat:t,...n}=At(e);this._blockOpts=Object.assign({},this._blockOpts,n);let i=jt(this._blockOpts);this.repeat=t??i.repeat??this.repeat??1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&this._blocks?.length||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(jt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});let n=new $;for(let s,r,a=this._mapPosToBlock(this.displayValue.length)?.index??Math.max(this._blocks.length-1,0);s=this._blocks[a]??(r=!r&&this._allocateBlock(a));++a){var i;let o=s._appendChar(e,{...t,_beforeTailState:null==(i=t._beforeTailState)||null==(i=i._blocks)?void 0:i[a]});if(o.skip&&r){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(o),o.consumed)break}return n}_trimEmptyTail(e,t){void 0===e&&(e=0);let n,i=Math.max(this._mapPosToBlock(e)?.index||0,this.repeatFrom,0);null!=t&&(n=this._mapPosToBlock(t)?.index),n??=this._blocks.length-1;let s=0;for(let e=n;i<=e&&!this._blocks[e].unmaskedValue;--e,++s);s&&(this._blocks.splice(n-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}};try{globalThis.IMask=Q}catch{}function nn(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}on(),window.addEventListener("scroll",function(){on()}),sn(),window.addEventListener("resize",function(){sn()}),X.bind("[data-fancybox]",{closeExisting:!0}),document.querySelectorAll(".phone_mask").forEach(function(e){var t=Q(e,{mask:"+7 (000) 000-00-00",placeholderChar:"_"});e.addEventListener("focus",function(){t.updateOptions({mask:"+7 (000) 000-00-00",lazy:!1})}),e.addEventListener("blur",function(){""==t.unmaskedValue&&t.updateOptions({mask:"",lazy:!0})})}),document.querySelector(".burger").addEventListener("click",function(){document.body.classList.toggle("open")}),document.querySelectorAll(".menu-item").forEach(function(e){e.addEventListener("click",function(){document.body.classList.remove("open")})}),document.querySelector(".btn-formDemo").addEventListener("click",function(){window.smartCaptcha&&window.smartCaptcha.execute()}),document.querySelectorAll(".btn-share").forEach(function(e){e.addEventListener("click",function(){ln(e.getAttribute("share-url"))})});var rn=!1;function an(e,t,n=!1){window.smartCaptcha.reset(),e.dataset.text=e.querySelector("span").innerHTML,e.querySelector("span").textContent=t,n&&e.classList.add("error"),setTimeout(function(){e.querySelector("span").innerHTML=e.dataset.text,e.classList.remove("error"),setTimeout(function(){rn=!1},500)},2e3)}function on(){document.querySelector("header").classList.toggle("scroll",window.scrollY>50)}function sn(){let e=document.documentElement.clientWidth/100;document.documentElement.style.setProperty("--vw",`${e}px`)}function cn(e){if(rn)return;rn=!0;let t=document.querySelector(".form"),n=t.querySelector(".btn");t.querySelectorAll(".error").forEach(function(e){e.classList.remove("error")});var i={token:e,agree:+!!t.querySelector("[name=agree]").checked},s=["name","email","phone"];for(let e in s)i[s[e]]=t.querySelector("[name="+s[e]+"]").value;for(let e in s){if("email"==s[e]&&!nn(i[s[e]]))return an(n,"ÐведиÑе коÑÑекÑнÑй email",!0),t.querySelector("[name="+s[e]+"]").closest(".form__row").classList.add("error"),!1;if(!i[s[e]])return an(n,"ÐаполниÑе вÑе полÑ",!0),t.querySelector("[name="+s[e]+"]").closest(".form__row").classList.add("error"),!1}return 0==i.agree?(an(n,"ÐодÑвеÑдиÑе ÑоглаÑие Ñ Ð¿Ð¾Ð»Ð¸Ñикой",!0),t.querySelector("[name=agree]").closest(".form__row").classList.add("error"),!1):(fetch("./include/api.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"demo",params:JSON.stringify(i)})}).then(function(e){return e.json()}).then(function(e){rn=!1,1==e.success?(an(n,"УÑпеÑ
"),setTimeout(function(){X.close()},1e3)):an(n,"ÐÑибка",!0)}).catch(function(){rn=!1,an(n,"ÐÑибка",!0)}),!1)}async function ln(e){await navigator.share({url:e})}async function un(){return window.smartCaptcha||await dn("https://smartcaptcha.yandexcloud.net/captcha.js?render=onload&onload=onloadFunction"),window.smartCaptcha}async function dn(e){return new Promise((t,n)=>{let i=document.createElement("script");i.src=e,i.onload=t,i.onerror=n,document.head.appendChild(i)})}un().then(()=>{window.smartCaptcha.render("captcha-container",{sitekey:document.querySelector("[name=YANDEX_SMART_CAPTCHA_KEY]").value,invisible:!0,callback:cn}),setTimeout(()=>
1{let e=document.querySelector(".SmartCaptcha-Shield");e&&e.classList.remove("SmartCaptcha-Shield_visible")},1e3)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.