PageSourceSearch

https://polmanarkivet.com/assets/js/app.bundle.min.js?v=qX4oNzDHAdH_oFNI

js polmanarkivet.com collected 2026-10-04 07:54:09 UTC 71,772 bytes, 1 lines download raw bytes

1((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).reframe=e()})(this,function(){return function(t,e){var i="string"==typeof t?document.querySelectorAll(t):t,s=e||"js-reframe";"length"in i||(i=[i]);for(var n=0;n<i.length;n+=1){var o=i[n];if(-1!==o.className.split(" ").indexOf(s)||-1<o.style.width.indexOf("%"))return;var h=o.getAttribute("height")||o.offsetHeight,a=o.getAttribute("width")||o.offsetWidth,h=("string"==typeof h?parseInt(h):h)/("string"==typeof a?parseInt(a):a)*100,r=((a=document.createElement("div")).className=s,a.style);r.position="relative",r.width="100%",r.paddingTop="".concat(h,"%"),(r=o.style).position="absolute",r.width="100%",r.height="100%",r.left="0",r.top="0",null!=(h=o.parentNode)&&h.insertBefore(a,o),null!=(r=o.parentNode)&&r.removeChild(o),a.appendChild(o)}}}),((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSwipe=e()})(this,function(){function l(t,e,i){e=document.createElement(e);return t&&(e.className=t),i&&i.appendChild(e),e}function c(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function h(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function d(t,e){var i=Math.abs(t.x-e.x),t=Math.abs(t.y-e.y);return Math.sqrt(i*i+t*t)}function m(t,e){return t.x===e.x&&t.y===e.y}function u(t,e,i){return Math.min(Math.max(t,e),i)}function a(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function r(t,e,i,s){t.style.transform=a(e,i,s)}function p(t,e,i,s){t.style.transition=e?e+` ${i}ms `+(s||"cubic-bezier(.4,0,.22,1)"):"none"}function s(t,e,i){t.style.width="number"==typeof e?e+"px":e,t.style.height="number"==typeof i?i+"px":i}let i="loading",t="loaded",e="error";function n(){return navigator.vendor&&navigator.vendor.match(/apple/i)}let g=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{g=!0}}))}catch(l){}class o{constructor(){this.t=[]}add(t,e,i,s){this.i(t,e,i,s)}remove(t,e,i,s){this.i(t,e,i,s,!0)}removeAll(){this.t.forEach(t=>{this.i(t.target,t.type,t.listener,t.passive,!0,!0)}),this.t=[]}i(s,t,n,o,h,a){if(s){let i=h?"removeEventListener":"addEventListener";t.split(" ").forEach(e=>{var t;e&&(a||(h?this.t=this.t.filter(t=>t.type!==e||t.listener!==n||t.target!==s):this.t.push({target:s,type:e,listener:n,passive:o})),t=!!g&&{passive:o||!1},s[i](e,n,t))})}}}function y(t,e){if(t.getViewportSizeFn){t=t.getViewportSizeFn(t,e);if(t)return t}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function v(e,i,t,s,n){let o=0;if(i.paddingFn)o=i.paddingFn(t,s,n)[e];else if(i.padding)o=i.padding[e];else{let t="padding"+e[0].toUpperCase()+e.slice(1);i[t]&&(o=i[t])}return Number(o)||0}function f(t,e,i,s){return{x:e.x-v("left",t,e,i,s)-v("right",t,e,i,s),y:e.y-v("top",t,e,i,s)-v("bottom",t,e,i,s)}}class w{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.o("x"),this.o("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}o(t){var e=this.slide.pswp,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,e=v("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),s=this.slide.panAreaSize[t];this.center[t]=Math.round((s-i)/2)+e,this.max[t]=s<i?Math.round(s-i)+e:this.center[t],this.min[t]=s<i?e: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 u(e,this.max[t],this.min[t])}}class x{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){t={x:t,y:e},this.elementSize=t,e=(this.panAreaSize=i).x/t.x,i=i.y/t.y;this.fit=Math.min(1,e<i?e:i),this.fill=Math.min(1,i<e?e:i),this.vFill=Math.min(1,i),this.initial=this.l(),this.secondary=this.u(),this.max=Math.max(this.initial,this.secondary,this.p()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}m(t){t=this.options[t+"ZoomLevel"];
1if(t)return"function"==typeof t?t(this):"fill"===t?this.fill:"fit"===t?this.fit:Number(t)}u(){let t=this.m("secondary");return t||(t=Math.min(1,3*this.fit),t=this.elementSize&&4e3<t*this.elementSize.x?4e3/this.elementSize.x:t)}l(){return this.m("initial")||this.fit}p(){return this.m("max")||Math.max(1,4*this.fit)}}class S{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 x(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=l("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 w(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(){var t=this.pswp;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||(this.isActive,0)||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){var e,i=this.currentResolution||this.zoomLevels.initial;i&&(e=Math.round(this.width*i)||this.pswp.viewportSize.x,i=Math.round(this.height*i)||this.pswp.viewportSize.y,this.sizeChanged(e,i)||t)&&this.content.setDisplayedSize(e,i)}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.element}zoomTo(t,e,i,s){var n,o=this.pswp;this.isZoomable()&&!o.mainScroll.isShifted()&&(o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),o.animations.stopAllPan(),n=this.currZoomLevel,s||(t=u(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,n),this.pan.y=this.calculateZoomToPanOffset("y",e,n),h(this.pan),s=()=>{this.v(t),this.applyCurrentZoomPan()},i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:s,duration:i,easing:o.options.easing}):s())}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;i=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*i+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.g(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),c(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}g(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,r(this.container,t,e,i)}calculateSize(){var t=this.pswp;c(this.panAreaSize,f(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){var t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return a(this.pan.x,this.pan.y,t)}v(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class b{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&c(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){let{p1:t,prevP1:i,dragAxis:e}=this.gestures,s=this.pswp.currSlide;if("y"===e&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){let e=s.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:e}).defaultPrevented){this._("y",e,.6);let t=1-Math.abs(this.S(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this.M("x")||(this.M("y"),s&&(h(s.pan),s.applyCurrentZoomPan()))}end(){let e=this.gestures.velocity,{mainScroll:i,currSlide:t}=this.pswp,s=0;if(this.pswp.animations.stopAll(),i.isShifted()){let t=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;e.x<-.5&&t<0||e.x<.1&&t<-.5?(s=1,e.x=Math.min(e.x,0)):(.5<e.x&&0<t||-.1<e.x&&.5<t)&&(s=-1,e.x=Math.max(e.x,0)),i.moveIndexBy(s,!0,e.x)}t&&t.currZoomLevel>t.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this.P("x"),this.P("y"))}P(l){let e=this.gestures.velocity,d=this.pswp.currSlide;
1if(d){let{pan:n,bounds:t}=d,o=n[l],h=this.pswp.bgOpacity<1&&"y"===l,a=o+.995*e[l]/(1-.995);if(h){let t=this.S(o),e=this.S(a);if(t<0&&e<-.4||0<t&&.4<e)return void this.pswp.close()}let r=t.correctPan(l,a);if(o!==r){let t=r===a?1:.82,i=this.pswp.bgOpacity,s=r-o;this.pswp.animations.startSpring({name:"panGesture"+l,isPan:!0,start:o,end:r,velocity:e[l],dampingRatio:t,onUpdate:e=>{if(h&&this.pswp.bgOpacity<1){let t=1-(r-e)/s;this.pswp.applyBgOpacity(u(i+(1-i)*t,0,1))}n[l]=Math.floor(e),d.applyCurrentZoomPan()}})}}}M(n){let{p1:t,dragAxis:e,prevP1:i,isMultitouch:s}=this.gestures,{currSlide:o,mainScroll:h}=this.pswp,a=t[n]-i[n],r=h.x+a;if(a&&o){if("x"===n&&!o.isPannable()&&!s)return h.moveTo(r,!0),!0;var l=o.bounds,d=o.pan[n]+a;if(this.pswp.options.allowPanToNext&&"x"===e&&"x"===n&&!s){let t=h.getCurrSlideX(),e=h.x-t,i=0<a,s=!i;if(d>l.min[n]&&i){if(l.min[n]<=this.startPan[n])return h.moveTo(r,!0),!0;this._(n,d)}else if(d<l.max[n]&&s){if(this.startPan[n]<=l.max[n])return h.moveTo(r,!0),!0;this._(n,d)}else if(0!=e){if(0<e)return h.moveTo(Math.max(r,t),!0),!0;if(e<0)return h.moveTo(Math.min(r,t),!0),!0}else this._(n,d)}else"y"===n&&(h.isShifted()||l.min.y===l.max.y)||this._(n,d)}return!1}S(t){return(t-(null!=(t=null==(t=this.pswp.currSlide)?void 0:t.bounds.center.y)?t:0))/(this.pswp.viewportSize.y/3)}_(e,i,s){let t=this.pswp.currSlide;if(t){var{pan:n,bounds:o}=t;if(o.correctPan(e,i)!==i||s){let t=Math.round(i-n[e]);n[e]+=t*(s||.35)}else n[e]=i}}}function I(t,e,i){t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2}class z{constructor(t){this.gestures=t,this.C={x:0,y:0},this.T={x:0,y:0},this.A={x:0,y:0},this.D=!1,this.I=1}start(){var t=this.gestures.pswp.currSlide;t&&(this.I=t.currZoomLevel,c(this.C,t.pan)),this.gestures.pswp.animations.stopAllPan(),this.D=!1}change(){let{p1:t,startP1:i,p2:s,startP2:n,pswp:o}=this.gestures,h=o.currSlide;if(h){var a=h.zoomLevels.min,r=h.zoomLevels.max;if(h.isZoomable()&&!o.mainScroll.isShifted()){I(this.T,i,n),I(this.A,t,s);let e=1/d(i,n)*d(t,s)*this.I;if(e>h.zoomLevels.initial+h.zoomLevels.initial/15&&(this.D=!0),e<a)if(o.options.pinchToClose&&!this.D&&this.I<=h.zoomLevels.initial){let t=1-(a-e)/(a/1.2);o.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||o.applyBgOpacity(t)}else e=a-.15*(a-e);else e>r&&(e=r+.05*(e-r));h.pan.x=this.L("x",e),h.pan.y=this.L("y",e),h.setZoomLevel(e),h.applyCurrentZoomPan()}}}end(){var t=this.gestures.pswp,e=t.currSlide;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this.D&&t.options.pinchToClose?t.close():this.correctZoomPan()}L(t,e){e/=this.I;return this.A[t]-(this.T[t]-this.C[t])*e}correctZoomPan(t){let d=this.gestures.pswp,p=d.currSlide;if(null!=p&&p.isZoomable()){0===this.A.x&&(t=!0);let i=p.currZoomLevel,s,n=!0,o=(s=i<p.zoomLevels.initial?p.zoomLevels.initial:i>p.zoomLevels.max?p.zoomLevels.max:(n=!1,i),d.bgOpacity),h=d.bgOpacity<1,a=c({x:0,y:0},p.pan),r=c({x:0,y:0},a),l=(t&&(this.A.x=0,this.A.y=0,this.T.x=0,this.T.y=0,this.I=i,c(this.C,a)),n&&(r={x:this.L("x",s),y:this.L("y",s)}),p.setZoomLevel(s),r={x:p.bounds.correctPan("x",r.x),y:p.bounds.correctPan("y",r.y)},p.setZoomLevel(i),!m(r,a));l||n||h?(d.animations.stopAllPan(),d.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{var e;t/=1e3,(l||n)&&(l&&(p.pan.x=a.x+(r.x-a.x)*t,p.pan.y=a.y+(r.y-a.y)*t),n&&(e=i+(s-i)*t,p.setZoomLevel(e)),p.applyCurrentZoomPan()),h&&d.bgOpacity<1&&d.applyBgOpacity(u(o+(1-o)*t,0,1))},onComplete:()=>{p.v(s),p.applyCurrentZoomPan()}})):(p.v(s),p.applyCurrentZoomPan())}}}function L(t){return t.target.closest(".pswp__container")}class P{constructor(t){this.gestures=t}click(t,e){var i=e.target.classList,s=i.contains("pswp__img"),i=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this.k("imageClick",t,e):i&&this.k("bgClick",t,e)}tap(t,e){L(e)&&this.k("tap",t,e)}doubleTap(t,e){L(e)&&this.k("doubleTap",t,e)}k(t,e,i){var s,n=this.gestures.pswp,o=n.currSlide,t=t+"Action",h=n.options[t];if(!n.dispatch(t,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof h)switch(h){case"close":case"next":n[h]();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;
1case"toggle-controls":null!=(s=this.gestures.pswp.element)&&s.classList.toggle("pswp--ui-visible")}else h.call(n,e,i)}}class C{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.Z={x:0,y:0},this.B={x:0,y:0},this.F=0,this.O=[],this.R="ontouchstart"in window,this.N=!!window.PointerEvent,this.supportsTouch=this.R||this.N&&1<navigator.maxTouchPoints,this.F=0,this.U=0,this.V=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this.G=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new b(this),this.zoomLevels=new z(this),this.tapHandler=new P(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this.$.bind(this)),this.N?this.q("pointer","down","up","cancel"):this.R?(this.q("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this.q("mouse","down","up")})}q(t,e,i,s){var n=this.pswp,o=n.events,s=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)),s&&o.add(n.scrollWrap,s,this.onPointerUp.bind(this))}onPointerDown(t){var e,i="mousedown"===t.type||"mouse"===t.pointerType;i&&0<t.button||(e=this.pswp,e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(e.mouseDetected(),this.H(t,"down")),e.animations.stopAll(),this.K(t,"down"),1===this.F&&(this.dragAxis=null,c(this.startP1,this.p1)),1<this.F?(this.W(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault())}onPointerMove(t){this.H(t,"move"),this.F&&(this.K(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this.F||this.isDragging?1<this.F&&!this.isZooming&&(this.j(),this.isZooming=!0,this.X(),this.zoomLevels.start(),this.Y(),this.J()):(this.dragAxis||this.tt(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this.W(),this.X(),this.U=Date.now(),this.V=!1,c(this.B,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this.Y(),this.J()))))}j(){this.isDragging&&(this.isDragging=!1,this.V||this.it(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this.F&&(this.K(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this.F&&(this.Y(),this.isDragging?this.j():this.isZooming||this.isMultitouch||this.st(t)),this.F<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this.F)&&(this.dragAxis=null,this.X())))}J(){(this.isDragging||this.isZooming)&&(this.it(),this.isDragging?m(this.p1,this.prevP1)||this.drag.change():m(this.p1,this.prevP1)&&m(this.p2,this.prevP2)||this.zoomLevels.change(),this.ht(),this.raf=requestAnimationFrame(this.J.bind(this)))}it(t){var e=Date.now(),i=e-this.U;i<50&&!t||(this.velocity.x=this.et("x",i),this.velocity.y=this.et("y",i),this.U=e,c(this.B,this.p1),this.V=!0)}st(t){var e=this.pswp.mainScroll;e.isShifted()?e.moveIndexBy(0,!0):0<t.type.indexOf("cancel")||("mouseup"===t.type||"mouse"===t.pointerType?this.tapHandler.click(this.startP1,t):(e=this.pswp.options.doubleTapAction?300:0,this.G?(this.W(),d(this.Z,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(c(this.Z,this.startP1),this.G=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this.W()},e))))}W(){this.G&&(clearTimeout(this.G),this.G=null)}et(t,e){t=this.p1[t]-this.B[t];return 1<Math.abs(t)&&5<e?t/e:0}Y(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}H(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}K(i,s){if(this.N){let e=i,t=this.O.findIndex(t=>t.id===e.pointerId);"up"===s&&-1<t?this.O.splice(t,1):"down"===s&&-1===t?this.O.push(this.nt(e,{x:0,y:0})):-1<t&&this.nt(e,this.O[t]),this.F=this.O.length,0<this.F&&c(this.p1,this.O[0]),1<this.F&&c(this.p2,this.O[1])}else{let t=i;this.F=0,-1<t.type.indexOf("touch")?t.touches&&0<t.touches.length&&(this.nt(t.touches[0],this.p1),this.F++,1<t.touches.length)&&(this.nt(t.touches[1],this.p2),this.F++):(this.nt(i,this.p1),"up"===s?this.F=0:this.F++)}}ht(){c(this.prevP1,this.p1),c(this.prevP2,this.p2)}X(){c(this.startP1,this.p1),c(this.startP2,this.p2),this.ht()}tt(){var t;this.pswp.mainScroll.isShifted()?this.dragAxis="x":0!=(t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y))&&(t=0<t?"x":"y",10<=Math.abs(this.p1[t]-this.startP1[t]))&&(this.dragAxis=t)}nt(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}$(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class A{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this.ot=0,this.rt=0,this.lt=-1,this.itemHolders=[]}resize(i){let t=this.pswp,e=Math.round(t.viewportSize.x+t.viewportSize.x*t.options.spacing),s=e!==this.slideWidth;s&&(this.slideWidth=e,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEac
1h((t,e)=>{s&&r(t.el,(e+this.lt)*this.slideWidth),i&&t.slide&&t.slide.resize()})}resetPosition(){this.ot=0,this.rt=0,this.slideWidth=0,this.lt=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){var e=l("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 1<this.pswp.getNumItems()}moveIndexBy(e,t,i){let s=this.pswp,n=s.potentialIndex+e;var o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);let t=(e+o)%o;e=t<=o/2?t:t-o}else n<0?n=0:n>=o&&(n=o-1),e=n-s.potentialIndex;s.potentialIndex=n,this.ot-=e,s.animations.stopMainScroll();var h=this.getCurrSlideX();if(t){s.animations.startSpring({isMainScroll:!0,start:this.x,end:h,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let e=s.potentialIndex-s.currIndex;if(s.canLoop()){let t=(e+o)%o;e=t<=o/2?t:t-o}1<Math.abs(e)&&this.updateCurrItem()}else this.moveTo(h),this.updateCurrItem();return Boolean(e)}getCurrSlideX(){return this.slideWidth*this.ot}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t,s=this.pswp,n=this.rt-this.ot;if(n){this.rt=this.ot,s.currIndex=s.potentialIndex;let e,i=Math.abs(n);3<=i&&(this.lt+=n+(0<n?-3:3),i=3,this.itemHolders.forEach(t=>{var e;null!=(e=t.slide)&&e.destroy(),t.slide=void 0}));for(let t=0;t<i;t++)0<n?(e=this.itemHolders.shift())&&(this.itemHolders[2]=e,this.lt++,r(e.el,(this.lt+2)*this.slideWidth),s.setContent(e,s.currIndex-i+t+2)):(e=this.itemHolders.pop())&&(this.itemHolders.unshift(e),this.lt--,r(e.el,this.lt*this.slideWidth),s.setContent(e,s.currIndex+i-t-2));50<Math.abs(this.lt)&&!this.isShifted()&&(this.resetPosition(),this.resize()),s.animations.stopAllPan(),this.itemHolders.forEach((t,e)=>{t.slide&&t.slide.setIsActive(1===e)}),s.currSlide=null==(t=this.itemHolders[1])?void 0:t.slide,s.contentLoader.updateLazy(n),s.currSlide&&s.currSlide.applyCurrentZoomPan(),s.dispatch("change")}}moveTo(t,e){var i,s;!this.pswp.canLoop()&&e&&(i=(this.slideWidth*this.ot-t)/this.slideWidth,i+=this.pswp.currIndex,s=Math.round(t-this.x),i<0&&0<s||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+.35*s),this.x=t,this.pswp.container&&r(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=e&&e})}}let E={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},D=(t,e)=>e?t:E[t];class T{constructor(t){this.pswp=t,this.ct=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this.dt(),t.events.add(document,"focusin",this.ut.bind(this))),t.events.add(document,"keydown",this.vt.bind(this))});let e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this.ct&&e.focus()})}dt(){!this.ct&&this.pswp.element&&(this.pswp.element.focus(),this.ct=!0)}vt(n){var t,o=this.pswp;if(!o.dispatch("keydown",{originalEvent:n}).defaultPrevented&&!("button"in(t=n)&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey)){let e,i,s=!1,t="key"in n;switch(t?n.key:n.keyCode){case D("Escape",t):o.options.escKey&&(e="close");break;case D("z",t):e="toggleZoom";break;case D("ArrowLeft",t):i="x";break;case D("ArrowUp",t):i="y";break;case D("ArrowRight",t):i="x",s=!0;break;case D("ArrowDown",t):s=!0,i="y";break;case D("Tab",t):this.dt()}if(i){n.preventDefault();let t=o.currSlide;o.options.arrowKeys&&"x"===i&&1<o.getNumItems()?e=s?"next":"prev":t&&t.currZoomLevel>t.zoomLevels.fit&&(t.pan[i]+=s?-80:80,t.panTo(t.pan.x,t.pan.y))}e&&(n.preventDefault(),o[e]())}}ut(t){var e=this.pswp.template;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}class F{constructor(t){let e,{target:i,onComplete:s,transform:n,onFinish:o=()=>{},duration:h=333,easing:a="cubic-bezier(.4,0,.22,1)"}=this.props=t,r=(this.onFinish=o,n?"transform":"opacity"),l=null!=(e=t[r])?e:"";this.ft=i,this.wt=s,this.gt=!1,this.yt=this.yt.bind(this),this._t=setTimeout(()=>{p(i,r,h,a),this._t=setTimeout(()=>{i.addEventListener("transitionend",this.yt,!1),i.addEventListener("transitioncancel",this.yt,!1),this._t=setTimeout(()=>{this.xt()},h+500),i.style[r]=l},30)},0)}yt(t){t.target===this.ft&&this.xt()}xt(){this.gt||(this.gt=!0,this.onFinish(),this.wt&&this.wt())}destroy(){this._t&&clearTimeout(this._t),p(this.ft),this.ft.removeEventListener("transitionend",this.yt,!1),this.ft.removeEventListener("transitioncancel",this.yt,!1),this.gt||this.xt()}}class k{constructor(t,e,i){this.velocity=1e3*t,this.bt=e||.75,this.St=i||12,this.zt=this.St,this.bt<1&&(this.zt*=Math.sqrt(1-this.bt*this.bt))}
1easeFrame(t,e){let i,s=0;e/=1e3;var n,o=Math.E**(-this.bt*this.St*e);return 1===this.bt?(i=this.velocity+this.St*t,s=(t+i*e)*o,this.velocity=s*-this.St+i*o):this.bt<1&&(i=1/this.zt*(this.bt*this.St*t+this.velocity),n=Math.cos(this.zt*e),e=Math.sin(this.zt*e),s=o*(t*n+i*e),this.velocity=s*-this.St*this.bt+o*(-this.zt*t*e+this.zt*i*n)),s}}class B{constructor(t){this.props=t,this.Mt=0;let{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:h=()=>{},dampingRatio:a,naturalFrequency:r}=t,l=(this.onFinish=h,new k(s,a,r)),d=Date.now(),p=e-i,c=()=>{this.Mt&&(p=l.easeFrame(p,Date.now()-d),Math.abs(p)<1&&Math.abs(l.velocity)<50?(n(i),o&&o(),this.onFinish()):(d=Date.now(),n(p+i),this.Mt=requestAnimationFrame(c)))};this.Mt=requestAnimationFrame(c)}destroy(){0<=this.Mt&&cancelAnimationFrame(this.Mt),this.Mt=0}}class N{constructor(){this.activeAnimations=[]}startSpring(t){this.Pt(t,!0)}startTransition(t){this.Pt(t)}Pt(t,e){let i=new(e?B:F)(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();t=this.activeAnimations.indexOf(t);-1<t&&this.activeAnimations.splice(t,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=>
1!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class H{constructor(t){(this.pswp=t).events.add(t.element,"wheel",this.Ct.bind(this))}Ct(e){e.preventDefault();var i=this.pswp.currSlide;let{deltaX:t,deltaY:s}=e;if(i&&!this.pswp.dispatch("wheel",{originalEvent:e}).defaultPrevented)if(e.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let t=-s;1===e.deltaMode?t*=.05:t*=e.deltaMode?1:.002,t=2**t;var n=i.currZoomLevel*t;i.zoomTo(n,{x:e.clientX,y:e.clientY})}}else i.isPannable()&&(1===e.deltaMode&&(t*=18,s*=18),i.panTo(i.pan.x-t,i.pan.y-s))}}class W{constructor(o,h){var i,a=h.name||h.className;let r=h.html;if(!1!==o.options[a]){"string"==typeof o.options[a+"SVG"]&&(r=o.options[a+"SVG"]),o.dispatch("uiElementCreate",{data:h});let t="",s=(h.isButton?t=(t+="pswp__button ")+(h.className||"pswp__button--"+h.name):t+=h.className||"pswp__"+h.name,h.isButton?h.tagName||"button":h.tagName||"div"),n=(s=s.toLowerCase(),l(t,s));if(h.isButton){"button"===s&&(n.type="button");let t=h.title,e=h.ariaLabel,i=((t="string"==typeof o.options[a+"Title"]?o.options[a+"Title"]:t)&&(n.title=t),e||t);i&&n.setAttribute("aria-label",i)}n.innerHTML=(t=>{if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";
1let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e=e+t.inner+"</svg>"})(r),h.onInit&&h.onInit(n,o),h.onClick&&(n.onclick=t=>{"string"==typeof h.onClick?o[h.onClick]():"function"==typeof h.onClick&&h.onClick(t,n,o)});a=h.appendTo||"bar";let e=o.element;"bar"===a?(o.topBar||(o.topBar=l("pswp__top-bar pswp__hide-on-close","div",o.scrollWrap)),e=o.topBar):(n.classList.add("pswp__hide-on-close"),"wrapper"===a&&(e=o.scrollWrap)),null!=(i=e)&&i.appendChild(o.applyFilters("uiElement",n,h))}}}function M(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.currIndex<e.getNumItems()-1):!(0<e.currIndex))})}let q={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:M},R={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,e)=>{M(t,e,!0)}},U={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},V={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},X={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,i)=>{let s,n=null,o=t=>{s!==t&&(s=t,e.classList.toggle("pswp__preloader--active",t))},h=()=>{var t;null!=(t=i.currSlide)&&t.content.isLoading()?n=n||setTimeout(()=>{var t;o(Boolean(null==(t=i.currSlide)?void 0:t.content.isLoading())),n=null},i.options.preloaderDelay):(o(!1),n&&(clearTimeout(n),n=null))};i.on("change",h),i.on("loadComplete",t=>{i.currSlide===t.slide&&h()}),i.ui&&(i.ui.updatePreloaderVisibility=h)}},j={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}};function _(t,e){t.classList.toggle("pswp--zoomed-in",e)}class G{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this.Tt=void 0}init(){let e=this.pswp;this.isRegistered=!1,this.uiElementsData=[U,q,R,V,X,j],e.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)}),e.on("change",()=>{var t;null!=(t=e.element)&&t.classList.toggle("pswp--one-slide",1===e.getNumItems())}),e.on("zoomPanUpdate",()=>this.At())}registerElement(t){this.isRegistered?this.items.push(new W(this.pswp,t)):this.uiElementsData.push(t)}At(){var e,{template:i,currSlide:s,options:n}=this.pswp;if(!this.pswp.opener.isClosing&&i&&s){let t=s.currZoomLevel;(t=this.pswp.opener.isOpen?t:s.zoomLevels.initial)!==this.Tt&&(this.Tt=t,e=s.zoomLevels.initial-s.zoomLevels.secondary,Math.abs(e)<.01||!s.isZoomable()?(_(i,!1),i.classList.remove("pswp--zoom-allowed")):(i.classList.add("pswp--zoom-allowed"),_(i,(t===s.zoomLevels.initial?s.zoomLevels.secondary:s.zoomLevels.initial)<=t),"zoom"!==n.imageClickAction&&"zoom-or-close"!==n.imageClickAction||i.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 K{constructor(e,t){if(this.element=l("pswp__img pswp__img--placeholder",e?"img":"div",t),e){let t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(s(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=a(0,0,t/250)):s(this.element,t,e))}destroy(){var t;null!=(t=this.element)&&t.parentNode&&this.element.remove(),this.element=null}}class ${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.t
1ype="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){let t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{let t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new K(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=l("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=l("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e;this.isImageContent()&&this.element&&!this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented&&(t=this.element,this.updateSrcsetSizes(),this.data.srcset&&(t.srcset=this.data.srcset),t.src=null!=(e=this.data.src)?e:"",t.alt=null!=(e=this.data.alt)?e:"",this.state=i,t.complete?this.onLoaded():(t.onload=()=>{this.onLoaded()},t.onerror=()=>{this.onError()}))}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=t,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!==t&&this.state!==e||this.removePlaceholder())}onError(){this.state=e,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===i,this)}isError(){return this.state===e}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){var i;this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented)&&(s(this.element,t,e),this.isImageContent())&&!this.isError()&&(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!==e,this)}updateSrcsetSizes(){var t,e;this.isImageContent()&&this.element&&this.data.srcset&&(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){let t,e,i=l("pswp__error-msg","div");i.innerText=null!=(t=null==(e=this.instance.options)?void 0:e.errorMsg)?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=l("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(){var t;!this.isAttached&&this.element&&(this.isAttached=!0,this.state===e?this.displayError():this.instance.dispatch("contentAppend",{content:this}).defaultPrevented||(t="decode"in this.element,this.isImageContent()?t&&this.slide&&(!this.slide.isActive||n())?(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&&!n()?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!==t&&this.state!==e)||this.removePlaceholder()}}
1function Z(t,e,i){var s=e.createContentFromData(t,i);let n;var o=e.options;return o&&(n=new x(o,t,-1),o=f(o,e.pswp?e.pswp.viewportSize:y(o,e),t,i),n.update(s.width,s.height,o)),s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}class J{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this.Dt=[]}updateLazy(e){var i=this.pswp;if(!i.dispatch("lazyLoad").defaultPrevented){var s=i.options.preload,n=void 0===e||0<=e;let t;for(t=0;t<=s[1];t++)this.loadSlideByIndex(i.currIndex+(n?t:-t));for(t=1;t<=s[0];t++)this.loadSlideByIndex(i.currIndex+(n?-t:t))}}loadSlideByIndex(t){var t=this.pswp.getLoopedIndex(t);this.getContentByIndex(t)||(t=((t,e)=>{var i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Z(i,e,t)})(t,this.pswp))&&this.addToCache(t)}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.Dt.push(t),this.Dt.length>this.limit){let t=this.Dt.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this.Dt.splice(t,1)[0].destroy()}}removeByIndex(e){var t=this.Dt.findIndex(t=>t.index===e);-1!==t&&this.Dt.splice(t,1)}getContentByIndex(e){return this.Dt.find(t=>t.index===e)}destroy(){this.Dt.forEach(t=>t.destroy()),this.Dt=[]}}let O=.003;class Q{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this.It=void 0,this.Et=!1,this.Lt=!1,this.kt=!1,this.Zt=!1,this.Bt=void 0,this.Ft=void 0,this.Ot=void 0,this.Rt=void 0,this.Nt=void 0,this.Ut=this.Ut.bind(this),t.on("firstZoomPan",this.Ut)}open(){this.Ut(),this.Pt()}close(){var t;this.isClosed||this.isClosing||this.isOpening||(t=this.pswp.currSlide,this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this.It=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt(),setTimeout(()=>{this.Pt()},this.Lt?30:0))}Ut(){var t;this.pswp.off("firstZoomPan",this.Ut),this.isOpening||(t=this.pswp.currSlide,this.isOpening=!0,this.isClosing=!1,this.It=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt())}Vt(){var t=this.pswp,e=this.pswp.currSlide,i=t.options;"fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this.Nt=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this.It=0,this.Nt=void 0):this.isOpening&&t.Gt?this.Nt=t.Gt:this.Nt=this.pswp.getThumbBounds(),this.Bt=null==e?void 0:e.getPlaceholderElement(),t.animations.stopAll(),this.Et=Boolean(this.It&&50<this.It),this.$t=Boolean(this.Nt)&&(null==e?void 0:e.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this.$t?this.kt=null!=(i=i.showHideOpacity)&&i:(this.kt=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this.Zt=!this.kt&&this.pswp.options.bgOpacity>O,this.Ft=this.kt?t.element:t.bg,this.Et?(this.$t&&this.Nt&&this.Nt.innerRect?(this.Lt=!0,this.Ot=this.pswp.container,this.Rt=null==(i=this.pswp.currSlide)?void 0:i.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this.Lt=!1,this.isOpening?(this.kt?(t.element&&(t.element.style.opacity=String(O)),t.applyBgOpacity(1)):(this.Zt&&t.bg&&(t.bg.style.opacity=String(O)),t.element&&(t.element.style.opacity="1")),this.$t&&(this.qt(),this.Bt)&&(this.Bt.style.willChange="transform",this.Bt.style.opacity=String(O))):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.Lt)&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize())):(this.It=0,this.$t=!1,this.Zt=!1,this.kt=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(O)),t.applyBgOpacity(1)))}Pt(){this.isOpening&&this.Et&&this.Bt&&"IMG"===this.Bt.tagName?new Promise(t=>{let e=!1,i=!0;var s=this.Bt;("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.Ht()):this.Ht()}Ht(){var t;null!=(t=this.pswp.element)&&t.style.setProperty("--pswp-transition-duration",this.It+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null!=(t=this.pswp.element)&&t.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this.Bt&&(this.Bt.style.opacity="1"),this.Kt()):this.isClosing&&this.Wt(),this.Et||this.jt()}jt(){var t=this.pswp;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():this.isOpen&&(this.$t&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null!=(t=t.currSlide))&&t.applyCurrentZoomPan()}Kt(){var t=this.pswp;this.$t&&(this.Lt&&this.Ot&&this.Rt&&(this.Xt(this.Ot,"transform","translate3d(0,
10,0)"),this.Xt(this.Rt,"transform","none")),t.currSlide)&&(t.currSlide.zoomAndPanToInitial(),this.Xt(t.currSlide.container,"transform",t.currSlide.getCurrentTransform())),this.Zt&&t.bg&&this.Xt(t.bg,"opacity",String(t.options.bgOpacity)),this.kt&&t.element&&this.Xt(t.element,"opacity","1")}Wt(){var t=this.pswp;this.$t&&this.qt(!0),this.Zt&&.01<t.bgOpacity&&t.bg&&this.Xt(t.bg,"opacity","0"),this.kt&&t.element&&this.Xt(t.element,"opacity","0")}qt(h){if(this.Nt){let t=this.pswp,n=this.Nt.innerRect,{currSlide:e,viewportSize:o}=t;if(this.Lt&&n&&this.Ot&&this.Rt){let t=-o.x+(this.Nt.x-n.x)+n.w,e=-o.y+(this.Nt.y-n.y)+n.h,i=o.x-n.w,s=o.y-n.h;h?(this.Xt(this.Ot,"transform",a(t,e)),this.Xt(this.Rt,"transform",a(i,s))):(r(this.Ot,t,e),r(this.Rt,i,s))}e&&(c(e.pan,n||this.Nt),e.currZoomLevel=this.Nt.w/e.width,h?this.Xt(e.container,"transform",e.getCurrentTransform()):e.applyCurrentZoomPan())}}Xt(i,s,n){if(this.It){let t=this.pswp.animations,e={duration:this.It,easing:this.pswp.options.easing,onComplete:()=>{t.activeAnimations.length||this.jt()},target:i};e[s]=n,t.startTransition(e)}else i.style[s]=n}}let tt={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)"};return class extends class extends class{constructor(){this.Yt={},this.Jt={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s;this.Jt[t]||(this.Jt[t]=[]),null!=(s=this.Jt[t])&&s.push({fn:e,priority:i}),null!=(s=this.Jt[t])&&s.sort((t,e)=>t.priority-e.priority),null!=(s=this.pswp)&&s.addFilter(t,e,i)}removeFilter(t,e){this.Jt[t]&&(this.Jt[t]=this.Jt[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return null!=(t=this.Jt[t])&&t.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){var i;this.Yt[t]||(this.Yt[t]=[]),null!=(i=this.Yt[t])&&i.push(e),null!=(i=this.pswp)&&i.on(t,e)}off(t,e){var i;this.Yt[t]&&(this.Yt[t]=this.Yt[t].filter(t=>e!==t)),null!=(i=this.pswp)&&i.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);let i=new Y(t,e);return null!=(e=this.Yt[t])&&e.forEach(t=>{t.call(this,i)}),i}}{getNumItems(){let t,e=0;var i=null==(t=this.options)?void 0:t.dataSource,s=(i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.Qt(i.gallery)),i.items)&&(e=i.items.length),this.dispatch("numItems",{dataSource:i,numItems:e}));return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new $(t,this,e)}getItemData(t){var e=null==(e=this.options)?void 0:e.dataSource;let i={},s=(Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this.Qt(e.gallery)),i=e.items[t]),i);s instanceof Element&&(s=this.ti(s));e=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",e.itemData,t)}Qt(t){var e;return null!=(e=this.options)&&e.children||null!=(e=this.options)&&e.childSelector?((t,e,i=document)=>{let s=[];return t instanceof Element?s=[t]:t instanceof NodeList||Array.isArray(t)?s=Array.from(t):(t="string"==typeof t?t:e)&&(s=Array.from(i.querySelectorAll(t))),s})(this.options.children,this.options.childSelector,t)||[]:[t]}ti(t){var e,i={element:t},s="A"===t.tagName?t:t.querySelector("a");return s&&(i.src=s.dataset.pswpSrc||s.href,s.dataset.pswpSrcset&&(i.srcset=s.dataset.pswpSrcset),i.width=s.dataset.pswpWidth?parseInt(s.dataset.pswpWidth,10):0,i.height=s.dataset.pswpHeight?parseInt(s.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,s.dataset.pswpType&&(i.type=s.dataset.pswpType),(e=t.querySelector("img"))&&(i.msrc=e.currentSrc||e.src,i.alt=null!=(e=e.getAttribute("alt"))?e:""),s.dataset.pswpCropped||s.dataset.cropped)&&(i.thumbCropped=!0),this.applyFilters("domItemData",i,t,s)}lazyLoadData(t,e){return Z(t,this,e)}}{constructor(t){super(),this.options=this.ii(t||{}),this.offset={x:0,y:0},this.si={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.hi={},this.Gt=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 o,this.animations=new N,this.mainScroll=ne
1w A(this),this.gestures=new C(this),this.opener=new Q(this),this.keyboard=new T(this),this.contentLoader=new J(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this.ei();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 H(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.hi=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this.hi,slide:void 0}),this.Gt=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{var t=this.mainScroll.itemHolders;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.ni.bind(this)),this.events.add(window,"scroll",this.oi.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){var e=this.getNumItems();return this.options.loop&&(e-1<t&&(t-=e),t<0)&&(t+=e),u(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{null!=(t=t.slide)&&t.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)&&e.zoomTo(...t)}toggleZoom(){var t;null!=(t=this.currSlide)&&t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;this.isDestroying?(this.dispatch("destroy"),this.Yt={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null!=(t=this.element)&&t.remove(),this.mainScroll.itemHolders.forEach(t=>{null!=(t=t.slide)&&t.destroy()}),this.contentLoader.destroy(),this.events.removeAll()):(this.options.showHideAnimationType="none",this.close())}refreshSlideContent(h){this.contentLoader.removeByIndex(h),this.mainScroll.itemHolders.forEach((t,e)=>{let i,s,n=(null!=(i=null==(s=this.currSlide)?void 0:s.index)?i:0)-1+e,o;(n=this.canLoop()?this.getLoopedIndex(n):n)===h&&(this.setContent(t,h,!0),1===e)&&(this.currSlide=t.slide,null!=(o=t.slide)&&o.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}!this.canLoop()&&(e<0||e>=this.getNumItems())||(i=this.getItemData(e),t.slide=new S(i,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){var e;this.isDestroying||(e=y(this.options,this),!t&&m(e,this.si))||(c(this.si,e),this.dispatch("beforeResize"),c(this.viewportSize,this.si),this.oi(),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))||t.classList.add("pswp--has_mouse")}ni(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}oi(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}ei(){this.element=l("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=l("pswp__bg","div",this.element),this.scrollWrap=l("pswp__scroll-wrap","section",this.element),this.container=l("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 G(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){{var i=this.currIndex,s=this.currSlide?this.currSlide.data:this.hi,n=this;if((l=n.dispatch("thumbBounds",{index:i,itemData:s,instance:n})).thumbBounds)return l.thumbBounds;var o,h,a,r,l=s.element;let t,e;if(l&&!1!==n.options.thumbSelector){let t=n.options.thumbSelector||"img";e=l.matches(t)?l:l.querySelector(t)}return(e=n.applyFilters("thumbEl",e,s,i))&&(t=s.thumbCropped?(l=e,o=s.width||s.w||0,h=s.height||s.h||0,l=l.getBoundingClientRect(),a=l.width/o,r=(l.width-o*(a=(r=l.height/h)<a?a:r))/2,h=(l.height-h*a)/2,(o={x:l.left+r,y:l.top+h,w:o*a}).innerRect={w:l.width,h:l.height,x:r,y:h},o):{x:(a=e.getBoundingClientRect()).left,y:a.top,w:a.width}),n.applyFilters("thumbBounds",t,s,i)}}canLoop(){return this.options.loop&&2<this.getNumItems()}ii(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...tt,...t}}}}),((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).PhotoSwipeLightbox=e()})(this,function(){function s(t,e,i){e=document.createElement(e);return t&&(e.className=t),i&&i.appendChild(e),e}function n(t,e,i){t.style.width="number"==typeof e?e+"px":e,t.style.height="number"==typeof i?i+"px":i}let i="loading",t="loaded",e="error";function o(t,e,i=document){let s=[];return t instanceof Element?s=[t]:t instanceof NodeList||Array.isArray(t)?s=Array.from(t):(t="string"==typeof t?t:e)&&(s=Array.from(i.querySelectorAll(t))),s}function h(){return navigator.vendor&&navigator.vendor.match(/apple/i)}class a{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}
1class r{constructor(e,t){if(this.element=s("pswp__img pswp__img--placeholder",e?"img":"div",t),e){let t=this.element;t.decoding="async",t.alt="",t.src=e,t.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=(t=>{let e="translate3d(0px,0px,0)";return e+=` scale3d(${t},${t},1)`})(t/250)):n(this.element,t,e))}destroy(){var t;null!=(t=this.element)&&t.parentNode&&this.element.remove(),this.element=null}}class l{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){let t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{let t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new r(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;this.isImageContent()&&this.element&&!this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented&&(t=this.element,this.updateSrcsetSizes(),this.data.srcset&&(t.srcset=this.data.srcset),t.src=null!=(e=this.data.src)?e:"",t.alt=null!=(e=this.data.alt)?e:"",this.state=i,t.complete?this.onLoaded():(t.onload=()=>{this.onLoaded()},t.onerror=()=>{this.onError()}))}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=t,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!==t&&this.state!==e||this.removePlaceholder())}onError(){this.state=e,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===i,this)}isError(){return this.state===e}isImageContent(){return"image"===this.type}setDisplayedSize(e,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,i),!this.instance.dispatch("contentResize",{content:this,width:e,height:i}).defaultPrevented)&&(n(this.element,e,i),this.isImageContent())&&!this.isError()){let t=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=i,t?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==e,this)}updateSrcsetSizes(){var t,e;this.isImageContent()&&this.element&&this.data.srcset&&(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){let t,e,i=s("pswp__error-msg","div");i.innerText=null!=(t=null==(e=this.instance.options)?void 0:e.errorMsg)?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(){var t;!this.isAttached&&this.element&&(this.isAttached=!0,this.state===e?this.displayError():this.instance.dispatch("contentAppend",{content:this}).defaultPrevented||(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!==t&&this.state!==e)||this.removePlaceholder()}}function d(e,i,t,s,n){let o=0;if(i.paddingFn)o=i.paddingFn(t,s,n)[e];else if(i.padding)o=i.padding[e];else{let t="padding"+e[0].toUpperCase()+e.slice(1);i[t]&&(o=i[t])}return Number(o)||0}class p{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){t={x:t,y:e},this.elementSize=t,e=(this.panAreaSize=i).x/t.x,i=i.y/t.y;this.fit=Math.min(1,e<i?e:i),this.fill=Math.min(1,i<e?e:i),this.vFill=Math.min(1,i),this.initial=this.t(),this.secondary=this.i(),this.max=Math.max(this.initial,this.secondary,this.o()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}l(t){t=this.options[t+"ZoomLevel"];
1if(t)return"function"==typeof t?t(this):"fill"===t?this.fill:"fit"===t?this.fit:Number(t)}i(){let t=this.l("secondary");return t||(t=Math.min(1,3*this.fit),t=this.elementSize&&4e3<t*this.elementSize.x?4e3/this.elementSize.x:t)}t(){return this.l("initial")||this.fit}o(){return this.l("max")||Math.max(1,4*this.fit)}}function c(t,e,i){var s=e.createContentFromData(t,i);let n;var o,h=e.options;return h&&(n=new p(h,t,-1),o=e.pswp?e.pswp.viewportSize:(t=>{if(t.getViewportSizeFn){t=t.getViewportSizeFn(t,e);if(t)return t}return{x:document.documentElement.clientWidth,y:window.innerHeight}})(h),h=h,t=t,i=i,h={x:(o=o).x-d("left",h,o,t,i)-d("right",h,o,t,i),y:o.y-d("top",h,o,t,i)-d("bottom",h,o,t,i)},n.update(s.width,s.height,h)),s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}return class extends class extends class{constructor(){this.u={},this.p={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s;this.p[t]||(this.p[t]=[]),null!=(s=this.p[t])&&s.push({fn:e,priority:i}),null!=(s=this.p[t])&&s.sort((t,e)=>t.priority-e.priority),null!=(s=this.pswp)&&s.addFilter(t,e,i)}removeFilter(t,e){this.p[t]&&(this.p[t]=this.p[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return null!=(t=this.p[t])&&t.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){var i;this.u[t]||(this.u[t]=[]),null!=(i=this.u[t])&&i.push(e),null!=(i=this.pswp)&&i.on(t,e)}off(t,e){var i;this.u[t]&&(this.u[t]=this.u[t].filter(t=>e!==t)),null!=(i=this.pswp)&&i.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);let i=new a(t,e);return null!=(e=this.u[t])&&e.forEach(t=>{t.call(this,i)}),i}}{getNumItems(){let t,e=0;var i=null==(t=this.options)?void 0:t.dataSource,s=(i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.v(i.gallery)),i.items)&&(e=i.items.length),this.dispatch("numItems",{dataSource:i,numItems:e}));return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new l(t,this,e)}getItemData(t){var e=null==(e=this.options)?void 0:e.dataSource;let i={},s=(Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this.v(e.gallery)),i=e.items[t]),i);s instanceof Element&&(s=this.m(s));e=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",e.itemData,t)}v(t){var e;return null!=(e=this.options)&&e.children||null!=(e=this.options)&&e.childSelector?o(this.options.children,this.options.childSelector,t)||[]:[t]}m(t){var e,i={element:t},s="A"===t.tagName?t:t.querySelector("a");return s&&(i.src=s.dataset.pswpSrc||s.href,s.dataset.pswpSrcset&&(i.srcset=s.dataset.pswpSrcset),i.width=s.dataset.pswpWidth?parseInt(s.dataset.pswpWidth,10):0,i.height=s.dataset.pswpHeight?parseInt(s.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,s.dataset.pswpType&&(i.type=s.dataset.pswpType),(e=t.querySelector("img"))&&(i.msrc=e.currentSrc||e.src,i.alt=null!=(e=e.getAttribute("alt"))?e:""),s.dataset.pswpCropped||s.dataset.cropped)&&(i.thumbCropped=!0),this.applyFilters("domItemData",i,t,s)}lazyLoadData(t,e){return c(t,this,e)}}{constructor(t){super(),this.options=t||{},this.g=0,this.shouldOpen=!1,this._=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){o(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(!("button"in(i=e)&&1===i.button||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey||window.pswp)){let t={x:e.clientX,y:e.clientY};t.x||t.y||(t=null);var i=this.getClickedIndex(e),i=this.applyFilters("clickedIndex",i,e,this),s={gallery:e.currentTarget};0<=i&&(e.preventDefault(),this.loadAndOpen(i,s,t))}}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);let e=t.target,i=o(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){let t=o(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){var i,s=this.options,e=(e&&(s.dataSource=e),[]),n=typeof s.pswpModule;if("function"==typeof(i=s.pswpModule)&&i.prototype&&i.prototype.goTo)e.push(Prom
1ise.resolve(s.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");e.push(s.pswpModule())}"function"==typeof s.openPromise&&e.push(s.openPromise()),!1!==s.preloadFirstSlide&&0<=t&&(this._=((t,e)=>{var i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return c(i,e,t)})(t,this));let o=++this.g;Promise.all(e).then(t=>{this.shouldOpen&&(t=t[0],this.I(t,o))})}I(t,e){if(!(e!==this.g&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))){let i=new("object"==typeof t?t.default:t)(this.options);this.pswp=i,window.pswp=i,Object.keys(this.u).forEach(e=>{var t;null!=(t=this.u[e])&&t.forEach(t=>{i.on(e,t)})}),Object.keys(this.p).forEach(e=>{var t;null!=(t=this.p[e])&&t.forEach(t=>{i.addFilter(e,t.fn,t.priority)})}),this._&&(i.contentLoader.addToCache(this._),this._=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}}destroy(){var t;null!=(t=this.pswp)&&t.destroy(),this.shouldOpen=!1,this.u={},o(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}}});var nextLink,nextPageUrl,toggleBtn=document.querySelectorAll(".js-toggle-dark-light"),html=document.documentElement,paginationWrap=(toggleBtn&&toggleBtn.forEac
1h(function(t){t.addEventListener("click",function(){var t=html.getAttribute("data-theme");null!==t&&"dark"===t?(html.setAttribute("data-theme","light"),localStorage.setItem("selected-theme","light")):(html.setAttribute("data-theme","dark"),localStorage.setItem("selected-theme","dark"))})}),nextLink=document.querySelector("link[rel=next]"),document.getElementById("pagination-wrap")),loadMoreButton=document.getElementById("load-more");null!==nextLink&&(btnText=loadMoreButton.innerText,nextPageUrl=nextLink.getAttribute("href")),void 0===nextPageUrl?null!==paginationWrap&&(loadMoreButton.style.display="none"):loadMoreButton.addEventListener("click",function(t){t.preventDefault(),loadMoreButton.classList.add("loading"),loadMoreButton.disabled=!0,parseInt(nextPage)<=parseInt(totalPages)&&(t=nextPageUrl.split("/page/")[0]+"/page/"+nextPage+"/",fetch(t).then(function(t){if(t.ok)return t.text()}).then(function(t){for(var e=document.createElement("div"),i=(e.innerHTML=t,document.querySelector(".js-post-cards-wrap")),s=e.querySelectorAll(".js-post-card"),n=0;n<s.length;n++){let t=i.appendChild(s.item(n));setTimeout(function(){hoverEffect(t)},50)}nextPage++,loadMoreButton.classList.remove("loading"),loadMoreButton.disabled=!1,nextPage>totalPages&&(loadMoreButton.style.display="none")}))}),reframe('iframe:not([src*="soundcloud"]):not([src*="spotify"]):not(.no-resize, .letterbird-embed)');let ScrollBack=document.querySelector(".js-scroll-top"),tables=(ScrollBack&&ScrollBack.addEventListener("click",function(){window.scrollTo({top:0,left:0,behavior:"smooth"})}),document.querySelectorAll("table")),galleries=(0<tables.length&&tables.forEach(function(t){var e=document.createElement("div");e.classList.add("table-responsive"),t.parentNode.insertBefore(e,t),e.appendChild(t)}),document.querySelectorAll(".kg-gallery-card")),galleryImageDivs=document.querySelectorAll(".kg-gallery-image");function copyAttrs(e,t){[...t.attributes].forEach(t=>{e.setAttribute(t.nodeName,t.nodeValue)})}galleryImageDivs.forEach(t=>{var e=t.querySelector("img"),i=document.createElement("a");i.href=e.src,i.dataset.pswpWidth=e.getAttribute("width"),i.dataset.pswpHeight=e.getAttribute("height"),i.dataset.pswpSrcset=e.srcset,copyAttrs(i,t),i.innerHTML=t.innerHTML,t.replaceWith(i)});let lightbox=new PhotoSwipeLightbox({gallery:galleries,children:"a",pswpModule:PhotoSwipe}),formNotifications=(lightbox.init(),document.querySelectorAll(".form-notification")),menuToggle=(formNotifications.forEach(function(t){t.querySelector(".notification-close").addEventListener("click",function(){document.querySelectorAll("[data-members-form]").forEach(function(t){t.classList.remove("success"),t.classList.remove("error")})})}),document.getElementById("menu-toggle")),parentItems=(menuToggle&&menuToggle.addEventListener("click",()=>{var t=window.scrollY,e=document.getElementById("announcement-bar-root");e&&document.body.style.setProperty("--announcement-bar-height",e.offsetHeight+"px"),document.body.classList.toggle("is-menu-open"),window.scrollTo(0,t)}),document.querySelectorAll(".nav-main>ul>li")),progressBar=(parentItems.forEach(function(t){"null"!==t.querySelector("ul")&&t.addEventListener("click",()=>{t.classList.toggle("active")})}),window.onload=function(){let i=document.getElementById("ghost-portal-root"),s=!(i.style.opacity="0");setInterval(()=>{var t,e=i.querySelector('[title="portal-popup"]');null!==e&&!1===s&&(console.log("iframe"),(t=document.createElement("style")).innerHTML=".gh-portal-powered { display: none; }",e.contentDocument.head.appendChild(t),i.style.opacity="1",s=!0),null==e&&(s=!1,i.style.opacity="1")},300)},document.querySelector(".reading-progress"));function updateProgress(){var t=document.body.clientHeight,e=document.documentElement.clientHeight,t=window.scrollY/(t-e)*100;progressBar.setAttribute("value",t),requestAnimationFrame(updateProgress)}progressBar&&requestAnimationFrame(updateProgress);var links=document.querySelectorAll(".single-post p a:not([href*=javascript]), .single-post ul a, .single-post ol a");console.log(links);for(var i=0;i<links.length;i++){var a=links[i],href=a.href;0!==href.indexOf(location.protocol+"//"+location.host)&&a.classList.add("external-link")}let shortEmbed=document.querySelectorAll(".shorthand-embed-article");0<shortEmbed.length&&shortEmbed.forEach(t=>t.classList.add("kg-width-full"));

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.