/*! For license information please see HeroSliderContainer_16718310151442417199228714222796059298.c8abd78e6f2a0ce9b443.js.LICENSE.txt */ (self.webpackChunkui=self.webpackChunkui||[]).push([[82,34,135],{12:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={accountWrapper:"qXeGpPSw",accountForm:"te7CAZQv",accountFormHeader:"f4fynuS_",accountTitle:"CZZ7NDmu",loginError:"qrsGJS4Z",messageError:"Xi3EMAjG",messageSuccess:"ncQvHM1f",accountFormAddress:"L0DnW04B",fieldsGroup:"CXuR8tOG",accountInputs:"ASip41tM",accountInput:"l0QekQFo",accountInputField:"_5m1fDGB",accountInputLabel:"IqibuG6w",accountInputError:"q5jlBe40",accountFooter:"Ion5fm0b",accountFooterLink:"ZnbNBlxs",loginLinkSecondary:"LUkLKGDg",accountButton:"dXdFogH1",accountButtonCenter:"M2GZLJwh",accountButtonFullWidth:"WkBk7vAa",accountButtonDisabled:"pZZht3dJ",accountButtonSecondary:"tiGBYEEt",accountButtonTertiary:"cNBbhsDX",accountButtons:"NAQeZAc6",buttonContent:"Js9SZWRC",buttonLoader:"JecoWbXv",spin:"yMF41ZyR",container:"VdYjDBT4",nav:"MNnJmn1N",addressCard:"NXDC3UD7",addressActions:"rKEskyqS",accountInputsFullWidth:"ihiTc9Ij"}},91:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={sliderContainer:"Uq_vaulr",sliderItem:"C0m7EVOb",embeddedImage:"K93xnXzl",modelOverlay:"wiZ9m0Zl"}},92:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={container:"uiIFALZT",item:"rkFfQnYn",pswpOverride:"PMoHGRtp"}},19:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={loginFormContainer:"mGmAcGF8"}},10:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={modalOverlay:"pKklj6A7",modalOverlayHidden:"FbGOep4Z",modalBackground:"srpRGD58",modal:"L76vEo7G",fitContent:"dC1D3FxI",closeBtn:"E2U6v0rP",closeIconSVG:"SMOJf3ND",modalImage:"v3EoYlrW",sizeGuidePage:"tZxZJ5xu",modalOverlayBottomSheet:"aTeBB3HC",modalBottomSheet:"rRLnrN0A __bite_extend __bite_theme_modalBottomSheet",slideUp:"woWeB2Ks",fadeIn:"rXVUk9Yk",large:"shRTi3NB",closing:"oitbq3f8",slideDown:"GC4NNj4H",fadeOut:"jtefEfQd",bottomSheetHeader:"pfc5sVVL",bottomSheetTitle:"WYgR_YWU",bottomSheetCloseBtn:"Ti_CbCl8",bottomSheetCloseBtnFloating:"PDrsEZxz",bottomSheetContent:"VI6yo2BU"}},18:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});const s={wishlistContainer:"jRlsVCot __bite_extend __bite_theme_wishlistContainer",wishlistButton:"ctbTZqfr jRlsVCot __bite_extend __bite_theme_wishlistContainer __bite_extend __bite_theme_wishlistButton",wishlistButtonIcon:"Iss5I7uB",wishlistButtonPDP:"FdsXzuwl ctbTZqfr jRlsVCot __bite_extend __bite_theme_wishlistContainer __bite_extend __bite_theme_wishlistButton",pdpImageDesktop:"cJBLNq_Q",pdpImageMobile:"VJdwZWfE",wishlistButtonPLP:"X4YRRsog ctbTZqfr jRlsVCot __bite_extend __bite_theme_wishlistContainer __bite_extend __bite_theme_wishlistButton",menuItemLink:"KCUcKOJW menuItemLink __bite_extend __bite_theme_menuItemLink",wishlistNav:"hYyHs83Q jRlsVCot __bite_extend __bite_theme_wishlistContainer",wishlistNavIcon:"jrjh9AQB",wishlistNavLabel:"hryykMDx",wishlistNavCount:"Y5u0ouJF"}},278:(t,e,i)=>{"use strict";var s=i(0),n=i(3),o=i(104);function a(t){var{apps:{product:e}}=t,i=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(t);n{"use strict";i.d(e,{a:()=>_});var s=i(0),n=i(1),o=i(91),a=i(92),r=i(93),l=i(94),h=i(7),d=i(49),c=i(34),p=i(50),u=i(71);const{sliderContainer:m,sliderItem:v}=o.a;function g(t){(new Image).src=t.src}function f({image:t,index:e,isDesktop:i,embedded:n,showModelInformation:r,maxFullSizeWidth:l}){const{src:c,altText:p,model:u,width:m,height:g}=t,f=null==c?void 0:c.endsWith(".mp4");return(0,s.jsxs)("a",{class:[i?a.a.item:v,n?o.a.embeddedImage:""].join(" "),"data-pswp-type":f?"video":"image",href:c,"data-pswp-width":m,"data-pswp-height":g,target:"_blank",rel:"noreferrer",children:[f?(0,s.jsx)(d.a,{sources:[{url:c,mimeType:"video/mp4",width:m,height:g}],preload:"metadata",className:i?a.a.item:v}):(0,s.jsx)(h.a,{src:c,alt:p,initialWidth:300,fullSizeWidth:l,width:m,height:g}),r&&u&&(0,s.jsx)("div",{class:o.a.modelOverlay,children:u})]},e)}function _({product:t,selectedVariant:e,pdpVideo:i,showModelInformation:h,isDesktop:d,embedded:v,includeDefaultImages:_}){const y=function({product:t,selectedVariant:e,pdpVideo:i,isDesktop:s,includeDefaultImages:o}){return(0,n.useMemo)((()=>{var n,a;const r=(0,c.c)(t.imageMap,e,void 0,o),l=null==e?void 0:e.selectedOptions.Color;return i&&l&&(null===(n=t.productVideos)||void 0===n?void 0:n[l])?[...r.slice(0,s?2:1),{altText:l,src:null===(a=t.productVideos)||void 0===a?void 0:a[l]},...r.slice(s?2:1)]:r}),[e])}({product:t,selectedVariant:e,pdpVideo:i,isDesktop:d,includeDefaultImages:_}),w=(0,p.a)(),x=(0,n.useRef)(null),[b,S]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{y.forEach(g),Object.values(t.imageMap).forEach((t=>{t.slice(0,2).forEach(g)}));const e=new r.a({mainClass:a.a.pswpOverride,gallery:"#hero-slider",children:"a",pswpModule:l.a,bgOpacity:.9,arrowKeys:!0,showHideAnimationType:"none"});return i&&e.on("contentLoad",(t=>{var e;const{content:i}=t;if(null===(e=i.data.src)||void 0===e?void 0:e.endsWith(".mp4")){t.preventDefault(),i.element=document.createElement("div"),i.element.className="pswp__video-container";const e=document.createElement("video");e.setAttribute("playsinline",""),e.setAttribute("muted",""),e.setAttribute("loop",""),e.setAttribute("style","width: 100vw;"),e.setAttribute("autoplay",""),e.src=i.data.src,i.element.appendChild(e)}})),e.init(),b?!d&&x.current&&(x.current.scrollLeft=0):S(!0),()=>{null==e||e.destroy()}}),[y,_]),(0,s.jsxs)("div",{class:["pswp-gallery",d?a.a.container:m,v?o.a.embeddedContainer:""].join(" "),ref:x,id:"hero-slider",children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:".pswp--touch .pswp__button--arrow { visibility: visible; };\n "+(i?" .pswp__video-container {\n position: relative;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n .pswp__video-container video {\n background: #444;\n object-fit: cover;\n width: 100%;\n height: 100%;\n max-width: 800px;\n pointer-events: auto;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }":"")}}),(0,s.jsx)(u.a,{appearance:"pdp",location:"image",product:t,selectedVariant:e}),y.map(((t,e)=>(0,s.jsx)(f,{image:t,index:e,isDesktop:d,embedded:v,showModelInformation:h,maxFullSizeWidth:w},e)))]})}},32:(t,e,i)=>{"use strict";i.d(e,{a:()=>n});var s=i(0);function n({size:t,iconClass:e}){return(0,s.jsx)("div",{"aria-hidden":"true",role:"presentation",class:e,style:{width:t||"",height:t||"",backgroundImage:"var(--icon-close)",backgroundSize:"contain",cursor:"pointer",backgroundRepeat:"no-repeat",backgroundOrigin:"content-box"}})}},40:(t,e,i)=>{"use strict";i.d(e,{a:()=>h});var s=i(0),n=i(1),o=i(24);const a='\n a[href],\n area[href],\n input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]):not([tabindex="-1"]),\n iframe,\n object,\n embed,\n [tabindex]:not([tabindex="-1"]),\n [contenteditable]:not([contenteditable="false"]),\n audio[controls],\n video[controls],\n summary',r=(0,o.forwardRef)((({children:t,disabled:e=!1,isActive:i,autoFocus:o=!0,restoreFocus:r=!0,as:l="div",className:h,style:d,"aria-label":c,"aria-labelledby":p,"aria-modal":u,role:m,"data-testid":v,onTransitionEnd:g,onAnimationEnd:f},_)=>{const y=(0,n.useRef)(null),w=(0,n.useRef)(null),x=(0,n.useRef)(null),b=(0,n.useRef)(null),S=(0,n.useCallback)((()=>void 0!==i?i():!e),[i,e]),P=(0,n.useCallback)((t=>{y.current=t,"function"==typeof _?_(t):_&&(_.current=t)}),[_]),I=(0,n.useCallback)((()=>{const t=y.current;if(!t)return null;const e=Array.from(t.querySelectorAll(a));for(const t of e)if(t!==w.current&&t!==x.current)return t;return null}),[]),C=(0,n.useCallback)((()=>{const t=y.current;if(!t)return null;const e=Array.from(t.querySelectorAll(a));for(let t=e.length-1;t>=0;t--){const i=e[t];if(i!==w.current&&i!==x.current)return i}return null}),[]),L=(0,n.useCallback)((()=>{var t;if(!S())return;const e=C();e?e.focus():null===(t=y.current)||void 0===t||t.focus()}),[S,C]),A=(0,n.useCallback)((()=>{var t;if(!S())return;const e=I();e?e.focus():null===(t=y.current)||void 0===t||t.focus()}),[S,I]);(0,n.useEffect)((()=>{var t;if("undefined"!=typeof document&&!e)return r&&(b.current=document.activeElement),o&&(null===(t=y.current)||void 0===t||t.focus({preventScroll:!0})),()=>{r&&b.current instanceof HTMLElement&&(b.current.focus(),b.current=null)}}),[e,o,r]),(0,n.useEffect)((()=>{if("undefined"==typeof document)return;const t=y.current,e=e=>{if(S()&&"Tab"===e.key&&t&&document.activeElement===t)if(e.preventDefault(),e.shiftKey){const t=C();null==t||t.focus()}else{const t=I();null==t||t.focus()}},i=e=>{if(!S()||!t)return;const i=e.target;if(i!==w.current&&i!==x.current&&!t.contains(i)){e.stopPropagation();const i=I();i?i.focus():t.focus()}};return document.addEventListener("keydown",e,!0),document.addEventListener("focusin",i,!0),()=>{document.removeEventListener("keydown",e,!0),document.removeEventListener("focusin",i,!0)}}),[S,I,C]);const z={position:"fixed",top:0,left:0,width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"},T=void 0!==i?0:e?-1:0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:w,style:z,tabIndex:T,onFocus:L,"aria-hidden":"true"}),(0,s.jsx)(l,{ref:P,tabIndex:-1,className:h,style:d,role:m,"aria-label":c,"aria-labelledby":p,"aria-modal":u,"data-testid":v,onTransitionEnd:g,onAnimationEnd:f,children:t}),(0,s.jsx)("div",{ref:x,style:z,tabIndex:T,onFocus:A,"aria-hidden":"true"})]})}));r.displayName="FocusLock";let l=[];function h({isOpen:t,children:e,keepMounted:i=!1,onEscape:a}){const[h,d]=(0,n.useState)(!1),c=(0,n.useRef)(Symbol("focus-portal")),p=(0,n.useRef)(null);!function(t){const e=(0,n.useRef)(null);(0,n.useEffect)((()=>{if("undefined"!=typeof document&&t)return e.current=document.activeElement,()=>{e.current instanceof HTMLElement&&(e.current.focus(),e.current=null)}}),[t])}(t);const u=function(t,e){const[i,s]=(0,n.useState)("inactive"),o=(0,n.useRef)(t);return o.current=t,(0,n.useEffect)((()=>{if(!t)return void s("inactive");s("waiting");let i=!1;const n=requestAnimationFrame((()=>{if(i||!o.current)return;const t=e.current;if(!t)return void s("complete");const n=t.querySelector("[data-animate]")||t.firstElementChild;if(!n)return void s("complete");const a=n.getAnimations({subtree:!1});0!==a.length?Promise.all(a.map((t=>t.finished))).then((()=>{!i&&o.current&&s("complete")})).catch((()=>{!i&&o.current&&s("complete")})):s("complete")}));return()=>{i=!0,cancelAnimationFrame(n)}}),[t,e]),i}(t,p);(0,n.useEffect)((()=>{if(!t)return void d(!1);const e=c.current;return l.push(e),d(!0),()=>{l=l.filter((t=>t!==e))}}),[t]),(0,n.useEffect)((()=>{if("undefined"==typeof document||!t||!a)return;const e=t=>{"Escape"===t.key&&l[l.length-1]===c.current&&(t.stopPropagation(),t.preventDefault(),a())};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)}),[t,a]);const m=(0,n.useCallback)((()=>!!t&&l[l.length-1]===c.current),[t]);if("undefined"==typeof document)return null;if(!t&&!i)return null;const v="complete"!==u||!h;return(0,o.createPortal)((0,s.jsx)(r,{ref:p,disabled:v,isActive:m,autoFocus:t&&h,restoreFocus:!1,children:e}),document.body)}},7:(t,e,i)=>{"use strict";i.d(e,{a:()=>a,b:()=>r});var s=i(0),n=i(6),o=i(1);function a({src:t,initialWidth:e,fullSizeWidth:i,cssClass:n,alt:a,width:l,height:h,style:d}){var c;const p=(0,o.useRef)(null),[u,m]=(0,o.useState)(!1),v=r(t,e,i,u);return(0,o.useEffect)((()=>{var t;!u&&(null===(t=p.current)||void 0===t?void 0:t.complete)&&m(!0)}),[null===(c=p.current)||void 0===c?void 0:c.complete]),l&&h?(0,s.jsx)("img",{ref:p,loading:"lazy",src:v,onLoadStart:()=>m(!0),onLoad:()=>m(!0),class:n,alt:null!=a?a:"",width:l,height:h,style:d}):(0,s.jsx)("img",{src:v,class:n,alt:null!=a?a:"",style:d})}function r(t,e,i,s=!0){const a=(0,n.b)(t,e),r=(0,n.b)(t,i),[l,h]=(0,o.useState)({}),d=(0,o.useMemo)((()=>l[r]?r:a),[t,e,i,l]);return(0,o.useEffect)((()=>{if(s&&document&&d!==r){const t=document.createElement("img");t.src=r,t.onload=()=>h(Object.assign(Object.assign({},l),{[r]:!0}))}}),[s,r]),d}},37:(t,e,i)=>{"use strict";i.d(e,{a:()=>r});var s=i(0),n=i(26),o=i(43),a=i(19);function r({isOpen:t,onClose:e,loginOnly:i=!0,returnTo:r}){return(0,s.jsx)(n.a,{isOpen:t,onClose:e,title:"Sign in",children:(0,s.jsx)("div",{class:a.a.loginFormContainer,children:(0,s.jsx)(o.a,{loginOnly:i,returnTo:r})})})}},26:(t,e,i)=>{"use strict";i.d(e,{a:()=>l});var s=i(0),n=i(10),o=i(32),a=i(40),r=i(52);function l({isOpen:t,onClose:e,children:i,title:l,fitContent:h=!1,keepMounted:d=!1}){const{dialogProps:c}=(0,r.a)({isOpen:t,label:l}),p=t?n.a.modalOverlay:n.a.modalOverlayHidden;return(0,s.jsx)(a.a,{isOpen:t,keepMounted:d,onEscape:e,children:(0,s.jsxs)("div",{className:p,"aria-hidden":!t,children:[(0,s.jsx)("div",{className:n.a.modalBackground,onClick:e,role:"presentation"}),(0,s.jsxs)("div",Object.assign({},c,{className:[n.a.modal,h?n.a.fitContent:""].join(" "),children:[(0,s.jsx)("button",{className:n.a.closeBtn,onClick:e,"aria-label":"Close dialog",children:(0,s.jsx)(o.a,{size:"14px",iconClass:n.a.closeIconSVG})}),i]}))]})})}},49:(t,e,i)=>{"use strict";i.d(e,{a:()=>o});var s=i(0),n=i(1);function o({sources:t,className:e,preload:i="metadata"}){const o=(0,n.useRef)(null);return(0,n.useEffect)((()=>{o.current&&o.current.load()}),[t]),(0,s.jsx)("video",{ref:o,class:e,preload:i,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,children:t.map((t=>(0,s.jsx)("source",{src:t.url,type:t.mimeType,width:t.width,height:t.height},t.url)))})}},71:(t,e,i)=>{"use strict";i.d(e,{a:()=>u});var s=i(0),n=i(3),o=i(1),a=i(68),r=i(18),l=i(25),h=i(11),d=i(36),c=i(37),p=i(4);function u(t){const{product:e,selectedVariant:i,appearance:n,location:o,isBundle:a}=t,{pdpWishlistLoc:r}=(0,p.d)((t=>({pdpWishlistLoc:t.pdpWishlistLoc})));return(0,d.a)()?"pdp"===n&&r!==o?null:i?e.isPack||a||!i||i.parentId?null:(0,s.jsx)(m,Object.assign({},t,{selectedVariant:i})):null:null}function m({appearance:t,product:e,selectedVariant:i,disabled:d=!1,location:u}){var m;const{isMobile:v}=(0,p.d)((t=>({isMobile:t.isMobile}))),{toggleWishlistItem:g,isModalOpen:f,closeLoginModal:_,wishlistItems:y,wishlistMode:w}=(0,a.g)(),x=(0,l.b)(e,i),b=(0,o.useMemo)((()=>{const t=i.childProductId;return parseInt(t||e.id)}),[i.childProductId,e.id]),S=(0,o.useMemo)((()=>parseInt(i.variantId)),[i.variantId]),P=(0,o.useMemo)((()=>"undefined"!=typeof window?window.location.origin+x:x),[x]),I=(0,o.useMemo)((()=>y.some((t=>t.variantId===S))),[S,y]),C=(0,o.useMemo)((()=>y.some((t=>t.productId===b))),[b,y]),L=(0,o.useMemo)((()=>{switch(w){case"variant":return I;case"product":return C;default:return!1}}),[w,I,C]),A=(0,o.useCallback)((()=>{void 0!==S&&void 0!==b&&(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),g({epi:S,empi:b,du:P}))}),[g,S,b,P]),[z,T]=(0,o.useState)(!1);(0,o.useLayoutEffect)((()=>{T(!0)}),[]);const E=null!==(m=i.productTitle)&&void 0!==m?m:e.title,O=z&&L,D=O?"Remove":"Add",Z=O?"from":"to",M=(0,o.useMemo)((()=>(0,h.b)(E,i.selectedOptions)),[E,i.selectedOptions]),F=M?`${D} ${M} ${Z} wishlist`:`${D} ${Z} wishlist`,k="pdp"===t?r.a.wishlistButtonPDP:r.a.wishlistButtonPLP,B="image"===u?v?r.a.pdpImageMobile:r.a.pdpImageDesktop:void 0,R=B?`${k} ${B}`:k;return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)("button",{onClick:A,class:R,"aria-pressed":z&&L,disabled:d,"aria-label":F,children:(0,s.jsx)("div",{className:r.a.wishlistButtonIcon})}),(0,s.jsx)(c.a,{isOpen:f,onClose:_,returnTo:"undefined"!=typeof window?window.location.pathname+window.location.search:void 0})]})}},36:(t,e,i)=>{"use strict";i.d(e,{a:()=>n,b:()=>o});var s=i(4);function n(){return(0,s.d)((t=>t.wishlistEnabled))}function o(){return(0,s.d)((t=>t.wishlistProvider))}},52:(t,e,i)=>{"use strict";i.d(e,{a:()=>o});var s=i(1),n=i(45);function o({isOpen:t,label:e,labelledBy:i}){return(0,n.a)(t),{dialogProps:(0,s.useMemo)((()=>({role:"dialog","aria-modal":!0,"aria-label":i?void 0:e,"aria-labelledby":i,tabIndex:-1})),[e,i])}}},45:(t,e,i)=>{"use strict";i.d(e,{a:()=>a});var s=i(1);let n=0,o=null;function a(t){(0,s.useEffect)((()=>{if("undefined"!=typeof document&&t){if(0===n){o={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight};const t=window.innerWidth-document.documentElement.clientWidth;document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`}return n++,()=>{n--,n<0&&(n=0),0===n&&o&&(document.body.style.overflow=o.overflow,document.body.style.paddingRight=o.paddingRight,o=null)}}}),[t])}},25:(t,e,i)=>{"use strict";i.d(e,{a:()=>o,b:()=>n});var s=i(1);function n(t,e){return(0,s.useMemo)((()=>o(t,e)),[e,t])}function o(t,e){const i=null==e?void 0:e.selectedOptions.childProductHandle,s=`/products/${null!=i?i:t.handle}`;let n=new URLSearchParams;if(e&&n.set("variant",e.variantId),t.trackingParameters){const e=new URLSearchParams(t.trackingParameters);n=new URLSearchParams([...n,...e])}const o=n.toString();return o?`${s}?${o}`:s}},11:(t,e,i)=>{"use strict";function s(t){const e=null==t?void 0:t.split("|").map((t=>t.trim()));return e?{title:e.shift(),subtitle:e.length>0?e.join(" | "):void 0}:{title:t}}function n(t){return t?(Array.isArray(t)?t.map((({name:t,value:e})=>[t,e])):Object.entries(t)).filter((([t])=>!t.startsWith("_")&&"childProductHandle"!==t)).map((([t,e])=>`${t} ${e}`)).join(", "):""}function o(t,e){const i=n(e);return t?i?`${t}, ${i}`:t:i}function a(t){if(!t)return{text:t,color:void 0};const e=t.split("-");return 1===e.length?{text:t,color:void 0}:{text:e.slice(0,-1).join("-").trim(),color:e[e.length-1].trim()}}i.d(e,{a:()=>n,b:()=>o,c:()=>s,d:()=>a})},50:(t,e,i)=>{"use strict";i.d(e,{a:()=>o});var s=i(1),n=i(5);function o(){const t=(0,n.l)("maxFullSizeWidth","1200","300")();return(0,s.useMemo)((()=>{if(!t)return 1200;try{const e=parseInt(t);if(Number.isNaN(e))return;return e}catch(t){return}}),[t])}},14:()=>{},93:(t,e,i)=>{"use strict";function s(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function n(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}i.d(e,{a:()=>_});const o="loading",a="loaded",r="error";function l(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function h(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class d{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class c{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,o;this._filters[t]||(this._filters[t]=[]),null===(s=this._filters[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this._filters[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this._filters[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),null===(i=this._listeners[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new d(t,e);return null===(i=this._listeners[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}class p{constructor(t,e){if(this.element=s("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(n(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(t,e,i){let s="translate3d(0px,0px,0)";return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}(0,0,t/250)):n(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class u{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new p(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=s("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=s("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=o,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=a,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==a&&this.state!==r||this.removePlaceholder())}onError(){this.state=r,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===o,this)}isError(){return this.state===r}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(n(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==r,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=s("pswp__error-msg","div");i.innerText=null!==(t=null===(e=this.instance.options)||void 0===e?void 0:e.errorMsg)&&void 0!==t?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=s("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===r)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||h())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!h()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==a&&this.state!==r||this.removePlaceholder()))}}function m(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(o=e[i])}return Number(o)||0}class v{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.y/s.y;this.fit=Math.min(1,no?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function g(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let a;n=new v(o,t,-1),a=e.pswp?e.pswp.viewportSize:function(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,e);const r=function(t,e,i,s){return{x:e.x-m("left",t,e,i,s)-m("right",t,e,i,s),y:e.y-m("top",t,e,i,s)-m("bottom",t,e,i,s)}}(o,a,t,i);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}class f extends c{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new u(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?l(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return g(t,this,e)}}class _ extends f{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){l(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=l(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===e||t.contains(e)));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=l(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if("function"==typeof(o=i.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var o;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return g(i,e,t)}(t,this));const a=++this._uid;Promise.all(s).then((t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}}))}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach((t=>{var e;null===(e=this._listeners[t])||void 0===e||e.forEach((e=>{i.on(t,e)}))})),Object.keys(this._filters).forEach((t=>{var e;null===(e=this._filters[t])||void 0===e||e.forEach((e=>{i.addFilter(t,e.fn,e.priority)}))})),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),i.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this._listeners={},l(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}},94:(t,e,i)=>{"use strict";function s(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function n(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function o(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function a(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function r(t,e){return t.x===e.x&&t.y===e.y}function l(t,e,i){return Math.min(Math.max(t,e),i)}function h(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function d(t,e,i,s){t.style.transform=h(e,i,s)}i.d(e,{a:()=>rt});function c(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function p(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const u="loading",m="loaded",v="error";function g(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let f=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{f=!0}}))}catch(t){}class _{constructor(){this._pool=[]}add(t,e,i,s){this._toggleListener(t,e,i,s)}remove(t,e,i,s){this._toggleListener(t,e,i,s,!0)}removeAll(){this._pool.forEach((t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)})),this._pool=[]}_toggleListener(t,e,i,s,n,o){if(!t)return;const a=n?"removeEventListener":"addEventListener";e.split(" ").forEach((e=>{if(e){o||(n?this._pool=this._pool.filter((s=>s.type!==e||s.listener!==i||s.target!==t)):this._pool.push({target:t,type:e,listener:i,passive:s}));const r=!!f&&{passive:s||!1};t[a](e,i,r)}}))}}function y(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function w(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(o=e[i])}return Number(o)||0}function x(t,e,i,s){return{x:e.x-w("left",t,e,i,s)-w("right",t,e,i,s),y:e.y-w("top",t,e,i,s)-w("bottom",t,e,i,s)}}class b{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=w("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-i)/2)+s,this.max[t]=i>n?Math.round(n-i)+s:this.center[t],this.min[t]=i>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return l(e,this.max[t],this.min[t])}}class S{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.y/s.y;this.fit=Math.min(1,no?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}class P{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new S(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=s("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new b(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){var t;return null===(t=this.content.placeholder)||void 0===t?void 0:t.element}zoomTo(t,e,i,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),n.animations.stopAllPan();const a=this.currZoomLevel;s||(t=l(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,a),this.pan.y=this.calculateZoomToPanOffset("y",e,a),o(this.pan);const r=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:i,easing:n.options.easing}):r()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(0==this.bounds.max[t]-this.bounds.min[t])return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),n(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,d(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;n(this.panAreaSize,x(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return h(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class I{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&n(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if("y"===i&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const i=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.6);const t=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(o(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,o=s[t],a=this.pswp.bgOpacity<1&&"y"===t,r=o+.995*e[t]/(1-.995);if(a){const t=this._getVerticalDragRatio(o),e=this._getVerticalDragRatio(r);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const h=n.correctPan(t,r);if(o===h)return;const d=h===r?1:.82,c=this.pswp.bgOpacity,p=h-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:h,velocity:e[t],dampingRatio:d,onUpdate:e=>{if(a&&this.pswp.bgOpacity<1){const t=1-(h-e)/p;this.pswp.applyBgOpacity(l(c+(1-c)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,r=e[t]-s[t],l=a.x+r;if(!r||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return a.moveTo(l,!0),!0;const{bounds:h}=o,d=o.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!n){const e=a.getCurrSlideX(),i=a.x-e,s=r>0,n=!s;if(d>h.min[t]&&s){if(h.min[t]<=this.startPan[t])return a.moveTo(l,!0),!0;this._setPanWithFriction(t,d)}else if(d0)return a.moveTo(Math.max(l,e),!0),!0;if(i<0)return a.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,d)}else"y"===t&&(a.isShifted()||h.min.y===h.max.y)||this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var e,i;return(t-(null!==(e=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.bounds.center.y)&&void 0!==e?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,e)!==e||i){const s=Math.round(e-n[t]);n[t]+=s*(i||.35)}else n[t]=e}}function C(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}class L{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,n(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;if(!o)return;const r=o.zoomLevels.min,l=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;C(this._startZoomPoint,e,s),C(this._zoomPoint,t,i);let h=1/a(e,s)*a(t,i)*this._startZoomLevel;if(h>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),hl&&(h=l+.05*(h-l));o.pan.x=this._calculatePanForZoomLevel("x",h),o.pan.y=this._calculatePanForZoomLevel("y",h),o.setZoomLevel(h),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLeveli.zoomLevels.max?o=i.zoomLevels.max:(a=!1,o=s);const h=e.bgOpacity,d=e.bgOpacity<1,c=n({x:0,y:0},i.pan);let p=n({x:0,y:0},c);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,n(this._startPan,c)),a&&(p={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),p={x:i.bounds.correctPan("x",p.x),y:i.bounds.correctPan("y",p.y)},i.setZoomLevel(s);const u=!r(p,c);if(!u&&!a&&!d)return i._setResolution(o),void i.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,u||a){if(u&&(i.pan.x=c.x+(p.x-c.x)*t,i.pan.y=c.y+(p.y-c.y)*t),a){const e=s+(o-s)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}d&&e.bgOpacity<1&&e.applyBgOpacity(l(h+(1-h)*t,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function A(t){return!!t.target.closest(".pswp__container")}class z{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),n=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):n&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){A(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){A(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){var s;const{pswp:n}=this.gestures,{currSlide:o}=n,a=t+"Action",r=n.options[a];if(!n.dispatch(a,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof r)switch(r){case"close":case"next":n[r]();break;case"zoom":null==o||o.toggleZoom(e);break;case"zoom-or-close":null!=o&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":null===(s=this.gestures.pswp.element)||void 0===s||s.classList.toggle("pswp--ui-visible")}else r.call(n,e,i)}}class T{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new I(this),this.zoomLevels=new L(this),this.tapHandler=new z(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")}))}_bindEvents(t,e,i,s){const{pswp:n}=this,{events:o}=n,a=s?t+s:"";o.add(n.scrollWrap,t+e,this.onPointerDown.bind(this)),o.add(window,t+"move",this.onPointerMove.bind(this)),o.add(window,t+i,this.onPointerUp.bind(this)),a&&o.add(n.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e="mousedown"===t.type||"mouse"===t.pointerType;if(e&&t.button>0)return;const{pswp:i}=this;i.opener.isOpen?i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,n(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,n(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?r(this.p1,this.prevP1)||this.drag.change():r(this.p1,this.prevP1)&&r(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,n(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const i=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),a(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(n(this._lastStartP1,this.startP1),this._tapTimer=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()}),i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex((t=>t.id===i.pointerId));"up"===e&&s>-1?this._ongoingPointers.splice(s,1):"down"===e&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&n(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&n(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){n(this.prevP1,this.p1),n(this.prevP2,this.p2)}_updateStartPoints(){n(this.startP1,this.p1),n(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class E{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((e,i)=>{s&&d(e.el,(i+this._containerShiftIndex)*this.slideWidth),t&&e.slide&&e.slide.resize()}))}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=s("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===t?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const e=(t+o)%o;t=e<=o/2?e:e-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const e=(t+o)%o;t=e<=o/2?e:e-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let s,n=Math.abs(i);n>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),n=3);for(let t=0;t0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this._containerShiftIndex++,d(s.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(s,e.currIndex-n+t+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this._containerShiftIndex--,d(s.el,this._containerShiftIndex*this.slideWidth),e.setContent(s,e.currIndex+n-t-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach(((t,e)=>{t.slide&&t.slide.setIsActive(1===e)})),e.currSlide=null===(t=this.itemHolders[1])||void 0===t?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&d(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=e&&e})}}const O={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},D=(t,e)=>e?t:O[t];class Z{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",(()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))}));const e=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()}))}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t))return;let i,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case D("Escape",o):e.options.escKey&&(i="close");break;case D("z",o):i="toggleZoom";break;case D("ArrowLeft",o):s="x";break;case D("ArrowUp",o):s="y";break;case D("ArrowRight",o):s="x",n=!0;break;case D("ArrowDown",o):n=!0,s="y";break;case D("Tab",o):this._focusRoot()}if(s){t.preventDefault();const{currSlide:o}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const M="cubic-bezier(.4,0,.22,1)";class F{constructor(t){var e;this.props=t;const{target:i,onComplete:s,transform:n,onFinish:o=()=>{},duration:a=333,easing:r=M}=t;this.onFinish=o;const l=n?"transform":"opacity",h=null!==(e=t[l])&&void 0!==e?e:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout((()=>{c(i,l,a,r),this._helperTimeout=setTimeout((()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout((()=>{this._finalizeAnimation()}),a+500),i.style[l]=h}),30)}),0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),c(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}class k{constructor(t,e,i){this.velocity=1e3*t,this._dampingRatio=e||.75,this._naturalFrequency=i||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i,s=0;e/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,s=(t+i*e)*n,this.velocity=s*-this._naturalFrequency+i*n;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);s=n*(t*o+i*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*a+this._dampedFrequency*i*o)}return s}}class B{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:l}=t;this.onFinish=a;const h=new k(s,r,l);let d=Date.now(),c=e-i;const p=()=>{this._raf&&(c=h.easeFrame(c,Date.now()-d),Math.abs(c)<1&&Math.abs(h.velocity)<50?(n(i),o&&o(),this.onFinish()):(d=Date.now(),n(c+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class R{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new B(t):new F(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}}class N{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const n=e.currZoomLevel*i;e.zoomTo(n,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}}class W{constructor(t,e){var i;const n=e.name||e.className;let o=e.html;if(!1===t.options[n])return;"string"==typeof t.options[n+"SVG"]&&(o=t.options[n+"SVG"]),t.dispatch("uiElementCreate",{data:e});let a="";e.isButton?(a+="pswp__button ",a+=e.className||`pswp__button--${e.name}`):a+=e.className||`pswp__${e.name}`;let r=e.isButton?e.tagName||"button":e.tagName||"div";r=r.toLowerCase();const l=s(a,r);if(e.isButton){"button"===r&&(l.type="button");let{title:i}=e;const{ariaLabel:s}=e;"string"==typeof t.options[n+"Title"]&&(i=t.options[n+"Title"]),i&&(l.title=i);const o=s||i;o&&l.setAttribute("aria-label",o)}l.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='",i}(o),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,l,t)});const h=e.appendTo||"bar";let d=t.element;"bar"===h?(t.topBar||(t.topBar=s("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),d=t.topBar):(l.classList.add("pswp__hide-on-close"),"wrapper"===h&&(d=t.scrollWrap)),null===(i=d)||void 0===i||i.appendChild(t.applyFilters("uiElement",l,e))}}function H(t,e,i){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",(()=>{e.options.loop||(t.disabled=i?!(e.currIndex0))}))}const j={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:H},V={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{H(t,e,!0)}},q={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-close"},onClick:"close"},U={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},G={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-loading"},onInit:(t,e)=>{let i,s=null;const n=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp__preloader--active",s))},o=()=>{var t;if(null===(t=e.currSlide)||void 0===t||!t.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout((()=>{var t;n(Boolean(null===(t=e.currSlide)||void 0===t?void 0:t.content.isLoading())),s=null}),e.options.preloaderDelay))};e.on("change",o),e.on("loadComplete",(t=>{e.currSlide===t.slide&&o()})),e.ui&&(e.ui.updatePreloaderVisibility=o)}},$={name:"counter",order:5,onInit:(t,e)=>{e.on("change",(()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()}))}};function K(t,e){t.classList.toggle("pswp--zoomed-in",e)}class X{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[q,j,V,U,G,$],t.dispatch("uiRegister"),this.uiElementsData.sort(((t,e)=>(t.order||0)-(e.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((t=>{this.registerElement(t)})),t.on("change",(()=>{var e;null===(e=t.element)||void 0===e||e.classList.toggle("pswp--one-slide",1===t.getNumItems())})),t.on("zoomPanUpdate",(()=>this._onZoomPanUpdate()))}registerElement(t){this.isRegistered?this.items.push(new W(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable())return K(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),K(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp--click-to-zoom")}}class Y{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class J{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,o;this._filters[t]||(this._filters[t]=[]),null===(s=this._filters[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this._filters[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this._filters[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),null===(i=this._listeners[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new Y(t,e);return null===(i=this._listeners[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}class Q{constructor(t,e){if(this.element=s("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(p(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=h(0,0,t/250)):p(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class tt{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new Q(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=s("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=s("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=u,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=m,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==m&&this.state!==v||this.removePlaceholder())}onError(){this.state=v,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===u,this)}isError(){return this.state===v}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(p(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==v,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=s("pswp__error-msg","div");i.innerText=null!==(t=null===(e=this.instance.options)||void 0===e?void 0:e.errorMsg)&&void 0!==t?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=s("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===v)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||g())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!g()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==m&&this.state!==v||this.removePlaceholder()))}}function et(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let a;n=new S(o,t,-1),a=e.pswp?e.pswp.viewportSize:y(o,e);const r=x(o,a,t,i);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}class it{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return et(i,e,t)}(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex((t=>!t.isAttached&&!t.hasSlide));-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex((e=>e.index===t));-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find((e=>e.index===t))}destroy(){this._cachedItems.forEach((t=>t.destroy())),this._cachedItems=[]}}class st extends J{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new tt(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}_getGalleryDOMElements(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?function(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return et(t,this,e)}}const nt=.003;class ot{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout((()=>{this._start()}),this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;var s,n;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this._thumbBounds=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=null==e?void 0:e.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&(null==e?void 0:e.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=null!==(s=i.showHideOpacity)&&void 0!==s&&s:(this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>nt,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(nt)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=null===(n=this.pswp.currSlide)||void 0===n?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(nt)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(nt)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(nt)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise((t=>{let e=!1,i=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch((()=>{})):s.complete?Promise.resolve(s):new Promise(((t,e)=>{s.onload=()=>t(s),s.onerror=e}))).finally((()=>{e=!0,i||t(!0)})),setTimeout((()=>{i=!1,e&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this._initiate())):this._initiate()}_initiate(){var t,e;null===(t=this.pswp.element)||void 0===t||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(e=this.pswp.element)||void 0===e||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null===(e=t.currSlide)||void 0===e||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-o.x+(this._thumbBounds.x-i.x)+i.w,s=-o.y+(this._thumbBounds.y-i.y)+i.h,n=o.x-i.w,a=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",h(e,s)),this._animateTo(this._cropContainer2,"transform",h(n,a))):(d(this._cropContainer1,e,s),d(this._cropContainer2,n,a))}s&&(n(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration)return void(t.style[e]=i);const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[e]=i,s.startTransition(n)}}const at={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class rt extends st{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new _,this.animations=new R,this.mainScroll=new E(this),this.gestures=new T(this),this.opener=new ot(this),this.keyboard=new Z(this),this.contentLoader=new it(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new N(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),l(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;null===(e=this.currSlide)||void 0===e||e.zoomTo(...t)}toggleZoom(){var t;null===(t=this.currSlide)||void 0===t||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(t=this.element)||void 0===t||t.remove(),this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((e,i)=>{var s,n;let o=(null!==(s=null===(n=this.currSlide)||void 0===n?void 0:n.index)&&void 0!==s?s:0)-1+i;var a;this.canLoop()&&(o=this.getLoopedIndex(o)),o===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,null===(a=e.slide)||void 0===a||a.setIsActive(!0)))})),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const s=this.getItemData(e);t.slide=new P(s,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const e=y(this.options,this);!t&&r(e,this._prevViewportSize)||(n(this._prevViewportSize,e),this.dispatch("beforeResize"),n(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,null===(t=this.element)||void 0===t||t.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=s("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=s("pswp__bg","div",this.element),this.scrollWrap=s("pswp__scroll-wrap","section",this.element),this.container=s("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new X(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:n}=e;let o,a;if(n&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";a=n.matches(t)?n:n.querySelector(t)}return a=i.applyFilters("thumbEl",a,e,t),a&&(o=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),n=s.width/e,o=s.height/i,a=n>o?n:o,r=(s.width-e*a)/2,l=(s.height-i*a)/2,h={x:s.left+r,y:s.top+l,w:e*a};return h.innerRect={w:s.width,h:s.height,x:r,y:l},h}(a,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(a)),i.applyFilters("thumbBounds",o,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...at,...t}}}}},t=>{t.O(0,[1,2,3,4,5,7,6,8,9,10,11,12,13,14,17,15,16,19,18,20,21,24,23,22,28,26,25,31],(()=>t(t.s=278))),t.O()}]);