PageSourceSearch

https://bijutsutecho.com/_nuxt-new/DCDojE86.js

js bijutsutecho.com collected 2026-10-01 10:18:46 UTC 91,227 bytes, 1 lines download raw bytes

1import{F as Ct,y as bt,e as $,z as xt,G as lt,d as N,o as u,s as _,j as b,c as I,f as x,H as O,I as ht,q as C,i as y,l as v,J as ct,_ as U,K as At,M as Lt,N as W,O as T,P as It,Q as Y,R as zt,S as dt,T as pt,U as q,t as D,n as Tt,k as Et,V as Ot,L as Dt,b as V,w as Mt,u as Zt,W as Rt,A as Q}from"./BIfjY5of.js";import{i as Ft,r as Bt}from"./BJU_0zcp.js";import{u as Nt}from"./rOjIZKFP.js";import{_ as kt}from"./CasKsRvs.js";import{_ as $t,L as Ht}from"./Dr86F12Y.js";import{_ as Wt,P as Ut,a as Vt,b as Gt}from"./Bzp315pc.js";import{_ as qt,B as Kt}from"./BGCeLsTU.js";import{u as jt}from"./CllU8UZP.js";import"./Dj0conVW.js";import"./DcEpueR8.js";import"./CEUFrvUX.js";function w(a,t,e){const i=document.createElement(t);return a&&(i.className=a),e&&e.appendChild(i),i}function m(a,t){return a.x=t.x,a.y=t.y,t.id!==void 0&&(a.id=t.id),a}function ut(a){a.x=Math.round(a.x),a.y=Math.round(a.y)}function K(a,t){const e=Math.abs(a.x-t.x),i=Math.abs(a.y-t.y);return Math.sqrt(e*e+i*i)}function F(a,t){return a.x===t.x&&a.y===t.y}function k(a,t,e){return Math.min(Math.max(a,t),e)}function B(a,t,e){let i=`translate3d(${a}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function L(a,t,e,i){a.style.transform=B(t,e,i)}const Xt="cubic-bezier(.4,0,.22,1)";function mt(a,t,e,i){a.style.transition=t?`${t} ${e}ms ${i||Xt}`:"none"}function j(a,t,e){a.style.width=typeof t=="number"?`${t}px`:t,a.style.height=typeof e=="number"?`${e}px`:e}function Yt(a){mt(a)}function Qt(a){return"decode"in a?a.decode().catch(()=>{}):a.complete?Promise.resolve(a):new Promise((t,e)=>{a.onload=()=>t(a),a.onerror=e})}const S={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Jt(a){return"button"in a&&a.button===1||a.ctrlKey||a.metaKey||a.altKey||a.shiftKey}function te(a,t,e=document){let i=[];if(a instanceof Element)i=[a];else if(a instanceof NodeList||Array.isArray(a))i=Array.from(a);else{const s=typeof a=="string"?a:t;s&&(i=Array.from(e.querySelectorAll(s)))}return i}function J(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let ft=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{ft=!0}}))}catch{}class ee{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 r=n?"removeEventListener":"addEventListener";e.split(" ").forEach(h=>{if(h){o||(n?this._pool=this._pool.filter(d=>d.type!==h||d.listener!==i||d.target!==t):this._pool.push({target:t,type:h,listener:i,passive:s}));const c=ft?{passive:s||!1}:!1;t[r](h,i,c)}})}}function _t(a,t){if(a.getViewportSizeFn){const e=a.getViewportSizeFn(a,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function M(a,t,e,i,s){let n=0;if(t.paddingFn)n=t.paddingFn(e,i,s)[a];else if(t.padding)n=t.padding[a];else{const o="padding"+a[0].toUpperCase()+a.slice(1);t[o]&&(n=t[o])}return Number(n)||0}function yt(a,t,e,i){return{x:t.x-M("left",a,t,e,i)-M("right",a,t,e,i),y:t.y-M("top",a,t,e,i)-M("bottom",a,t,e,i)}}class ie{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[t==="x"?"width":"height"]*this.currZoomLevel,n=M(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),o=this.slide.panAreaSize[t];this.center[t]=Math.round((o-i)/2)+n,this.max[t]=i>o?Math.round(o-i)+n:this.center[t],this.min[t]=i>o?n: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 k(e,this.max[t],this.min[t])}}const tt=4e3;let gt=class{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,n<o?n:o),this.fill=Math.min(1,n>o?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 typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>tt&&(t=tt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};class se{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 gt(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=w("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 ie(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.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}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):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}
1zoomTo(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 o=this.currZoomLevel;s||(t=k(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,o),this.pan.y=this.calculateZoomToPanOffset("y",e,o),ut(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(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const n=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*n+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!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!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),m(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,L(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;m(this.panAreaSize,yt(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 B(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const ne=.35,oe=.6,et=.4,it=.5;function ae(a,t){return a*t/(1-t)}class re{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&m(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(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const n=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:n}).defaultPrevented){this._setPanWithFriction("y",n,oe);const o=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(o),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(ut(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 o=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-it&&o<0||t.x<.1&&o<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>it&&o>0||t.x>-.1&&o>.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],r=this.pswp.bgOpacity<1&&t==="y",h=o+ae(e[t],.995);if(r){const g=this._getVerticalDragRatio(o),z=this._getVerticalDragRatio(h);if(g<0&&z<-et||g>0&&z>et){this.pswp.close();return}}const c=n.correctPan(t,h);if(o===c)return;const d=c===h?1:.82,p=this.pswp.bgOpacity,f=c-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:c,velocity:e[t],dampingRatio:d,onUpdate:g=>
1{if(r&&this.pswp.bgOpacity<1){const z=1-(c-g)/f;this.pswp.applyBgOpacity(k(p+(1-p)*z,0,1))}s[t]=Math.floor(g),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:r}=this.pswp,l=e[t]-s[t],h=r.x+l;if(!l||!o)return!1;if(t==="x"&&!o.isPannable()&&!n)return r.moveTo(h,!0),!0;const{bounds:c}=o,d=o.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!n){const p=r.getCurrSlideX(),f=r.x-p,g=l>0,z=!g;if(d>c.min[t]&&g){if(c.min[t]<=this.startPan[t])return r.moveTo(h,!0),!0;this._setPanWithFriction(t,d)}else if(d<c.max[t]&&z){if(this.startPan[t]<=c.max[t])return r.moveTo(h,!0),!0;this._setPanWithFriction(t,d)}else if(f!==0){if(f>0)return r.moveTo(Math.max(h,p),!0),!0;if(f<0)return r.moveTo(Math.min(h,p),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!r.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?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 l=Math.round(e-n[t]);n[t]+=l*(i||ne)}else n[t]=e}}const le=.05,he=.15;function st(a,t,e){return a.x=(t.x+e.x)/2,a.y=(t.y+e.y)/2,a}class ce{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,m(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;st(this._startZoomPoint,e,s),st(this._zoomPoint,t,i);let h=1/K(e,s)*K(t,i)*this._startZoomLevel;if(h>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<r)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const c=1-(r-h)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:c}).defaultPrevented||n.applyBgOpacity(c)}else h=r-(r-h)*he;else h>l&&(h=l+(h-l)*le);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.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let n,o=!0;s<i.zoomLevels.initial?n=i.zoomLevels.initial:s>i.zoomLevels.max?n=i.zoomLevels.max:(o=!1,n=s);const r=e.bgOpacity,l=e.bgOpacity<1,h=m({x:0,y:0},i.pan);let c=m({x:0,y:0},h);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,m(this._startPan,h)),o&&(c={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),i.setZoomLevel(n),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const d=!F(c,h);if(!d&&!o&&!l){i._setResolution(n),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:p=>{if(p/=1e3,d||o){if(d&&(i.pan.x=h.x+(c.x-h.x)*p,i.pan.y=h.y+(c.y-h.y)*p),o){const f=s+(n-s)*p;i.setZoomLevel(f)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(k(r+(1-r)*p,0,1))},onComplete:()=>{i._setResolution(n),i.applyCurrentZoomPan()}})}}function nt(a){return!!a.target.closest(".pswp__container")}class de{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){nt(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){nt(e)&&this._doClickOrTapAction("doubleTap",t,e)}
vendor: 7,208 bytes, line 1
1_doClickOrTapAction(t,e,i){var s;const{pswp:n}=this.gestures,{currSlide:o}=n,r=t+"Action",l=n.options[r];if(!n.dispatch(r,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(n,e,i);return}switch(l){case"close":case"next":n[l]();break;case"zoom":o?.toggleZoom(e);break;case"zoom-or-close":o!=null&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const pe=10,ue=300,me=25;class fe{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 re(this),this.zoomLevels=new ce(this),this.tapHandler=new de(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,r=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)),r&&o.add(n.scrollWrap,r,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,m(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(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,m(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.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&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?F(this.p1,this.prevP1)||this.drag.change():(!F(this.p1,this.prevP1)||!F(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,m(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?ue:0;this._tapTimer?(this._clearTapTimer(),K(this._lastStartP1,this.startP1)<me&&this.tapHandler.doubleTap(this.startP1,t)):(m(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(n=>n.id===i.pointerId);e==="up"&&s>-1?this._ongoingPointers.splice(s,1):e==="down"&&s===-1?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&&m(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&m(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),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){m(this.prevP1,this.p1),m(this.prevP2,this.p2)}_updateStartPoints(){m(this.startP1,this.p1),m(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(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=pe&&(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:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const _e=.35;class ye{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.forEac
1h((n,o)=>{s&&L(n.el,(o+this._containerShiftIndex)*this.slideWidth),t&&n.slide&&n.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=w("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"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 l=(t+o)%o;l<=o/2?t=l:t=l-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 r=this.getCurrSlideX();if(!e)this.moveTo(r),this.updateCurrItem();else{s.animations.startSpring({isMainScroll:!0,start:this.x,end:r,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:h=>{this.moveTo(h)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let l=s.potentialIndex-s.currIndex;if(s.canLoop()){const h=(l+o)%o;h<=o/2?l=h:l=h-o}Math.abs(l)>1&&this.updateCurrItem()}return!!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=Math.abs(i),n;s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(o=>{var r;(r=o.slide)===null||r===void 0||r.destroy(),o.slide=void 0}));for(let o=0;o<s;o++)i>0?(n=this.itemHolders.shift(),n&&(this.itemHolders[2]=n,this._containerShiftIndex++,L(n.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(n,e.currIndex-s+o+2))):(n=this.itemHolders.pop(),n&&(this.itemHolders.unshift(n),this._containerShiftIndex--,L(n.el,this._containerShiftIndex*this.slideWidth),e.setContent(n,e.currIndex+s-o-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((o,r)=>{o.slide&&o.slide.setIsActive(r===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?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 i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*_e)}this.x=t,this.pswp.container&&L(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const ge={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},A=(a,t)=>t?a:ge[a];class ve{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||Jt(t))return;let i,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case A("Escape",o):e.options.escKey&&(i="close");break;case A("z",o):i="toggleZoom";break;case A("ArrowLeft",o):s="x";break;case A("ArrowUp",o):s="y";break;case A("ArrowRight",o):s="x",n=!0;break;case A("ArrowDown",o):n=!0,s="y";break;case A("Tab",o):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:r}=e;e.options.arrowKeys&&s==="x"&&e.getNumItems()>1?i=n?"next":"prev":r&&r.currZoomLevel>r.zoomLevels.fit&&(r.pan[s]+=n?-80:80,r.panTo(r.pan.x,r.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 we="cubic-bezier(.4,0,.22,1)";class Se{constructor(t){var e;this.props=t;const{target:i,onComplete:s,transform:n,onFinish:o=()=>{},duration:r=333,easing:l=we}=t;this.onFinish=o;const h=n?"transform":"opacity",c=(e=t[h])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{mt(i,h,r,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},r+500),i.style[h]=c},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),Yt(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const Pe=12,Ce=.75;class be{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||Ce,this._naturalFrequency=i||Pe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}
1easeFrame(t,e){let i=0,s;e/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*e)*n,this.velocity=i*-this._naturalFrequency+s*n;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*e),r=Math.sin(this._dampedFrequency*e);i=n*(t*o+s*r),this.velocity=i*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*r+this._dampedFrequency*s*o)}return i}}class xe{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:r=()=>{},dampingRatio:l,naturalFrequency:h}=t;this.onFinish=r;const c=new be(s,l,h);let d=Date.now(),p=e-i;const f=()=>{this._raf&&(p=c.easeFrame(p,Date.now()-d),Math.abs(p)<1&&Math.abs(c.velocity)<50?(n(i),o&&o(),this.onFinish()):(d=Date.now(),n(p+i),this._raf=requestAnimationFrame(f)))};this._raf=requestAnimationFrame(f)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class Ae{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new xe(t):new Se(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):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class Le{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 n=-s;t.deltaMode===1?n*=.05:n*=t.deltaMode?1:.002,n=2**n;const o=e.currZoomLevel*n;e.zoomTo(o,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}}function Ie(a){if(typeof a=="string")return a;
1if(!a||!a.isCustomSVG)return"";const t=a;let 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+=t.inner,e+="</svg>",e}class ze{constructor(t,e){var i;const s=e.name||e.className;let n=e.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(n=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:e});let o="";e.isButton?(o+="pswp__button ",o+=e.className||`pswp__button--${e.name}`):o+=e.className||`pswp__${e.name}`;let r=e.isButton?e.tagName||"button":e.tagName||"div";r=r.toLowerCase();const l=w(o,r);if(e.isButton){r==="button"&&(l.type="button");let{title:d}=e;const{ariaLabel:p}=e;typeof t.options[s+"Title"]=="string"&&(d=t.options[s+"Title"]),d&&(l.title=d);const f=p||d;f&&l.setAttribute("aria-label",f)}l.innerHTML=Ie(n),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=d=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(d,l,t)});const h=e.appendTo||"bar";let c=t.element;h==="bar"?(t.topBar||(t.topBar=w("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),c=t.topBar):(l.classList.add("pswp__hide-on-close"),h==="wrapper"&&(c=t.scrollWrap)),(i=c)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function vt(a,t,e){a.classList.add("pswp__button--arrow"),a.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?a.disabled=!(t.currIndex<t.getNumItems()-1):a.disabled=!(t.currIndex>0))})}const Te={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:vt},Ee={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:(a,t)=>{vt(a,t,!0)}},Oe={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"},De={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"},Me={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:(a,t)=>{let e,i=null;const s=(r,l)=>{a.classList.toggle("pswp__preloader--"+r,l)},n=r=>{e!==r&&(e=r,s("active",r))},o=()=>{var r;if(!((r=t.currSlide)!==null&&r!==void 0&&r.content.isLoading())){n(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;n(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",o),t.on("loadComplete",r=>{t.currSlide===r.slide&&o()}),t.ui&&(t.ui.updatePreloaderVisibility=o)}},Ze={name:"counter",order:5,onInit:(a,t)=>{t.on("change",()=>{a.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function ot(a,t){a.classList.toggle("pswp--zoomed-in",t)}class Re{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=[Oe,Te,Ee,De,Me,Ze],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new ze(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()){ot(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const o=s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;ot(t,o<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--cl
1ick-to-zoom")}}function Fe(a){const t=a.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function Be(a,t,e){const i=a.getBoundingClientRect(),s=i.width/t,n=i.height/e,o=s>n?s:n,r=(i.width-t*o)/2,l=(i.height-e*o)/2,h={x:i.left+r,y:i.top+l,w:t*o};return h.innerRect={w:i.width,h:i.height,x:r,y:l},h}function Ne(a,t,e){const i=e.dispatch("thumbBounds",{index:a,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let n,o;if(s&&e.options.thumbSelector!==!1){const r=e.options.thumbSelector||"img";o=s.matches(r)?s:s.querySelector(r)}return o=e.applyFilters("thumbEl",o,t,a),o&&(t.thumbCropped?n=Be(o,t.width||t.w||0,t.height||t.h||0):n=Fe(o)),e.applyFilters("thumbBounds",n,t,a)}let ke=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},$e=class{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]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:e,priority:i}),(n=this._filters[t])===null||n===void 0||n.sort((r,l)=>r.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{e[0]=s.fn.apply(this,e)}),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(s=this.pswp)===null||s===void 0||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>e!==s)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new ke(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(n=>{n.call(this,s)}),s}},He=class{constructor(t,e){if(this.element=w("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(j(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=B(0,0,t/250)):j(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},We=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=S.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 i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new He(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=w("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=w("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=(e=this.data.src)!==null&&e!==void 0?e:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=S.LOADING,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=S.LOADED,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===S.LOADED||this.state===S.ERROR)&&this.removePlaceholder())}onError(){this.state=S.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,
vendor: 5,285 bytes, line 1
1content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===S.LOADING,this)}isError(){return this.state===S.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(j(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!==S.ERROR,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=w("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=w("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===S.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||J())?(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&&!J()?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===S.LOADED||this.state===S.ERROR)&&this.removePlaceholder()))}};const Ue=5;function wt(a,t,e){const i=t.createContentFromData(a,e);let s;const{options:n}=t;if(n){s=new gt(n,a,-1);let o;t.pswp?o=t.pswp.viewportSize:o=_t(n,t);const r=yt(n,o,a,e);s.update(i.width,i.height,r)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function Ve(a,t){const e=t.getItemData(a);if(!t.dispatch("lazyLoadSlide",{index:a,itemData:e}).defaultPrevented)return wt(e,t,a)}class Ge{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,Ue),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=t===void 0?!0: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=Ve(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 e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}
1destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}let qe=class extends $e{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?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 We(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?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(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?te(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?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");if(n){var s;e.msrc=n.currentSrc||n.src,e.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return wt(t,this,e)}};const E=.003;class Ke{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;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(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=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var s;this._animateRootOpacity=(s=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>E,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(E)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var n;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(n=this.pswp.currSlide)===null||n===void 0?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(E)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(E)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(E)))):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&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;Qt(this._placeholder).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;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||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%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,
10,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:n}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const o=-n.x+(this._thumbBounds.x-i.x)+i.w,r=-n.y+(this._thumbBounds.y-i.y)+i.h,l=n.x-i.w,h=n.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",B(o,r)),this._animateTo(this._cropContainer2,"transform",B(l,h))):(L(this._cropContainer1,o,r),L(this._cropContainer2,l,h))}s&&(m(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){t.style[e]=i;return}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 je={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 Xe extends qe{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 ee,this.animations=new Ae,this.mainScroll=new ye(this),this.gestures=new fe(this),this.opener=new Ke(this),this.keyboard=new ve(this),this.contentLoader=new Ge(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 Le(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:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[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)),k(t,0,e-1)}
vendor: 17,272 bytes, line 1
1appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||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;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||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){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var s,n;let o=((s=(n=this.currSlide)===null||n===void 0?void 0:n.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(o=this.getLoopedIndex(o)),o===t&&(this.setContent(e,t,!0),i===1)){var r;this.currSlide=e.slide,(r=e.slide)===null||r===void 0||r.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 se(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=_t(this.options,this);!t&&F(e,this._prevViewportSize)||(m(this._prevViewportSize,e),this.dispatch("beforeResize"),m(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(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||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=w("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=w("pswp__bg","div",this.element),this.scrollWrap=w("pswp__scroll-wrap","section",this.element),this.container=w("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 Re(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return Ne(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),{...je,...t}}}function Z(a,t,e){const i=document.createElement(t);return a&&(i.className=a),e&&e.appendChild(i),i}function Ye(a,t,e){let i=`translate3d(${a}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function X(a,t,e){a.style.width=typeof t=="number"?`${t}px`:t,a.style.height=typeof e=="number"?`${e}px`:e}const P={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Qe(a){return"button"in a&&a.button===1||a.ctrlKey||a.metaKey||a.altKey||a.shiftKey}function R(a,t,e=document){let i=[];if(a instanceof Element)i=[a];else if(a instanceof NodeList||Array.isArray(a))i=Array.from(a);else{const s=typeof a=="string"?a:t;s&&(i=Array.from(e.querySelectorAll(s)))}return i}function Je(a){return typeof a=="function"&&a.prototype&&a.prototype.goTo}function at(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class ti{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class ei{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]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:e,priority:i}),(n=this._filters[t])===null||n===void 0||n.sort((r,l)=>r.priority-l.priority),(o=this.pswp)===null||o===void 0||o.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{e[0]=s.fn.apply(this,e)}),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(s=this.pswp)===null||s===void 0||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>e!==s)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new ti(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(n=>{n.call(this,s)}),s}}class ii{constructor(t,e){if(this.element=Z("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(X(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Ye(0,0,t/250)):X(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class si{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=P.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 i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new ii(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=Z("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=Z("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=(e=this.data.src)!==null&&e!==void 0?e:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=P.LOADING,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=P.LOADED,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===P.LOADED||this.state===P.ERROR)&&this.removePlaceholder())}onError(){this.state=P.ERROR,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===P.LOADING,this)}isError(){return this.state===P.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(X(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!==P.ERROR,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=Z("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=Z("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===P.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||at())?(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&&!at()?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===P.LOADED||this.state===P.ERROR)&&this.removePlaceholder()))}}function ni(a,t){if(a.getViewportSizeFn){const e=a.getViewportSizeFn(a,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function H(a,t,e,i,s){let n=0;if(t.paddingFn)n=t.paddingFn(e,i,s)[a];else if(t.padding)n=t.padding[a];else{const o="padding"+a[0].toUpperCase()+a.slice(1);t[o]&&(n=t[o])}return Number(n)||0}function oi(a,t,e,i){return{x:t.x-H("left",a,t,e,i)-H("right",a,t,e,i),y:t.y-H("top",a,t,e,i)-H("bottom",a,t,e,i)}}const rt=4e3;class ai{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,n<o?n:o),this.fill=Math.min(1,n>o?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 typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>rt&&(t=rt/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function St(a,t,e){const i=t.createContentFromData(a,e);let s;const{options:n}=t;if(n){s=new ai(n,a,-1);let o;t.pswp?o=t.pswp.viewportSize:o=ni(n,t);const r=oi(n,o,a,e);s.update(i.width,i.height,r)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function ri(a,t){const e=t.getItemData(a);if(!t.dispatch("lazyLoadSlide",{index:a,itemData:e}).defaultPrevented)return St(e,t,a)}class li extends ei{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?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 si(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?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(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?R(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?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");if(n){var s;e.msrc=n.currentSrc||n.src,e.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return St(t,this,e)}}class hi extends li{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){R(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Qe(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,s=R(this.options.children,this.options.childSelector,t.currentTarget).findIndex(n=>n===e||n.contains(e));return s!==-1?s: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 s=R(this.options.gallery);s[0]&&(e={gallery:s[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;
1if(Je(i.pswpModule))s.push(Promise.resolve(i.pswpModule));else{if(n==="string")throw new Error("pswpModule as string is no longer supported");if(n==="function")s.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&s.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=ri(t,this));const o=++this._uid;Promise.all(s).then(r=>{if(this.shouldOpen){const l=r[0];this._openPhotoswipe(l,o)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(s=>{var n;(n=this._listeners[s])===null||n===void 0||n.forEach(o=>{i.on(s,o)})}),Object.keys(this._filters).forEach(s=>{var n;(n=this._filters[s])===null||n===void 0||n.forEach(o=>{i.addFilter(s,o.fn,o.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;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={},R(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const ci={captionContent:".pswp-caption-content",type:"auto",horizontalEdgeThreshold:20,mobileCaptionOverlapRatio:.3,mobileLayoutBreakpoint:600,verticallyCenterImage:!1};class di{constructor(t,e){this.options={...ci,...e},this.lightbox=t,this.lightbox.on("init",()=>{this.pswp=this.lightbox.pswp,this.initCaption()})}initCaption(){const{pswp:t}=this;t.on("change",()=>{this.showCaption(this.pswp.currSlide)}),t.on("calcSlideSize",e=>this.onCalcSlideSize(e)),t.on("slideDestroy",e=>{e.slide.dynamicCaption&&(e.slide.dynamicCaption.element&&e.slide.dynamicCaption.element.remove(),delete e.slide.dynamicCaption)}),t.on("zoomPanUpdate",({slide:e})=>{if(t.opener.isOpen&&e.dynamicCaption){if(e.currZoomLevel>e.zoomLevels.initial?this.hideCaption(e):this.showCaption(e),e.dynamicCaption.element){let i=0;if(e.currZoomLevel<=e.zoomLevels.initial){const s=e.pan.y-e.bounds.center.y;Math.abs(s)>1&&(i=s)}this.setCaptionYOffset(e.dynamicCaption.element,i)}this.adjustPanArea(e,e.currZoomLevel)}}),t.on("beforeZoomTo",e=>{this.adjustPanArea(t.currSlide,e.destZoomLevel)}),t.on("tapAction",e=>{e.originalEvent.target.closest(".pswp__dynamic-caption")&&e.preventDefault()})}adjustPanArea(t,e){t.dynamicCaption&&t.dynamicCaption.adjustedPanAreaSize&&(e>t.zoomLevels.initial?(t.panAreaSize.x=t.dynamicCaption.originalPanAreaSize.x,t.panAreaSize.y=t.dynamicCaption.originalPanAreaSize.y):(t.panAreaSize.x=t.dynamicCaption.adjustedPanAreaSize.x,t.panAreaSize.y=t.dynamicCaption.adjustedPanAreaSize.y))}useMobileLayout(){const{mobileLayoutBreakpoint:t}=this.options;return typeof t=="function"?t.call(this):typeof t=="number"&&window.innerWidth<t}hideCaption(t){if(t.dynamicCaption&&!t.dynamicCaption.hidden){const e=t.dynamicCaption.element;if(!e)return;t.dynamicCaption.hidden=!0,e.classList.add("pswp__dynamic-caption--faded"),t.captionFadeTimeout&&clearTimeout(t.captionFadeTimeout),t.captionFadeTimeout=setTimeout(()=>{e.style.visibility="hidden",delete t.captionFadeTimeout},400)}}setCaptionYOffset(t,e){t.style.transform=`translateY(${e}px)`}showCaption(t){if(t.dynamicCaption&&t.dynamicCaption.hidden){const e=t.dynamicCaption.element;if(!e)return;t.dynamicCaption.hidden=!1,e.style.visibility="visible",clearTimeout(t.captionFadeTimeout),t.captionFadeTimeout=setTimeout(()=>{e.classList.remove("pswp__dynamic-caption--faded"),delete t.captionFadeTimeout},50)}}setCaptionPosition(t,e,i){const s=e<=this.options.horizontalEdgeThreshold;t.classList[s?"add":"remove"]("pswp__dynamic-caption--on-hor-edge"),t.style.left=e+"px",t.style.top=i+"px"}setCaptionWidth(t,e){e?t.style.width=e+"px":t.style.removeProperty("width")}setCaptionType(t,e){const i=t.dataset.pswpCaptionType;e!==i&&(t.classList.add("pswp__dynamic-caption--"+e),t.classList.remove("pswp__dynamic-caption--"+i),t.dataset.pswpCaptionType=e)}updateCaptionPosition(t){if(!t.dynamicCaption||!t.dynamicCaption.type||!t.dynamicCaption.element)return;if(t.dynamicCaption.type==="mobile"){this.setCaptionType(t.dynamicCaption.element,t.dynamicCaption.type),t.dynamicCaption.element.style.removeProperty("left"),t.dynamicCaption.element.style.removeProperty("top"),this.setCaptionWidth(t.dynamicCaption.element,!1);return}const e=t.zoomLevels.initial,i=Math.ceil(t.width*e),s=Math.ceil(t.height*e);this.setCaptionType(t.dynamicCaption.element,t.dynamicCaption.type),t.dynamicCaption.type==="aside"?(this.setCaptionPosition(t.dynamicCaption.element,t.bounds.center.x+i,t.bounds.center.y),this.setCaptionWidth(t.dynamicCaption.element,!1)):t.dynamicCaption.type==="below"&&(this.setCaptionPosition(t.dynamicCaption.element,t.bounds.center.x,t.bounds.center.y+s),this.setCaptionWidth(t.dynamicCaption.element,i))}onCalcSlideSize(t){const{slide:e}=t;let i,s;if(!e.dynamicCaption){e.dynamicCaption={element:void 0,type:!1,hidden:!1};const r=this.getCaptionHTML(e);if(!r)return;e.dynamicCaption.element=document.createElement("div"),e.dynamicCaption.element.className="pswp__dynamic-caption pswp__hide-on-close",e.dynamicCaption.element.innerHTML=r,this.pswp.dispatch("dynamicCaptionUpdateHTML",{c
1aptionElement:e.dynamicCaption.element,slide:e}),e.holderElement.appendChild(e.dynamicCaption.element)}if(!e.dynamicCaption.element)return;this.storeOriginalPanAreaSize(e),e.bounds.update(e.zoomLevels.initial),this.useMobileLayout()?(e.dynamicCaption.type="mobile",s=!0):this.options.type==="auto"?e.bounds.center.x>e.bounds.center.y?e.dynamicCaption.type="aside":e.dynamicCaption.type="below":e.dynamicCaption.type=this.options.type;const n=Math.ceil(e.width*e.zoomLevels.initial),o=Math.ceil(e.height*e.zoomLevels.initial);if(this.setCaptionType(e.dynamicCaption.element,e.dynamicCaption.type),e.dynamicCaption.type==="aside"){this.setCaptionWidth(e.dynamicCaption.element,!1),i=this.measureCaptionSize(e.dynamicCaption.element,t.slide);const r=i.x,l=n+e.bounds.center.x;e.panAreaSize.x-l<=r&&(e.panAreaSize.x-=r,this.recalculateZoomLevelAndBounds(e))}else if(e.dynamicCaption.type==="below"||s){this.setCaptionWidth(e.dynamicCaption.element,s?this.pswp.viewportSize.x:n),i=this.measureCaptionSize(e.dynamicCaption.element,t.slide);const r=i.y;if(this.options.verticallyCenterImage)e.panAreaSize.y-=r,this.recalculateZoomLevelAndBounds(e);else{const l=o+e.bounds.center.y,h=e.panAreaSize.y-l,c=e.panAreaSize.y;if(h<=r){e.panAreaSize.y-=Math.min((r-h)*2,r),this.recalculateZoomLevelAndBounds(e);const d=e.panAreaSize.x*this.options.mobileCaptionOverlapRatio/2;s&&e.bounds.center.x>d&&(e.panAreaSize.y=c,this.recalculateZoomLevelAndBounds(e))}}}this.storeAdjustedPanAreaSize(e),this.updateCaptionPosition(e)}measureCaptionSize(t,e){const i=t.getBoundingClientRect();return this.pswp.dispatch("dynamicCaptionMeasureSize",{captionEl:t,slide:e,captionSize:{x:i.width,y:i.height}}).captionSize}recalculateZoomLevelAndBounds(t){t.zoomLevels.update(t.width,t.height,t.panAreaSize),t.bounds.update(t.zoomLevels.initial)}storeAdjustedPanAreaSize(t){t.dynamicCaption&&(t.dynamicCaption.adjustedPanAreaSize||(t.dynamicCaption.adjustedPanAreaSize={}),t.dynamicCaption.adjustedPanAreaSize.x=t.panAreaSize.x,t.dynamicCaption.adjustedPanAreaSize.y=t.panAreaSize.y)}storeOriginalPanAreaSize(t){t.dynamicCaption&&(t.dynamicCaption.originalPanAreaSize||(t.dynamicCaption.originalPanAreaSize={}),t.dynamicCaption.originalPanAreaSize.x=t.panAreaSize.x,t.dynamicCaption.originalPanAreaSize.y=t.panAreaSize.y)}getCaptionHTML(t){if(typeof this.options.captionContent=="function")return this.options.captionContent.call(this,t);const e=t.data.element;let i="";if(e){const s=e.querySelector(this.options.captionContent);if(s)i=s.innerHTML;else{const n=e.querySelector("img");n&&(i=n.getAttribute("alt"))}}return i}}async function pi(a){const t=ui(a);try{const e=await fetch(t,{method:"GET",mode:"cors",headers:{Range:"bytes=0-32"}}),s=(e.headers.get("Content-Type")??"").includes("image/png")||t.toLowerCase().includes("fm=png");if(!e.ok||!s)throw new Error("PNG header fetch unsupported or not PNG");const n=await e.arrayBuffer();if(n.byteLength<24)throw new Error("PNG header too short");const o=new DataView(n);if(!(o.getUint8(0)===137&&o.getUint8(1)===80&&o.getUint8(2)===78&&o.getUint8(3)===71&&o.getUint8(4)===13&&o.getUint8(5)===10&&o.getUint8(6)===26&&o.getUint8(7)===10))throw new Error("Not PNG signature");const l=o.getUint32(16,!1),h=o.getUint32(20,!1);if(l>0&&h>0)return{width:l,height:h};throw new Error("Invalid IHDR")}catch{const{srcW:e,srcH:i}=await mi(a),s=fi(a);return _i(e,i,s)}}function ui(a){const t=new URL(a);return t.searchParams.delete("auto"),t.searchParams.set("fm","png"),t.searchParams.delete("q"),t.toString()}async function mi(a){const t=new URL(a);["w","h","fit","ar","dpr","auto","fm"].forEach(r=>t.searchParams.delete(r)),t.searchParams.set("fm","json");const i=await fetch(t.toString(),{method:"GET",mode:"cors"});if(!i.ok)throw new Error("Failed to fetch fm=json");const s=await i.json(),n=Number(s?.PixelWidth??s?.OutputPixelWidth),o=Number(s?.PixelHeight??s?.OutputPixelHeight);if(!Number.isFinite(n)||!Number.isFinite(o))throw new Error("Invalid json meta");return{srcW:n,srcH:o}}function fi(a){const t=new URL(a),e=h=>{const c=t.searchParams.get(h);if(c==null)return;const d=Number(c);return Number.isFinite(d)?d:void 0},i=e("w"),s=e("h"),n=t.searchParams.get("ar")??void 0,o=n?n.includes(":")?(()=>{const[h,c]=n.split(":").map(Number);return h!=null&&c!=null&&h>0&&c>0?h/c:void 0})():Number(n):void 0,r=e("dpr"),l=t.searchParams.get("fit")??void 0;return{w:i,h:s,ar:o,dpr:r,fit:l}}function _i(a,t,e){const i=e.ar&&isFinite(e.ar)&&e.ar>0?e.ar:a/t,s=Math.max(1,e.dpr??1),n=e.fit??"clip";let o,r;if(e.w&&e.h){const p=e.w,f=e.h;switch(n){case"scale":o=p,r=f;break;case"crop":case"fill":case"fillmax":case"facearea":case"faces":o=p,r=f;break;case"min":{const g=Math.max(p/a,f/t);o=Math.floor(a*g),r=Math.floor(t*g)}break;default:{const g=Math.min(p/a,f/t);o=Math.floor(a*g),r=Math.floor(t*g)}break}}else e.w&&!e.h?(o=e.w,r=Math.floor(e.w/i)):!e.w&&e.h?(r=e.h,o=Math.floor(e.h*i)):(o=a,r=t);let l=Math.round(o*s),h=Math.round(r*s);const c=8192,d=Math.min(1,c/l,c/h);return d<1&&(l=Math.floor(l*d),h=Math.floor(h*d)),l=Math.max(1,l),h=Math.max(1,h),{width:l,height:h}}const G={fit:"max",w:2e3,h:2e3};function yi(a,t){const e=lt(null),i=Ct(async()=>await Promise.all(t.map(async o=>{const r=typeof o=="object"&&"caption"in o&&o.caption!=null?o.caption:null;if(typeof o=="object"&&"width"in o&&"height"in o&&o.width!=null&&o.height!=null)return{src:$(o.src,G),width:o.width,height:o.height,caption:r};
1const l=typeof o=="string"?o:o.src,h=await pi($(l,G));return{src:$(l,G),width:h.width,height:h.height,caption:r}})),null);bt(()=>{!a.value||e.value||(e.value=new hi({gallery:a.value,children:"a",showHideAnimationType:"fade",imageClickAction:"zoom",bgOpacity:1,pswpModule:Xe}),e.value.addFilter("placeholderSrc",(n,o)=>n&&o.data.src&&o.data.w&&o.data.h?$(o.data.src,{w:o.data.w,h:o.data.h,q:1,blur:1e3}):n),e.value.on("uiRegister",()=>{const n=e.value?.pswp;n&&(n.next=()=>s(n.potentialIndex+1,!0),n.prev=()=>s(n.potentialIndex-1,!0))}),new di(e.value,{type:"below"}),e.value.init())}),xt(()=>{e.value&&(e.value.destroy(),e.value=null)});function s(n,o=!1){if(!e.value||!e.value.pswp)return;const r=e.value.pswp;n=r.getLoopedIndex(n),r.mainScroll.moveIndexBy(n-r.potentialIndex,o)&&r.dispatch("afterGoto")}return{instance:e,resolvedImages:i}}const gi=["href","data-pswp-width","data-pswp-height","aria-label"],vi=["innerHTML"],wi=N({__name:"BacknumberPageDetailThumbnails",props:{data:{}},setup(a){const e=a.data.map(n=>({src:n.url,caption:n.caption})),i=lt(null),{resolvedImages:s}=yi(i,e);return(n,o)=>(u(),_("div",{ref_key:"elGallery",ref:i,class:"BacknumberPageDetailThumbnails"},[b(s)?(u(),I(Wt,{key:0},{default:x(()=>[(u(!0),_(O,null,ht(b(s),(r,l)=>(u(),I(Ut,{key:l},{default:x(()=>[y("a",{href:r.src,"data-pswp-width":r.width,"data-pswp-height":r.height,"aria-label":`画像${l+1}を見る`},[v(Vt,{image:r.src},{default:x(()=>[r.caption?(u(),_("span",{key:0,class:"pswp-caption-content",innerHTML:b(ct)(r.caption)},null,8,vi)):C("",!0)]),_:2},1032,["image"])],8,gi)]),_:2},1024))),128))]),_:1})):C("",!0)],512))}}),Si=U(wi,[["__scopeId","data-v-a92889fc"]]),Pi={class:"items"},Ci={class:"chapter-title"},bi={key:0,class:"chapter-author"},xi={key:1,class:"chapter-page"},Ai={key:2,class:"chapter-article","aria-hidden":"true"},Li=N({__name:"BacknumberPageDetailTocItem",props:{data:{},headingTag:{}},setup(a){const t=a;function e(i){switch(i){case"section1":return"section lv1";case"section2":return"section lv2";case"chapter":return"chapter";default:return}}return(i,s)=>{const n=At("BacknumberPageDetailTocItem",!0),o=zt;return u(),_("ul",Pi,[(u(!0),_(O,null,ht(t.data,(r,l)=>(u(),_("li",{key:l,class:Lt(e(r.type))},[b(Ft)(r.type)?(u(),_(O,{key:0},[v($t,{tag:t.headingTag,class:"section-title"},{default:x(()=>[W(T(r.title),1)]),_:2},1032,["tag"]),r.items&&r.items.length?(u(),I(n,{key:0,data:r.items,"heading-tag":b(It)(t.headingTag)},null,8,["data","heading-tag"])):C("",!0)],64)):(u(),_(O,{key:1},[y("div",Ci,[y("p",null,[r.relatedMagazine?(u(),I(o,{key:0,to:b(Y)(r.relatedMagazine)},{default:x(()=>[W(T(r.title),1)]),_:2},1032,["to"])):(u(),_(O,{key:1},[W(T(r.title),1)],64))])]),r.author?(u(),_("div",bi,[y("p",null,T(r.author),1)])):C("",!0),r.page?(u(),_("div",xi,[y("p",null,T(r.page),1)])):C("",!0),r.relatedMagazine?(u(),_("div",Ai,[v(o,{to:b(Y)(r.relatedMagazine),tabindex:"-1"},{default:x(()=>[v(dt,{name:"icon:article",class:"icon-article"})]),_:1},8,["to"])])):C("",!0)],64))],2))),128))])}}}),Ii=U(Li,[["__scopeId","data-v-8640cad1"]]),zi={class:"BacknumberPageDetailTableOfContents"},Ti={class:"header"},Ei={class:"note","aria-hidden":"true"},Oi={key:0,class:"toc"},Di=N({__name:"BacknumberPageDetailToc",props:{data:{}},setup(a){const t=a;return(e,i)=>(u(),_("div",zi,[y("div",Ti,[i[1]||(i[1]=y("h2",{class:"heading"}," 目次 ",-1)),y("p",Ei,[y("small",null,[v(dt,{name:"icon:article",class:"icon-article"}),i[0]||(i[0]=W("Web記事あり",-1))])])]),t.data.length?(u(),_("div",Oi,[v(Ii,{data:t.data,"heading-tag":"h3"},null,8,["data"])])):C("",!0)]))}}),Mi=U(Di,[["__scopeId","data-v-608a0531"]]),Zi={class:"BacknumberPageDetail"},Ri={class:"header"},Fi={class:"save-button"},Bi={class:"overview"},Ni={key:0,class:"thumbnails"},ki={key:2,class:"toc"},$i={class:"note"},Hi=["innerHTML"],Wi={key:3,class:"tag"},Ui=N({__name:"BacknumberPageDetail",props:{data:{}},setup(a){const t=a,e=pt(),i={breadcrumb:[{to:"/",text:"HOME"},{to:{name:"backnumber"},text:"BACK NUMBER"},{text:q(D(`${t.data.issueNumber} ${t.data.title}`),60,!0)}]};return(s,n)=>{const o=Ot,r=kt;return u(),I(r,Tt(Et(i)),{default:x(()=>[v(Dt,null,{default:x(()=>[y("div",Zi,[y("div",Ri,[n[0]||(n[0]=y("p",{class:"heading"}," BACK NUMBER ",-1)),y("div",Fi,[v(qt,{id:t.data.id,"is-active":t.data.clipFlg},null,8,["id","is-active"])])]),y("div",Bi,[v(Kt,{data:t.data,"title-tag":"h1","is-detail-page":""},null,8,["data"])]),t.data.images.length?(u(),_("div",Ni,[v(Si,{data:t.data.images},null,8,["data"])])):C("",!0),b(e).user?.permissions.readPaidBacknumberFlg?C("",!0):(u(),I(Ht,{key:1,class:"gpt-ad"},{default:x(()=>[v(o,{"unit-name":"BACKNUMBER_CONTENTS1_PC"}),v(o,{"unit-name":"BACKNUMBER_CONTENTS1_SP"})]),_:1})),t.data.tableOfContents.length?(u(),_("div",ki,[v(Mi,{data:t.data.tableOfContents},null,8,["data"])])):C("",!0),y("div",$i,[y("p",{innerHTML:b(ct)(t.data.note)},null,8,Hi)]),t.data.tags.length?(u(),_("div",Wi,[v(Gt,{"wrapper-tag":"aside",data:t.data.tags,type:"backnumber"},null,8,["data"])])):C("",!0)])]),_:1})]),_:1},16)}}}),Vi=U(Ui,[["__scopeId","data-v-7be469fd"]]),hs=N({__name:"index",async setup(a){let t,e;const i=pt(),s=Bt("id",{asNumber:!0});if(!s.value)throw V({statusCode:404,fatal:!0});const{data:n,error:o}=([t,e]=Mt(()=>Nt().fetch(s.value)),t=await t,e(),t);if(o.value)throw V({statusCode:o.value.statusCode,fatal:!0});if(n.value==null)throw V({statusCode:500,fatal:!0});return Zt({title:D(`${n.value.issueNumber} ${n.value.title}`),ogTitle:D(`${n.value.issueNumber} ${n.value.title}`),description:q(D(n.value.explanation),90),ogDescription:q(D(n.value.explanation),90),ogImage:Rt(n.value.mainImage.url)}),jt(i.user?.permissions.readPaidBacknumberFlg?Q.BACKNUMBER_DETAIL_PREMIUM_PLUS_MEMBER:Q.BACKNUMBER_DETAIL),(r,l)=>
1b(n)?(u(),I(Vi,{key:0,data:b(n)},null,8,["data"])):C("",!0)}});export{hs as default};

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.