1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,270083,e=>{"use strict";var t,i,n,s,o,a,r,l,h,c,d,u;let p,f=(e,t=1e4)=>Math.round(((e=parseFloat(e+"")||0)+Number.EPSILON)*t)/t,g=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,n=-1!==i.indexOf("hidden"),s=-1!==i.indexOf("visible");return t&&!n&&!s},m=function(e,t){return!(!e||e===document.body||t&&e===t)&&(g(e)?e:m(e.parentElement,t))},b=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var i=document.createElement("div");t.firstChild;)i.appendChild(t.firstChild);return i}return t.firstChild},v=e=>`${e||""}`.split(" ").filter(e=>!!e),y=(e,t,i)=>{e&&v(t).forEach(t=>{e.classList.toggle(t,i||!1)})};class w{constructor(e){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}let x={passive:!1};class E{constructor(e,{start:t=()=>!0,move:i=()=>{},end:n=()=>{}}){for(const s of(Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=e,this.startCallback=t,this.moveCallback=i,this.endCallback=n,["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"]))this[s]=this[s].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,x),this.element.addEventListener("touchstart",this.onTouchStart,x),this.element.addEventListener("touchmove",this.onMove,x),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;let t=new w(e);this.currentPointers.some(e=>e.id===t.id)||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(let t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new w(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){let t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map(e=>new w(e)):[new w(e)],n=[];for(let e of i){let t=this.currentPointers.findIndex(t=>t.id===e.id);t<0||(n.push(e),this.currentPointers[t]=e)}n.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new w(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(let t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new w(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){let i=this.currentPointers.findIndex(e=>e.id===t.id);i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){let e=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,x),this.element.removeEventListener("touchstart",this.onTouchStart,x),this.element.removeEventListener("touchmove",this.onMove,x),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}}function S(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function P(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}let C=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),T=(e,...t)=>{let i=t.length;for(let n=0;n<i;n++)Object.entries(t[n]||{}
1).forEach(([t,i])=>{let n=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:n}),C(i)?Object.assign(e[t],T(n,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})});return e},M=function(e,t){return e.split(".").reduce((e,t)=>"object"==typeof e?e[t]:void 0,t)};class O{constructor(e={}){for(const t of(Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e),Object.getOwnPropertyNames(Object.getPrototypeOf(this))))t.startsWith("on")&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}setOptions(e){for(let[t,i]of(this.options=e?T({},this.constructor.defaults,e):{},Object.entries(this.option("on")||{})))this.on(t,i)}option(e,...t){let i=M(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...n){var s;let o=M(t,e);"string"!=typeof(s=o)||isNaN(s)||isNaN(parseFloat(s))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,e,...n));let a=M(t,this.options);return a&&"function"==typeof a?o=a.call(this,this,e,...n,o):void 0===o&&(o=a),void 0===o?i:o}cn(e){let t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,(e,t,i)=>{let n="";return i?n=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${i}`):t&&(n=this.option(`l10n.${t}`)),n||(n=e),n});for(let i=0;i<t.length;i++)e=e.split(t[i][0]).join(t[i][1]);return e=e.replace(/\{\{(.*?)\}\}/g,(e,t)=>t)}on(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEac
1h(e=>{let i=this.events.get(e);i||(this.events.set(e,[]),i=[]),i.includes(t)||i.push(t),this.events.set(e,i)})}off(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach(e=>{let i=this.events.get(e);if(Array.isArray(i)){let e=i.indexOf(t);e>-1&&i.splice(e,1)}})}emit(e,...t){[...this.events.get(e)||[]].forEach(e=>e(this,...t)),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(O,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(O,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class A extends O{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){let t=new Map;for(let[i,n]of Object.entries(e)){let e=this.option(i),s=this.plugins[i];s||!1===e?s&&!1===e&&(s.detach(),delete this.plugins[i]):t.set(i,new n(this,e||{}))}for(let[e,i]of t)this.plugins[e]=i,i.attach()}detachPlugins(e){for(let t of e=e||Object.keys(this.plugins)){let e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}(r=t||(t={}))[r.Init=0]="Init",r[r.Error=1]="Error",r[r.Ready=2]="Ready",r[r.Panning=3]="Panning",r[r.Mousemove=4]="Mousemove",r[r.Destroy=5]="Destroy";let L=["a","b","c","d","e","f"],z={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},R='<circle cx="25" cy="25" r="20"></circle>',k='<div class="f-spinner"><svg viewBox="0 0 50 50">'+R+R+"</svg></div>",I=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,D=(e,t)=>{e&&v(t).forEach(t=>{e.classList.remove(t)})},F=(e,t)=>{e&&v(t).forEach(t=>{e.classList.add(t)})},j={a:1,b:0,c:0,d:1,e:0,f:0},B="mousemove",H="drag",N="content",_="auto",$=null,W=null;class X extends A{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===W&&(W=window.matchMedia("(hover: none)").matches),W}get isMobile(){return null===$&&($=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),$}get panMode(){return this.options.panMode!==B||this.isTouchDevice?H:B}get panOnlyZoomed(){let e=this.options.panOnlyZoomed;return e===_?this.isTouchDevice:e}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){let{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){let{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){let{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){let{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){let e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(let e of L){let t="e"==e||"f"===e?1e-4:1e-5;if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,i={},n={}){var s;if(super(i),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:t.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},j)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},j)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!e)throw Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({}
1,X.Plugins),n)),this.emit("attachPlugins"),this.emit("init");const o=this.content;if(o.addEventListener("load",this.onLoad),o.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));const t=b(k);!e.contains(o)||o.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null==(s=o.parentElement)?void 0:s.insertBefore(t,o))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){let{container:e}=this,t=this.cn(N),i=this.option(N)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild)&&F(i,t),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw Error("No content found");this.content=i}onLoad(){let{spinner:e,container:i,state:n}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&i.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),n===t.Init?this.enable():this.updateMetrics()}onError(){this.state!==t.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=t.Error,this.emit("error"))}getNextScale(e){let{fullScale:t,targetScale:i,coverScale:n,maxScale:s,minScale:o}=this,a=o;switch(e){case"toggleMax":a=i-o<.5*(s-o)?s:o;break;case"toggleCover":a=i-o<.5*(n-o)?n:o;break;case"toggleZoom":a=i-o<.5*(t-o)?t:o;break;case"iterateZoom":let r=[1,t,s].sort((e,t)=>e-t),l=r.findIndex(e=>e>i+1e-5);a=r[l]||1}return a}attachObserver(){var e;let t=()=>{let{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout(()=>{t()&&this.onResize(),this.updateTimer=null},500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))})),null==(e=this.resizeObserver)||e.observe(this.container)}detachObserver(){var e;null==(e=this.resizeObserver)||e.disconnect()}attachEvents(){let{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new E(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(B,this.onMouseMove)}detachEvents(){var e;let{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null==(e=this.pointerTracker)||e.stop(),this.pointerTracker=null,document.removeEventListener(B,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();let e=this.friction,t=this.option("maxVelocity");for(let i of L)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(let e of L)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){let{current:i}=this,n=i.e+e,s=i.f+t,o=this.getBounds(),{x:a,y:r}=o,l=a.min,h=a.max,c=r.min,d=r.max,u=0,p=0;return l!==1/0&&n<l?u=l-n:h!==1/0&&n>h&&(u=h-n),c!==1/0&&s<c?p=c-s:d!==1/0&&s>d&&(p=d-s),1e-4>Math.abs(u)&&(u=0),1e-4>Math.abs(p)&&(p=0),Object.assign(Object.assign({},o),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){let{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){let{content:t,contentRect:i}=this,{fitWidth:n,fitHeight:s,fullWidth:o,fullHeight:a}=i,r=o,l=a;
1if(this.option("zoom")||0!==this.angle){let i=!(t instanceof HTMLImageElement)&&("none"===window.getComputedStyle(t).maxWidth||"none"===window.getComputedStyle(t).maxHeight),h=i?o:n,c=i?a:s,d=this.getMatrix(e),u=new DOMPoint(0,0).matrixTransform(d),p=new DOMPoint(0+h,0).matrixTransform(d),f=new DOMPoint(0+h,0+c).matrixTransform(d),g=new DOMPoint(0,0+c).matrixTransform(d),m=Math.abs(f.x-u.x),b=Math.abs(f.y-u.y),v=Math.abs(g.x-p.x),y=Math.abs(g.y-p.y);r=Math.max(m,v),l=Math.max(b,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===B||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);let{target:e}=this,{x:t,y:i,xDiff:n,yDiff:s}=this.checkBounds(),o=this.option("maxVelocity"),a=this.velocity.e,r=this.velocity.f;0!==n?(this.isBouncingX=!0,n*a<=0?a+=.14*n:(a=.14*n,t.min!==1/0&&(this.target.e=Math.max(e.e,t.min)),t.max!==1/0&&(this.target.e=Math.min(e.e,t.max))),o&&(a=Math.max(Math.min(a,o),-1*o))):this.isBouncingX=!1,0!==s?(this.isBouncingY=!0,s*r<=0?r+=.14*s:(r=.14*s,i.min!==1/0&&(this.target.f=Math.max(e.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(e.f,i.max))),o&&(r=Math.max(Math.min(r,o),-1*o))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a),this.isBouncingY&&(this.velocity.f=r)}enable(){let{content:e}=this,i=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(let e of L)this.current[e]=this.target[e]=i[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=t.Ready,this.emit("ready")}onClick(e){var t;let i;"click"===e.type&&0===e.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null==(t=this.pointerTracker)||t.clear(),this.trackingPoints=[],this.startDecelAnim());let n=e.target;if(!n||e.defaultPrevented)return;if(n.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((i=window.getSelection())&&"Range"===i.type&&!n.closest("button"))return;let s=n.closest("[data-panzoom-action]"),o=n.closest("[data-panzoom-change]"),a=s||o,r=a&&I(a)?a.dataset:null;if(r){let t=r.panzoomChange,i=r.panzoomAction;if((t||i)&&e.preventDefault(),t){let e={};try{e=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(e)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(n.closest("[data-fancybox]"))return;let l=this.content.getBoundingClientRect(),h=this.dragStart;if(h.time&&!this.canZoomOut()&&(Math.abs(l.x-h.x)>2||Math.abs(l.y-h.y)>2))return;this.dragStart.time=0;let c=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},d=this.option("click",e),u=this.option("dblClick",e);u?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&d&&c(d)):(this.emit("dblClick",e),e.defaultPrevented||c(u)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",e),!e.defaultPrevented&&d&&c(d))}addTrackingPoint(e){let t=this.trackingPoints.filter(e=>e.time>Date.now()-100);t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var n;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];let s=this.content.getBoundingClientRect();if(this.dragStart={x:s.x,y:s.y,top:s.top,left:s.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===B&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;let o=e.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(o.nodeName)||o.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null==(n=window.getSelection())||n.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(o.nodeName)||e.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(t),this.emit
1("touchStart",e)),!0}onPointerMove(e,t,i){if(!1===this.option("touch",e)||!this.isDragging||t.length<2&&this.panOnlyZoomed&&f(this.targetScale)<=f(this.minScale)||(this.emit("touchMove",e),e.defaultPrevented))return;this.addTrackingPoint(t[0]);let{content:n}=this,s=P(i[0],i[1]),o=P(t[0],t[1]),a=0,r=0;if(t.length>1){let e=n.getBoundingClientRect();a=s.clientX-e.left-.5*e.width,r=s.clientY-e.top-.5*e.height}let l=S(i[0],i[1]),h=S(t[0],t[1]),c=l?h/l:1,d=o.clientX-s.clientX,u=o.clientY-s.clientY;this.dragOffset.x+=d,this.dragOffset.y+=u,this.dragOffset.time=Date.now()-this.dragStart.time;let p=f(this.targetScale)===f(this.minScale)&&this.option("lockAxis");if(p&&!this.lockedAxis)if("xy"===p||"y"===p||"touchmove"===e.type){if(6>Math.abs(this.dragOffset.x)&&6>Math.abs(this.dragOffset.y))return void e.preventDefault();let t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=t>45&&t<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,d=0,u=0}else this.lockedAxis=p;if(m(e.target,this.content)&&(p="x",this.dragOffset.y=0),p&&"xy"!==p&&this.lockedAxis!==p&&f(this.targetScale)===f(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));let g=this.checkBounds(d,u);this.option("rubberband")?("x"!==this.isInfinite&&(g.xDiff>0&&d<0||g.xDiff<0&&d>0)&&(d*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*g.xDiff))),"y"!==this.isInfinite&&(g.yDiff>0&&u<0||g.yDiff<0&&u>0)&&(u*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*g.yDiff)))):(g.xDiff&&(d=0),g.yDiff&&(u=0));let b=this.targetScale,v=this.minScale,y=this.maxScale;b<.5*v&&(c=Math.max(c,v)),b>1.5*y&&(c=Math.min(c,y)),"y"===this.lockedAxis&&f(b)===f(v)&&(d=0),"x"===this.lockedAxis&&f(b)===f(v)&&(u=0),this.applyChange({originX:a,originY:r,panX:d,panY:u,scale:c,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,i,n){n.length?(this.dragOffset.x=0,this.dragOffset.y=0,this.trackingPoints=[]):(this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(i),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),m(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==t.Destroy&&(e.defaultPrevented||this.startDecelAnim())))}startDecelAnim(){var e;let t=this.isScaling;for(let e of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,L))this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,D(this.container,"is-scaling"),D(this.container,"is-animating"),this.isTicking=!1;let{trackingPoints:i}=this,n=i[0],s=i[i.length-1],o=0,a=0,r=0;s&&n&&(o=s.clientX-n.clientX,a=s.clientY-n.clientY,r=s.time-n.time);let l=(null==(e=window.visualViewport)?void 0:e.scale)||1;1!==l&&(o*=l,a*=l);let h=0,c=0,d=0,u=0,p=this.option("decelFriction"),g=this.targetScale;if(r>0){d=Math.abs(o)>3?o/(r/30):0,u=Math.abs(a)>3?a/(r/30):0;let e=this.option("maxVelocity");e&&(d=Math.max(Math.min(d,e),-1*e),u=Math.max(Math.min(u,e),-1*e))}d&&(h=d/(1/(1-p)-1)),u&&(c=u/(1/(1-p)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&f(g)===this.minScale)&&(h=d=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&f(g)===this.minScale)&&(c=u=0);let m=this.dragOffset.x,b=this.dragOffset.y,v=this.option("dragMinThreshold")||0;Math.abs(m)<v&&Math.abs(b)<v&&(h=c=0,d=u=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||t&&!h&&!c)&&(p=.35),this.applyChange({panX:h,panY:c,friction:p}),this.emit("decel",d,u,m,b)}onWheel(e){let t=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e})));if(this.emit("wheel",e,t),this.panMode===B||e.defaultPrevented)return;let i=this.option("wheel");"pan"===i?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:-(2*e.deltaX),panY:-(2*e.deltaY),bounce:!1})):"zoom"===i&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}
1setTransform(){this.emit("beforeTransform");let{current:e,target:t,content:i,contentRect:n}=this,s=Object.assign({},j);for(let i of L){let n="e"==i||"f"===i?1e4:1e5;s[i]=f(e[i],n),Math.abs(t[i]-e[i])<("e"==i||"f"===i?.51:.001)&&(e[i]=t[i])}let{a:o,b:a,c:r,d:l,e:h,f:c}=s,d=`matrix(${o}, ${a}, ${r}, ${l}, ${h}, ${c})`,u=i.parentElement instanceof HTMLPictureElement?i.parentElement:i;if(this.option("transformParent")&&(u=u.parentElement||u),u.style.transform===d)return;u.style.transform=d;let{contentWidth:p,contentHeight:g}=this.calculateContentDim();n.width=p,n.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var i,n,s;let o,a,r;if(!this||this.state===t.Destroy||this.isContentLoading)return;let l=Math.max(1,(null==(i=window.visualViewport)?void 0:i.scale)||1),{container:h,content:c}=this,d=c instanceof HTMLImageElement,u=h.getBoundingClientRect(),p=getComputedStyle(this.container),g=u.width*l,m=u.height*l,b=parseFloat(p.paddingTop)+parseFloat(p.paddingBottom),v=g-(parseFloat(p.paddingLeft)+parseFloat(p.paddingRight));this.containerRect={width:g,height:m,innerWidth:v,innerHeight:m-b};let y=parseFloat(c.dataset.width||"")||(o=c instanceof HTMLImageElement?c.naturalWidth:c instanceof SVGElement?c.width.baseVal.value:Math.max(c.offsetWidth,c.scrollWidth))||0,w=parseFloat(c.dataset.height||"")||(a=c instanceof HTMLImageElement?c.naturalHeight:c instanceof SVGElement?c.height.baseVal.value:Math.max(c.offsetHeight,c.scrollHeight))||0,x=this.option("width",y)||_,E=this.option("height",w)||_,S=x===_,P=E===_;"number"!=typeof x&&(x=y),"number"!=typeof E&&(E=w),S&&(x=E/w*y),P&&(E=w/(y/x));let C=c.parentElement instanceof HTMLPictureElement?c.parentElement:c;this.option("transformParent")&&(C=C.parentElement||C);let T=C.getAttribute("style")||"";C.style.setProperty("transform","none","important"),d&&(C.style.width="",C.style.height=""),C.offsetHeight;let M=c.getBoundingClientRect(),O=M.width*l,A=M.height*l,L=O,z=A;O=Math.min(O,x),A=Math.min(A,E),d?{width:O,height:A}=(r=Math.min(O/(n=x),A/(s=E)),{width:n*=r,height:s*=r}):(O=Math.min(O,x),A=Math.min(A,E));let R=.5*(z-A),k=.5*(L-O);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:M.top-u.top+R,bottom:u.bottom-M.bottom+R,left:M.left-u.left+k,right:u.right-M.right+k,fitWidth:O,fitHeight:A,width:O,height:A,fullWidth:x,fullHeight:E}),C.style.cssText=T,d&&(C.style.width=`${O}px`,C.style.height=`${A}px`),this.setTransform(),!0!==e&&this.emit("refresh"),this.ignoreBounds||(f(this.targetScale)<f(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===t.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){let{contentWidth:e,contentHeight:t}=this.calculateContentDim(this.target),{targetScale:i,lockedAxis:n}=this,{fitWidth:s,fitHeight:o}=this.contentRect,a=0,r=0,l=0,h=0,c=this.option("infinite");if(!0===c||n&&c===n)a=-1/0,l=1/0,r=-1/0,h=1/0;else{let{containerRect:n,contentRect:c}=this,d=f(s*i,1e4),u=f(o*i,1e4),{innerWidth:p,innerHeight:g}=n;if(n.width===d&&(p=n.width),n.width===u&&(g=n.height),e>p){a=-1*(l=.5*(e-p));let t=.5*(c.right-c.left);a+=t,l+=t}if(s>p&&e<p&&(a-=.5*(s-p),l-=.5*(s-p)),t>g){r=-1*(h=.5*(t-g));let e=.5*(c.bottom-c.top);r+=e,h+=e}o>g&&t<g&&(a-=.5*(o-g),l-=.5*(o-g))}return{x:{min:a,max:l},y:{min:r,max:h}}}getBounds(){let e=this.option("bounds");return e!==_?e:this.calculateBounds()}updateControls(){let e=this.container,{panMode:t,contentRect:i,targetScale:n,minScale:s}=this,o=s,a=this.option("click")||!1;a&&(o=this.getNextScale(a));let r=this.canZoomIn(),l=this.canZoomOut(),h=t===H&&!!this.option("touch"),c=l&&h;if(h&&(f(n)<f(s)&&!this.panOnlyZoomed&&(c=!0),(f(i.width,1)>f(i.fitWidth,1)||f(i.height,1)>f(i.fitHeight,1))&&(c=!0)),f(i.width*n,1)<f(i.fitWidth,1)&&(c=!1),t===B&&(c=!1),y(e,this.cn("isDraggable"),c),!this.option("zoom"))return;let d=r&&f(o)>f(n),u=!d&&!c&&l&&f(o)<f(n);for(let t of(y(e,this.cn("canZoomIn"),d),y(e,this.cn("canZoomOut"),u),e.querySelectorAll("[data-panzoom-action]"))){let e=!1,i=!1;switch(t.dataset.panzoomAction){case"zoomIn":r?e=!0:i=!0;break;case"zoomOut":l?e=!0:i=!0;break;case"toggleZoom":case"iterateZoom":r||l?e=!0:i=!0;let n=t.querySelector("g");n&&(n.style.display=r?"":"none")}e?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):i&&(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:i=this.target.f,scale:n=this.targetScale,friction:s=this.option("friction"),angle:o=0,originX:a=0,originY:r=0,flipX:l=!1,flipY:h=!1,ignoreBounds:c=!1}){this.state!==t.Destroy&&this.applyChange({panX:e-this.target.e,panY:i-this.target.f,scale:n/this.targetScale,angle:o,originX:a,originY:r,friction:s,flipX:l,flipY:h,ignoreBounds:c})}applyChange({panX:e=0,panY:i=0,scale:n=1,angle:s=0,originX:o=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:h=!1,ignoreBounds:c=!1,bounce:d=this.option("bounce")}){let u=this.state;if(u===t.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=c;let{current:p}=this,g=p.e,m=p.f,b=this.getMatrix(this.target),v=(new DOMMatrix).translate(g,m).translate(o,a).translate(e,i);
1if(this.option("zoom")){if(!c){let e=this.targetScale,t=this.minScale,i=this.maxScale;e*n<t&&(n=t/e),e*n>i&&(n=i/e)}v=v.scale(n)}for(let e of(v=v.translate(-o,-a).translate(-g,-m).multiply(b),s&&(v=v.rotate(s)),l&&(v=v.scale(-1,1)),h&&(v=v.scale(1,-1)),L))"e"!==e&&"f"!==e&&(v[e]>this.minScale+1e-5||v[e]<this.minScale-1e-5)?this.target[e]=v[e]:this.target[e]=f(v[e],1e4);(this.targetScale<this.scale||Math.abs(n-1)>.1||this.panMode===B||!1===d)&&!c&&this.clampTargetBounds(),u===t.Init?this.animate():this.isResting||(this.state=t.Panning,this.requestTick())}stop(e=!1){if(this.state===t.Init||this.state===t.Destroy)return;let i=this.isTicking;for(let t of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,L))this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),D(this.container,"is-scaling"),D(this.container,"is-animating"),this.isTicking=!1,this.state=t.Ready,i&&(this.emit("endAnimation"),this.updateControls())}
1requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),F(this.container,"is-animating"),this.isScaling&&F(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(e,t=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==B||!e||f(this.targetScale)<=f(this.minScale))return;this.emit("mouseMove",e);let{container:i,containerRect:n,contentRect:s}=this,o=n.width,a=n.height,r=i.getBoundingClientRect(),l=(e.clientX||0)-r.left,h=(e.clientY||0)-r.top,{contentWidth:c,contentHeight:d}=this.calculateContentDim(this.target),u=this.option("mouseMoveFactor");u>1&&(c!==o&&(c*=u),d!==a&&(d*=u));let p=.5*(c-o)-l/o*100/100*(c-o);p+=.5*(s.right-s.left);let g=.5*(d-a)-h/a*100/100*(d-a);g+=.5*(s.bottom-s.top),this.applyChange({panX:p-this.target.e,panY:g-this.target.f,friction:t})}zoomWithWheel(e){if(this.state===t.Destroy||this.state===t.Init)return;let i=Date.now();if(i-this.pwt<45)return void e.preventDefault();this.pwt=i;let n=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),{targetScale:s,maxScale:o,minScale:a}=this,r=s*(100+45*n)/100;f(r)<f(a)&&f(s)<=f(a)?(this.cwd+=Math.abs(n),r=a):f(r)>f(o)&&f(s)>=f(o)?(this.cwd+=Math.abs(n),r=o):(this.cwd=0,r=Math.max(Math.min(r,o),a)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),f(r)!==f(s)&&this.zoomTo(r,{event:e}))}canZoomIn(){return this.option("zoom")&&(f(this.contentRect.width,1)<f(this.contentRect.fitWidth,1)||f(this.targetScale)<f(this.maxScale))}canZoomOut(){return this.option("zoom")&&f(this.targetScale)>f(this.minScale)}zoomIn(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.getNextScale("toggleZoom"),e)}toggleMax(e){this.zoomTo(this.getNextScale("toggleMax"),e)}toggleCover(e){this.zoomTo(this.getNextScale("toggleCover"),e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:i=_,originX:n=_,originY:s=_,event:o}={}){if(this.isContentLoading||this.state===t.Destroy)return;let{targetScale:a,fullScale:r,maxScale:l,coverScale:h}=this;if(this.stop(),this.panMode===B&&(o=this.pmme||o),o||n===_||s===_){let e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),i=o?o.clientX:t.left+.5*t.width,a=o?o.clientY:t.top+.5*t.height;n=i-e.left-.5*e.width,s=a-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=r:"cover"===e?c=h:"max"===e?c=l:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/a||1,i=i===_?c>1?.15:.25:i,this.applyChange({scale:c,originX:n,originY:s,friction:i}),o&&this.panMode===B&&this.panWithMouse(o,i)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");let{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");let{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){let{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);let n=e.classList.contains(t);n?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(n?"enterFS":"exitFS")}getMatrix(e=this.current){let{a:t,b:i,c:n,d:s,e:o,f:a}=e;return new DOMMatrix([t,i,n,s,o,a])}reset(e){if(this.state!==t.Init&&this.state!==t.Destroy){for(let e of(this.stop("current"),L))this.target[e]=j[e];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=t.Panning,this.requestTick())}}destroy(){this.stop(),this.state=t.Destroy,this.detachEvents(),this.detachObserver();let{container:e,content:i}=this;for(let t of Object.values(this.option("classes")||{}))e.classList.remove(t+"");
1i&&(i.removeEventListener("load",this.onLoad),i.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(X,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:z}}),Object.defineProperty(X,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});let q=function(e,t){let i=!0;return(...n)=>{i&&(i=!1,e(...n),setTimeout(()=>{i=!0},t))}},Y=(e,t)=>{let i=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)}),i};(l=i||(i={}))[l.Init=0]="Init",l[l.Ready=1]="Ready",l[l.Destroy=2]="Destroy";let V=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{let t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},Z=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class U extends O{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class G extends U{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let e=this.list;if(!e){F(e=document.createElement("ul"),this.cn("list")),e.setAttribute("role","tablist");let t=this.instance.container;t.appendChild(e),F(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;let t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),n=Math.max(2e3,this.option("maxCount")),s=this.option("dynamicFrom");if(t<i||t>n)return void this.cleanup();let o="number"==typeof s&&t>5&&t>=s,a=!this.list||this.isDynamic!==o||this.list.children.length!==t;a&&this.cleanup();let r=this.build();if(y(r,this.cn("isDynamic"),!!o),a)for(let e=0;e<t;e++)r.append(this.createItem(e));let l,h=0;for(let t of[...r.children]){let i=h===this.instance.page;for(let n of(i&&(l=t),y(t,this.cn("isCurrent"),i),null==(e=t.children[0])||e.setAttribute("aria-selected",i?"true":"false"),["isBeforePrev","isPrev","isNext","isAfterNext"]))D(t,this.cn(n));h++}if(l=l||r.firstChild,o&&l){let e=l.previousElementSibling,t=e&&e.previousElementSibling;F(e,this.cn("isPrev")),F(t,this.cn("isBeforePrev"));let i=l.nextElementSibling,n=i&&i.nextElementSibling;F(i,this.cn("isNext")),F(n,this.cn("isAfterNext"))}this.isDynamic=o}createItem(e=0){var t;let i=document.createElement("li");i.setAttribute("role","presentation");let n=b(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return i.appendChild(n),null==(t=i.children[0])||t.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,D(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(G,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2}});let K="disabled",J="next",Q="prev";class ee extends U{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){let e=this.instance,t=e.pages.length,i=e.page;if(t<2)return void this.cleanup();this.build();let n=this.prev,s=this.next;n&&s&&(n.removeAttribute(K),s.removeAttribute(K),e.isInfinite||(i<=0&&n.setAttribute(K,""),i>=t-1&&s.setAttribute(K,"")))}addBtn(e){var t;let i=this.instance,n=document.createElement("button");n.setAttribute("tabindex","0"),n.setAttribute("title",i.localize(`{{${e.toUpperCase()}}}`)),F(n,this.cn("button")+" "+this.cn(e===J?"isNext":"isPrev"));let s=i.isRTL?e===J?Q:J:e;return n.innerHTML=i.localize(this.option(`${s}Tpl`)),n.dataset[`carousel${e?e.match("^[a-z]")?e.charAt(0).toUpperCase()+e.substring(1):e:""}`]="true",null==(t=this.container)||t.appendChild(n),n}build(){let e=this.instance.container,t=this.cn("container"),{container:i,prev:n,next:s}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(F(i=document.createElement("div"),t),e.appendChild(i)),this.container=i,s||(s=i.querySelector("[data-carousel-next]")),s||(s=this.addBtn(J)),this.next=s,n||(n=i.querySelector("[data-carousel-prev]")),n||(n=this.addBtn(Q)),this.prev=n}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}}Object.defineProperty(ee,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
1',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});class et extends U{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){let{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===i.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===i.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var n,s;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;let o=i.target,{nav:a,target:r}=this;if(!a||!r||!o)return;let l=o.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;let h=parseInt(l.dataset.index||"",10)||0,c=r.getPageForSlide(h),d=a.getPageForSlide(h);a.slideTo(d),r.slideTo(c,{friction:(null==(s=null==(n=this.nav)?void 0:n.plugins)?void 0:s.Sync.option("friction"))||0}),this.markSelectedSlide(h)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;let{target:n,nav:s}=this;if(!n||!s||s.state!==i.Ready||n.state!==i.Ready)return;let o=null==(t=null==(e=n.pages[n.page])?void 0:e.slides[0])?void 0:t.index,a=s.getPageForSlide(o);this.markSelectedSlide(o),s.slideTo(a,null===s.prevPage&&null===n.prevPage?{friction:0}:void 0)}markSelectedSlide(e){let t=this.nav;t&&t.state===i.Ready&&(this.selectedIndex=e,[...t.slides].map(t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")}))}attach(){let e=this.options.target,t=this.options.nav;e?this.addAsNavFor(e):t&&this.addAsTargetFor(t)}detach(){let e=this.nav,t=this.target;e&&(e.off("ready",this.onNavReady),e.off("createSlide",this.onNavCreateSlide),e.off("Panzoom.click",this.onNavClick),e.off("Panzoom.touchEnd",this.onNavTouch)),this.nav=null,t&&(t.off("ready",this.onTargetReady),t.off("refresh",this.onTargetChange),t.off("change",this.onTargetChange)),this.target=null}}Object.defineProperty(et,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});let ei="animationend",en="isSelected",es="slide";class eo extends A{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===i.Ready}get isInfinite(){let e=!1,{contentDim:t,viewportDim:i,pages:n,slides:s}=this,o=s[0];return n.length>=2&&o&&t+o.dim>=i&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},n={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:i.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof e&&(e=document.querySelector(e)),!e||!I(e))throw Error("No Element found");this.container=e,this.slideNext=q(this.slideNext.bind(this),150),this.slidePrev=q(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=n,queueMicrotask(()=>{this.processOptions()})}processOptions(){var e,t;let n=T({},eo.defaults,this.userOptions),s="",o=n.breakpoints;if(o&&C(o))for(let[e,t]of Object.entries(o))window.matchMedia(e).matches&&C(t)&&(s+=e,T(n,t));s===this.bp&&this.state!==i.Init||(this.bp=s,this.state===i.Ready&&(n.initialSlide=(null==(t=null==(e=this.pages[this.page])?void 0:e.slides[0])?void 0:t.index)||0),this.state!==i.Init&&this.destroy(),super.setOptions(n),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}
1init(){this.state=i.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},eo.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=i.Ready,this.emit("ready")}initLayout(){let{container:e}=this,t=this.option("classes");F(e,this.cn("container")),y(e,t.isLTR,!this.isRTL),y(e,t.isRTL,this.isRTL),y(e,t.isVertical,!this.isHorizontal),y(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(F(i=document.createElement("div"),t.viewport),i.append(...Y(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let n=this.option("track")||e.querySelector(`.${t.track}`);n||(F(n=document.createElement("div"),t.track),n.append(...Array.from(i.childNodes))),n.setAttribute("aria-live","polite"),i.contains(n)||i.prepend(n),this.viewport=i,this.track=n,this.emit("initLayout")}initSlides(){let{track:e}=this;if(!e)return;let t=[...this.slides],i=[];for(let n of([...Y(e,`.${this.cn(es)}`)].forEach(e=>{if(I(e)){let t=V({el:e,isDom:!0,index:this.slides.length});i.push(t)}}),[...this.option("slides",[])||[],...t]))i.push(V(n));this.slides=i;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;
1for(let e of i)this.emit("beforeInitSlide",e,e.index),this.emit("initSlide",e,e.index);this.emit("initSlides")}setInitialPage(){let e=this.option("initialSlide");this.page="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){let{track:e,pages:t,isHorizontal:i}=this;if(!e||!t.length)return;let n=this.page;t[n]||(this.page=n=0);let s=(t[n].pos||0)*(this.isRTL&&i?1:-1),o=i?`${s}px`:"0",a=i?"0":`${s}px`;e.style.transform=`translate3d(${o}, ${a}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);let e=this.option("Panzoom")||{};this.panzoom=new X(this.viewport,T({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:e=>!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>100*(Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim)},e)),this.panzoom.on("*",(e,t,...i)=>{this.emit(`Panzoom.${t}`,e,...i)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){let e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[],{contentDim:t,viewportDim:i}=this,n=this.option("slidesPerPage");n=("auto"===n||t<=i)&&!1!==this.option("fill")?1/0:parseFloat(n+"");let s=0,o=0,a=0;for(let t of this.slides)(!e.length||o+t.dim-i>.05||a>=n)&&(e.push(Z()),s=e.length-1,o=0,a=0),e[s].slides.push(t),o+=t.dim+t.gap,a++;return e}processPages(){let e,t=this.pages,{contentDim:i,viewportDim:n,isInfinite:s}=this,o=this.option("center"),a=this.option("fill"),r=a&&o&&i>n&&!s;if(t.forEach((e,t)=>{var s;for(let[i,n]of(e.index=t,e.pos=(null==(s=e.slides[0])?void 0:s.pos)||0,e.dim=0,e.slides.entries()))e.dim+=n.dim,i<e.slides.length-1&&(e.dim+=n.gap);r&&e.pos+.5*e.dim<.5*n?e.pos=0:r&&e.pos+.5*e.dim>=i-.5*n?e.pos=i-n:o&&(e.pos+=-.5*(n-e.dim))}),t.forEach(e=>{a&&!s&&i>n&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,i-n)),e.pos=f(e.pos,1e3),e.dim=f(e.dim,1e3),.1>=Math.abs(e.pos)&&(e.pos=0)}),s)return t;let l=[];return t.forEach(t=>{let i=Object.assign({},t);e&&i.pos===e.pos?(e.dim+=i.dim,e.slides=[...e.slides,...i.slides]):(i.index=l.length,e=i,l.push(i))}),l}getPageFromIndex(e=0){let t=this.pages.length;return e=parseInt((e||0).toString())||0,this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0)}getSlideMetrics(e){var t,i;let n=this.isHorizontal?"width":"height",s=0,o=0,a=e.el,r=!(!a||a.parentNode);if(a?s=parseFloat(a.dataset[n]||"")||0:((a=document.createElement("div")).style.visibility="hidden",(this.track||document.body).prepend(a)),F(a,this.cn(es)+" "+e.class+" "+e.customClass),s)a.style[n]=`${s}px`,a.style["width"===n?"height":"width"]="";else{r&&(this.track||document.body).prepend(a),s=a.getBoundingClientRect()[n]*Math.max(1,(null==(t=window.visualViewport)?void 0:t.scale)||1);let e=a[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>s&&(s=e)}let l=getComputedStyle(a);return"content-box"===l.boxSizing&&(this.isHorizontal?(s+=parseFloat(l.paddingLeft)||0,s+=parseFloat(l.paddingRight)||0):(s+=parseFloat(l.paddingTop)||0,s+=parseFloat(l.paddingBottom)||0)),o=parseFloat(l[this.isHorizontal?"marginRight":"marginBottom"])||0,r?null==(i=a.parentElement)||i.removeChild(a):e.el||a.remove(),{dim:f(s,1e3),gap:f(o,1e3)}}getBounds(){let{isInfinite:e,isRTL:t,isHorizontal:i,pages:n}=this,s={min:0,max:0};if(e)s={min:-1/0,max:1/0};else if(n.length){let e=n[0].pos,o=n[n.length-1].pos;s=t&&i?{min:e,max:o}:{min:-1*o,max:-1*e}}return{x:i?s:{min:0,max:0},y:i?{min:0,max:0}:s}}repositionSlides(){let e,{isHorizontal:t,isRTL:i,isInfinite:n,viewport:s,viewportDim:o,contentDim:a,page:r,pages:l,slides:h,panzoom:c}=this,d=0,u=0,p=0,g=0;for(let n of(c?g=-1*c.current[this.axis]:l[r]&&(g=l[r].pos||0),e=t?i?"right":"left":"top",i&&t&&(g*=-1),h)){let t=n.el;t?("top"===e?(t.style.right="",t.style.left=""):t.style.top="",n.index!==d?t.style[e]=0===u?"":`${f(u,1e3)}px`:t.style[e]="",p+=n.dim+n.gap,d++):u+=n.dim+n.gap}if(n&&p&&s){let i=getComputedStyle(s),n="padding",r=parseFloat(i[n+(t?"Left":"Top")]);for(let s of(g-=r,o+=r,o+=parseFloat(i[n+(t?"Right":"Bottom")]),h))s.el&&(f(s.pos)<f(o)&&f(s.pos+s.dim+s.gap)<f(g)&&f(g)>f(a-o)&&(s.el.style[e]=`${f(u+p,1e3)}px`),f(s.pos+s.gap)>=f(a-o)&&f(s.pos)>f(g+o)&&f(g)<f(o)&&(s.el.style[e]=`-${f(p,1e3)}px`))}let m,b,v=[...this.inTransition];if(v.length>1&&(m=l[v[0]],b=l[v[1]]),m&&b){let t=0;for(let i of h)i.el?this.inTransition.has(i.index)&&0>m.slides.indexOf(i)&&(i.el.style[e]=`${f(t+(m.pos-b.pos),1e3)}px`):t+=i.dim+i.gap}}createSlideEl(e){let{track:t,slides:i}=this;if(!t||!e||e.el&&e.el.parentNode)return;let n=e.el||document.createElement("div");F(n,this.cn(es)),F(n,e.class),F(n,e.customClass);let s=e.html;s&&(s instanceof HTMLElement?n.appendChild(s):n.innerHTML=e.html+"");let o=[];
1i.forEach((e,t)=>{e.el&&o.push(t)});let a=e.index,r=null;o.length&&(r=i[o.reduce((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e)]);let l=r&&r.el&&r.el.parentNode?r.index<e.index?r.el.nextSibling:r.el:null;t.insertBefore(n,t.contains(l)?l:null),e.el=n,this.emit("createSlide",e)}removeSlideEl(e,t=!1){let i=null==e?void 0:e.el;if(!i||!i.parentNode)return;let n=this.cn(en);if(i.classList.contains(n)&&(D(i,n),this.emit("unselectSlide",e)),e.isDom&&!t)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",e);let s=new CustomEvent(ei);i.dispatchEvent(s),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var i,n,s,o;if(!t)return!1;let a=this.page,{pages:r,panzoom:l}=this;e=parseInt((e||0).toString())||0;let h=this.getPageFromIndex(e);if(!l||!r[h]||r.length<2||Math.abs(((null==(n=null==(i=r[a])?void 0:i.slides[0])?void 0:n.dim)||0)-this.viewportDim)>1)return!1;let c=e>a?1:-1;this.isInfinite&&(0===a&&e===r.length-1&&(c=-1),a===r.length-1&&0===e&&(c=1));let d=r[h].pos*(this.isRTL?1:-1);if(a===h&&1>Math.abs(d-l.target[this.axis]))return!1;this.clearTransitions();let u=l.isResting;F(this.container,this.cn("inTransition"));let p=(null==(s=r[a])?void 0:s.slides[0])||null,f=(null==(o=r[h])?void 0:o.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);let g=p.el,m=f.el;u||t===es||(t="fadeFast",g=null);let b=this.isRTL?"next":"prev",v=this.isRTL?"prev":"next";return g&&(this.inTransition.add(p.index),p.transition=t,g.addEventListener(ei,this.onAnimationEnd),g.classList.add(`f-${t}Out`,`to-${c>0?v:b}`)),m&&(f.transition=t,m.addEventListener(ei,this.onAnimationEnd),m.classList.add(`f-${t}In`,`from-${c>0?b:v}`)),l.current[this.axis]=d,l.target[this.axis]=d,l.requestTick(),this.onChange(h),!0}manageSlideVisiblity(){let e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(let n of this.slides)i.has(n)?e.add(n):t.add(n);for(let t of this.inTransition)e.add(this.slides[t]);for(let t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(let i of t)e.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;let e="aria-hidden",t=this.cn(en);if(t)for(let i of this.slides){let n=i.el;n&&(n.dataset.index=`${i.index}`,n.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?n.removeAttribute(e):n.setAttribute(e,"true"):this.pages[this.page].slides.includes(i)?(n.classList.contains(t)||(F(n,t),this.emit("selectSlide",i)),n.removeAttribute(e)):(n.classList.contains(t)&&(D(n,t),this.emit("unselectSlide",i)),n.setAttribute(e,"true")))}}flipInfiniteTrack(){let{axis:e,isHorizontal:t,isInfinite:i,isRTL:n,viewportDim:s,contentDim:o}=this,a=this.panzoom;if(!a||!i)return;let r=a.current[e],l=a.target[e]-r,h=0,c=.5*s;n&&t?(r<-c&&(h=-1,r+=o),r>o-c&&(h=1,r-=o)):(r>c&&(h=1,r-=o),r<-o+c&&(h=-1,r+=o)),h&&(a.current[e]=r,a.target[e]=r+l)}lazyLoadImg(e,t){let i=this,n="f-fadeIn",s="is-preloading",o=!1,a=null,r=()=>{o||(o=!0,a&&(a.remove(),a=null),D(t,s),t.complete&&(F(t,n),setTimeout(()=>{D(t,n)},350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",e))};F(t,s),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",()=>{r()}),t.addEventListener("load",()=>{r()}),setTimeout(()=>{let i=t.parentNode;i&&e.el&&(t.complete?r():o||(a=b(k),i.insertBefore(a,t)))},300)}lazyLoadSlide(e){let t=e&&e.el;if(!t)return;let i=new Set,n=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));for(let s of(t.dataset.lazySrc&&n.push(t),n.map(e=>{e instanceof HTMLImageElement?i.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)}),i))this.lazyLoadImg(e,s)}onAnimationEnd(e){var t;let i=e.target,n=i?parseInt(i.dataset.index||"",10)||0:-1,s=this.slides[n],o=e.animationName;if(!i||!s||!o)return;let a=!!this.inTransition.has(n)&&s.transition;a&&o.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(n),this.inTransition.size||this.clearTransitions(),n===this.page&&(null==(t=this.panzoom)?void 0:t.isResting)&&this.emit
1("settle")}onDecel(e,t=0,i=0,n=0,s=0){if(this.option("dragFree"))return void this.setPageFromPosition();let{isRTL:o,isHorizontal:a,axis:r,pages:l}=this,h=l.length,c=Math.abs(Math.atan2(i,t)/(Math.PI/180)),d=0;if(d=c>45&&c<135?a?0:i:a?t:0,!h)return;let u=this.page,p=o&&a?1:-1,f=e.current[r]*p,{pageIndex:g}=this.getPageFromPosition(f);Math.abs(d)>5?(l[u].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(u=g),u=o&&a?d<0?u-1:u+1:d<0?u+1:u-1):u=0===n&&0===s?u:g,this.slideTo(u,{transition:!1,friction:e.option("decelFriction")})}onClick(e){let t,i,n=e.target,s=n&&I(n)?n.dataset:null;s&&(void 0!==s.carouselPage?(i="slideTo",t=s.carouselPage):void 0!==s.carouselNext?i="slideNext":void 0!==s.carouselPrev&&(i="slidePrev")),i?(e.preventDefault(),e.stopPropagation(),n&&!n.hasAttribute("disabled")&&this[i](t)):this.emit("click",e)}onSlideTo(e){let t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){let i=this.page;this.prevPage=i,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==i&&(this.markSelectedSlides(),this.emit("change",e,i,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var e;null==(e=this.viewport)||e.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(e){this.lp!==e.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=e.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(e=null,t=null){this.destroy(),this.state=i.Init,this.prevPage=null,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}slideTo(e=0,{friction:t=this.option("friction"),transition:n=this.option("transition")}={}){if(this.state===i.Destroy)return;e=parseInt((e||0).toString())||0;let s=this.getPageFromIndex(e),{axis:o,isHorizontal:a,isRTL:r,pages:l,panzoom:h}=this,c=l.length,d=r&&a?1:-1;if(!h||!c)return;if(this.page!==s){let t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,n))return;let u=l[s].pos;if(this.isInfinite){let t=this.contentDim,i=h.target[o]*d;2===c?u+=t*Math.floor(parseFloat(e+"")/2):u=[u,u-t,u+t].reduce(function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e})}u*=d,1>Math.abs(h.target[o]-u)||(h.panTo({x:a?u:0,y:a?0:u,friction:t}),this.onChange(s))}slideToClosest(e){if(this.panzoom){let{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),D(this.container,this.cn("inTransition"));let e=["to-prev","to-next","from-prev","from-next"];for(let t of this.slides){let i=t.el;if(i){i.removeEventListener(ei,this.onAnimationEnd),i.classList.remove(...e);let n=t.transition;n&&i.classList.remove(`f-${n}Out`,`f-${n}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,n,s,o;let a=this.panzoom,r=(null==(i=this.pages[this.page])?void 0:i.pos)||0,l=(null==(n=this.pages[this.page])?void 0:n.dim)||0,h=this.contentDim<this.viewportDim,c=Array.isArray(t)?t:[t],d=[];for(let e of c)d.push(V(e));this.slides.splice(e,0,...d);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(let e of d)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=d.length),this.updateMetrics(),a){let t=(null==(s=this.pages[this.page])?void 0:s.pos)||0,i=(null==(o=this.pages[this.page])?void 0:o.dim)||0,n=this.pages.length||1,c=this.isRTL?l-i:i-l,d=this.isRTL?r-t:t-r;h&&1===n?(e<=this.page&&(a.current[this.axis]-=c,a.target[this.axis]-=c),a.panTo({[this.isHorizontal?"x":"y"]:-1*t})):d&&e<=this.page&&(a.target[this.axis]-=d,a.current[this.axis]-=d,a.requestTick())}for(let e of d)this.emit("initSlide",e,e.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){let t=this.slides.length;e=(e%t+t)%t;let i=this.slides[e];if(i){this.removeSlideEl(i,!0),this.slides.splice(e,1);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}
1),this.emit("destroySlide",i)}}updateMetrics(){let{panzoom:e,viewport:t,track:n,slides:s,isHorizontal:o,isInfinite:a}=this;if(!n)return;let r=o?"width":"height";if(t){let e=Math.max(t[o?"offsetWidth":"offsetHeight"],f(t.getBoundingClientRect()[r],1e3)),i=getComputedStyle(t),n="padding";e-=parseFloat(i[n+(o?"Left":"Top")])+parseFloat(i[n+(o?"Right":"Bottom")]),this.viewportDim=e}let l,h=0;for(let[e,t]of s.entries()){let i=0,n=0;!t.el&&l?(i=l.dim,n=l.gap):({dim:i,gap:n}=this.getSlideMetrics(t),l=t),i=f(i,1e3),n=f(n,1e3),t.dim=i,t.gap=n,t.pos=h,h+=i,(a||e<s.length-1)&&(h+=n)}h=f(h,1e3),this.contentDim=h,e&&(e.contentRect[r]=h,e.contentRect[o?"fullWidth":"fullHeight"]=h),this.pages=this.createPages(),this.pages=this.processPages(),this.state===i.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,t=!1,i=!1){void 0===e&&(e=this.page);let n=this.panzoom,s=this.contentDim,o=this.pages[e]||0;if(!o||!n)return e>this.page?-1:1;let a=-1*n.current.e,r=f((a-o.pos)/o.dim,1e3),l=r,h=r;this.isInfinite&&!0!==i&&(l=f((a-o.pos+s)/o.dim,1e3),h=f((a-o.pos-s)/o.dim,1e3));let c=[r,l,h].reduce(function(e,t){return Math.abs(t)<Math.abs(e)?t:e});return t?c:c>1?1:c<-1?-1:c}setViewportHeight(){let{page:e,pages:t,viewport:i,isHorizontal:n}=this;if(!i||!t[e])return;let s=0;n&&this.track&&(this.track.style.height="auto",t[e].slides.forEach(e=>{e.el&&(s=Math.max(s,e.el.offsetHeight))})),i.style.height=s?`${s}px`:""}getPageForSlide(e){for(let t of this.pages)for(let i of t.slides)if(i.index===e)return t.index;return -1}getVisibleSlides(e=0){var i;let n=new Set,{panzoom:s,contentDim:o,viewportDim:a,pages:r,page:l}=this;if(a){o=o+(null==(i=this.slides[this.slides.length-1])?void 0:i.gap)||0;let h=0;h=s&&s.state!==t.Init&&s.state!==t.Destroy?-1*s.current[this.axis]:r[l]&&r[l].pos||0,this.isInfinite&&(h-=Math.floor(h/o)*o),this.isRTL&&this.isHorizontal&&(h*=-1);let c=h-a*e,d=h+a*(e+1),u=this.isInfinite?[-1,0,1]:[0];for(let e of this.slides)for(let t of u){let i=e.pos+t*o,s=i+e.dim+e.gap;i<d&&s>c&&n.add(e)}}return n}getPageFromPosition(e){let{viewportDim:t,contentDim:i,slides:n,pages:s,panzoom:o}=this,a=s.length,r=n.length,l=n[0],h=n[r-1],c=this.option("center"),d=0,u=0,p=void 0===e?-1*((null==o?void 0:o.target[this.axis])||0):e;c&&(p+=.5*t),this.isInfinite?(p<l.pos-.5*h.gap&&(p-=i,u=-1),p>h.pos+h.dim+.5*h.gap&&(p-=i,u=1)):p=Math.max(l.pos||0,Math.min(p,h.pos));let f=h,g=n.find(e=>{let t=e.pos-.5*f.gap,i=e.pos+e.dim+.5*e.gap;return f=e,p>=t&&p<i});return g||(g=h),{page:(d=this.getPageForSlide(g.index))+u*a,pageIndex:d}}setPageFromPosition(){let{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([i.Destroy].includes(this.state))return;this.state=i.Destroy;let{container:e,viewport:t,track:n,slides:s,panzoom:o}=this,a=this.option("classes");for(let[i,r]of(e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),o&&(o.destroy(),this.panzoom=null),s&&s.forEach(e=>{this.removeSlideEl(e)}),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&n&&n.offsetParent&&t.replaceWith(...n.childNodes)),Object.entries(a)))"container"!==i&&r&&e.classList.remove(r);this.track=null,this.viewport=null,this.page=0,this.slides=[];let r=this.events.get("ready");this.events=new Map,r&&this.events.set("ready",r)}}Object.defineProperty(eo,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(eo,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}}}),Object.defineProperty(eo,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Navigation:ee,Dots:G,Sync:et}});let ea=function(e){if(!I(e))return 0;let t=window.scrollY,i=window.innerHeight,n=t+i,s=e.getBoundingClientRect(),o=s.y+t,a=s.height,r=o+a;if(t>r||n<o)return 0;if(t<o&&n>r||o<t&&r>n)return 100;let l=a;return o<t&&(l-=t-o),r>n&&(l-=r-n),Math.round(l/i*100)},er=!("u"<typeof window||!window.document||!window.document.createElement),el='a[href],area[href],input:not([disabled]):not([type="hidden"]):not([aria-hidden]),select:not([disabled]):not([aria-hidden]),textarea:not([disabled]):not([aria-hidden]),button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard),iframe,object,embed,video,audio,[contenteditable],[tabindex]:not
1([tabindex^="-"]):not([disabled]):not([aria-hidden])',eh=e=>{if(e&&er){void 0===p&&document.createElement("div").focus({get preventScroll(){return p=!0,!1}});try{if(p)e.focus({preventScroll:!0});else{let t=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(e){}}},ec=()=>{let e=document,t,i="",n="",s="";return e.fullscreenEnabled?(i="requestFullscreen",n="exitFullscreen",s="fullscreenElement"):e.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",n="webkitExitFullscreen",s="webkitFullscreenElement"),i&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===i?t[i](Element.ALLOW_KEYBOARD_INPUT):t[i]()},exit:function(){return e[s]&&e[n]()},isFullscreen:function(){return e[s]}}),t},ed={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},z),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n <div class="fancybox__backdrop"></div>\n <div class="fancybox__carousel"></div>\n <div class="fancybox__footer"></div>\n </div>'},trapFocus:!0,wheel:"zoom"};(h=n||(n={}))[h.Init=0]="Init",h[h.Ready=1]="Ready",h[h.Closing=2]="Closing",h[h.CustomClosing=3]="CustomClosing",h[h.Destroy=4]="Destroy",(c=s||(s={}))[c.Loading=0]="Loading",c[c.Opening=1]="Opening",c[c.Ready=2]="Ready",c[c.Closing=3]="Closing";let eu="",ep=!1,ef=!1,eg=null,em=()=>{let e="",t="",i=tp.getInstance();if(i){let n=i.carousel,s=i.getSlide();if(n&&s){let o=s.slug||void 0,a=s.triggerEl||void 0;(t=o||i.option("slug")||"")||!a||!a.dataset||(t=a.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!o&&n.slides.length>1?"-"+(s.index+1):""))}}return{hash:e,slug:t,index:1}},eb=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split("-"),i=t[t.length-1],n=i&&/^\+?\d+$/.test(i)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:n}},ev=()=>{let{slug:e,index:t}=eb();if(!e)return;let i=document.querySelector(`[data-slug="${e}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),tp.getInstance())return;let n=document.querySelectorAll(`[data-fancybox="${e}"]`);n.length&&(i=n[t-1])&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))},ey=()=>{if(!1===tp.defaults.Hash)return;let e=tp.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;let{slug:t,index:i}=eb(),{slug:n}=em();e&&(t===n?e.jumpTo(i-1):(ep=!0,e.close())),ev()},ew=()=>{eg&&clearTimeout(eg),queueMicrotask(()=>{ey()})},ex=()=>{window.addEventListener("hashchange",ew,!1),setTimeout(()=>{ey()},500)};er&&(/complete|interactive|loaded/.test(document.readyState)?ex():document.addEventListener("DOMContentLoaded",ex));let eE="is-zooming-in";class eS extends U{onCreateSlide(e,t,i){let n=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof n&&this.setImage(i,n)}onRemoveSlide(e,t,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(e,t,i,n){for(let e of(D(this.instance.container,eE),t.slides)){let t=e.panzoom;t&&e.index!==i&&t.reset(.35)}}onClose(){var e,i;let s=this.instance,o=s.container,a=s.getSlide();if(!o||!o.parentElement||!a)return;let{el:r,contentEl:l,panzoom:h,thumbElSrc:c}=a;if(!r||!c||!l||!h||h.isContentLoading||h.state===t.Init||h.state===t.Destroy)return;h.updateMetrics();let d=this.getZoomInfo(a);if(!d)return;this.instance.state=n.CustomClosing,o.classList.remove(eE),o.classList.add("is-zooming-out"),l.style.backgroundImage=`url('${c}')`;let u=o.getBoundingClientRect();
11===((null==(e=window.visualViewport)?void 0:e.scale)||1)&&Object.assign(o.style,{position:"absolute",top:`${o.offsetTop+window.scrollY}px`,left:`${o.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${u.width}px`,height:`${u.height}px`,overflow:"hidden"});let{x:p,y:f,scale:g,opacity:m}=d;if(m){let e,t,n=(i=h.scale,e=g-i,t=-1,n=>1+((n-i)/e*t||0));h.on("afterTransform",()=>{l.style.opacity=n(h.scale)+""})}h.on("endAnimation",()=>{s.destroy()}),h.target.a=g,h.target.b=0,h.target.c=0,h.target.d=g,h.panTo({x:p,y:f,scale:g,friction:m?.2:.33,ignoreBounds:!0}),h.isResting&&s.destroy()}setImage(e,t){let i=this.instance;e.src=t,this.process(e,t).then(t=>{let{contentEl:n,imageEl:o,thumbElSrc:a,el:r}=e;if(i.isClosing()||!n||!o)return;n.offsetHeight;let l=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&r){r.addEventListener("contextmenu",e=>{e.preventDefault()});let e=document.createElement("div");F(e,"fancybox-protected"),n.appendChild(e)}if(a&&l){let o=t.contentRect,r=Math.max(o.fullWidth,o.fullHeight),h=null;!l.opacity&&r>1200&&(F(h=document.createElement("img"),"fancybox-ghost"),h.src=a,n.appendChild(h));let c=()=>{h&&(F(h,"f-fadeFastOut"),setTimeout(()=>{h&&(h.remove(),h=null)},200))};new Promise((e,t)=>{let i=new Image;i.onload=e,i.onerror=t,i.src=a}).then(()=>{i.hideLoading(e),e.state=s.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then(()=>{c(),this.instance.done(e)},()=>{}),h&&setTimeout(()=>{c()},r>2500?800:200)},()=>{i.hideLoading(e),i.revealContent(e)})}else{let n=this.optionFor(e,"initialSize"),s=this.optionFor(e,"zoom"),o={event:i.prevMouseMoveEvent||i.options.event,friction:.12*!!s},a=i.optionFor(e,"showClass")||void 0,r=!0;i.isOpeningSlide(e)&&("full"===n?t.zoomToFull(o):"cover"===n?t.zoomToCover(o):"max"===n?t.zoomToMax(o):r=!1,t.stop("current")),r&&a&&(a=t.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,a)}},()=>{i.setError(e,"{{IMAGE_ERROR}}")})}process(e,t){return new Promise((i,n)=>{var s;let o=this.instance,a=e.el;o.clearContent(e),o.showLoading(e);let r=this.optionFor(e,"content");if("string"==typeof r&&(r=b(r)),!r||!I(r)){if((r=document.createElement("img"))instanceof HTMLImageElement){let i="",n=e.caption;i="string"==typeof n&&n?n.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null==(s=o.carousel)?void 0:s.pages.length)||1}`,r.src=t||"",r.alt=i,r.draggable=!1,e.srcset&&r.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(r.fetchPriority="high")}e.sizes&&r.setAttribute("sizes",e.sizes)}F(r,"fancybox-image"),e.imageEl=r,o.setContent(e,r,!1),e.panzoom=new X(a,T({transformParent:!0},this.option("Panzoom")||{},{content:r,width:(t,i)=>o.optionFor(e,"width","auto",i)||"auto",height:(t,i)=>o.optionFor(e,"height","auto",i)||"auto",wheel:()=>{let e=o.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,i)=>{var n,s;if(o.isCompact||o.isClosing()||e.index!==(null==(n=o.getSlide())?void 0:n.index)||i&&["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(i.composedPath()[0].nodeName))return!1;let a=!i||i.target&&(null==(s=e.contentEl)?void 0:s.contains(i.target));return o.option(a?"contentClick":"backdropClick")||!1},dblClick:()=>o.isCompact?"toggleZoom":o.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{i(e)},error:()=>{n()},destroy:()=>{n()}}}))})}zoomIn(e){return new Promise((t,i)=>{let n=this.instance,o=n.container,{panzoom:a,contentEl:r,el:l}=e;a&&a.updateMetrics();let h=this.getZoomInfo(e);if(!(h&&l&&r&&a&&o))return void i();let{x:c,y:d,scale:u,opacity:p}=h,f=()=>{e.state!==s.Closing&&(p&&(r.style.opacity=Math.max(Math.min(1,1-(1-a.scale)/(1-u)),0)+""),a.scale>=1&&a.scale>a.targetScale-.1&&t(a))},g=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(D(o,eE),r.style.opacity="",e.off("endAnimation",g),e.off("touchStart",g),e.off("afterTransform",f),t(e))};a.on("endAnimation",g),a.on("touchStart",g),a.on("afterTransform",f),a.on(["error","destroy"],()=>{i()}),a.panTo({x:c,y:d,scale:u,friction:0,ignoreBounds:!0}),a.stop("current");let m={event:"mousemove"===a.panMode?n.prevMouseMoveEvent||n.options.event:void 0},b=this.optionFor(e,"initialSize");F(o,eE),n.hideLoading(e),"full"===b?a.zoomToFull(m):"cover"===b?a.zoomToCover(m):"max"===b?a.zoomToMax(m):a.reset(.172)})}getZoomInfo(e){let{el:t,imageEl:i,thumbEl:s,panzoom:o}=e,a=this.instance,r=a.container;if(!t||!i||!s||!o||3>ea(s)||!this.optionFor(e,"zoom")||!r||a.state===n.Destroy||"0"===getComputedStyle(r).getPropertyValue("--f-images-zoom"))return!1;
1let l=window.visualViewport||null;if(1!==(l?l.scale:1))return!1;let{top:h,left:c,width:d,height:u}=s.getBoundingClientRect(),{top:p,left:f,fitWidth:g,fitHeight:m}=o.contentRect;if(!(d&&u&&g&&m))return!1;let b=o.container.getBoundingClientRect();f+=b.left,p+=b.top;let v=-1*(f+.5*g-(c+.5*d)),y=-1*(p+.5*m-(h+.5*u)),w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(d/u-g/m)>.1),{x:v,y:y,scale:d/g,opacity:w}}attach(){let e=this.instance;e.on("Carousel.change",this.onChange),e.on("Carousel.createSlide",this.onCreateSlide),e.on("Carousel.removeSlide",this.onRemoveSlide),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("Carousel.change",this.onChange),e.off("Carousel.createSlide",this.onCreateSlide),e.off("Carousel.removeSlide",this.onRemoveSlide),e.off("close",this.onClose)}}Object.defineProperty(eS,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;let eP="html",eC="image",eT="youtube",eM="vimeo",eO="html5video",eA=(e,t={})=>{let i=new URLSearchParams(new URL(e).search),n=new URLSearchParams;for(let[e,s]of[...i,...Object.entries(t)]){let t=s+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&n.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else n.set(e,t)}let s=n+"",o=e.match(/#t=((.*)?\d+s)/);return o&&(s+=`#t=${o[1]}`),s},eL=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class ez extends U{onBeforeInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);let i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);let n=t.contentEl,s=t.placeholderEl;if("inline"===t.type&&n&&s)n.classList.remove("fancybox__content"),"none"!==getComputedStyle(n).getPropertyValue("display")&&(n.style.display="none"),setTimeout(()=>{s&&(n&&s.parentNode&&s.parentNode.insertBefore(n,s),s.remove())},0),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,i){i.state===s.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var n,s;let o;if(i.type===eO){try{null==(s=null==(n=i.el)?void 0:n.querySelector("video"))||s.pause()}catch(e){}return}i.type===eM?o={method:"pause",value:"true"}:i.type===eT&&(o={event:"command",func:"pauseVideo"}),o&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(o),"*"),i.poller&&clearTimeout(i.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach(e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))})}onMessage(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(document.getElementsByClassName("fancybox__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(e){}}loadAjaxContent(e){let t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);let i=this.instance,s=new XMLHttpRequest;i.showLoading(e),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&i.state===n.Ready&&(i.hideLoading(e),200===s.status?i.setContent(e,s.responseText):i.setError(e,404===s.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};let o=e.ajax||null;s.open(o?"POST":"GET",t+""),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(o),e.xhr=s}setInlineContent(e){let t=null;if(I(e.src))t=e.src;else if("string"==typeof e.src){let i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){let i=(t=t.cloneNode(!0)).dataset.animationName;i&&(t.classList.remove(i),delete t.dataset.animationName);let n=t.getAttribute("id");n=n?`${n}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",n)}else if(t.parentNode){let i=document.createElement("div");i.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(i,t),e.placeholderEl=i}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){let{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");let n=this.instance,s=document.createElement("iframe");for(let[t,i]of(s.className="fancybox__iframe",s.setAttribute("id",`fancybox__iframe_${n.id}_${e.index}`),Object.entries(this.optionFor(e,"iframeAttr")||{})))s.setAttribute(t,i);s.onerror=()=>{n.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=s;let o=this.optionFor(e,"preload");"iframe"!==e.type||!1===o?(s.setAttribute("src",e.src+""),n.setContent(e,s,!1),this.resizeIframe(e),n.revealContent(e)):(n.showLoading(e),s.onload=()=>
1{if(!s.src.length)return;let t="true"!==s.dataset.ready;s.dataset.ready="true",this.resizeIframe(e),t?n.revealContent(e):n.hideLoading(e)},s.setAttribute("src",t),n.setContent(e,s,!1))}resizeIframe(e){let{type:t,iframeEl:i}=e;if(t===eT||t===eM)return;let n=null==i?void 0:i.parentElement;if(!i||!n)return;let s=e.autoSize;void 0===s&&(s=this.optionFor(e,"autoSize"));let o=e.width||0,a=e.height||0;o&&a&&(s=!1);let r=n&&n.style;if(!1!==e.preload&&!1!==s&&r)try{let e=window.getComputedStyle(n),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),s=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=i.contentWindow;if(l){let e=l.document,i=e.getElementsByTagName(eP)[0],n=e.body;r.width="",n.style.overflow="hidden",o=o||i.scrollWidth+t,r.width=`${o}px`,n.style.overflow="",r.flex="0 0 auto",r.height=`${n.scrollHeight}px`,a=i.scrollHeight+s}}catch(e){}if(o||a){let e={flex:"0 1 auto",width:"",height:""};o&&"auto"!==o&&(e.width=`${o}px`),a&&"auto"!==a&&(e.height=`${a}px`),Object.assign(r,e)}}playVideo(){let e=this.instance.getSlide();if(!e)return;let{el:t}=e;if(!t||!t.offsetParent||!this.optionFor(e,"videoAutoplay"))return;if(e.type===eO)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(e){}if(e.type!==eT&&e.type!==eM)return;let i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return(t=e.type===eT?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===eT&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(i,250)};i()}processType(e){if(e.html)return e.type=eP,e.src=e.html,void(e.html="");let t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let i=e.type,n=null;if(n=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){let s=this.optionFor(e,eT),{nocookie:o}=s,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}(s,["nocookie"]),r=`www.youtube${o?"-nocookie":""}.com`,l=eA(t,a),h=encodeURIComponent(n[2]);e.videoId=h,e.src=`https://${r}/embed/${h}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${h}/mqdefault.jpg`,i=eT}else if(n=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){let s=eA(t,this.optionFor(e,eM)),o=encodeURIComponent(n[1]),a=n[4]||"";e.videoId=o,e.src=`https://player.vimeo.com/video/${o}?${a?`h=${a}${s?"&":""}`:""}${s}`,i=eM}if(!i&&e.triggerEl){let t=e.triggerEl.dataset.type;eL.includes(t)&&(i=t)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(n=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=eO,e.videoFormat=e.videoFormat||"video/"+("ogv"===n[1]?"ogg":n[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=eC:t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${n[1]}/?ll=${(n[2]?n[2]+"&z="+Math.floor(parseFloat(n[3]))+(n[4]?n[4].replace(/^\//,"&"):""):n[4]+"").replace(/\?/,"&")}&output=${n[4]&&n[4].indexOf("layer=c")>0?"svembed":"embed"}`,i="map"):(n=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${n[1]}/maps?q=${n[2].replace("query=","q=").replace("api=1","")}&output=embed`,i="map"),e.type=i=i||this.instance.option("defaultType"),i===eC&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){let t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case eP:this.instance.setContent(e,t);break;case eO:let i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case"map":case eT:case eM:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){let t=e.contentEl;if(!(e.el&&t&&e.type&&[eT,eM,eO].includes(e.type)))return;let i,n=e.width||"auto",s=e.height||"auto";if("auto"===n||"auto"===s){let t=((i=this.optionFor(e,"videoRatio"))+"").match(/(\d+)\s*\/\s?(\d+)/);i=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(i+"")}else n&&s&&(i=n/s);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;let o=t.getBoundingClientRect(),a=o.width||1,r=o.height||1;t.style.aspectRatio=i+"",i<a/r?(s="auto"===s?r:Math.min(r,s),t.style.width="auto",t.style.height=`${s}px`):(n="auto"===n?a:Math.min(a,n),t.style.width=`${n}px`,t.style.height="auto")}attach(){let e=this.instance;e.on("Carousel.beforeInitSlide",this.onBeforeInitSlide),e.on("Carousel.createSlide",this.onCreateSlide),e.on("Carousel.selectSlide",this.onSelectSlide),e.on("Carousel.unselectSlide",this.onUnselectSlide),e.on("Carousel.Panzoom.refresh",this.onRefresh),e.on("done",this.onDone),e.on("clearContent",this.onClearContent),window.addEventListener("message",this.onMessage)}detach(){let e=this.instance;e.off("Carousel.beforeInitSlide",this.onBeforeInitSlide),e.off("Carousel.createSlide",this.onCreateSlide),e.off("Carousel.selectSlide",this.onSelectSlide),e.off("Carousel.unselectSlide",this.onUnselectSlide),e.off("Carousel.Panzoom.refresh",this.onRefresh),e.off("done",this.onDone),e.off("clearContent",this.onClearContent),window.removeEventListener("message",this.onMessage)}}Object.defineProperty(ez,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}}});let eR="play",ek="pause",eI="ready";class eD extends U{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:eI}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==eI}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var e;this.inHover=!1,(null==(e=this.instance.panzoom)?void 0:e.isResting)&&this.resume()}onTimerEnd(){let e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.
1slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();let t=this.instance,i=(null==(e=t.pages[t.page])?void 0:e.slides)||[],n=this.option("progressParentEl");if(n||(n=(1===i.length?i[0].el:null)||t.viewport),!n)return null;let s=document.createElement("div");return F(s,"f-progress"),n.prepend(s),this.progressBar=s,s.offsetHeight,s}set(){let e=this,t=e.instance;if(t.pages.length<2||e.timer)return;let i=e.option("timeout");e.state=eR,F(t.container,"has-autoplay");let n=e.createProgressBar();n&&(n.style.transitionDuration=`${i}ms`,n.style.transform="scaleX(1)"),e.timer=setTimeout(()=>{e.timer=null,e.inHover||e.onTimerEnd()},i),e.emit("set")}clear(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.removeProgressBar()}start(){if(this.set(),this.state!==eI){if(this.option("pauseOnHover")){let e=this.instance.container;e.addEventListener("mouseenter",this.onMouseEnter,!1),e.addEventListener("mouseleave",this.onMouseLeave,!1)}document.addEventListener("visibilitychange",this.onVisibilityChange,!1),this.emit("start")}}stop(){let e=this.state,t=this.instance.container;this.clear(),this.state=eI,t.removeEventListener("mouseenter",this.onMouseEnter,!1),t.removeEventListener("mouseleave",this.onMouseLeave,!1),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),D(t,"has-autoplay"),e!==eI&&this.emit("stop")}pause(){this.state===eR&&(this.state=ek,this.clear(),this.emit(ek))}resume(){let e=this.instance;if(e.isInfinite||e.page!==e.pages.length-1)if(this.state!==eR){if(this.state===ek&&!this.inHover){let e=new Event("resume",{bubbles:!0,cancelable:!0});this.emit("resume",e),e.defaultPrevented||this.set()}}else this.set();else this.stop()}toggle(){this.state===eR||this.state===ek?this.stop():this.start()}attach(){let e=this.instance;e.on("ready",this.onReady),e.on("Panzoom.startAnimation",this.onChange),e.on("Panzoom.endAnimation",this.onSettle),e.on("Panzoom.touchMove",this.onChange)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off("Panzoom.startAnimation",this.onChange),e.off("Panzoom.endAnimation",this.onSettle),e.off("Panzoom.touchMove",this.onChange),this.stop()}}Object.defineProperty(eD,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class eF extends U{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){let t=e.carousel;if(!t)return;let i=e.container;i&&(t.options.Autoplay=T({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var n;i.classList.add("has-slideshow"),(null==(n=e.getSlide())?void 0:n.state)!==s.Ready&&t.pause()},stop:()=>{i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,i)=>{var n,o,a;!i||!i.cancelable||(null==(n=e.getSlide())?void 0:n.state)===s.Ready&&(null==(a=null==(o=e.carousel)?void 0:o.panzoom)?void 0:a.isResting)||i.preventDefault()}}}),t.attachPlugins({Autoplay:eD}),this.ref=t.plugins.Autoplay)}onReady(e){let t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){let i=this.ref,n=e.carousel;if(!i||!n)return;let s=t.panzoom;s&&s.on("startAnimation",()=>{e.isCurrentSlide(t)&&i.stop()}),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;let n=this.ref;n&&t===this.option("key")&&"BUTTON"!==(null==(i=document.activeElement)?void 0:i.nodeName)&&n.toggle()}attach(){let e=this.instance;e.on("Carousel.init",this.onPrepare),e.on("Carousel.ready",this.onReady),e.on("done",this.onDone),e.on("keydown",this.onKeydown)}detach(){let e=this.instance;e.off("Carousel.init",this.onPrepare),e.off("Carousel.ready",this.onReady),e.off("done",this.onDone),e.off("keydown",this.onKeydown)}}Object.defineProperty(eF,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:e=>{var t;return(null==(t=e.instance.container)?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});let ej={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};(d=o||(o={}))[d.Init=0]="Init",d[d.Ready=1]="Ready",d[d.Hidden=2]="Hidden";
1let eB="isResting",eH="thumbWidth",eN="thumbHeight",e_="thumbClipWidth",e$=class extends U{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:o.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){let i=t.el?t.el.dataset:void 0;i&&(t.thumbSrc=i.thumbSrc||t.thumbSrc||"",t[e_]=parseFloat(i[e_]||"")||t[e_]||0,t[eN]=parseFloat(i.thumbHeight||"")||t[eN]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;let t=this.container,i=this.instance,n=i.panzoom,s=this.carousel,o=s?s.panzoom:null,a=i.page;if(n&&s&&o){if(n.isDragging){D(t,this.cn(eB));let n=(null==(e=s.pages[a])?void 0:e.pos)||0;n+=i.getProgress(a)*(this[e_]+this.thumbGap);let r=o.getBounds();-1*n>r.x.min&&-1*n<r.x.max&&o.panTo({x:-1*n,friction:.12})}else y(t,this.cn(eB),n.isResting);this.shiftModern()}}onRefresh(){for(let e of(this.updateProps(),this.instance.slides||[]))this.resizeModernSlide(e);this.shiftModern()}isDisabled(){let e=this.option("minCount")||0;if(e){let t=this.instance,i=0;for(let e of t.slides||[])e.thumbSrc&&i++;if(i<e)return!0}return 0>["modern","classic"].indexOf(this.option("type"))}getThumb(e){let t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(e){let t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){let e=[];
1for(let t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[eH]=e[e_]&&e[eN]?Math.round(this[eN]*(e[e_]/e[eN])):this[eH])}updateProps(){let e=this.container;if(!e)return;let t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[eH]=t("width")||40,this[e_]=t("clip-width")||40,this[eN]=t("height")||40}build(){let e=this;if(e.state!==o.Init)return;if(e.isDisabled())return void e.emit("disabled");let t=e.instance,i=t.container,n=e.getSlides(),s=e.option("type");e.type=s;let a=e.option("parentEl"),r=e.cn("container"),l=e.cn("track"),h=null==a?void 0:a.querySelector("."+r);h||(F(h=document.createElement("div"),r),a?a.appendChild(h):i.after(h)),F(h,`is-${s}`),F(i,e.cn("hasThumbs")),e.container=h,e.updateProps();let c=h.querySelector("."+l);c||(F(c=document.createElement("div"),e.cn("track")),h.appendChild(c)),e.track=c;let d=T({},{track:c,infinite:!1,center:!0,fill:"classic"===s,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},e.option("Carousel")||{},{Sync:{target:t},slides:n}),u=new t.constructor(h,d);u.on("createSlide",(t,i)=>{e.setProps(i.index),e.emit("createSlide",i,i.el)}),u.on("ready",()=>{e.shiftModern(),e.emit("ready")}),u.on("refresh",()=>{e.shiftModern()}),u.on("Panzoom.click",(t,i,n)=>{e.onClick(n)}),e.carousel=u,e.state=o.Ready}onClick(e){e.preventDefault(),e.stopPropagation();let t=this.instance,{pages:i,page:n}=t,s=e=>{if(e){let t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},o=(e,t)=>{let i=document.elementFromPoint(e,t);return i?s(i):[-1,void 0]},[a,r]=s(e.target);if(a>-1)return;let l=this[e_],h=e.clientX,c=e.clientY,[d,u]=o(h-l,c),[p,f]=o(h+l,c);u&&f?(a=Math.abs(h-u.getBoundingClientRect().right)<Math.abs(h-f.getBoundingClientRect().left)?d:p)===n&&(a=a===d?p:d):u?a=d:f&&(a=p),a>-1&&i[a]&&t.slideTo(a)}getShift(e){var t;let{instance:i}=this,n=this.carousel;if(!i||!n)return 0;let s=this[eH],o=this[e_],a=this.thumbGap,r=this.thumbExtraGap;if(!(null==(t=n.slides[e])?void 0:t.el))return 0;let l=i.pages.length-1,h=i.getProgress(0),c=i.getProgress(l),d=i.getProgress(e,!1,!0),u=0,p=.5*(s-o)+r+a,f=h<0&&h>-1,g=c>0&&c<1;return 0===e?(u=p*Math.abs(h),g&&1===h&&(u-=p*Math.abs(c))):e===l?(u=-(p*Math.abs(c)*1),f&&-1===c&&(u+=p*Math.abs(h))):u=f||g?-1*p+p*Math.abs(h)+p*(1-Math.abs(c)):p*d,u}setProps(e){var t;if(!this.isModern)return;let{instance:i}=this,n=this.carousel;if(i&&n){let s=null==(t=n.slides[e])?void 0:t.el;if(s&&s.childNodes.length){let t=f(1-Math.abs(i.getProgress(e))),n=f(this.getShift(e));s.style.setProperty("--progress",t?t+"":""),s.style.setProperty("--shift",n+"")}}}shiftModern(){if(!this.isModern)return;let{instance:e,track:i}=this,n=e.panzoom,s=this.carousel;if(!(e&&i&&n&&s)||n.state===t.Init||n.state===t.Destroy)return;for(let t of e.slides)this.setProps(t.index);let o=(this[e_]+this.thumbGap)*(s.slides.length||0);i.style.setProperty("--width",o+"")}cleanup(){this.carousel&&this.carousel.destroy(),this.carousel=null,this.container&&this.container.remove(),this.container=null,this.track&&this.track.remove(),this.track=null,this.state=o.Init,D(this.instance.container,this.cn("hasThumbs"))}attach(){let e=this.instance;e.on("initSlide",this.onInitSlide),e.state===i.Init?e.on("initSlides",this.onInitSlides):this.onInitSlides(),e.on(["change","Panzoom.afterTransform"],this.onChange),e.on("Panzoom.refresh",this.onRefresh)}detach(){let e=this.instance;e.off("initSlide",this.onInitSlide),e.off("initSlides",this.onInitSlides),e.off(["change","Panzoom.afterTransform"],this.onChange),e.off("Panzoom.refresh",this.onRefresh),this.cleanup()}};Object.defineProperty(e$,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ej});let eW=Object.assign(Object.assign({},ej),{key:"t",showOnStart:!0,parentEl:null}),eX="is-masked",eq="aria-hidden";class eY extends U{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){let e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,n,s;let o=(null==(s=null==(n=null==(i=this.instance)?void 0:i.carousel)?void 0:n.slides[t.index])?void 0:s.type)||"",a=t.el;if(a&&o){let e=`for-${o}`;["video","youtube","vimeo","html5video"].includes(o)&&(e+=" for-video"),F(a,e)}}onInit(){var e;let t=this,i=t.instance,n=i.carousel;if(t.ref||!n)return;let s=t.option("parentEl")||i.footer||i.container;if(!s)return;let a=T({},t.options,{parentEl:s,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{let i=e.container;i&&this.hidden&&(t.refresh(),i.style.transition="none",t.hide(),i.offsetHeight,queueMicrotask(()=>{i.style.transition="",t.show()}))}}});a.Carousel=a.Carousel||{},a.Carousel.on=T((null==(e=t.options.Carousel)?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),n.options.Thumbs=a,n.attachPlugins({Thumbs:e$}),t.ref=n.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=o.Hidden,t.hidden=!0)}onResize(){var e;let t=null==(e=this.ref)?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){let i=this.option("key");i&&i===t&&this.toggle()}toggle(){let e=this.ref;if(e&&!e.isDisabled())return e.state===o.Hidden?(e.state=o.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){let e=this.ref;if(!e||e.isDisabled())return;let t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(eq),t.classList.remove(eX),this.hidden=!1)}
1hide(){let e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(eX),t.setAttribute(eq,"true")),this.hidden=!0}refresh(){let e=this.ref;if(!e||!e.state)return;let t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){let e=this.instance;e.state===n.Init?e.on("Carousel.init",this.onInit):this.onInit(),e.on("resize",this.onResize),e.on("keydown",this.onKeydown)}detach(){var e;let t=this.instance;t.off("Carousel.init",this.onInit),t.off("resize",this.onResize),t.off("keydown",this.onKeydown),null==(e=t.carousel)||e.detachPlugins(["Thumbs"]),this.ref=null}}Object.defineProperty(eY,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:eW});let eV={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><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"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><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"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><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"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><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"/></svg>',action:"reset"},toggleFS:{icon:'<svg><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></svg>',action:"toggleFS"}};(u=a||(a={}))[u.Init=0]="Init",u[u.Ready=1]="Ready",u[u.Disabled=2]="Disabled";let eZ={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},eU="has-toolbar",eG="fancybox__toolbar";class eK extends U{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:a.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let i=this.option("display"),n=this.option("absolute"),s=this.option("enabled");if("auto"===s){let e=this.instance.carousel,t=0;if(e)for(let i of e.slides)(i.panzoom||"image"===i.type)&&t++;t||(s=!1)}s||(i=void 0);let o=0,r={left:[],middle:[],right:[]};if(i)for(let e of["left","middle","right"])for(let n of i[e]){let i=this.createEl(n);i&&(null==(t=r[e])||t.push(i),o++)}let l=null;if(o&&(l=this.createContainer()),l){for(let[e,t]of Object.entries(r)){let i=document.createElement("div");for(let n of(F(i,eG+"__column is-"+e),t))i.appendChild(n);"auto"!==n||"middle"!==e||t.length||(n=!0),l.appendChild(i)}!0===n&&F(l,"is-absolute"),this.state=a.Ready,this.onRefresh()}else this.state=a.Disabled}onClick(e){var t,i;let n=this.instance,s=n.getSlide(),o=null==s?void 0:s.panzoom,a=e.target,r=a&&I(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null==(t=n.plugins.Thumbs
1)||t.toggle());if(void 0!==r.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();let t=null==(i=n.carousel)?void 0:i.plugins.Autoplay,s=t.isActive;return o&&"mousemove"===o.panMode&&!s&&o.reset(),void(s?t.stop():t.start())}let l=r.panzoomAction,h=r.panzoomChange;if((h||l)&&(e.preventDefault(),e.stopPropagation()),h){let e={};try{e=JSON.parse(h)}catch(e){}o&&o.applyChange(e)}else l&&o&&o[l]&&o[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;let e=this.container;if(!e)return;let t=this.instance.getSlide();if(!t||t.state!==s.Ready)return;let i=t&&!t.error&&t.panzoom;for(let t of e.querySelectorAll("[data-panzoom-action]"))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let n=i&&i.canZoomIn(),o=i&&i.canZoomOut();for(let t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(let t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))o?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(let t of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){o||n?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let e=t.querySelector("g");e&&(e.style.display=n?"":"none")}}onDone(e,t){var i;null==(i=t.panzoom)||i.on("afterTransform",()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()}),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){let e=this.instance.container;if(!e)return null;let t=this.option("parentEl")||e,i=t.querySelector("."+eG);return i||(F(i=document.createElement("div"),eG),t.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&F(e,eU),this.container=i,i}createEl(e){let t=this.instance,i=t.carousel;if(!i||"toggleFS"===e||"fullscreen"===e&&!ec())return null;let n=null,s=i.slides.length||0,o=0,a=0;for(let e of i.slides)(e.panzoom||"image"===e.type)&&o++,("image"===e.type||e.downloadSrc)&&a++;if(s<2&&["infobar","prev","next"].includes(e))return n;if(void 0!==eV[e]&&!o||"download"===e&&!a)return null;if("thumbs"===e){let e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||s<2))return null;if(void 0!==eV[e]){let t=eV[e];(n=document.createElement("button")).setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),F(n,"f-button"),t.action&&(n.dataset.panzoomAction=t.action),t.change&&(n.dataset.panzoomChange=JSON.stringify(t.change)),n.appendChild(b(this.instance.localize(t.icon)))}else{let t=(this.option("items")||[])[e];t&&(n=b(this.instance.localize(t.tpl)),"function"==typeof t.click&&n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)}))}let r=null==n?void 0:n.querySelector("svg");if(r)for(let[e,t]of Object.entries(eZ))r.getAttribute(e)||r.setAttribute(e,String(t));return n}removeContainer(){let e=this.container;e&&e.remove(),this.container=null,this.state=a.Disabled;let t=this.instance.container;t&&D(t,eU)}attach(){let e=this.instance;e.on("Carousel.initSlides",this.onReady),e.on("done",this.onDone),e.on(["reveal","Carousel.change"],this.onChange),this.onReady(this.instance)}detach(){let e=this.instance;e.off("Carousel.initSlides",this.onReady),e.off("done",this.onDone),e.off(["reveal","Carousel.change"],this.onChange),this.removeContainer()}}Object.defineProperty(eK,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g>
1<path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></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>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null}});let eJ="with-fancybox",eQ="hide-scrollbar",e0="--fancybox-scrollbar-compensate",e1="--fancybox-body-margin",e2="aria-hidden",e5="is-using-tab",e3="is-animated",e4="is-compact",e6="is-loading",e8="is-opening",e7="has-caption",e9="disabled",te="tabindex",tt="download",ti="href",tn=function(){var e=window.getSelection();return!!e&&"Range"===e.type},ts,to=null,ta=null,tr=0,tl=0,th=0,tc=0,td=new Map,tu=0;class tp extends A{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},i={}){super(t),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:n.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),ts||(ts=ec()),this.id=t.id||++tu,td.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask(()=>{this.init()})}init(){if(this.state===n.Destroy)return;this.state=n.Init,this.attachPlugins(Object.assign(Object.assign({},tp.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!er)return;let e=document,t=e.body,i=e.documentElement;if(t.classList.contains(eQ))return;let n=window.innerWidth-i.getBoundingClientRect().width,s=parseFloat(window.getComputedStyle(t).marginRight);n<0&&(n=0),i.style.setProperty(e0,`${n}px`),s&&t.style.setProperty(e1,`${s}px`),t.classList.add(eQ)})(),this.initLayout(),this.scale();let e=()=>{this.initCarousel(this.userSlides),this.state=n.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(e2,"false")},16)};this.option("Fullscreen.autoStart")&&ts&&!ts.isFullscreen()?ts.request().then(()=>{this.startedFs=!0,e()}).catch(()=>e()):e()}initLayout(){var e,t;let i=this.option("parentEl")||document.body,n=b(this.localize(this.option("tpl.main")||""));if(n){if(n.setAttribute("id",`fancybox-${this.id}`),n.setAttribute("aria-label",this.localize("{{MODAL}}")),n.classList.toggle(e4,this.isCompact),F(n,this.option("mainClass")||""),F(n,e8),this.container=n,this.footer=n.querySelector(".fancybox__footer"),i.appendChild(n),F(document.documentElement,eJ),to&&ta||(F(to=document.createElement("span"),"fancybox-focus-guard"),to.setAttribute(te,"0"),to.setAttribute(e2,"true"),to.setAttribute("aria-label","Focus guard"),ta=to.cloneNode(),null==(e=n.parentElement)||e.insertBefore(to,n),null==(t=n.parentElement)||t.append(ta)),n.addEventListener("mousedown",e=>{tr=e.pageX,tl=e.pageY,D(n,e5)}),this.option("closeExisting"))for(let e of td.values())e.id!==this.id&&e.close();else this.option("animated")&&(F(n,e3),setTimeout(()=>{this.isClosing()||D(n,e3)},350));
1this.emit("initLayout")}}initCarousel(e){let t=this.container;if(!t)return;let i=t.querySelector(".fancybox__carousel");if(!i)return;let n=this.carousel=new eo(i,T({},{slides:e,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));n.on("*",(e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)}),n.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(e,t,i)=>{this.clearContent(i),i.state=void 0}),n.on("Panzoom.touchStart",()=>{var e,t;this.isCompact||this.endIdle(),(null==(e=document.activeElement)?void 0:e.closest(".f-thumbs"))&&(null==(t=this.container)||t.focus())}),n.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(n.on("Panzoom.afterTransform",(e,t)=>{let i=this.getSlide();if(i&&g(i.el))return;let n=this.container;if(n){let e=Math.abs(t.current.f),i=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));n.style.setProperty("--fancybox-ts",i?"0s":""),n.style.setProperty("--fancybox-opacity",i+"")}}),n.on("Panzoom.touchEnd",(e,t,i)=>{var n;let s=this.getSlide();if(s&&g(s.el)||t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null==(n=document.activeElement)?void 0:n.nodeName))return;let o=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(o>=200||o>=50&&t.dragOffset.time<300)&&(i&&i.cancelable&&i.preventDefault(),this.close(i,"f-throwOut"+(t.current.f<0?"Up":"Down")))})),n.on("change",e=>{var t;let i=null==(t=this.getSlide())?void 0:t.triggerEl;if(i){let t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(t)}}),n.on(["refresh","change"],e=>{let t=this.container;if(!t)return;for(let i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(let i of t.querySelectorAll("[data-fancybox-count]"))i.innerHTML=e.pages.length;if(!e.isInfinite){for(let i of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(i.removeAttribute(e9),i.removeAttribute(te)):(i.setAttribute(e9,""),i.setAttribute(te,"-1"));for(let i of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(i.removeAttribute(e9),i.removeAttribute(te)):(i.setAttribute(e9,""),i.setAttribute(te,"-1"))}let i=this.getSlide();if(!i)return;let n=i.downloadSrc||"";for(let e of(n||"image"!==i.type||i.error||"string"!=typeof i.src||(n=i.src),t.querySelectorAll("[data-fancybox-download]"))){let t=i.downloadFilename;n?(e.removeAttribute(e9),e.removeAttribute(te),e.setAttribute(ti,n),e.setAttribute(tt,t||n),e.setAttribute("target","_blank")):(e.setAttribute(e9,""),e.setAttribute(te,"-1"),e.removeAttribute(ti),e.removeAttribute(tt))}}),this.emit("initCarousel")}attachEvents(){let e=this.container;if(!e)return;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",this.onVisibilityChange,!1),document.addEventListener("mousemove",this.onMousemove),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),window.addEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.addEventListener("scroll",this.onResize),t.addEventListener("resize",this.onResize))}detachEvents(){let e=this.container;if(!e)return;document.removeEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),e.removeEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("resize",this.onResize);let t=window.visualViewport;t&&(t.removeEventListener("resize",this.onResize),t.removeEventListener("scroll",this.onResize)),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),document.removeEventListener("focus",this.onFocus,!0)}scale(){let e=this.container;if(!e)return;
1let t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1),n="",s="",o="";if(t&&i>1){let e=`${t.offsetLeft}px`,a=`${t.offsetTop}px`;n=t.width*i+"px",s=t.height*i+"px",o=`translate3d(${e}, ${a}, 0) scale(${1/i})`}e.style.transform=o,e.style.width=n,e.style.height=s}onClick(e){var t;let{container:i,isCompact:n}=this;if(!i||this.isClosing())return;!n&&this.option("idle")&&this.resetIdle();let s=e.composedPath()[0];if(s.closest(".fancybox-spinner")||s.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(s.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(s.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail||Math.abs(e.pageX-tr)>30||Math.abs(e.pageY-tl)>30)return;let o=document.activeElement;if(tn()&&o&&i.contains(o))return;if(n&&"image"===(null==(t=this.getSlide())?void 0:t.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",e),e.defaultPrevented)return;let a=!1;if(s.closest(".fancybox__content")){if(o){if(o.closest("[contenteditable]"))return;s.matches(el)||o.blur()}if(tn())return;a=this.option("contentClick")}else s.closest(".fancybox__carousel")&&!s.matches(el)&&(a=this.option("backdropClick"));"close"===a?(e.preventDefault(),this.close(e)):"next"===a?(e.preventDefault(),this.next()):"prev"===a&&(e.preventDefault(),this.prev())}onWheel(e){let t=e.target,i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");let n="slide"===i,s=Math.max(-1,Math.min(1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}))),o=Date.now();this.pwt&&o-this.pwt<300?n&&e.preventDefault():(this.pwt=o,this.emit("wheel",e,s),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(m(t)||(e.preventDefault(),this[s>0?"prev":"next"]()))))}onScroll(){window.scrollTo(th,tc)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();let t=e.key,i=this.option("keyboard");if(!i)return;let n=e.composedPath()[0],s=document.activeElement&&document.activeElement.classList,o=s&&s.contains("f-button")||n.dataset.carouselPage||n.dataset.carouselIndex;if("Escape"!==t&&!o&&I(n)&&(n.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(n.nodeName))||("Tab"===e.key?F(this.container,e5):D(this.container,e5),e.ctrlKey||e.altKey||e.shiftKey))return;this.emit("keydown",t,e);let a=i[t];a&&"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){let e=this.container;if(!e)return;let t=this.isCompact;e.classList.toggle(e4,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){let t=this.optionFor(e,"closeButton")||!1;if("auto"===t){let e=this.plugins.Toolbar;if(e&&e.state===a.Ready)return}if(!t||!e.contentEl||e.closeBtnEl)return;let i=this.option("tpl.closeButton");if(i){let t=b(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&F(e.el,"has-close-btn")}}manageCaption(e){var t,i;let n="fancybox__caption",s=this.container;if(!s)return;D(s,e7);let o=this.isCompact||this.option("commonCaption"),a=!o;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),o&&!this.caption)for(let e of(null==(t=this.carousel)?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,D(e.el,e7),null==(i=e.el)||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||o&&!this.isCurrentSlide(e))return;let r=e.el,l=this.optionFor(e,"caption","");if(!l)return void(o&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let h=null;if(a){if(h=e.captionEl||null,r&&!h){let t=n+`_${this.id}_${e.index}`;F(h=document.createElement("div"),n),h.setAttribute("id",t),e.captionEl=r.a
1ppendChild(h),F(r,e7),r.setAttribute("aria-labelledby",t)}}else(h=this.caption)||(h=s.querySelector("."+n)),h||((h=document.createElement("div")).dataset.fancyboxCaption="",F(h,n),(this.footer||s).prepend(h)),F(s,e7),this.caption=h;h&&(h.innerHTML="","string"==typeof l||"number"==typeof l?h.innerHTML=l+"":l instanceof HTMLElement&&h.appendChild(l))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;let i=document.activeElement||null,n=(null==e?void 0:e.target)||null,o=this.container,a=null==(t=this.carousel)?void 0:t.viewport;if(!o||!a||!e&&i&&o.contains(i))return;let r=this.getSlide(),l=r&&r.state===s.Ready?r.el:null;if(!l||l.contains(i)||o===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;let h=Array.from(o.querySelectorAll(el)),c=[],d=null;for(let e of h){let t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),i=l&&l.contains(e),n=!a.contains(e);if(e===o||(i||n)&&!t){c.push(e);let t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&d||(d=e)}else{let t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let u=null;e?(!n||0>c.indexOf(n))&&(u=d||o,c.length&&(i===ta?u=c[0]:this.lastFocus!==o&&i!==to||(u=c[c.length-1]))):u=r&&"image"===r.type?o:d||o,u&&eh(u),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){let e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){let e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null==(e=tp.getInstance())?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);let n=s=>{s.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",n),delete e.dataset.animationName,i&&i(),D(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",n),F(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;let n=e.el;if(!n)return;let s=null;if(I(t)?s=t:I(s=b(t+""))||((s=document.createElement("div")).innerHTML=t+""),["img","picture","iframe","video","audio"].includes(s.nodeName.toLowerCase())){let e=document.createElement("div");e.appendChild(s),s=e}I(s)&&e.filter&&!e.error&&(s=s.querySelector(e.filter)),s&&I(s)?(F(s,"fancybox__content"),e.id&&s.setAttribute("id",e.id),n.classList.add(`has-${e.error?"error":e.type||"unknown"}`),n.prepend(s),"none"===s.style.display&&(s.style.display=""),"none"===getComputedStyle(s).getPropertyValue("display")&&(s.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=s,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){let i=e.el,n=e.contentEl;i&&n&&(this.emit("reveal",e),this.hideLoading(e),e.state=s.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(n,t,()=>{this.done(e)}):this.done(e))}done(e){this.isClosing()||(e.state=s.Ready,this.emit("done",e),F(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask(()=>{var t;null==(t=e.panzoom)||t.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(e)&&(D(this.container,e8),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){let t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return null===(null==(t=this.carousel)?void 0:t.prevPage)&&e&&e.index===(null==(i=this.getSlide())?void 0:i.index)}showLoading(e){e.state=s.Loading;let t=e.el;t&&(F(t,e6),this.emit("loading",e),e.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===s.Loading){let i=b(k);F(i,"fancybox-spinner"),e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}},250))}hideLoading(e){let t=e.el;if(!t)return;let i=e.spinnerEl;this.isClosing()?null==i||i.remove():(D(t,e6),i&&this.animate(i,"f-fadeOut",()=>{i.remove()}
1),e.state===s.Loading&&(this.emit("loaded",e),e.state=s.Ready))}setError(e,t){if(this.isClosing())return;let i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);let n=document.createElement("div");n.classList.add("fancybox-error"),n.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,n)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);let t=e.el;t&&(D(t,"has-error"),D(t,"has-unknown"),D(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;let t=this.carousel;return(null==(e=null==t?void 0:t.pages[null==t?void 0:t.page])?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;let i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());let n=()=>{this.proceedClose(e,t)};this.startedFs&&ts&&ts.isFullscreen()?Promise.resolve(ts.exit()).then(()=>n()):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){let t=()=>{this.clearIdle(),this.idle=!0,F(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{let e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,D(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){ts&&(ts.isFullscreen()?ts.exit():ts.request().then(()=>{this.startedFs=!0}))}isClosing(){return[n.Closing,n.CustomClosing,n.Destroy].includes(this.state)}proceedClose(e,t){var i,o;this.state=n.Closing,this.clearIdle(),this.detachEvents();let a=this.container,r=this.carousel,l=this.getSlide(),h=l&&this.option("placeFocusBack")?l.triggerEl||this.option("triggerEl"):null;if(h&&(ea(h)?eh(h):h.focus()),a&&(D(a,e8),F(a,"is-closing"),a.setAttribute(e2,"true"),this.option("animated")&&F(a,e3),a.style.pointerEvents="none"),r)for(let e of(r.clearTransitions(),null==(i=r.panzoom)||i.destroy(),null==(o=r.plugins.Navigation)||o.detach(),r.slides)){e.state=s.Closing,this.hideLoading(e);let t=e.contentEl;t&&this.stop(t);let i=null==e?void 0:e.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(e)||r.emit("removeSlide",e)}th=window.scrollX,tc=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==n.CustomClosing?(void 0===t&&l&&(t=this.optionFor(l,"hideClass")),t&&l?(this.animate(l.contentEl,t,()=>{r&&r.emit("removeSlide",l)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var e;if(this.state===n.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=n.Destroy,null==(e=this.carousel)||e.destroy();let t=this.container;t&&t.remove(),td.delete(this.id);let i=tp.getInstance();i?i.focus():(to&&(to.remove(),to=null),ta&&(ta.remove(),ta=null),D(document.documentElement,eJ),(()=>{if(!er)return;let e=document,t=e.body;t.classList.remove(eQ),t.style.setProperty(e1,""),e.documentElement.style.setProperty(e0,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!er)return;let n,s="",o={};if(void 0===e?n=document.body:"string"==typeof e?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):(n=e,"string"==typeof t&&(s=t),"object"==typeof i&&(o=i||{})),!n||!I(n))return;s=s||"[data-fancybox]";let a=tp.openers.get(n)||new Map;a.set(s,o),tp.openers.set(n,a),1===a.size&&n.addEventListener("click",tp.fromEvent)}static unbind(e,t){let i,n="";if("string"==typeof e?(i=document.body,n=e):(i=e,"string"==typeof t&&(n=t)),!i)return;let s=tp.openers.get(i);s&&n&&s.delete(n),n&&s||(tp.openers.delete(i),i.removeEventListener("click",tp.fromEvent))}static destroy(){let e;for(;e=tp.getInstance();)e.destroy();for(let e of tp.openers.keys())e.removeEventListener("click",tp.fromEvent);tp.openers=new Map}static fromEvent(e){let t,i,n,s;if(e.defaultPrevented||e.button&&0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey)return;let o=e.composedPath()[0],a=o.closest("[data-fancybox-trigger]");if(a){let e=a.dataset.fancyboxTrigger||"";o=document.querySelectorAll(`[data-fancybox="${e}"]`)[parseInt(a.dataset.fancyboxIndex||"",10)||0]||o}if(!(o&&o instanceof Element)||([...tp.openers].reverse().find(([e,a])=>!(!e.contains(o)||![...a].reverse().find(([a,r])=>{let l=o.closest(a);return!!l&&(t=e,i=a,n=l,s=r,!0)}))),!t||!i||!n))return;s=s||{},e.preventDefault(),o=n;let r=[],l=T({},ed,s);l.event=e,l.triggerEl=o,l.delegate=a;let h=l.groupAll,c=l.groupAttr,d=c&&o?o.getAttribute(`${c}`):"";if((!o||d||h)&&(r=[].slice.call(t.querySelectorAll(i))),o&&!h&&(r=d?r.filter(e=>e.getAttribute(`${c}`)===d):[o]),!r.length)return;let u=tp.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(o&&(l.startIndex=r.indexOf(o)),tp.fromNodes(r,l))}static fromSelector(e,t,i){let n=null,s="",o={};if("string"==typeof e?(n=document.body,s=e,"object"==typeof t&&(o=t||{})):e instanceof HTMLElement&&"string"==typeof t&&(n=e,s=t,"object"==typeof i&&(o=i||{})),!n||!s)return!1;let a=tp.openers.get(n);return!!a&&!!(o=T({},a.get(s)||{},o))&&tp.fromNodes(Array.from(n.querySelectorAll(s)),o)}
1static fromNodes(e,t){t=T({},ed,t||{});let i=[];for(let n of e){let e,s,o=n.dataset||{},a=o.src||n.getAttribute(ti)||n.getAttribute("currentSrc")||n.getAttribute("src")||void 0,r=t.delegate;r&&i.length===t.startIndex&&(e=r instanceof HTMLImageElement?r:r.querySelector("img:not([aria-hidden])")),e||(e=n instanceof HTMLImageElement?n:n.querySelector("img:not([aria-hidden])")),!e||(s=e.currentSrc||e.src||void 0)||!e.dataset||(s=e.dataset.lazySrc||e.dataset.src||void 0);let l={src:a,triggerEl:n,thumbEl:e,thumbElSrc:s,thumbSrc:s};for(let e in o){let t=o[e]+"";t="false"!==t&&("true"===t||t),l[e]=t}i.push(l)}return new tp(i,t)}static getInstance(e){return e?td.get(e):Array.from(td.values()).reverse().find(e=>!e.isClosing()&&e)||null}static getSlide(){var e;return(null==(e=tp.getInstance())?void 0:e.getSlide())||null}static show(e=[],t={}){return new tp(e,t)}static next(){let e=tp.getInstance();e&&e.next()}static prev(){let e=tp.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(let e of td.values())e.close(...t);else{let e=tp.getInstance();e&&e.close(...t)}}}Object.defineProperty(tp,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(tp,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ed}),Object.defineProperty(tp,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Hash:class extends U{onReady(){ep=!1}onChange(e){eg&&clearTimeout(eg);let{hash:t}=em(),{hash:i}=eb(),s=e.isOpeningSlide(e.getSlide());s&&(eu=i===t?"":i),t&&t!==i&&(eg=setTimeout(()=>{try{if(e.state===n.Ready){let e="replaceState";s&&!ef&&(e="pushState",ef=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}},300))}onClose(e){if(eg&&clearTimeout(eg),!ep&&ef)return ef=!1,ep=!1,void window.history.back();if(!ep)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(eu||""))}catch(e){}}attach(){let e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){let e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return eb()}static startFromUrl(){ev()}static destroy(){window.removeEventListener("hashchange",ew,!1)}},Html:ez,Images:eS,Slideshow:eF,Thumbs:eY,Toolbar:eK}}),Object.defineProperty(tp,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),e.s(["Fancybox",()=>tp])}]);
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.