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AAO,CAAC,EAAEC,SAAS,CAACC,MAAM,IAAID,SAAS,CAACC,MAAM,CAACC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAKMC,eAAe;EACjB;AACJ;AACA;AACA;EACI,SAAAA,gBAAYC,IAAI,EAAEC,OAAO,EAAE;IAAAC,eAAA,OAAAH,eAAA;IACvB,IAAI,CAACC,IAAI,GAAGA,IAAI;I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AAQ,CAAC9B,YAAY,CAAC,aAAa,EAAEorB,WAAW,EAAEvpB,QAAQ,EAAEE,KAAK,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAJA,IAKMxD,eAAe;EACjB;AACJ;AACA;AACA;EACI,SAAAA,gBAAYC,IAAI,EAAEC,OAAO,EAAE;IAAAC,eAAA,OAAAH,eAAA;IACvB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAIC,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AAI,CAACpC,SAAS,EAAE;QACjB5gB,MAAM,CAAClQ,KAAK,CAACuK,IAAI,CAAC,GAAG7K,SAAS;QAC9B;MACJ;MAEA,IAAQyX,UAAU,GAAK,IAAI,CAAChU,IAAI,CAAxBgU,UAAU;MAClB;MACA,IAAMgc,SAAS,GAAG;QACd/f,QAAQ,EAAE,IAAI,CAAC0d,SAAS;QACxBhZ,MAAM,EAAE,IAAI,CAAC3U,IAAI,CAACC,OAAO,CAAC0U,MAAM;QAChCD,UAAU,EAAE,SAAAA,WAAA,EAAM;UACd,IAAI,CAACV,UAAU,CAACwS,gBAAgB,CAACvoB,MAAM,EAAE;YACrC8xB,OAAI,CAACN,oBAAoB,CAAC,CAAC;UAC/B;QACJ,CAAC;QACD1iB,MAAM,EAANA;MACJ,CAAC;MACDijB,SAAS,CAAC5oB,IAAI,CAAC,GAAG7K,SAAS;MAC3ByX,UAAU,CAACO,eAAe,CAACyb,SAAS,CAAC;IACzC;EAAC;AAAA;AAGL;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EACvD/F,OAAO,CAACmL,MAAM,GAAG,QAAQ;EACzBnL,OAAO,CAACyZ,KAAK,CAAC,CAAC;AAClB,C","sources":["webpack://prime1studio-ec/./app_prime1studio_ec/cartridges/app_prime1studio_ec/cartridge/client/default/js/photoswipe/photoswipe-lightbox.esm.js","webpack://prime1studio-ec/./app_prime1studio_ec/cartridges/app_prime1studio_ec/cartridge/client/default/js/photoswipe/photoswipe.esm.js","webpack://prime1studio-ec/webpack/bootstrap","webpack://prime1studio-ec/webpack/runtime/define property getters","webpack://prime1studio-ec/webpack/runtime/hasOwnProperty shorthand","webpack://prime1studio-ec/webpack/runtime/make namespace object","webpack://prime1studio-ec/./app_prime1studio_ec/cartridges/app_prime1studio_ec/cartridge/client/default/js/product_gallery.js"],"sourcesContent":["/*!\n  * PhotoSwipe Lightbox 5.3.3 - https://photoswipe.com\n  * (c) 2022 Dmytro Semenov\n  */\n/** @typedef {import('../photoswipe.js').Point} Point */\n\n/** @typedef {undefined | null | false | '' | 0} Falsy */\n/** @typedef {keyof HTMLElementTagNameMap} HTMLElementTagName */\n\n/**\n * @template {HTMLElementTagName | Falsy} [T=\"div\"]\n * @template {Node | undefined} [NodeToAppendElementTo=undefined]\n * @param {string=} className\n * @param {T=} [tagName]\n * @param {NodeToAppendElementTo=} appendToEl\n * @returns {T extends HTMLElementTagName ? HTMLElementTagNameMap[T] : HTMLElementTagNameMap['div']}\n */\nfunction createElement(className, tagName, appendToEl) {\n    const el = document.createElement(tagName || 'div');\n    if (className) {\n        el.className = className;\n    }\n    if (appendToEl) {\n        appendToEl.appendChild(el);\n    }\n    // @ts-expect-error\n    return el;\n}\n\n/**\n * Get transform string\n *\n * @param {number} x\n * @param {number=} y\n * @param {number=} scale\n */\nfunction toTransformString(x, y, scale) {\n    let propValue = `translate3d(${\n        x}px,${y || 0}px` +\n    ',0)';\n\n    if (scale !== undefined) {\n        propValue += ` scale3d(${\n            scale},${scale\n        },1)`;\n    }\n\n    return propValue;\n}\n\n/**\n * Apply width and height CSS properties to element\n *\n * @param {HTMLElement} el\n * @param {string | number} w\n * @param {string | number} h\n */\nfunction setWidthHeight(el, w, h) {\n    el.style.width = (typeof w === 'number') ? (`${w}px`) : w;\n    el.style.height = (typeof h === 'number') ? (`${h}px`) : h;\n}\n\n/** @typedef {LOAD_STATE[keyof LOAD_STATE]} LoadState */\n/** @type {{ IDLE: 'idle'; LOADING: 'loading'; LOADED: 'loaded'; ERROR: 'error' }} */\nconst LOAD_STATE = {\n    IDLE: 'idle',\n    LOADING: 'loading',\n    LOADED: 'loaded',\n    ERROR: 'error',\n};\n\n/**\n * Check if click or keydown event was dispatched\n * with a special key or via mouse wheel.\n *\n * @param {MouseEvent | KeyboardEvent} e\n */\nfunction specialKeyUsed(e) {\n    if (e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) {\n        return true;\n    }\n}\n\n/**\n * Parse `gallery` or `children` options.\n *\n * @param {import('../photoswipe.js').ElementProvider} option\n * @param {string=} legacySelector\n * @param {HTMLElement | Document} [parent]\n * @returns HTMLElement[]\n */\nfunction getElementsFromOption(option, legacySelector, parent = document) {\n    /** @type {HTMLElement[]} */\n    let elements = [];\n\n    if (option instanceof Element) {\n        elements = [option];\n    } else if (option instanceof NodeList || Array.isArray(option)) {\n        elements = Array.from(option);\n    } else {\n        const selector = typeof option === 'string' ? option : legacySelector;\n        if (selector) {\n            elements = Array.from(parent.querySelectorAll(selector));\n        }\n    }\n\n    return elements;\n}\n\n/**\n * Check if variable is PhotoSwipe class\n *\n * @param {any} fn\n */\nfunction isPswpClass(fn) {\n    return typeof fn === 'function' &&\n    fn.prototype &&\n    fn.prototype.goTo;\n}\n\n/**\n * Check if browser is Safari\n *\n * @returns {boolean}\n */\nfunction isSafari() {\n    return !!(navigator.vendor && navigator.vendor.match(/apple/i));\n}\n\n/** @typedef {import('../lightbox/lightbox.js').default} PhotoSwipeLightbox */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../photoswipe.js').DataSource} DataSource */\n/** @typedef {import('../ui/ui-element.js').UIElementData} UIElementData */\n/** @typedef {import('../slide/content.js').default} ContentDefault */\n/** @typedef {import('../slide/slide.js').default} Slide */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n/** @typedef {import('../slide/zoom-level.js').default} ZoomLevel */\n/** @typedef {import('../slide/get-thumb-bounds.js').Bounds} Bounds */\n\n/**\n * Allow adding an arbitrary props to the Content\n * https://photoswipe.com/custom-content/#using-webp-image-format\n * @typedef {ContentDefault & Record<string, any>} Content\n */\n/** @typedef {{ x?: number; y?: number }} Point */\n\n/**\n * @typedef {Object} PhotoSwipeEventsMap https://photoswipe.com/events/\n *\n *\n * https://photoswipe.com/adding-ui-elements/\n *\n * @prop {undefined} uiRegister\n * @prop {{ data: UIElementData }} uiElementCreate\n *\n *\n * https://photoswipe.com/events/#initialization-events\n *\n * @prop {undefined} beforeOpen\n * @prop {undefined} firstUpdate\n * @prop {undefined} initialLayout\n * @prop {undefined} change\n * @prop {undefined} afterInit\n * @prop {undefined} bindEvents\n *\n *\n * https://photoswipe.com/events/#opening-or-closing-transition-events\n *\n * @prop {undefined} openingAnimationStart\n * @prop {undefined} openingAnimationEnd\n * @prop {undefined} closingAnimationStart\n * @prop {undefined} closingAnimationEnd\n *\n *\n * https://photoswipe.com/events/#closing-events\n *\n * @prop {undefined} close\n * @prop {undefined} destroy\n *\n *\n * https://photoswipe.com/events/#pointer-and-gesture-events\n *\n * @prop {{ originalEvent: PointerEvent }} pointerDown\n * @prop {{ originalEvent: PointerEvent }} pointerMove\n * @prop {{ originalEvent: PointerEvent }} pointerUp\n * @prop {{ bgOpacity: number }} pinchClose can be default prevented\n * @prop {{ panY: number }} verticalDrag can be default prevented\n *\n *\n * https://photoswipe.com/events/#slide-content-events\n *\n * @prop {{ content: Content }} contentInit\n * @prop {{ content: Content; isLazy: boolean }} contentLoad can be default prevented\n * @prop {{ content: Content; isLazy: boolean }} contentLoadImage can be default prevented\n * @prop {{ content: Content; slide: Slide; isError?: boolean }} loadComplete\n * @prop {{ content: Content; slide: Slide }} loadError\n * @prop {{ content: Content; width: number; height: number }} contentResize can be default prevented\n * @prop {{ content: Content; width: number; height: number; slide: Slide }} imageSizeChange\n * @prop {{ content: Content }} contentLazyLoad can be default prevented\n * @prop {{ content: Content }} contentAppend can be default prevented\n * @prop {{ content: Content }} contentActivate can be default prevented\n * @prop {{ content: Content }} contentDeactivate can be default prevented\n * @prop {{ content: Content }} contentRemove can be default prevented\n * @prop {{ content: Content }} contentDestroy can be default prevented\n *\n *\n * undocumented\n *\n * @prop {{ point: Point; originalEvent: PointerEvent }} imageClickAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} bgClickAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} tapAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} doubleTapAction can be default prevented\n *\n * @prop {{ originalEvent: KeyboardEvent }} keydown can be default prevented\n * @prop {{ x: number; dragging: boolean }} moveMainScroll\n * @prop {{ slide: Slide }} firstZoomPan\n * @prop {{ slide: Slide, data: SlideData, index: number }} gettingData\n * @prop {undefined} beforeResize\n * @prop {undefined} resize\n * @prop {undefined} viewportSize\n * @prop {undefined} updateScrollOffset\n * @prop {{ slide: Slide }} slideInit\n * @prop {{ slide: Slide }} afterSetContent\n * @prop {{ slide: Slide }} slideLoad\n * @prop {{ slide: Slide }} appendHeavy can be default prevented\n * @prop {{ slide: Slide }} appendHeavyContent\n * @prop {{ slide: Slide }} slideActivate\n * @prop {{ slide: Slide }} slideDeactivate\n * @prop {{ slide: Slide }} slideDestroy\n * @prop {{ destZoomLevel: number, centerPoint: Point, transitionDuration: number | false }} beforeZoomTo\n * @prop {{ slide: Slide }} zoomPanUpdate\n * @prop {{ slide: Slide }} initialZoomPan\n * @prop {{ slide: Slide }} calcSlideSize\n * @prop {undefined} resolutionChanged\n * @prop {{ originalEvent: WheelEvent }} wheel can be default prevented\n * @prop {{ content: Content }} contentAppendImage can be default prevented\n * @prop {{ index: number; itemData: SlideData }} lazyLoadSlide can be default prevented\n * @prop {undefined} lazyLoad\n * @prop {{ slide: Slide }} calcBounds\n * @prop {{ zoomLevels: ZoomLevel, slideData: SlideData }} zoomLevelsUpdate\n *\n *\n * legacy\n *\n * @prop {undefined} init\n * @prop {undefined} initialZoomIn\n * @prop {undefined} initialZoomOut\n * @prop {undefined} initialZoomInEnd\n * @prop {undefined} initialZoomOutEnd\n * @prop {{ dataSource: DataSource, numItems: number }} numItems\n * @prop {{ itemData: SlideData; index: number }} itemData\n * @prop {{ index: number, itemData: SlideData, instance: PhotoSwipe }} thumbBounds\n */\n\n/**\n * @typedef {Object} PhotoSwipeFiltersMap https://photoswipe.com/filters/\n *\n * @prop {(numItems: number, dataSource: DataSource) => number} numItems\n * Modify the total amount of slides. Example on Data sources page.\n * https://photoswipe.com/filters/#numitems\n *\n * @prop {(itemData: SlideData, index: number) => SlideData} itemData\n * Modify slide item data. Example on Data sources page.\n * https://photoswipe.com/filters/#itemdata\n *\n * @prop {(itemData: SlideData, element: HTMLElement, linkEl: HTMLAnchorElement) => SlideData} domItemData\n * Modify item data when it's parsed from DOM element. Example on Data sources page.\n * https://photoswipe.com/filters/#domitemdata\n *\n * @prop {(clickedIndex: number, e: MouseEvent, instance: PhotoSwipeLightbox) => number} clickedIndex\n * Modify clicked gallery item index.\n * https://photoswipe.com/filters/#clickedindex\n *\n * @prop {(placeholderSrc: string | false, content: Content) => string | false} placeholderSrc\n * Modify placeholder image source.\n * https://photoswipe.com/filters/#placeholdersrc\n *\n * @prop {(isContentLoading: boolean, content: Content) => boolean} isContentLoading\n * Modify if the content is currently loading.\n * https://photoswipe.com/filters/#iscontentloading\n *\n * @prop {(isContentZoomable: boolean, content: Content) => boolean} isContentZoomable\n * Modify if the content can be zoomed.\n * https://photoswipe.com/filters/#iscontentzoomable\n *\n * @prop {(useContentPlaceholder: boolean, content: Content) => boolean} useContentPlaceholder\n * Modify if the placeholder should be used for the content.\n * https://photoswipe.com/filters/#usecontentplaceholder\n *\n * @prop {(isKeepingPlaceholder: boolean, content: Content) => boolean} isKeepingPlaceholder\n * Modify if the placeholder should be kept after the content is loaded.\n * https://photoswipe.com/filters/#iskeepingplaceholder\n *\n *\n * @prop {(contentErrorElement: HTMLElement, content: Content) => HTMLElement} contentErrorElement\n * Modify an element when the content has error state (for example, if image cannot be loaded).\n * https://photoswipe.com/filters/#contenterrorelement\n *\n * @prop {(element: HTMLElement, data: UIElementData) => HTMLElement} uiElement\n * Modify a UI element that's being created.\n * https://photoswipe.com/filters/#uielement\n *\n * @prop {(thumbnail: HTMLElement, itemData: SlideData, index: number) => HTMLElement} thumbEl\n * Modify the thubmnail element from which opening zoom animation starts or ends.\n * https://photoswipe.com/filters/#thumbel\n *\n * @prop {(thumbBounds: Bounds, itemData: SlideData, index: number) => Bounds} thumbBounds\n * Modify the thubmnail bounds from which opening zoom animation starts or ends.\n * https://photoswipe.com/filters/#thumbbounds\n *\n * @prop {(srcsetSizesWidth: number, content: Content) => number} srcsetSizesWidth\n *\n */\n\n/**\n * @template {keyof PhotoSwipeFiltersMap} T\n * @typedef {{ fn: PhotoSwipeFiltersMap[T], priority: number }} Filter<T>\n */\n\n/**\n * @template {keyof PhotoSwipeEventsMap} T\n * @typedef {PhotoSwipeEventsMap[T] extends undefined ? PhotoSwipeEvent<T> : PhotoSwipeEvent<T> & PhotoSwipeEventsMap[T]} AugmentedEvent\n */\n\n/**\n * @template {keyof PhotoSwipeEventsMap} T\n * @typedef {(event: AugmentedEvent<T>) => void} EventCallback<T>\n */\n\n/**\n * Base PhotoSwipe event object\n *\n * @template {keyof PhotoSwipeEventsMap} T\n */\nclass PhotoSwipeEvent {\n    /**\n   * @param {T} type\n   * @param {PhotoSwipeEventsMap[T]} [details]\n   */\n    constructor(type, details) {\n        this.type = type;\n        if (details) {\n            Object.assign(this, details);\n        }\n    }\n\n    preventDefault() {\n        this.defaultPrevented = true;\n    }\n}\n\n/**\n * PhotoSwipe base class that can listen and dispatch for events.\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox, extended by base.js\n */\nclass Eventable {\n    constructor() {\n    /**\n     * @type {{ [T in keyof PhotoSwipeEventsMap]?: ((event: AugmentedEvent<T>) => void)[] }}\n     */\n        this._listeners = {};\n\n        /**\n     * @type {{ [T in keyof PhotoSwipeFiltersMap]?: Filter<T>[] }}\n     */\n        this._filters = {};\n\n        /** @type {PhotoSwipe=} */\n        this.pswp = undefined;\n\n        /** @type {PhotoSwipeOptions} */\n        this.options = undefined;\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {PhotoSwipeFiltersMap[T]} fn\n   * @param {number} priority\n   */\n    addFilter(name, fn, priority = 100) {\n        if (!this._filters[name]) {\n            this._filters[name] = [];\n        }\n\n        this._filters[name].push({ fn, priority });\n        this._filters[name].sort((f1, f2) => f1.priority - f2.priority);\n\n        if (this.pswp) {\n            this.pswp.addFilter(name, fn, priority);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {PhotoSwipeFiltersMap[T]} fn\n   */\n    removeFilter(name, fn) {\n        if (this._filters[name]) {\n            // @ts-expect-error\n            this._filters[name] = this._filters[name].filter((filter) => (filter.fn !== fn));\n        }\n\n        if (this.pswp) {\n            this.pswp.removeFilter(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {Parameters<PhotoSwipeFiltersMap[T]>} args\n   * @returns {Parameters<PhotoSwipeFiltersMap[T]>[0]}\n   */\n    applyFilters(name, ...args) {\n        if (this._filters[name]) {\n            this._filters[name].forEach((filter) => {\n                // @ts-expect-error\n                args[0] = filter.fn.apply(this, args);\n            });\n        }\n        return args[0];\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {EventCallback<T>} fn\n   */\n    on(name, fn) {\n        if (!this._listeners[name]) {\n            this._listeners[name] = [];\n        }\n        this._listeners[name].push(fn);\n\n        // When binding events to lightbox,\n        // also bind events to PhotoSwipe Core,\n        // if it's open.\n        if (this.pswp) {\n            this.pswp.on(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {EventCallback<T>} fn\n   */\n    off(name, fn) {\n        if (this._listeners[name]) {\n            // @ts-expect-error\n            this._listeners[name] = this._listeners[name].filter((listener) => (fn !== listener));\n        }\n\n        if (this.pswp) {\n            this.pswp.off(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {PhotoSwipeEventsMap[T]} [details]\n   * @returns {AugmentedEvent<T>}\n   */\n    dispatch(name, details) {\n        if (this.pswp) {\n            return this.pswp.dispatch(name, details);\n        }\n\n        const event = /** @type {AugmentedEvent<T>} */ (new PhotoSwipeEvent(name, details));\n\n        if (!this._listeners) {\n            return event;\n        }\n\n        if (this._listeners[name]) {\n            this._listeners[name].forEach((listener) => {\n                listener.call(this, event);\n            });\n        }\n\n        return event;\n    }\n}\n\nclass Placeholder {\n    /**\n   * @param {string | false} imageSrc\n   * @param {HTMLElement} container\n   */\n    constructor(imageSrc, container) {\n    // Create placeholder\n    // (stretched thumbnail or simple div behind the main image)\n        this.element = createElement(\n            'pswp__img pswp__img--placeholder',\n            imageSrc ? 'img' : '',\n            container,\n        );\n\n        if (imageSrc) {\n            /** @type {HTMLImageElement} */\n            (this.element).decoding = 'async';\n            /** @type {HTMLImageElement} */\n            (this.element).alt = '';\n            /** @type {HTMLImageElement} */\n            (this.element).src = imageSrc;\n            this.element.setAttribute('role', 'presentation');\n        }\n\n        this.element.setAttribute('aria-hidden', 'true');\n    }\n\n    /**\n   * @param {number} width\n   * @param {number} height\n   */\n    setDisplayedSize(width, height) {\n        if (!this.element) {\n            return;\n        }\n\n        if (this.element.tagName === 'IMG') {\n            // Use transform scale() to modify img placeholder size\n            // (instead of changing width/height directly).\n            // This helps with performance, specifically in iOS15 Safari.\n            setWidthHeight(this.element, 250, 'auto');\n            this.element.style.transformOrigin = '0 0';\n            this.element.style.transform = toTransformString(0, 0, width / 250);\n        } else {\n            setWidthHeight(this.element, width, height);\n        }\n    }\n\n    destroy() {\n        if (this.element.parentNode) {\n            this.element.remove();\n        }\n        this.element = null;\n    }\n}\n\n/** @typedef {import('./slide.js').default} Slide */\n/** @typedef {import('./slide.js').SlideData} SlideData */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../util/util.js').LoadState} LoadState */\n\nclass Content {\n    /**\n   * @param {SlideData} itemData Slide data\n   * @param {PhotoSwipe} instance PhotoSwipe or PhotoSwipeLightbox instance\n   * @param {number} index\n   */\n    constructor(itemData, instance, index) {\n        this.instance = instance;\n        this.data = itemData;\n        this.index = index;\n\n        /** @type {HTMLImageElement | HTMLDivElement} */\n        this.element = undefined;\n\n        this.displayedImageWidth = 0;\n        this.displayedImageHeight = 0;\n\n        this.width = Number(this.data.w) || Number(this.data.width) || 0;\n        this.height = Number(this.data.h) || Number(this.data.height) || 0;\n\n        this.isAttached = false;\n        this.hasSlide = false;\n        /** @type {LoadState} */\n        this.state = LOAD_STATE.IDLE;\n\n        if (this.data.type) {\n            this.type = this.data.type;\n        } else if (this.data.src) {\n            this.type = 'image';\n        } else {\n            this.type = 'html';\n        }\n\n        this.instance.dispatch('contentInit', { content: this });\n    }\n\n    removePlaceholder() {\n        if (this.placeholder && !this.keepPlaceholder()) {\n            // With delay, as image might be loaded, but not rendered\n            setTimeout(() => {\n                if (this.placeholder) {\n                    this.placeholder.destroy();\n                    this.placeholder = null;\n                }\n            }, 1000);\n        }\n    }\n\n    /**\n   * Preload content\n   *\n   * @param {boolean=} isLazy\n   * @param {boolean=} reload\n   */\n    load(isLazy, reload) {\n        if (this.slide && this.usePlaceholder()) {\n            if (!this.placeholder) {\n                const placeholderSrc = this.instance.applyFilters(\n                    'placeholderSrc',\n                    // use  image-based placeholder only for the first slide,\n                    // as rendering (even small stretched thumbnail) is an expensive operation\n                    (this.data.msrc && this.slide.isFirstSlide) ? this.data.msrc : false,\n                    this,\n                );\n                this.placeholder = new Placeholder(\n                    placeholderSrc,\n                    this.slide.container,\n                );\n            } else {\n                const placeholderEl = this.placeholder.element;\n                // Add placeholder to DOM if it was already created\n                if (placeholderEl && !placeholderEl.parentElement) {\n                    this.slide.container.prepend(placeholderEl);\n                }\n            }\n        }\n\n        if (this.element && !reload) {\n            return;\n        }\n\n        if (this.instance.dispatch('contentLoad', { content: this, isLazy }).defaultPrevented) {\n            return;\n        }\n\n        if (this.isImageContent()) {\n            this.element = createElement('pswp__img', 'img');\n            // Start loading only after width is defined, as sizes might depend on it.\n            // Due to Safari feature, we must define sizes before srcset.\n            if (this.displayedImageWidth) {\n                this.loadImage(isLazy);\n            }\n        } else {\n            this.element = createElement('pswp__content');\n            this.element.innerHTML = this.data.html || '';\n        }\n\n        if (reload && this.slide) {\n            this.slide.updateContentSize(true);\n        }\n    }\n\n    /**\n   * Preload image\n   *\n   * @param {boolean} isLazy\n   */\n    loadImage(isLazy) {\n        const imageElement = /** @type HTMLImageElement */ (this.element);\n\n        if (this.instance.dispatch('contentLoadImage', { content: this, isLazy }).defaultPrevented) {\n            return;\n        }\n\n        this.updateSrcsetSizes();\n\n        if (this.data.srcset) {\n            imageElement.srcset = this.data.srcset;\n        }\n\n        imageElement.src = this.data.src;\n\n        imageElement.alt = this.data.alt || '';\n\n        this.state = LOAD_STATE.LOADING;\n\n        if (imageElement.complete) {\n            this.onLoaded();\n        } else {\n            imageElement.onload = () => {\n                this.onLoaded();\n            };\n\n            imageElement.onerror = () => {\n                this.onError();\n            };\n        }\n    }\n\n    /**\n   * Assign slide to content\n   *\n   * @param {Slide} slide\n   */\n    setSlide(slide) {\n        this.slide = slide;\n        this.hasSlide = true;\n        this.instance = slide.pswp;\n\n    // todo: do we need to unset slide?\n    }\n\n    /**\n   * Content load success handler\n   */\n    onLoaded() {\n        this.state = LOAD_STATE.LOADED;\n\n        if (this.slide) {\n            this.instance.dispatch('loadComplete', { slide: this.slide, content: this });\n\n            // if content is reloaded\n            if (this.slide.isActive &&\n          this.slide.heavyAppended &&\n          !this.element.parentNode) {\n                this.append();\n                this.slide.updateContentSize(true);\n            }\n\n            if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n                this.removePlaceholder();\n            }\n        }\n    }\n\n    /**\n   * Content load error handler\n   */\n    onError() {\n        this.state = LOAD_STATE.ERROR;\n\n        if (this.slide) {\n            this.displayError();\n            this.instance.dispatch('loadComplete', { slide: this.slide, isError: true, content: this });\n            this.instance.dispatch('loadError', { slide: this.slide, content: this });\n        }\n    }\n\n    /**\n   * @returns {boolean} If the content is currently loading\n   */\n    isLoading() {\n        return this.instance.applyFilters(\n            'isContentLoading',\n            this.state === LOAD_STATE.LOADING,\n            this,\n        );\n    }\n\n    isError() {\n        return this.state === LOAD_STATE.ERROR;\n    }\n\n    /**\n   * @returns {boolean} If the content is image\n   */\n    isImageContent() {\n        return this.type === 'image';\n    }\n\n    /**\n   * Update content size\n   *\n   * @param {number} width\n   * @param {number} height\n   */\n    setDisplayedSize(width, height) {\n        if (!this.element) {\n            return;\n        }\n\n        if (this.placeholder) {\n            this.placeholder.setDisplayedSize(width, height);\n        }\n\n        // eslint-disable-next-line max-len\n        if (this.instance.dispatch('contentResize', { content: this, width, height }).defaultPrevented) {\n            return;\n        }\n\n        setWidthHeight(this.element, width, height);\n\n        if (this.isImageContent() && !this.isError()) {\n            const isInitialSizeUpdate = (!this.displayedImageWidth && width);\n\n            this.displayedImageWidth = width;\n            this.displayedImageHeight = height;\n\n            if (isInitialSizeUpdate) {\n                this.loadImage(false);\n            } else {\n                this.updateSrcsetSizes();\n            }\n\n            if (this.slide) {\n                // eslint-disable-next-line max-len\n                this.instance.dispatch('imageSizeChange', {\n                    slide: this.slide, width, height, content: this,\n                });\n            }\n        }\n    }\n\n    /**\n   * @returns {boolean} If the content can be zoomed\n   */\n    isZoomable() {\n        return this.instance.applyFilters(\n            'isContentZoomable',\n            this.isImageContent() && (this.state !== LOAD_STATE.ERROR),\n            this,\n        );\n    }\n\n    /**\n   * Update image srcset sizes attribute based on width and height\n   */\n    updateSrcsetSizes() {\n    // Handle srcset sizes attribute.\n    //\n    // Never lower quality, if it was increased previously.\n    // Chrome does this automatically, Firefox and Safari do not,\n    // so we store largest used size in dataset.\n    // Handle srcset sizes attribute.\n    //\n    // Never lower quality, if it was increased previously.\n    // Chrome does this automatically, Firefox and Safari do not,\n    // so we store largest used size in dataset.\n        if (this.data.srcset) {\n            const image = /** @type HTMLImageElement */ (this.element);\n            const sizesWidth = this.instance.applyFilters(\n                'srcsetSizesWidth',\n                this.displayedImageWidth,\n                this,\n            );\n\n            if (!image.dataset.largestUsedSize ||\n          sizesWidth > parseInt(image.dataset.largestUsedSize, 10)) {\n                image.sizes = `${sizesWidth}px`;\n                image.dataset.largestUsedSize = String(sizesWidth);\n            }\n        }\n    }\n\n    /**\n   * @returns {boolean} If content should use a placeholder (from msrc by default)\n   */\n    usePlaceholder() {\n        return this.instance.applyFilters(\n            'useContentPlaceholder',\n            this.isImageContent(),\n            this,\n        );\n    }\n\n    /**\n   * Preload content with lazy-loading param\n   */\n    lazyLoad() {\n        if (this.instance.dispatch('contentLazyLoad', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        this.load(true);\n    }\n\n    /**\n   * @returns {boolean} If placeholder should be kept after content is loaded\n   */\n    keepPlaceholder() {\n        return this.instance.applyFilters(\n            'isKeepingPlaceholder',\n            this.isLoading(),\n            this,\n        );\n    }\n\n    /**\n   * Destroy the content\n   */\n    destroy() {\n        this.hasSlide = false;\n        this.slide = null;\n\n        if (this.instance.dispatch('contentDestroy', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        this.remove();\n\n        if (this.placeholder) {\n            this.placeholder.destroy();\n            this.placeholder = null;\n        }\n\n        if (this.isImageContent() && this.element) {\n            this.element.onload = null;\n            this.element.onerror = null;\n            this.element = null;\n        }\n    }\n\n    /**\n   * Display error message\n   */\n    displayError() {\n        if (this.slide) {\n            /** @type {HTMLElement} */\n            let errorMsgEl = createElement('pswp__error-msg');\n            errorMsgEl.innerText = this.instance.options.errorMsg;\n            errorMsgEl = this.instance.applyFilters(\n                'contentErrorElement',\n                errorMsgEl,\n                this,\n            );\n            this.element = createElement('pswp__content pswp__error-msg-container');\n            this.element.appendChild(errorMsgEl);\n            this.slide.container.innerText = '';\n            this.slide.container.appendChild(this.element);\n            this.slide.updateContentSize(true);\n            this.removePlaceholder();\n        }\n    }\n\n    /**\n   * Append the content\n   */\n    append() {\n        if (this.isAttached) {\n            return;\n        }\n\n        this.isAttached = true;\n\n        if (this.state === LOAD_STATE.ERROR) {\n            this.displayError();\n            return;\n        }\n\n        if (this.instance.dispatch('contentAppend', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        const supportsDecode = ('decode' in this.element);\n\n        if (this.isImageContent()) {\n            // Use decode() on nearby slides\n            //\n            // Nearby slide images are in DOM and not hidden via display:none.\n            // However, they are placed offscreen (to the left and right side).\n            //\n            // Some browsers do not composite the image until it's actually visible,\n            // using decode() helps.\n            //\n            // You might ask \"why dont you just decode() and then append all images\",\n            // that's because I want to show image before it's fully loaded,\n            // as browser can render parts of image while it is loading.\n            // We do not do this in Safari due to partial loading bug.\n            if (supportsDecode && this.slide && (!this.slide.isActive || isSafari())) {\n                this.isDecoding = true;\n                // purposefully using finally instead of then,\n                // as if srcset sizes changes dynamically - it may cause decode error\n                /** @type {HTMLImageElement} */\n                (this.element).decode().catch(() => {}).finally(() => {\n                    this.isDecoding = false;\n                    this.appendImage();\n                });\n            } else {\n                this.appendImage();\n            }\n        } else if (this.element && !this.element.parentNode) {\n            this.slide.container.appendChild(this.element);\n        }\n    }\n\n    /**\n   * Activate the slide,\n   * active slide is generally the current one,\n   * meaning the user can see it.\n   */\n    activate() {\n        if (this.instance.dispatch('contentActivate', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        if (this.slide) {\n            if (this.isImageContent() && this.isDecoding && !isSafari()) {\n                // add image to slide when it becomes active,\n                // even if it's not finished decoding\n                this.appendImage();\n            } else if (this.isError()) {\n                this.load(false, true); // try to reload\n            }\n        }\n    }\n\n    /**\n   * Deactivate the content\n   */\n    deactivate() {\n        this.instance.dispatch('contentDeactivate', { content: this });\n    }\n\n    /**\n   * Remove the content from DOM\n   */\n    remove() {\n        this.isAttached = false;\n\n        if (this.instance.dispatch('contentRemove', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        if (this.element && this.element.parentNode) {\n            this.element.remove();\n        }\n\n        if (this.placeholder && this.placeholder.element) {\n            this.placeholder.element.remove();\n        }\n    }\n\n    /**\n   * Append the image content to slide container\n   */\n    appendImage() {\n        if (!this.isAttached) {\n            return;\n        }\n\n        if (this.instance.dispatch('contentAppendImage', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        // ensure that element exists and is not already appended\n        if (this.slide && this.element && !this.element.parentNode) {\n            this.slide.container.appendChild(this.element);\n        }\n\n        if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n            this.removePlaceholder();\n        }\n    }\n}\n\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/**\n * @param {PhotoSwipeOptions} options\n * @param {PhotoSwipe} pswp\n */\nfunction getViewportSize(options, pswp) {\n    if (options.getViewportSizeFn) {\n        const newViewportSize = options.getViewportSizeFn(options, pswp);\n        if (newViewportSize) {\n            return newViewportSize;\n        }\n    }\n\n    return {\n        x: document.documentElement.clientWidth,\n\n        // TODO: height on mobile is very incosistent due to toolbar\n        // find a way to improve this\n        //\n        // document.documentElement.clientHeight - doesn't seem to work well\n        y: window.innerHeight,\n    };\n}\n\n/**\n * Parses padding option.\n * Supported formats:\n *\n * // Object\n * padding: {\n *  top: 0,\n *  bottom: 0,\n *  left: 0,\n *  right: 0\n * }\n *\n * // A function that returns the object\n * paddingFn: (viewportSize, itemData, index) => {\n *  return {\n *    top: 0,\n *    bottom: 0,\n *    left: 0,\n *    right: 0\n *  };\n * }\n *\n * // Legacy variant\n * paddingLeft: 0,\n * paddingRight: 0,\n * paddingTop: 0,\n * paddingBottom: 0,\n *\n * @param {'left' | 'top' | 'bottom' | 'right'} prop\n * @param {PhotoSwipeOptions} options PhotoSwipe options\n * @param {{ x?: number; y?: number }} viewportSize PhotoSwipe viewport size, for example: { x:800, y:600 }\n * @param {SlideData} itemData Data about the slide\n * @param {number} index Slide index\n * @returns {number}\n */\nfunction parsePaddingOption(prop, options, viewportSize, itemData, index) {\n    /** @type {number} */\n    let paddingValue;\n\n    if (options.paddingFn) {\n        paddingValue = options.paddingFn(viewportSize, itemData, index)[prop];\n    } else if (options.padding) {\n        paddingValue = options.padding[prop];\n    } else {\n        const legacyPropName = `padding${prop[0].toUpperCase()}${prop.slice(1)}`;\n        // @ts-expect-error\n        if (options[legacyPropName]) {\n            // @ts-expect-error\n            paddingValue = options[legacyPropName];\n        }\n    }\n\n    return paddingValue || 0;\n}\n\n/**\n * @param {PhotoSwipeOptions} options\n * @param {{ x?: number; y?: number }} viewportSize\n * @param {SlideData} itemData\n * @param {number} index\n */\nfunction getPanAreaSize(options, viewportSize, itemData, index) {\n    return {\n        x: viewportSize.x -\n      parsePaddingOption('left', options, viewportSize, itemData, index) -\n      parsePaddingOption('right', options, viewportSize, itemData, index),\n        y: viewportSize.y -\n      parsePaddingOption('top', options, viewportSize, itemData, index) -\n      parsePaddingOption('bottom', options, viewportSize, itemData, index),\n    };\n}\n\nconst MAX_IMAGE_WIDTH = 4000;\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/** @typedef {'fit' | 'fill' | number | ((zoomLevelObject: ZoomLevel) => number)} ZoomLevelOption */\n\n/**\n * Calculates zoom levels for specific slide.\n * Depends on viewport size and image size.\n */\nclass ZoomLevel {\n    /**\n   * @param {PhotoSwipeOptions} options PhotoSwipe options\n   * @param {SlideData} itemData Slide data\n   * @param {number} index Slide index\n   * @param {PhotoSwipe=} pswp PhotoSwipe instance, can be undefined if not initialized yet\n   */\n    constructor(options, itemData, index, pswp) {\n        this.pswp = pswp;\n        this.options = options;\n        this.itemData = itemData;\n        this.index = index;\n    }\n\n    /**\n   * Calculate initial, secondary and maximum zoom level for the specified slide.\n   *\n   * It should be called when either image or viewport size changes.\n   *\n   * @param {number} maxWidth\n   * @param {number} maxHeight\n   * @param {{ x?: number; y?: number }} panAreaSize\n   */\n    update(maxWidth, maxHeight, panAreaSize) {\n        this.elementSize = {\n            x: maxWidth,\n            y: maxHeight,\n        };\n\n        this.panAreaSize = panAreaSize;\n\n        const hRatio = this.panAreaSize.x / this.elementSize.x;\n        const vRatio = this.panAreaSize.y / this.elementSize.y;\n\n        this.fit = Math.min(1, hRatio < vRatio ? hRatio : vRatio);\n        this.fill = Math.min(1, hRatio > vRatio ? hRatio : vRatio);\n\n        // zoom.vFill defines zoom level of the image\n        // when it has 100% of viewport vertical space (height)\n        this.vFill = Math.min(1, vRatio);\n\n        this.initial = this._getInitial();\n        this.secondary = this._getSecondary();\n        this.max = Math.max(\n            this.initial,\n            this.secondary,\n            this._getMax(),\n        );\n\n        this.min = Math.min(\n            this.fit,\n            this.initial,\n            this.secondary,\n        );\n\n        if (this.pswp) {\n            this.pswp.dispatch('zoomLevelsUpdate', { zoomLevels: this, slideData: this.itemData });\n        }\n    }\n\n    /**\n   * Parses user-defined zoom option.\n   *\n   * @private\n   * @param {'initial' | 'secondary' | 'max'} optionPrefix Zoom level option prefix (initial, secondary, max)\n   */\n    _parseZoomLevelOption(optionPrefix) {\n    // eslint-disable-next-line max-len\n        const optionName = /** @type {'initialZoomLevel' | 'secondaryZoomLevel' | 'maxZoomLevel'} */ (`${optionPrefix}ZoomLevel`);\n        const optionValue = this.options[optionName];\n\n        if (!optionValue) {\n            return;\n        }\n\n        if (typeof optionValue === 'function') {\n            return optionValue(this);\n        }\n\n        if (optionValue === 'fill') {\n            return this.fill;\n        }\n\n        if (optionValue === 'fit') {\n            return this.fit;\n        }\n\n        return Number(optionValue);\n    }\n\n    /**\n   * Get zoom level to which image will be zoomed after double-tap gesture,\n   * or when user clicks on zoom icon,\n   * or mouse-click on image itself.\n   * If you return 1 image will be zoomed to its original size.\n   *\n   * @private\n   * @return {number}\n   */\n    _getSecondary() {\n        let currZoomLevel = this._parseZoomLevelOption('secondary');\n\n        if (currZoomLevel) {\n            return currZoomLevel;\n        }\n\n        // 3x of \"fit\" state, but not larger than original\n        currZoomLevel = Math.min(1, this.fit * 3);\n\n        if (currZoomLevel * this.elementSize.x > MAX_IMAGE_WIDTH) {\n            currZoomLevel = MAX_IMAGE_WIDTH / this.elementSize.x;\n        }\n\n        return currZoomLevel;\n    }\n\n    /**\n   * Get initial image zoom level.\n   *\n   * @private\n   * @return {number}\n   */\n    _getInitial() {\n        return this._parseZoomLevelOption('initial') || this.fit;\n    }\n\n    /**\n   * Maximum zoom level when user zooms\n   * via zoom/pinch gesture,\n   * via cmd/ctrl-wheel or via trackpad.\n   *\n   * @private\n   * @return {number}\n   */\n    _getMax() {\n        const currZoomLevel = this._parseZoomLevelOption('max');\n\n        if (currZoomLevel) {\n            return currZoomLevel;\n        }\n\n        // max zoom level is x4 from \"fit state\",\n        // used for zoom gesture and ctrl/trackpad zoom\n        return Math.max(1, this.fit * 4);\n    }\n}\n\n/**\n * Lazy-load an image\n * This function is used both by Lightbox and PhotoSwipe core,\n * thus it can be called before dialog is opened.\n *\n * @param {SlideData} itemData Data about the slide\n * @param {PhotoSwipe | PhotoSwipeLightbox | PhotoSwipeBase} instance PhotoSwipe instance\n * @param {number} index\n * @returns Image that is being decoded or false.\n */\nfunction lazyLoadData(itemData, instance, index) {\n    // src/slide/content/content.js\n    const content = instance.createContentFromData(itemData, index);\n\n    if (!content || !content.lazyLoad) {\n        return;\n    }\n\n    const { options } = instance;\n\n    // We need to know dimensions of the image to preload it,\n    // as it might use srcset and we need to define sizes\n    // @ts-expect-error should provide pswp instance?\n    const viewportSize = instance.viewportSize || getViewportSize(options, instance);\n    const panAreaSize = getPanAreaSize(options, viewportSize, itemData, index);\n\n    const zoomLevel = new ZoomLevel(options, itemData, -1);\n    zoomLevel.update(content.width, content.height, panAreaSize);\n\n    content.lazyLoad();\n    content.setDisplayedSize(\n        Math.ceil(content.width * zoomLevel.initial),\n        Math.ceil(content.height * zoomLevel.initial),\n    );\n\n    return content;\n}\n\n/**\n * Lazy-loads specific slide.\n * This function is used both by Lightbox and PhotoSwipe core,\n * thus it can be called before dialog is opened.\n *\n * By default it loads image based on viewport size and initial zoom level.\n *\n * @param {number} index Slide index\n * @param {PhotoSwipe | PhotoSwipeLightbox} instance PhotoSwipe or PhotoSwipeLightbox eventable instance\n */\nfunction lazyLoadSlide(index, instance) {\n    const itemData = instance.getItemData(index);\n\n    if (instance.dispatch('lazyLoadSlide', { index, itemData }).defaultPrevented) {\n        return;\n    }\n\n    return lazyLoadData(itemData, instance, index);\n}\n\n/** @typedef {import(\"../photoswipe.js\").default} PhotoSwipe */\n/** @typedef {import(\"../photoswipe.js\").PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import(\"../slide/slide.js\").SlideData} SlideData */\n\n/**\n * PhotoSwipe base class that can retrieve data about every slide.\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox\n */\nclass PhotoSwipeBase extends Eventable {\n    /**\n   * Get total number of slides\n   *\n   * @returns {number}\n   */\n    getNumItems() {\n        let numItems;\n        const { dataSource } = this.options;\n        if (!dataSource) {\n            numItems = 0;\n        } else if ('length' in dataSource) {\n            // may be an array or just object with length property\n            numItems = dataSource.length;\n        } else if ('gallery' in dataSource) {\n            // query DOM elements\n            if (!dataSource.items) {\n                dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n            }\n\n            if (dataSource.items) {\n                numItems = dataSource.items.length;\n            }\n        }\n\n        // legacy event, before filters were introduced\n        const event = this.dispatch('numItems', {\n            dataSource,\n            numItems,\n        });\n        return this.applyFilters('numItems', event.numItems, dataSource);\n    }\n\n    /**\n   * @param {SlideData} slideData\n   * @param {number} index\n   */\n    createContentFromData(slideData, index) {\n    // @ts-expect-error\n        return new Content(slideData, this, index);\n    }\n\n    /**\n   * Get item data by index.\n   *\n   * \"item data\" should contain normalized information that PhotoSwipe needs to generate a slide.\n   * For example, it may contain properties like\n   * `src`, `srcset`, `w`, `h`, which will be used to generate a slide with image.\n   *\n   * @param {number} index\n   */\n    getItemData(index) {\n        const { dataSource } = this.options;\n        let dataSourceItem;\n        if (Array.isArray(dataSource)) {\n            // Datasource is an array of elements\n            dataSourceItem = dataSource[index];\n        } else if (dataSource && dataSource.gallery) {\n            // dataSource has gallery property,\n            // thus it was created by Lightbox, based on\n            // gallery and children options\n\n            // query DOM elements\n            if (!dataSource.items) {\n                dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n            }\n\n            dataSourceItem = dataSource.items[index];\n        }\n\n        let itemData = dataSourceItem;\n\n        if (itemData instanceof Element) {\n            itemData = this._domElementToItemData(itemData);\n        }\n\n        // Dispatching the itemData event,\n        // it's a legacy verion before filters were introduced\n        const event = this.dispatch('itemData', {\n            itemData: itemData || {},\n            index,\n        });\n\n        return this.applyFilters('itemData', event.itemData, index);\n    }\n\n    /**\n   * Get array of gallery DOM elements,\n   * based on childSelector and gallery element.\n   *\n   * @param {HTMLElement} galleryElement\n   */\n    _getGalleryDOMElements(galleryElement) {\n        if (this.options.children || this.options.childSelector) {\n            return getElementsFromOption(\n                this.options.children,\n                this.options.childSelector,\n                galleryElement,\n            ) || [];\n        }\n\n        return [galleryElement];\n    }\n\n    /**\n   * Converts DOM element to item data object.\n   *\n   * @param {HTMLElement} element DOM element\n   */\n    // eslint-disable-next-line class-methods-use-this\n    _domElementToItemData(element) {\n    /** @type {SlideData} */\n        const itemData = {\n            element,\n        };\n\n        // eslint-disable-next-line max-len\n        const linkEl = /** @type {HTMLAnchorElement} */ (element.tagName === 'A' ? element : element.querySelector('a'));\n\n        if (linkEl) {\n            // src comes from data-pswp-src attribute,\n            // if it's empty link href is used\n            itemData.src = linkEl.dataset.pswpSrc || linkEl.href;\n\n            if (linkEl.dataset.pswpSrcset) {\n                itemData.srcset = linkEl.dataset.pswpSrcset;\n            }\n\n            itemData.width = parseInt(linkEl.dataset.pswpWidth, 10);\n            itemData.height = parseInt(linkEl.dataset.pswpHeight, 10);\n\n            // support legacy w & h properties\n            itemData.w = itemData.width;\n            itemData.h = itemData.height;\n\n            if (linkEl.dataset.pswpType) {\n                itemData.type = linkEl.dataset.pswpType;\n            }\n\n            const thumbnailEl = element.querySelector('img');\n\n            if (thumbnailEl) {\n                // msrc is URL to placeholder image that's displayed before large image is loaded\n                // by default it's displayed only for the first slide\n                itemData.msrc = thumbnailEl.currentSrc || thumbnailEl.src;\n                itemData.alt = thumbnailEl.getAttribute('alt');\n            }\n\n            if (linkEl.dataset.pswpCropped || linkEl.dataset.cropped) {\n                itemData.thumbCropped = true;\n            }\n        }\n\n        return this.applyFilters('domItemData', itemData, element, linkEl);\n    }\n\n    /**\n   * Lazy-load by slide data\n   *\n   * @param {SlideData} itemData Data about the slide\n   * @param {number} index\n   * @returns Image that is being decoded or false.\n   */\n    lazyLoadData(itemData, index) {\n        return lazyLoadData(itemData, this, index);\n    }\n}\n\n/**\n * @template T\n * @typedef {import('../types.js').Type<T>} Type<T>\n */\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../photoswipe.js').DataSource} DataSource */\n/** @typedef {import('../slide/content.js').default} Content */\n/** @typedef {import('../core/eventable.js').PhotoSwipeEventsMap} PhotoSwipeEventsMap */\n/** @typedef {import('../core/eventable.js').PhotoSwipeFiltersMap} PhotoSwipeFiltersMap */\n\n/**\n * @template T\n * @typedef {import('../core/eventable.js').EventCallback<T>} EventCallback<T>\n */\n\n/**\n * PhotoSwipe Lightbox\n *\n * - If user has unsupported browser it falls back to default browser action (just opens URL)\n * - Binds click event to links that should open PhotoSwipe\n * - parses DOM strcture for PhotoSwipe (retrieves large image URLs and sizes)\n * - Initializes PhotoSwipe\n *\n *\n * Loader options use the same object as PhotoSwipe, and supports such options:\n *\n * gallery - Element | Element[] | NodeList | string selector for the gallery element\n * children - Element | Element[] | NodeList | string selector for the gallery children\n *\n */\nclass PhotoSwipeLightbox extends PhotoSwipeBase {\n    /**\n   * @param {PhotoSwipeOptions} options\n   */\n    constructor(options) {\n        super();\n        /** @type {PhotoSwipeOptions} */\n        this.options = options || {};\n        this._uid = 0;\n    }\n\n    /**\n   * Initialize lightbox, should be called only once.\n   * It's not included in the main constructor, so you may bind events before it.\n   */\n    init() {\n        this.onThumbnailsClick = this.onThumbnailsClick.bind(this);\n\n        // Bind click events to each gallery\n        getElementsFromOption(this.options.gallery, this.options.gallerySelector)\n            .forEach((galleryElement) => {\n                galleryElement.addEventListener('click', this.onThumbnailsClick, false);\n            });\n    }\n\n    /**\n   * @param {MouseEvent} e\n   */\n    onThumbnailsClick(e) {\n    // Exit and allow default browser action if:\n        if (specialKeyUsed(e) || // ... if clicked with a special key (ctrl/cmd...)\n        window.pswp || // ... if PhotoSwipe is already open\n        window.navigator.onLine === false) { // ... if offline\n            return;\n        }\n\n        // If both clientX and clientY are 0 or not defined,\n        // the event is likely triggered by keyboard,\n        // so we do not pass the initialPoint\n        //\n        // Note that some screen readers emulate the mouse position,\n        // so it's not ideal way to detect them.\n        //\n        let initialPoint = { x: e.clientX, y: e.clientY };\n\n        if (!initialPoint.x && !initialPoint.y) {\n            initialPoint = null;\n        }\n\n        let clickedIndex = this.getClickedIndex(e);\n        clickedIndex = this.applyFilters('clickedIndex', clickedIndex, e, this);\n        const dataSource = {\n            gallery: /** @type {HTMLElement} */ (e.currentTarget),\n        };\n\n        if (clickedIndex >= 0) {\n            e.preventDefault();\n            this.loadAndOpen(clickedIndex, dataSource, initialPoint);\n        }\n    }\n\n    /**\n   * Get index of gallery item that was clicked.\n   *\n   * @param {MouseEvent} e click event\n   */\n    getClickedIndex(e) {\n    // legacy option\n        if (this.options.getClickedIndexFn) {\n            return this.options.getClickedIndexFn.call(this, e);\n        }\n\n        const clickedTarget = /** @type {HTMLElement} */ (e.target);\n        const childElements = getElementsFromOption(\n            this.options.children,\n            this.options.childSelector,\n            /** @type {HTMLElement} */ (e.currentTarget),\n        );\n        const clickedChildIndex = childElements.findIndex(\n            (child) => child === clickedTarget || child.contains(clickedTarget),\n        );\n\n        if (clickedChildIndex !== -1) {\n            return clickedChildIndex;\n        } if (this.options.children || this.options.childSelector) {\n            // click wasn't on a child element\n            return -1;\n        }\n\n        // There is only one item (which is the gallery)\n        return 0;\n    }\n\n    /**\n   * Load and open PhotoSwipe\n   *\n   * @param {number} index\n   * @param {DataSource=} dataSource\n   * @param {{ x?: number; y?: number }} [initialPoint]\n   */\n    loadAndOpen(index, dataSource, initialPoint) {\n    // Check if the gallery is already open\n        if (window.pswp) {\n            return false;\n        }\n\n        // set initial index\n        this.options.index = index;\n\n        // define options for PhotoSwipe constructor\n        this.options.initialPointerPos = initialPoint;\n\n        this.shouldOpen = true;\n        this.preload(index, dataSource);\n        return true;\n    }\n\n    /**\n   * Load the main module and the slide content by index\n   *\n   * @param {number} index\n   * @param {DataSource=} dataSource\n   */\n    preload(index, dataSource) {\n        const { options } = this;\n\n        if (dataSource) {\n            options.dataSource = dataSource;\n        }\n\n        // Add the main module\n        /** @type {Promise<Type<PhotoSwipe>>[]} */\n        const promiseArray = [];\n\n        const pswpModuleType = typeof options.pswpModule;\n        if (isPswpClass(options.pswpModule)) {\n            promiseArray.push(Promise.resolve(/** @type {Type<PhotoSwipe>} */ (options.pswpModule)));\n        } else if (pswpModuleType === 'string') {\n            throw new Error('pswpModule as string is no longer supported');\n        } else if (pswpModuleType === 'function') {\n            promiseArray.push(/** @type {() => Promise<Type<PhotoSwipe>>} */ (options.pswpModule)());\n        } else {\n            throw new Error('pswpModule is not valid');\n        }\n\n        // Add custom-defined promise, if any\n        if (typeof options.openPromise === 'function') {\n            // allow developers to perform some task before opening\n            promiseArray.push(options.openPromise());\n        }\n\n        if (options.preloadFirstSlide !== false && index >= 0) {\n            this._preloadedContent = lazyLoadSlide(index, this);\n        }\n\n        // Wait till all promises resolve and open PhotoSwipe\n        const uid = ++this._uid;\n        Promise.all(promiseArray).then((iterableModules) => {\n            if (this.shouldOpen) {\n                const mainModule = iterableModules[0];\n                this._openPhotoswipe(mainModule, uid);\n            }\n        });\n    }\n\n    /**\n   * @private\n   * @param {Type<PhotoSwipe> | { default: Type<PhotoSwipe> }} module\n   * @param {number} uid\n   */\n    _openPhotoswipe(module, uid) {\n    // Cancel opening if UID doesn't match the current one\n    // (if user clicked on another gallery item before current was loaded).\n    //\n    // Or if shouldOpen flag is set to false\n    // (developer may modify it via public API)\n        if (uid !== this._uid && this.shouldOpen) {\n            return;\n        }\n\n        this.shouldOpen = false;\n\n        // PhotoSwipe is already open\n        if (window.pswp) {\n            return;\n        }\n\n        /**\n     * Pass data to PhotoSwipe and open init\n     *\n     * @type {PhotoSwipe}\n     */\n        const pswp = typeof module === 'object'\n        ? new module.default(this.options) // eslint-disable-line\n        : new module(this.options); // eslint-disable-line\n\n        this.pswp = pswp;\n        window.pswp = pswp;\n\n        // map listeners from Lightbox to PhotoSwipe Core\n        /** @type {(keyof PhotoSwipeEventsMap)[]} */\n        (Object.keys(this._listeners)).forEach((name) => {\n            this._listeners[name].forEach((fn) => {\n                pswp.on(name, /** @type {EventCallback<typeof name>} */(fn));\n            });\n        });\n\n        // same with filters\n        /** @type {(keyof PhotoSwipeFiltersMap)[]} */\n        (Object.keys(this._filters)).forEach((name) => {\n            this._filters[name].forEach((filter) => {\n                pswp.addFilter(name, filter.fn, filter.priority);\n            });\n        });\n\n        if (this._preloadedContent) {\n            pswp.contentLoader.addToCache(this._preloadedContent);\n            this._preloadedContent = null;\n        }\n\n        pswp.on('destroy', () => {\n            // clean up public variables\n            this.pswp = null;\n            window.pswp = null;\n        });\n\n        pswp.init();\n    }\n\n    /**\n   * Unbinds all events, closes PhotoSwipe if it's open.\n   */\n    destroy() {\n        if (this.pswp) {\n            this.pswp.destroy();\n        }\n\n        this.shouldOpen = false;\n        this._listeners = null;\n\n        getElementsFromOption(this.options.gallery, this.options.gallerySelector)\n            .forEach((galleryElement) => {\n                galleryElement.removeEventListener('click', this.onThumbnailsClick, false);\n            });\n    }\n}\n\nexport { PhotoSwipeLightbox as default };\n// # sourceMappingURL=photoswipe-lightbox.esm.js.map\n","/*!\n  * PhotoSwipe 5.3.3 - https://photoswipe.com\n  * (c) 2022 Dmytro Semenov\n  */\n/** @typedef {import('../photoswipe.js').Point} Point */\n\n/** @typedef {undefined | null | false | '' | 0} Falsy */\n/** @typedef {keyof HTMLElementTagNameMap} HTMLElementTagName */\n\n/**\n * @template {HTMLElementTagName | Falsy} [T=\"div\"]\n * @template {Node | undefined} [NodeToAppendElementTo=undefined]\n * @param {string=} className\n * @param {T=} [tagName]\n * @param {NodeToAppendElementTo=} appendToEl\n * @returns {T extends HTMLElementTagName ? HTMLElementTagNameMap[T] : HTMLElementTagNameMap['div']}\n */\nfunction createElement(className, tagName, appendToEl) {\n    const el = document.createElement(tagName || 'div');\n    if (className) {\n        el.className = className;\n    }\n    if (appendToEl) {\n        appendToEl.appendChild(el);\n    }\n    // @ts-expect-error\n    return el;\n}\n\n/**\n * @param {Point} p1\n * @param {Point} p2\n */\nfunction equalizePoints(p1, p2) {\n    p1.x = p2.x;\n    p1.y = p2.y;\n    if (p2.id !== undefined) {\n        p1.id = p2.id;\n    }\n    return p1;\n}\n\n/**\n * @param {Point} p\n */\nfunction roundPoint(p) {\n    p.x = Math.round(p.x);\n    p.y = Math.round(p.y);\n}\n\n/**\n * Returns distance between two points.\n *\n * @param {Point} p1\n * @param {Point} p2\n */\nfunction getDistanceBetween(p1, p2) {\n    const x = Math.abs(p1.x - p2.x);\n    const y = Math.abs(p1.y - p2.y);\n    return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * Whether X and Y positions of points are qual\n *\n * @param {Point} p1\n * @param {Point} p2\n */\nfunction pointsEqual(p1, p2) {\n    return p1.x === p2.x && p1.y === p2.y;\n}\n\n/**\n * The float result between the min and max values.\n *\n * @param {number} val\n * @param {number} min\n * @param {number} max\n */\nfunction clamp(val, min, max) {\n    return Math.min(Math.max(val, min), max);\n}\n\n/**\n * Get transform string\n *\n * @param {number} x\n * @param {number=} y\n * @param {number=} scale\n */\nfunction toTransformString(x, y, scale) {\n    let propValue = `translate3d(${\n        x}px,${y || 0}px` +\n    ',0)';\n\n    if (scale !== undefined) {\n        propValue += ` scale3d(${\n            scale},${scale\n        },1)`;\n    }\n\n    return propValue;\n}\n\n/**\n * Apply transform:translate(x, y) scale(scale) to element\n *\n * @param {HTMLElement} el\n * @param {number} x\n * @param {number=} y\n * @param {number=} scale\n */\nfunction setTransform(el, x, y, scale) {\n    el.style.transform = toTransformString(x, y, scale);\n}\n\nconst defaultCSSEasing = 'cubic-bezier(.4,0,.22,1)';\n\n/**\n * Apply CSS transition to element\n *\n * @param {HTMLElement} el\n * @param {string=} prop CSS property to animate\n * @param {number=} duration in ms\n * @param {string=} ease CSS easing function\n */\nfunction setTransitionStyle(el, prop, duration, ease) {\n    // inOut: 'cubic-bezier(.4, 0, .22, 1)', // for \"toggle state\" transitions\n    // out: 'cubic-bezier(0, 0, .22, 1)', // for \"show\" transitions\n    // in: 'cubic-bezier(.4, 0, 1, 1)'// for \"hide\" transitions\n    el.style.transition = prop\n        ? (`${prop} ${duration}ms ${ease || defaultCSSEasing}`)\n        : 'none';\n}\n\n/**\n * Apply width and height CSS properties to element\n *\n * @param {HTMLElement} el\n * @param {string | number} w\n * @param {string | number} h\n */\nfunction setWidthHeight(el, w, h) {\n    el.style.width = (typeof w === 'number') ? (`${w}px`) : w;\n    el.style.height = (typeof h === 'number') ? (`${h}px`) : h;\n}\n\n/**\n * @param {HTMLElement} el\n */\nfunction removeTransitionStyle(el) {\n    setTransitionStyle(el);\n}\n\n/**\n * @param {HTMLImageElement} img\n * @returns {Promise<HTMLImageElement | void>}\n */\nfunction decodeImage(img) {\n    if ('decode' in img) {\n        return img.decode().catch(() => {});\n    }\n\n    if (img.complete) {\n        return Promise.resolve(img);\n    }\n\n    return new Promise((resolve, reject) => {\n        img.onload = () => resolve(img);\n        img.onerror = reject;\n    });\n}\n\n/** @typedef {LOAD_STATE[keyof LOAD_STATE]} LoadState */\n/** @type {{ IDLE: 'idle'; LOADING: 'loading'; LOADED: 'loaded'; ERROR: 'error' }} */\nconst LOAD_STATE = {\n    IDLE: 'idle',\n    LOADING: 'loading',\n    LOADED: 'loaded',\n    ERROR: 'error',\n};\n\n/**\n * Check if click or keydown event was dispatched\n * with a special key or via mouse wheel.\n *\n * @param {MouseEvent | KeyboardEvent} e\n */\nfunction specialKeyUsed(e) {\n    if (e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey) {\n        return true;\n    }\n}\n\n/**\n * Parse `gallery` or `children` options.\n *\n * @param {import('../photoswipe.js').ElementProvider} option\n * @param {string=} legacySelector\n * @param {HTMLElement | Document} [parent]\n * @returns HTMLElement[]\n */\nfunction getElementsFromOption(option, legacySelector, parent = document) {\n    /** @type {HTMLElement[]} */\n    let elements = [];\n\n    if (option instanceof Element) {\n        elements = [option];\n    } else if (option instanceof NodeList || Array.isArray(option)) {\n        elements = Array.from(option);\n    } else {\n        const selector = typeof option === 'string' ? option : legacySelector;\n        if (selector) {\n            elements = Array.from(parent.querySelectorAll(selector));\n        }\n    }\n\n    return elements;\n}\n\n/**\n * Check if browser is Safari\n *\n * @returns {boolean}\n */\nfunction isSafari() {\n    return !!(navigator.vendor && navigator.vendor.match(/apple/i));\n}\n\n// Detect passive event listener support\nlet supportsPassive = false;\n/* eslint-disable */\ntry {\n  window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n    get: () => {\n      supportsPassive = true;\n    }\n  }));\n} catch (e) {}\n/* eslint-enable */\n\n/**\n * @typedef {Object} PoolItem\n * @prop {HTMLElement | Window | Document} target\n * @prop {string} type\n * @prop {(e: any) => void} listener\n * @prop {boolean} passive\n */\n\nclass DOMEvents {\n    constructor() {\n    /**\n     * @type {PoolItem[]}\n     * @private\n     */\n        this._pool = [];\n    }\n\n    /**\n   * Adds event listeners\n   *\n   * @param {HTMLElement | Window | Document} target\n   * @param {string} type Can be multiple, separated by space.\n   * @param {(e: any) => void} listener\n   * @param {boolean=} passive\n   */\n    add(target, type, listener, passive) {\n        this._toggleListener(target, type, listener, passive);\n    }\n\n    /**\n   * Removes event listeners\n   *\n   * @param {HTMLElement | Window | Document} target\n   * @param {string} type\n   * @param {(e: any) => void} listener\n   * @param {boolean=} passive\n   */\n    remove(target, type, listener, passive) {\n        this._toggleListener(target, type, listener, passive, true);\n    }\n\n    /**\n   * Removes all bound events\n   */\n    removeAll() {\n        this._pool.forEach((poolItem) => {\n            this._toggleListener(\n                poolItem.target,\n                poolItem.type,\n                poolItem.listener,\n                poolItem.passive,\n                true,\n                true,\n            );\n        });\n        this._pool = [];\n    }\n\n    /**\n   * Adds or removes event\n   *\n   * @param {HTMLElement | Window | Document} target\n   * @param {string} type\n   * @param {(e: any) => void} listener\n   * @param {boolean} passive\n   * @param {boolean=} unbind Whether the event should be added or removed\n   * @param {boolean=} skipPool Whether events pool should be skipped\n   */\n    _toggleListener(target, type, listener, passive, unbind, skipPool) {\n        if (!target) {\n            return;\n        }\n\n        const methodName = unbind ? 'removeEventListener' : 'addEventListener';\n        const types = type.split(' ');\n        types.forEach((eType) => {\n            if (eType) {\n                // Events pool is used to easily unbind all events when PhotoSwipe is closed,\n                // so developer doesn't need to do this manually\n                if (!skipPool) {\n                    if (unbind) {\n                        // Remove from the events pool\n                        this._pool = this._pool.filter((poolItem) => poolItem.type !== eType ||\n                poolItem.listener !== listener ||\n                poolItem.target !== target);\n                    } else {\n                        // Add to the events pool\n                        this._pool.push({\n                            target,\n                            type: eType,\n                            listener,\n                            passive,\n                        });\n                    }\n                }\n\n                // most PhotoSwipe events call preventDefault,\n                // and we do not need browser to scroll the page\n                const eventOptions = supportsPassive ? { passive: (passive || false) } : false;\n\n                target[methodName](\n                    eType,\n                    listener,\n                    eventOptions,\n                );\n            }\n        });\n    }\n}\n\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/**\n * @param {PhotoSwipeOptions} options\n * @param {PhotoSwipe} pswp\n */\nfunction getViewportSize(options, pswp) {\n    if (options.getViewportSizeFn) {\n        const newViewportSize = options.getViewportSizeFn(options, pswp);\n        if (newViewportSize) {\n            return newViewportSize;\n        }\n    }\n\n    return {\n        x: document.documentElement.clientWidth,\n\n        // TODO: height on mobile is very incosistent due to toolbar\n        // find a way to improve this\n        //\n        // document.documentElement.clientHeight - doesn't seem to work well\n        y: window.innerHeight,\n    };\n}\n\n/**\n * Parses padding option.\n * Supported formats:\n *\n * // Object\n * padding: {\n *  top: 0,\n *  bottom: 0,\n *  left: 0,\n *  right: 0\n * }\n *\n * // A function that returns the object\n * paddingFn: (viewportSize, itemData, index) => {\n *  return {\n *    top: 0,\n *    bottom: 0,\n *    left: 0,\n *    right: 0\n *  };\n * }\n *\n * // Legacy variant\n * paddingLeft: 0,\n * paddingRight: 0,\n * paddingTop: 0,\n * paddingBottom: 0,\n *\n * @param {'left' | 'top' | 'bottom' | 'right'} prop\n * @param {PhotoSwipeOptions} options PhotoSwipe options\n * @param {{ x?: number; y?: number }} viewportSize PhotoSwipe viewport size, for example: { x:800, y:600 }\n * @param {SlideData} itemData Data about the slide\n * @param {number} index Slide index\n * @returns {number}\n */\nfunction parsePaddingOption(prop, options, viewportSize, itemData, index) {\n    /** @type {number} */\n    let paddingValue;\n\n    if (options.paddingFn) {\n        paddingValue = options.paddingFn(viewportSize, itemData, index)[prop];\n    } else if (options.padding) {\n        paddingValue = options.padding[prop];\n    } else {\n        const legacyPropName = `padding${prop[0].toUpperCase()}${prop.slice(1)}`;\n        // @ts-expect-error\n        if (options[legacyPropName]) {\n            // @ts-expect-error\n            paddingValue = options[legacyPropName];\n        }\n    }\n\n    return paddingValue || 0;\n}\n\n/**\n * @param {PhotoSwipeOptions} options\n * @param {{ x?: number; y?: number }} viewportSize\n * @param {SlideData} itemData\n * @param {number} index\n */\nfunction getPanAreaSize(options, viewportSize, itemData, index) {\n    return {\n        x: viewportSize.x -\n      parsePaddingOption('left', options, viewportSize, itemData, index) -\n      parsePaddingOption('right', options, viewportSize, itemData, index),\n        y: viewportSize.y -\n      parsePaddingOption('top', options, viewportSize, itemData, index) -\n      parsePaddingOption('bottom', options, viewportSize, itemData, index),\n    };\n}\n\n/** @typedef {import('./slide.js').default} Slide */\n/** @typedef {{ x?: number; y?: number }} Point */\n/** @typedef {'x' | 'y'} Axis */\n\n/**\n * Calculates minimum, maximum and initial (center) bounds of a slide\n */\nclass PanBounds {\n    /**\n   * @param {Slide} slide\n   */\n    constructor(slide) {\n        this.slide = slide;\n\n        this.currZoomLevel = 1;\n\n        /** @type {Point} */\n        this.center = {};\n        /** @type {Point} */\n        this.max = {};\n        /** @type {Point} */\n        this.min = {};\n\n        this.reset();\n    }\n\n    /**\n   * _getItemBounds\n   *\n   * @param {number} currZoomLevel\n   */\n    update(currZoomLevel) {\n        this.currZoomLevel = currZoomLevel;\n\n        if (!this.slide.width) {\n            this.reset();\n        } else {\n            this._updateAxis('x');\n            this._updateAxis('y');\n            this.slide.pswp.dispatch('calcBounds', { slide: this.slide });\n        }\n    }\n\n    /**\n   * _calculateItemBoundsForAxis\n   *\n   * @param {Axis} axis\n   */\n    _updateAxis(axis) {\n        const { pswp } = this.slide;\n        const elSize = this.slide[axis === 'x' ? 'width' : 'height'] * this.currZoomLevel;\n        const paddingProp = axis === 'x' ? 'left' : 'top';\n        const padding = parsePaddingOption(\n            paddingProp,\n            pswp.options,\n            pswp.viewportSize,\n            this.slide.data,\n            this.slide.index,\n        );\n\n        const panAreaSize = this.slide.panAreaSize[axis];\n\n        // Default position of element.\n        // By defaul it is center of viewport:\n        this.center[axis] = Math.round((panAreaSize - elSize) / 2) + padding;\n\n        // maximum pan position\n        this.max[axis] = (elSize > panAreaSize)\n            ? Math.round(panAreaSize - elSize) + padding\n            : this.center[axis];\n\n        // minimum pan position\n        this.min[axis] = (elSize > panAreaSize)\n            ? padding\n            : this.center[axis];\n    }\n\n    // _getZeroBounds\n    reset() {\n        this.center.x = 0;\n        this.center.y = 0;\n        this.max.x = 0;\n        this.max.y = 0;\n        this.min.x = 0;\n        this.min.y = 0;\n    }\n\n    /**\n   * Correct pan position if it's beyond the bounds\n   *\n   * @param {Axis} axis x or y\n   * @param {number} panOffset\n   */\n    correctPan(axis, panOffset) { // checkPanBounds\n        return clamp(panOffset, this.max[axis], this.min[axis]);\n    }\n}\n\nconst MAX_IMAGE_WIDTH = 4000;\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n\n/** @typedef {'fit' | 'fill' | number | ((zoomLevelObject: ZoomLevel) => number)} ZoomLevelOption */\n\n/**\n * Calculates zoom levels for specific slide.\n * Depends on viewport size and image size.\n */\nclass ZoomLevel {\n    /**\n   * @param {PhotoSwipeOptions} options PhotoSwipe options\n   * @param {SlideData} itemData Slide data\n   * @param {number} index Slide index\n   * @param {PhotoSwipe=} pswp PhotoSwipe instance, can be undefined if not initialized yet\n   */\n    constructor(options, itemData, index, pswp) {\n        this.pswp = pswp;\n        this.options = options;\n        this.itemData = itemData;\n        this.index = index;\n    }\n\n    /**\n   * Calculate initial, secondary and maximum zoom level for the specified slide.\n   *\n   * It should be called when either image or viewport size changes.\n   *\n   * @param {number} maxWidth\n   * @param {number} maxHeight\n   * @param {{ x?: number; y?: number }} panAreaSize\n   */\n    update(maxWidth, maxHeight, panAreaSize) {\n        this.elementSize = {\n            x: maxWidth,\n            y: maxHeight,\n        };\n\n        this.panAreaSize = panAreaSize;\n\n        const hRatio = this.panAreaSize.x / this.elementSize.x;\n        const vRatio = this.panAreaSize.y / this.elementSize.y;\n\n        this.fit = Math.min(1, hRatio < vRatio ? hRatio : vRatio);\n        this.fill = Math.min(1, hRatio > vRatio ? hRatio : vRatio);\n\n        // zoom.vFill defines zoom level of the image\n        // when it has 100% of viewport vertical space (height)\n        this.vFill = Math.min(1, vRatio);\n\n        this.initial = this._getInitial();\n        this.secondary = this._getSecondary();\n        this.max = Math.max(\n            this.initial,\n            this.secondary,\n            this._getMax(),\n        );\n\n        this.min = Math.min(\n            this.fit,\n            this.initial,\n            this.secondary,\n        );\n\n        if (this.pswp) {\n            this.pswp.dispatch('zoomLevelsUpdate', { zoomLevels: this, slideData: this.itemData });\n        }\n    }\n\n    /**\n   * Parses user-defined zoom option.\n   *\n   * @private\n   * @param {'initial' | 'secondary' | 'max'} optionPrefix Zoom level option prefix (initial, secondary, max)\n   */\n    _parseZoomLevelOption(optionPrefix) {\n    // eslint-disable-next-line max-len\n        const optionName = /** @type {'initialZoomLevel' | 'secondaryZoomLevel' | 'maxZoomLevel'} */ (`${optionPrefix}ZoomLevel`);\n        const optionValue = this.options[optionName];\n\n        if (!optionValue) {\n            return;\n        }\n\n        if (typeof optionValue === 'function') {\n            return optionValue(this);\n        }\n\n        if (optionValue === 'fill') {\n            return this.fill;\n        }\n\n        if (optionValue === 'fit') {\n            return this.fit;\n        }\n\n        return Number(optionValue);\n    }\n\n    /**\n   * Get zoom level to which image will be zoomed after double-tap gesture,\n   * or when user clicks on zoom icon,\n   * or mouse-click on image itself.\n   * If you return 1 image will be zoomed to its original size.\n   *\n   * @private\n   * @return {number}\n   */\n    _getSecondary() {\n        let currZoomLevel = this._parseZoomLevelOption('secondary');\n\n        if (currZoomLevel) {\n            return currZoomLevel;\n        }\n\n        // 3x of \"fit\" state, but not larger than original\n        currZoomLevel = Math.min(1, this.fit * 3);\n\n        if (currZoomLevel * this.elementSize.x > MAX_IMAGE_WIDTH) {\n            currZoomLevel = MAX_IMAGE_WIDTH / this.elementSize.x;\n        }\n\n        return currZoomLevel;\n    }\n\n    /**\n   * Get initial image zoom level.\n   *\n   * @private\n   * @return {number}\n   */\n    _getInitial() {\n        return this._parseZoomLevelOption('initial') || this.fit;\n    }\n\n    /**\n   * Maximum zoom level when user zooms\n   * via zoom/pinch gesture,\n   * via cmd/ctrl-wheel or via trackpad.\n   *\n   * @private\n   * @return {number}\n   */\n    _getMax() {\n        const currZoomLevel = this._parseZoomLevelOption('max');\n\n        if (currZoomLevel) {\n            return currZoomLevel;\n        }\n\n        // max zoom level is x4 from \"fit state\",\n        // used for zoom gesture and ctrl/trackpad zoom\n        return Math.max(1, this.fit * 4);\n    }\n}\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/**\n * Renders and allows to control a single slide\n */\nclass Slide {\n    /**\n   * @param {SlideData} data\n   * @param {number} index\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(data, index, pswp) {\n        this.data = data;\n        this.index = index;\n        this.pswp = pswp;\n        this.isActive = (index === pswp.currIndex);\n        this.currentResolution = 0;\n        /** @type {Point} */\n        this.panAreaSize = {};\n\n        this.isFirstSlide = (this.isActive && !pswp.opener.isOpen);\n\n        this.zoomLevels = new ZoomLevel(pswp.options, data, index, pswp);\n\n        this.pswp.dispatch('gettingData', {\n            slide: this,\n            data: this.data,\n            index,\n        });\n\n        this.pan = {\n            x: 0,\n            y: 0,\n        };\n\n        this.content = this.pswp.contentLoader.getContentBySlide(this);\n        this.container = createElement('pswp__zoom-wrap');\n\n        this.currZoomLevel = 1;\n        /** @type {number} */\n        this.width = this.content.width;\n        /** @type {number} */\n        this.height = this.content.height;\n\n        this.bounds = new PanBounds(this);\n\n        this.prevDisplayedWidth = -1;\n        this.prevDisplayedHeight = -1;\n\n        this.pswp.dispatch('slideInit', { slide: this });\n    }\n\n    /**\n   * If this slide is active/current/visible\n   *\n   * @param {boolean} isActive\n   */\n    setIsActive(isActive) {\n        if (isActive && !this.isActive) {\n            // slide just became active\n            this.activate();\n        } else if (!isActive && this.isActive) {\n            // slide just became non-active\n            this.deactivate();\n        }\n    }\n\n    /**\n   * Appends slide content to DOM\n   *\n   * @param {HTMLElement} holderElement\n   */\n    append(holderElement) {\n        this.holderElement = holderElement;\n\n        this.container.style.transformOrigin = '0 0';\n\n        // Slide appended to DOM\n        if (!this.data) {\n            return;\n        }\n\n        this.calculateSize();\n\n        this.load();\n        this.updateContentSize();\n        this.appendHeavy();\n\n        this.holderElement.appendChild(this.container);\n\n        this.zoomAndPanToInitial();\n\n        this.pswp.dispatch('firstZoomPan', { slide: this });\n\n        this.applyCurrentZoomPan();\n\n        this.pswp.dispatch('afterSetContent', { slide: this });\n\n        if (this.isActive) {\n            this.activate();\n        }\n    }\n\n    load() {\n        this.content.load();\n        this.pswp.dispatch('slideLoad', { slide: this });\n    }\n\n    /**\n   * Append \"heavy\" DOM elements\n   *\n   * This may depend on a type of slide,\n   * but generally these are large images.\n   */\n    appendHeavy() {\n        const { pswp } = this;\n        const appendHeavyNearby = true; // todo\n\n        // Avoid appending heavy elements during animations\n        if (this.heavyAppended ||\n        !pswp.opener.isOpen ||\n        pswp.mainScroll.isShifted() ||\n        (!this.isActive && !appendHeavyNearby)) {\n            return;\n        }\n\n        if (this.pswp.dispatch('appendHeavy', { slide: this }).defaultPrevented) {\n            return;\n        }\n\n        this.heavyAppended = true;\n\n        this.content.append();\n\n        this.pswp.dispatch('appendHeavyContent', { slide: this });\n    }\n\n    /**\n   * Triggered when this slide is active (selected).\n   *\n   * If it's part of opening/closing transition -\n   * activate() will trigger after the transition is ended.\n   */\n    activate() {\n        this.isActive = true;\n        this.appendHeavy();\n        this.content.activate();\n        this.pswp.dispatch('slideActivate', { slide: this });\n    }\n\n    /**\n   * Triggered when this slide becomes inactive.\n   *\n   * Slide can become inactive only after it was active.\n   */\n    deactivate() {\n        this.isActive = false;\n        this.content.deactivate();\n\n        if (this.currZoomLevel !== this.zoomLevels.initial) {\n            // allow filtering\n            this.calculateSize();\n        }\n\n        // reset zoom level\n        this.currentResolution = 0;\n        this.zoomAndPanToInitial();\n        this.applyCurrentZoomPan();\n        this.updateContentSize();\n\n        this.pswp.dispatch('slideDeactivate', { slide: this });\n    }\n\n    /**\n   * The slide should destroy itself, it will never be used again.\n   * (unbind all events and destroy internal components)\n   */\n    destroy() {\n        this.content.hasSlide = false;\n        this.content.remove();\n        this.container.remove();\n        this.pswp.dispatch('slideDestroy', { slide: this });\n    }\n\n    resize() {\n        if (this.currZoomLevel === this.zoomLevels.initial || !this.isActive) {\n            // Keep initial zoom level if it was before the resize,\n            // as well as when this slide is not active\n\n            // Reset position and scale to original state\n            this.calculateSize();\n            this.currentResolution = 0;\n            this.zoomAndPanToInitial();\n            this.applyCurrentZoomPan();\n            this.updateContentSize();\n        } else {\n            // readjust pan position if it's beyond the bounds\n            this.calculateSize();\n            this.bounds.update(this.currZoomLevel);\n            this.panTo(this.pan.x, this.pan.y);\n        }\n    }\n\n    /**\n   * Apply size to current slide content,\n   * based on the current resolution and scale.\n   *\n   * @param {boolean=} force if size should be updated even if dimensions weren't changed\n   */\n    updateContentSize(force) {\n    // Use initial zoom level\n    // if resolution is not defined (user didn't zoom yet)\n        const scaleMultiplier = this.currentResolution || this.zoomLevels.initial;\n\n        if (!scaleMultiplier) {\n            return;\n        }\n\n        const width = Math.round(this.width * scaleMultiplier) || this.pswp.viewportSize.x;\n        const height = Math.round(this.height * scaleMultiplier) || this.pswp.viewportSize.y;\n\n        if (!this.sizeChanged(width, height) && !force) {\n            return;\n        }\n        this.content.setDisplayedSize(width, height);\n    }\n\n    /**\n   * @param {number} width\n   * @param {number} height\n   */\n    sizeChanged(width, height) {\n        if (width !== this.prevDisplayedWidth ||\n        height !== this.prevDisplayedHeight) {\n            this.prevDisplayedWidth = width;\n            this.prevDisplayedHeight = height;\n            return true;\n        }\n\n        return false;\n    }\n\n    getPlaceholderElement() {\n        if (this.content.placeholder) {\n            return this.content.placeholder.element;\n        }\n    }\n\n    /**\n   * Zoom current slide image to...\n   *\n   * @param {number} destZoomLevel Destination zoom level.\n   * @param {{ x?: number; y?: number }} centerPoint\n   * Transform origin center point, or false if viewport center should be used.\n   * @param {number | false} [transitionDuration] Transition duration, may be set to 0.\n   * @param {boolean=} ignoreBounds Minimum and maximum zoom levels will be ignored.\n   * @return {boolean=} Returns true if animated.\n   */\n    zoomTo(destZoomLevel, centerPoint, transitionDuration, ignoreBounds) {\n        const { pswp } = this;\n        if (!this.isZoomable() ||\n        pswp.mainScroll.isShifted()) {\n            return;\n        }\n\n        pswp.dispatch('beforeZoomTo', {\n            destZoomLevel, centerPoint, transitionDuration,\n        });\n\n        // stop all pan and zoom transitions\n        pswp.animations.stopAllPan();\n\n        // if (!centerPoint) {\n        //   centerPoint = pswp.getViewportCenterPoint();\n        // }\n\n        const prevZoomLevel = this.currZoomLevel;\n\n        if (!ignoreBounds) {\n            destZoomLevel = clamp(destZoomLevel, this.zoomLevels.min, this.zoomLevels.max);\n        }\n\n        // if (transitionDuration === undefined) {\n        //   transitionDuration = this.pswp.options.zoomAnimationDuration;\n        // }\n\n        this.setZoomLevel(destZoomLevel);\n        this.pan.x = this.calculateZoomToPanOffset('x', centerPoint, prevZoomLevel);\n        this.pan.y = this.calculateZoomToPanOffset('y', centerPoint, prevZoomLevel);\n        roundPoint(this.pan);\n\n        const finishTransition = () => {\n            this._setResolution(destZoomLevel);\n            this.applyCurrentZoomPan();\n        };\n\n        if (!transitionDuration) {\n            finishTransition();\n        } else {\n            pswp.animations.startTransition({\n                isPan: true,\n                name: 'zoomTo',\n                target: this.container,\n                transform: this.getCurrentTransform(),\n                onComplete: finishTransition,\n                duration: transitionDuration,\n                easing: pswp.options.easing,\n            });\n        }\n    }\n\n    /**\n   * @param {{ x?: number, y?: number }} [centerPoint]\n   */\n    toggleZoom(centerPoint) {\n        this.zoomTo(\n            this.currZoomLevel === this.zoomLevels.initial\n                ? this.zoomLevels.secondary : this.zoomLevels.initial,\n            centerPoint,\n            this.pswp.options.zoomAnimationDuration,\n        );\n    }\n\n    /**\n   * Updates zoom level property and recalculates new pan bounds,\n   * unlike zoomTo it does not apply transform (use applyCurrentZoomPan)\n   *\n   * @param {number} currZoomLevel\n   */\n    setZoomLevel(currZoomLevel) {\n        this.currZoomLevel = currZoomLevel;\n        this.bounds.update(this.currZoomLevel);\n    }\n\n    /**\n   * Get pan position after zoom at a given `point`.\n   *\n   * Always call setZoomLevel(newZoomLevel) beforehand to recalculate\n   * pan bounds according to the new zoom level.\n   *\n   * @param {'x' | 'y'} axis\n   * @param {{ x?: number; y?: number }} [point]\n   * point based on which zoom is performed, usually refers to the current mouse position,\n   * if false - viewport center will be used.\n   * @param {number=} prevZoomLevel Zoom level before new zoom was applied.\n   */\n    calculateZoomToPanOffset(axis, point, prevZoomLevel) {\n        const totalPanDistance = this.bounds.max[axis] - this.bounds.min[axis];\n        if (totalPanDistance === 0) {\n            return this.bounds.center[axis];\n        }\n\n        if (!point) {\n            point = this.pswp.getViewportCenterPoint();\n        }\n\n        const zoomFactor = this.currZoomLevel / prevZoomLevel;\n        return this.bounds.correctPan(\n            axis,\n            (this.pan[axis] - point[axis]) * zoomFactor + point[axis],\n        );\n    }\n\n    /**\n   * Apply pan and keep it within bounds.\n   *\n   * @param {number} panX\n   * @param {number} panY\n   */\n    panTo(panX, panY) {\n        this.pan.x = this.bounds.correctPan('x', panX);\n        this.pan.y = this.bounds.correctPan('y', panY);\n        this.applyCurrentZoomPan();\n    }\n\n    /**\n   * If the slide in the current state can be panned by the user\n   */\n    isPannable() {\n        return this.width && (this.currZoomLevel > this.zoomLevels.fit);\n    }\n\n    /**\n   * If the slide can be zoomed\n   */\n    isZoomable() {\n        return this.width && this.content.isZoomable();\n    }\n\n    /**\n   * Apply transform and scale based on\n   * the current pan position (this.pan) and zoom level (this.currZoomLevel)\n   */\n    applyCurrentZoomPan() {\n        this._applyZoomTransform(this.pan.x, this.pan.y, this.currZoomLevel);\n        if (this === this.pswp.currSlide) {\n            this.pswp.dispatch('zoomPanUpdate', { slide: this });\n        }\n    }\n\n    zoomAndPanToInitial() {\n        this.currZoomLevel = this.zoomLevels.initial;\n\n        // pan according to the zoom level\n        this.bounds.update(this.currZoomLevel);\n        equalizePoints(this.pan, this.bounds.center);\n        this.pswp.dispatch('initialZoomPan', { slide: this });\n    }\n\n    /**\n   * Set translate and scale based on current resolution\n   *\n   * @param {number} x\n   * @param {number} y\n   * @param {number} zoom\n   */\n    _applyZoomTransform(x, y, zoom) {\n        zoom /= this.currentResolution || this.zoomLevels.initial;\n        setTransform(this.container, x, y, zoom);\n    }\n\n    calculateSize() {\n        const { pswp } = this;\n\n        equalizePoints(\n            this.panAreaSize,\n            getPanAreaSize(pswp.options, pswp.viewportSize, this.data, this.index),\n        );\n\n        this.zoomLevels.update(this.width, this.height, this.panAreaSize);\n\n        pswp.dispatch('calcSlideSize', {\n            slide: this,\n        });\n    }\n\n    getCurrentTransform() {\n        const scale = this.currZoomLevel / (this.currentResolution || this.zoomLevels.initial);\n        return toTransformString(this.pan.x, this.pan.y, scale);\n    }\n\n    /**\n   * Set resolution and re-render the image.\n   *\n   * For example, if the real image size is 2000x1500,\n   * and resolution is 0.5 - it will be rendered as 1000x750.\n   *\n   * Image with zoom level 2 and resolution 0.5 is\n   * the same as image with zoom level 1 and resolution 1.\n   *\n   * Used to optimize animations and make\n   * sure that browser renders image in highest quality.\n   * Also used by responsive images to load the correct one.\n   *\n   * @param {number} newResolution\n   */\n    _setResolution(newResolution) {\n        if (newResolution === this.currentResolution) {\n            return;\n        }\n\n        this.currentResolution = newResolution;\n        this.updateContentSize();\n\n        this.pswp.dispatch('resolutionChanged');\n    }\n}\n\n/** @typedef {import('../photoswipe.js').Point} Point */\n/** @typedef {import('./gestures.js').default} Gestures */\n\nconst PAN_END_FRICTION = 0.35;\nconst VERTICAL_DRAG_FRICTION = 0.6;\n\n// 1 corresponds to the third of viewport height\nconst MIN_RATIO_TO_CLOSE = 0.4;\n\n// Minimum speed required to navigate\n// to next or previous slide\nconst MIN_NEXT_SLIDE_SPEED = 0.5;\n\n/**\n * @param {number} initialVelocity\n * @param {number} decelerationRate\n */\nfunction project(initialVelocity, decelerationRate) {\n    return initialVelocity * decelerationRate / (1 - decelerationRate);\n}\n\n/**\n * Handles single pointer dragging\n */\nclass DragHandler {\n    /**\n   * @param {Gestures} gestures\n   */\n    constructor(gestures) {\n        this.gestures = gestures;\n        this.pswp = gestures.pswp;\n        /** @type {Point} */\n        this.startPan = {};\n    }\n\n    start() {\n        equalizePoints(this.startPan, this.pswp.currSlide.pan);\n        this.pswp.animations.stopAll();\n    }\n\n    change() {\n        const {\n            p1, prevP1, dragAxis, pswp,\n        } = this.gestures;\n        const { currSlide } = pswp;\n\n        if (dragAxis === 'y' &&\n        pswp.options.closeOnVerticalDrag &&\n        currSlide.currZoomLevel <= currSlide.zoomLevels.fit &&\n        !this.gestures.isMultitouch) {\n            // Handle vertical drag to close\n            const panY = currSlide.pan.y + (p1.y - prevP1.y);\n            if (!pswp.dispatch('verticalDrag', { panY }).defaultPrevented) {\n                this._setPanWithFriction('y', panY, VERTICAL_DRAG_FRICTION);\n                const bgOpacity = 1 - Math.abs(this._getVerticalDragRatio(currSlide.pan.y));\n                pswp.applyBgOpacity(bgOpacity);\n                currSlide.applyCurrentZoomPan();\n            }\n        } else {\n            const mainScrollChanged = this._panOrMoveMainScroll('x');\n            if (!mainScrollChanged) {\n                this._panOrMoveMainScroll('y');\n\n                roundPoint(currSlide.pan);\n                currSlide.applyCurrentZoomPan();\n            }\n        }\n    }\n\n    end() {\n        const { pswp, velocity } = this.gestures;\n        const { mainScroll } = pswp;\n        let indexDiff = 0;\n\n        pswp.animations.stopAll();\n\n        // Handle main scroll if it's shifted\n        if (mainScroll.isShifted()) {\n            // Position of the main scroll relative to the viewport\n            const mainScrollShiftDiff = mainScroll.x - mainScroll.getCurrSlideX();\n\n            // Ratio between 0 and 1:\n            // 0 - slide is not visible at all,\n            // 0.5 - half of the slide is vicible\n            // 1 - slide is fully visible\n            const currentSlideVisibilityRatio = (mainScrollShiftDiff / pswp.viewportSize.x);\n\n            // Go next slide.\n            //\n            // - if velocity and its direction is matched\n            //   and we see at least tiny part of the next slide\n            //\n            // - or if we see less than 50% of the current slide\n            //   and velocity is close to 0\n            //\n            if ((velocity.x < -MIN_NEXT_SLIDE_SPEED && currentSlideVisibilityRatio < 0) ||\n          (velocity.x < 0.1 && currentSlideVisibilityRatio < -0.5)) {\n                // Go to next slide\n                indexDiff = 1;\n                velocity.x = Math.min(velocity.x, 0);\n            } else if ((velocity.x > MIN_NEXT_SLIDE_SPEED && currentSlideVisibilityRatio > 0) ||\n          (velocity.x > -0.1 && currentSlideVisibilityRatio > 0.5)) {\n                // Go to prev slide\n                indexDiff = -1;\n                velocity.x = Math.max(velocity.x, 0);\n            }\n\n            mainScroll.moveIndexBy(indexDiff, true, velocity.x);\n        }\n\n        // Restore zoom level\n        if (pswp.currSlide.currZoomLevel > pswp.currSlide.zoomLevels.max ||\n        this.gestures.isMultitouch) {\n            this.gestures.zoomLevels.correctZoomPan(true);\n        } else {\n            // we run two animations instead of one,\n            // as each axis has own pan boundaries and thus different spring function\n            // (correctZoomPan does not have this functionality,\n            //  it animates all properties with single timing function)\n            this._finishPanGestureForAxis('x');\n            this._finishPanGestureForAxis('y');\n        }\n    }\n\n    /**\n   * @private\n   * @param {'x' | 'y'} axis\n   */\n    _finishPanGestureForAxis(axis) {\n        const { pswp } = this;\n        const { currSlide } = pswp;\n        const { velocity } = this.gestures;\n        const { pan, bounds } = currSlide;\n        const panPos = pan[axis];\n        const restoreBgOpacity = (pswp.bgOpacity < 1 && axis === 'y');\n\n        // 0.995 means - scroll view loses 0.5% of its velocity per millisecond\n        // Inceasing this number will reduce travel distance\n        const decelerationRate = 0.995; // 0.99\n\n        // Pan position if there is no bounds\n        const projectedPosition = panPos + project(velocity[axis], decelerationRate);\n\n        if (restoreBgOpacity) {\n            const vDragRatio = this._getVerticalDragRatio(panPos);\n            const projectedVDragRatio = this._getVerticalDragRatio(projectedPosition);\n\n            // If we are above and moving upwards,\n            // or if we are below and moving downwards\n            if ((vDragRatio < 0 && projectedVDragRatio < -MIN_RATIO_TO_CLOSE) ||\n          (vDragRatio > 0 && projectedVDragRatio > MIN_RATIO_TO_CLOSE)) {\n                pswp.close();\n                return;\n            }\n        }\n\n        // Pan position with corrected bounds\n        const correctedPanPosition = bounds.correctPan(axis, projectedPosition);\n\n        // Exit if pan position should not be changed\n        // or if speed it too low\n        if (panPos === correctedPanPosition) {\n            return;\n        }\n\n        // Overshoot if the final position is out of pan bounds\n        const dampingRatio = (correctedPanPosition === projectedPosition) ? 1 : 0.82;\n\n        const initialBgOpacity = pswp.bgOpacity;\n        const totalPanDist = correctedPanPosition - panPos;\n\n        pswp.animations.startSpring({\n            name: `panGesture${axis}`,\n            isPan: true,\n            start: panPos,\n            end: correctedPanPosition,\n            velocity: velocity[axis],\n            dampingRatio,\n            onUpdate: (pos) => {\n                // Animate opacity of background relative to Y pan position of an image\n                if (restoreBgOpacity && pswp.bgOpacity < 1) {\n                    // 0 - start of animation, 1 - end of animation\n                    const animationProgressRatio = 1 - (correctedPanPosition - pos) / totalPanDist;\n\n                    // We clamp opacity to keep it between 0 and 1.\n                    // As progress ratio can be larger than 1 due to overshoot,\n                    // and we do not want to bounce opacity.\n                    pswp.applyBgOpacity(clamp(\n                        initialBgOpacity + (1 - initialBgOpacity) * animationProgressRatio,\n                        0,\n                        1,\n                    ));\n                }\n\n                pan[axis] = Math.floor(pos);\n                currSlide.applyCurrentZoomPan();\n            },\n        });\n    }\n\n    /**\n   * Update position of the main scroll,\n   * or/and update pan position of the current slide.\n   *\n   * Should return true if it changes (or can change) main scroll.\n   *\n   * @private\n   * @param {'x' | 'y'} axis\n   */\n    _panOrMoveMainScroll(axis) {\n        const {\n            p1, pswp, dragAxis, prevP1, isMultitouch,\n        } = this.gestures;\n        const { currSlide, mainScroll } = pswp;\n        const delta = (p1[axis] - prevP1[axis]);\n        const newMainScrollX = mainScroll.x + delta;\n\n        if (!delta) {\n            return;\n        }\n\n        // Always move main scroll if image can not be panned\n        if (axis === 'x' && !currSlide.isPannable() && !isMultitouch) {\n            mainScroll.moveTo(newMainScrollX, true);\n            return true; // changed main scroll\n        }\n\n        const { bounds } = currSlide;\n        const newPan = currSlide.pan[axis] + delta;\n\n        if (pswp.options.allowPanToNext &&\n        dragAxis === 'x' &&\n        axis === 'x' &&\n        !isMultitouch) {\n            const currSlideMainScrollX = mainScroll.getCurrSlideX();\n\n            // Position of the main scroll relative to the viewport\n            const mainScrollShiftDiff = mainScroll.x - currSlideMainScrollX;\n\n            const isLeftToRight = delta > 0;\n            const isRightToLeft = !isLeftToRight;\n\n            if (newPan > bounds.min[axis] && isLeftToRight) {\n                // Panning from left to right, beyond the left edge\n\n                // Wether the image was at minimum pan position (or less)\n                // when this drag gesture started.\n                // Minimum pan position refers to the left edge of the image.\n                const wasAtMinPanPosition = (bounds.min[axis] <= this.startPan[axis]);\n\n                if (wasAtMinPanPosition) {\n                    mainScroll.moveTo(newMainScrollX, true);\n                    return true;\n                }\n                this._setPanWithFriction(axis, newPan);\n                // currSlide.pan[axis] = newPan;\n            } else if (newPan < bounds.max[axis] && isRightToLeft) {\n                // Paning from right to left, beyond the right edge\n\n                // Maximum pan position refers to the right edge of the image.\n                const wasAtMaxPanPosition = (this.startPan[axis] <= bounds.max[axis]);\n\n                if (wasAtMaxPanPosition) {\n                    mainScroll.moveTo(newMainScrollX, true);\n                    return true;\n                }\n                this._setPanWithFriction(axis, newPan);\n                // currSlide.pan[axis] = newPan;\n            } else {\n                // If main scroll is shifted\n                if (mainScrollShiftDiff !== 0) {\n                    // If main scroll is shifted right\n                    if (mainScrollShiftDiff > 0 /* && isRightToLeft */) {\n                        mainScroll.moveTo(Math.max(newMainScrollX, currSlideMainScrollX), true);\n                        return true;\n                    } if (mainScrollShiftDiff < 0 /* && isLeftToRight */) {\n                        // Main scroll is shifted left (Position is less than 0 comparing to the viewport 0)\n                        mainScroll.moveTo(Math.min(newMainScrollX, currSlideMainScrollX), true);\n                        return true;\n                    }\n                } else {\n                    // We are within pan bounds, so just pan\n                    this._setPanWithFriction(axis, newPan);\n                }\n            }\n        } else if (axis === 'y') {\n        // Do not pan vertically if main scroll is shifted o\n            if (!mainScroll.isShifted() && bounds.min.y !== bounds.max.y) {\n                this._setPanWithFriction(axis, newPan);\n            }\n        } else {\n            this._setPanWithFriction(axis, newPan);\n        }\n    }\n    //\n    // If we move above - the ratio is negative\n    // If we move below the ratio is positive\n\n    /**\n   * Relation between pan Y position and third of viewport height.\n   *\n   * When we are at initial position (center bounds) - the ratio is 0,\n   * if position is shifted upwards - the ratio is negative,\n   * if position is shifted downwards - the ratio is positive.\n   *\n   * @private\n   * @param {number} panY The current pan Y position.\n   */\n    _getVerticalDragRatio(panY) {\n        return (panY - this.pswp.currSlide.bounds.center.y) /\n            (this.pswp.viewportSize.y / 3);\n    }\n\n    /**\n   * Set pan position of the current slide.\n   * Apply friction if the position is beyond the pan bounds,\n   * or if custom friction is defined.\n   *\n   * @private\n   * @param {'x' | 'y'} axis\n   * @param {number} potentialPan\n   * @param {number=} customFriction (0.1 - 1)\n   */\n    _setPanWithFriction(axis, potentialPan, customFriction) {\n        const { pan, bounds } = this.pswp.currSlide;\n        const correctedPan = bounds.correctPan(axis, potentialPan);\n        // If we are out of pan bounds\n        if (correctedPan !== potentialPan || customFriction) {\n            const delta = Math.round(potentialPan - pan[axis]);\n            pan[axis] += delta * (customFriction || PAN_END_FRICTION);\n        } else {\n            pan[axis] = potentialPan;\n        }\n    }\n}\n\n/** @typedef {import('../photoswipe.js').Point} Point */\n/** @typedef {import('./gestures.js').default} Gestures */\n\nconst UPPER_ZOOM_FRICTION = 0.05;\nconst LOWER_ZOOM_FRICTION = 0.15;\n\n/**\n * Get center point between two points\n *\n * @param {Point} p\n * @param {Point} p1\n * @param {Point} p2\n */\nfunction getZoomPointsCenter(p, p1, p2) {\n    p.x = (p1.x + p2.x) / 2;\n    p.y = (p1.y + p2.y) / 2;\n    return p;\n}\n\nclass ZoomHandler {\n    /**\n   * @param {Gestures} gestures\n   */\n    constructor(gestures) {\n        this.gestures = gestures;\n        this.pswp = this.gestures.pswp;\n        /** @type {Point} */\n        this._startPan = {};\n\n        /** @type {Point} */\n        this._startZoomPoint = {};\n        /** @type {Point} */\n        this._zoomPoint = {};\n    }\n\n    start() {\n        this._startZoomLevel = this.pswp.currSlide.currZoomLevel;\n        equalizePoints(this._startPan, this.pswp.currSlide.pan);\n        this.pswp.animations.stopAllPan();\n        this._wasOverFitZoomLevel = false;\n    }\n\n    change() {\n        const {\n            p1, startP1, p2, startP2, pswp,\n        } = this.gestures;\n        const { currSlide } = pswp;\n        const minZoomLevel = currSlide.zoomLevels.min;\n        const maxZoomLevel = currSlide.zoomLevels.max;\n\n        if (!currSlide.isZoomable() || pswp.mainScroll.isShifted()) {\n            return;\n        }\n\n        getZoomPointsCenter(this._startZoomPoint, startP1, startP2);\n        getZoomPointsCenter(this._zoomPoint, p1, p2);\n\n        let currZoomLevel = (1 / getDistanceBetween(startP1, startP2)) *\n                      getDistanceBetween(p1, p2) *\n                      this._startZoomLevel;\n\n        // slightly over the zoom.fit\n        if (currZoomLevel > currSlide.zoomLevels.initial + (currSlide.zoomLevels.initial / 15)) {\n            this._wasOverFitZoomLevel = true;\n        }\n\n        if (currZoomLevel < minZoomLevel) {\n            if (pswp.options.pinchToClose &&\n          !this._wasOverFitZoomLevel &&\n          this._startZoomLevel <= currSlide.zoomLevels.initial) {\n                // fade out background if zooming out\n                const bgOpacity = 1 - ((minZoomLevel - currZoomLevel) / (minZoomLevel / 1.2));\n                if (!pswp.dispatch('pinchClose', { bgOpacity }).defaultPrevented) {\n                    pswp.applyBgOpacity(bgOpacity);\n                }\n            } else {\n                // Apply the friction if zoom level is below the min\n                currZoomLevel = minZoomLevel - (minZoomLevel - currZoomLevel) * LOWER_ZOOM_FRICTION;\n            }\n        } else if (currZoomLevel > maxZoomLevel) {\n            // Apply the friction if zoom level is above the max\n            currZoomLevel = maxZoomLevel + (currZoomLevel - maxZoomLevel) * UPPER_ZOOM_FRICTION;\n        }\n\n        currSlide.pan.x = this._calculatePanForZoomLevel('x', currZoomLevel);\n        currSlide.pan.y = this._calculatePanForZoomLevel('y', currZoomLevel);\n\n        currSlide.setZoomLevel(currZoomLevel);\n        currSlide.applyCurrentZoomPan();\n    }\n\n    end() {\n        const { pswp } = this;\n        const { currSlide } = pswp;\n        if (currSlide.currZoomLevel < currSlide.zoomLevels.initial &&\n        !this._wasOverFitZoomLevel &&\n        pswp.options.pinchToClose) {\n            pswp.close();\n        } else {\n            this.correctZoomPan();\n        }\n    }\n\n    /**\n   * @private\n   * @param {'x' | 'y'} axis\n   * @param {number} currZoomLevel\n   */\n    _calculatePanForZoomLevel(axis, currZoomLevel) {\n        const zoomFactor = currZoomLevel / this._startZoomLevel;\n        return this._zoomPoint[axis] -\n            ((this._startZoomPoint[axis] - this._startPan[axis]) * zoomFactor);\n    }\n\n    /**\n   * Correct currZoomLevel and pan if they are\n   * beyond minimum or maximum values.\n   * With animation.\n   *\n   * @param {boolean=} ignoreGesture\n   * Wether gesture coordinates should be ignored when calculating destination pan position.\n   */\n    correctZoomPan(ignoreGesture) {\n        const { pswp } = this;\n        const { currSlide } = pswp;\n\n        if (!currSlide.isZoomable()) {\n            return;\n        }\n\n        if (this._zoomPoint.x === undefined) {\n            ignoreGesture = true;\n        }\n\n        const prevZoomLevel = currSlide.currZoomLevel;\n\n        /** @type {number} */\n        let destinationZoomLevel;\n        let currZoomLevelNeedsChange = true;\n\n        if (prevZoomLevel < currSlide.zoomLevels.initial) {\n            destinationZoomLevel = currSlide.zoomLevels.initial;\n            // zoom to min\n        } else if (prevZoomLevel > currSlide.zoomLevels.max) {\n            destinationZoomLevel = currSlide.zoomLevels.max;\n            // zoom to max\n        } else {\n            currZoomLevelNeedsChange = false;\n            destinationZoomLevel = prevZoomLevel;\n        }\n\n        const initialBgOpacity = pswp.bgOpacity;\n        const restoreBgOpacity = pswp.bgOpacity < 1;\n\n        const initialPan = equalizePoints({}, currSlide.pan);\n        let destinationPan = equalizePoints({}, initialPan);\n\n        if (ignoreGesture) {\n            this._zoomPoint.x = 0;\n            this._zoomPoint.y = 0;\n            this._startZoomPoint.x = 0;\n            this._startZoomPoint.y = 0;\n            this._startZoomLevel = prevZoomLevel;\n            equalizePoints(this._startPan, initialPan);\n        }\n\n        if (currZoomLevelNeedsChange) {\n            destinationPan = {\n                x: this._calculatePanForZoomLevel('x', destinationZoomLevel),\n                y: this._calculatePanForZoomLevel('y', destinationZoomLevel),\n            };\n        }\n\n        // set zoom level, so pan bounds are updated according to it\n        currSlide.setZoomLevel(destinationZoomLevel);\n\n        destinationPan = {\n            x: currSlide.bounds.correctPan('x', destinationPan.x),\n            y: currSlide.bounds.correctPan('y', destinationPan.y),\n        };\n\n        // return zoom level and its bounds to initial\n        currSlide.setZoomLevel(prevZoomLevel);\n\n        let panNeedsChange = true;\n        if (pointsEqual(destinationPan, initialPan)) {\n            panNeedsChange = false;\n        }\n\n        if (!panNeedsChange && !currZoomLevelNeedsChange && !restoreBgOpacity) {\n            // update resolution after gesture\n            currSlide._setResolution(destinationZoomLevel);\n            currSlide.applyCurrentZoomPan();\n\n            // nothing to animate\n            return;\n        }\n\n        pswp.animations.stopAllPan();\n\n        pswp.animations.startSpring({\n            isPan: true,\n            start: 0,\n            end: 1000,\n            velocity: 0,\n            dampingRatio: 1,\n            naturalFrequency: 40,\n            onUpdate: (now) => {\n                now /= 1000; // 0 - start, 1 - end\n\n                if (panNeedsChange || currZoomLevelNeedsChange) {\n                    if (panNeedsChange) {\n                        currSlide.pan.x = initialPan.x + (destinationPan.x - initialPan.x) * now;\n                        currSlide.pan.y = initialPan.y + (destinationPan.y - initialPan.y) * now;\n                    }\n\n                    if (currZoomLevelNeedsChange) {\n                        const newZoomLevel = prevZoomLevel +\n                        (destinationZoomLevel - prevZoomLevel) * now;\n                        currSlide.setZoomLevel(newZoomLevel);\n                    }\n\n                    currSlide.applyCurrentZoomPan();\n                }\n\n                // Restore background opacity\n                if (restoreBgOpacity && pswp.bgOpacity < 1) {\n                    // We clamp opacity to keep it between 0 and 1.\n                    // As progress ratio can be larger than 1 due to overshoot,\n                    // and we do not want to bounce opacity.\n                    pswp.applyBgOpacity(clamp(\n                        initialBgOpacity + (1 - initialBgOpacity) * now, 0, 1,\n                    ));\n                }\n            },\n            onComplete: () => {\n                // update resolution after transition ends\n                currSlide._setResolution(destinationZoomLevel);\n                currSlide.applyCurrentZoomPan();\n            },\n        });\n    }\n}\n\n/**\n * @template T\n * @template P\n * @typedef {import('../types.js').AddPostfix<T, P>} AddPostfix<T, P>\n */\n\n/** @typedef {import('./gestures.js').default} Gestures */\n\n/** @typedef {'imageClick' | 'bgClick' | 'tap' | 'doubleTap'} Actions */\n/** @typedef {{ x?: number; y?: number }} Point */\n\n/**\n * Whether the tap was performed on the main slide\n * (rather than controls or caption).\n *\n * @param {PointerEvent} event\n */\nfunction didTapOnMainContent(event) {\n    return !!(/** @type {HTMLElement} */ (event.target).closest('.pswp__container'));\n}\n\n/**\n * Tap, double-tap handler.\n */\nclass TapHandler {\n    /**\n   * @param {Gestures} gestures\n   */\n    constructor(gestures) {\n        this.gestures = gestures;\n    }\n\n    /**\n   * @param {Point} point\n   * @param {PointerEvent} originalEvent\n   */\n    click(point, originalEvent) {\n        const targetClassList = /** @type {HTMLElement} */ (originalEvent.target).classList;\n        const isImageClick = targetClassList.contains('pswp__img');\n        const isBackgroundClick = targetClassList.contains('pswp__item') ||\n                              targetClassList.contains('pswp__zoom-wrap');\n\n        if (isImageClick) {\n            this._doClickOrTapAction('imageClick', point, originalEvent);\n        } else if (isBackgroundClick) {\n            this._doClickOrTapAction('bgClick', point, originalEvent);\n        }\n    }\n\n    /**\n   * @param {Point} point\n   * @param {PointerEvent} originalEvent\n   */\n    tap(point, originalEvent) {\n        if (didTapOnMainContent(originalEvent)) {\n            this._doClickOrTapAction('tap', point, originalEvent);\n        }\n    }\n\n    /**\n   * @param {Point} point\n   * @param {PointerEvent} originalEvent\n   */\n    doubleTap(point, originalEvent) {\n        if (didTapOnMainContent(originalEvent)) {\n            this._doClickOrTapAction('doubleTap', point, originalEvent);\n        }\n    }\n\n    /**\n   * @param {Actions} actionName\n   * @param {Point} point\n   * @param {PointerEvent} originalEvent\n   */\n    _doClickOrTapAction(actionName, point, originalEvent) {\n        const { pswp } = this.gestures;\n        const { currSlide } = pswp;\n        const actionFullName = /** @type {AddPostfix<Actions, 'Action'>} */ (`${actionName}Action`);\n        const optionValue = pswp.options[actionFullName];\n\n        if (pswp.dispatch(actionFullName, { point, originalEvent }).defaultPrevented) {\n            return;\n        }\n\n        if (typeof optionValue === 'function') {\n            optionValue.call(pswp, point, originalEvent);\n            return;\n        }\n\n        switch (optionValue) {\n            case 'close':\n            case 'next':\n                pswp[optionValue]();\n                break;\n            case 'zoom':\n                currSlide.toggleZoom(point);\n                break;\n            case 'zoom-or-close':\n                // by default click zooms current image,\n                // if it can not be zoomed - gallery will be closed\n                if (currSlide.isZoomable() &&\n            currSlide.zoomLevels.secondary !== currSlide.zoomLevels.initial) {\n                    currSlide.toggleZoom(point);\n                } else if (pswp.options.clickToCloseNonZoomable) {\n                    pswp.close();\n                }\n                break;\n            case 'toggle-controls':\n                this.gestures.pswp.element.classList.toggle('pswp--ui-visible');\n                // if (_controlsVisible) {\n                //   _ui.hideControls();\n                // } else {\n                //   _ui.showControls();\n                // }\n                break;\n        }\n    }\n}\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').Point} Point */\n\n// How far should user should drag\n// until we can determine that the gesture is swipe and its direction\nconst AXIS_SWIPE_HYSTERISIS = 10;\n// const PAN_END_FRICTION = 0.35;\n\nconst DOUBLE_TAP_DELAY = 300; // ms\nconst MIN_TAP_DISTANCE = 25; // px\n\n/**\n * Gestures class bind touch, pointer or mouse events\n * and emits drag to drag-handler and zoom events zoom-handler.\n *\n * Drag and zoom events are emited in requestAnimationFrame,\n * and only when one of pointers was actually changed.\n */\nclass Gestures {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n\n        /** @type {'x' | 'y'} */\n        this.dragAxis = undefined;\n\n        // point objects are defined once and reused\n        // PhotoSwipe keeps track only of two pointers, others are ignored\n        /** @type {Point} */\n        this.p1 = {}; // the first pressed pointer\n        /** @type {Point} */\n        this.p2 = {}; // the second pressed pointer\n        /** @type {Point} */\n        this.prevP1 = {};\n        /** @type {Point} */\n        this.prevP2 = {};\n        /** @type {Point} */\n        this.startP1 = {};\n        /** @type {Point} */\n        this.startP2 = {};\n        /** @type {Point} */\n        this.velocity = {};\n\n        /** @type {Point} */\n        this._lastStartP1 = {};\n        /** @type {Point} */\n        this._intervalP1 = {};\n        this._numActivePoints = 0;\n        /** @type {Point[]} */\n        this._ongoingPointers = [];\n\n        this._touchEventEnabled = 'ontouchstart' in window;\n        this._pointerEventEnabled = !!(window.PointerEvent);\n        this.supportsTouch = this._touchEventEnabled ||\n                          (this._pointerEventEnabled && navigator.maxTouchPoints > 1);\n\n        if (!this.supportsTouch) {\n            // disable pan to next slide for non-touch devices\n            pswp.options.allowPanToNext = false;\n        }\n\n        this.drag = new DragHandler(this);\n        this.zoomLevels = new ZoomHandler(this);\n        this.tapHandler = new TapHandler(this);\n\n        pswp.on('bindEvents', () => {\n            pswp.events.add(pswp.scrollWrap, 'click', (e) => this._onClick(e));\n\n            if (this._pointerEventEnabled) {\n                this._bindEvents('pointer', 'down', 'up', 'cancel');\n            } else if (this._touchEventEnabled) {\n                this._bindEvents('touch', 'start', 'end', 'cancel');\n\n                // In previous versions we also bound mouse event here,\n                // in case device supports both touch and mouse events,\n                // but newer versions of browsers now support PointerEvent.\n\n                // on iOS10 if you bind touchmove/end after touchstart,\n                // and you don't preventDefault touchstart (which PhotoSwipe does),\n                // preventDefault will have no effect on touchmove and touchend.\n                // Unless you bind it previously.\n        pswp.scrollWrap.ontouchmove = () => {}; // eslint-disable-line\n        pswp.scrollWrap.ontouchend = () => {}; // eslint-disable-line\n            } else {\n                this._bindEvents('mouse', 'down', 'up');\n            }\n        });\n    }\n\n    /**\n   *\n   * @param {'mouse' | 'touch' | 'pointer'} pref\n   * @param {'down' | 'start'} down\n   * @param {'up' | 'end'} up\n   * @param {'cancel'} [cancel]\n   */\n    _bindEvents(pref, down, up, cancel) {\n        const { pswp } = this;\n        const { events } = pswp;\n\n        const cancelEvent = cancel ? pref + cancel : '';\n\n        events.add(pswp.scrollWrap, pref + down, this.onPointerDown.bind(this));\n        events.add(window, `${pref}move`, this.onPointerMove.bind(this));\n        events.add(window, pref + up, this.onPointerUp.bind(this));\n        if (cancelEvent) {\n            events.add(pswp.scrollWrap, cancelEvent, this.onPointerUp.bind(this));\n        }\n    }\n\n    /**\n   * @param {PointerEvent} e\n   */\n    onPointerDown(e) {\n    // We do not call preventDefault for touch events\n    // to allow browser to show native dialog on longpress\n    // (the one that allows to save image or open it in new tab).\n    //\n    // Desktop Safari allows to drag images when preventDefault isn't called on mousedown,\n    // even though preventDefault IS called on mousemove. That's why we preventDefault mousedown.\n        let isMousePointer;\n        if (e.type === 'mousedown' || e.pointerType === 'mouse') {\n            isMousePointer = true;\n        }\n\n        // Allow dragging only via left mouse button.\n        // http://www.quirksmode.org/js/events_properties.html\n        // https://developer.mozilla.org/en-US/docs/Web/API/event.button\n        if (isMousePointer && e.button > 0) {\n            return;\n        }\n\n        const { pswp } = this;\n\n        // if PhotoSwipe is opening or closing\n        if (!pswp.opener.isOpen) {\n            e.preventDefault();\n            return;\n        }\n\n        if (pswp.dispatch('pointerDown', { originalEvent: e }).defaultPrevented) {\n            return;\n        }\n\n        if (isMousePointer) {\n            pswp.mouseDetected();\n\n            // preventDefault mouse event to prevent\n            // browser image drag feature\n            this._preventPointerEventBehaviour(e);\n        }\n\n        pswp.animations.stopAll();\n\n        this._updatePoints(e, 'down');\n\n        this.pointerDown = true;\n\n        if (this._numActivePoints === 1) {\n            this.dragAxis = null;\n            // we need to store initial point to determine the main axis,\n            // drag is activated only after the axis is determined\n            equalizePoints(this.startP1, this.p1);\n        }\n\n        if (this._numActivePoints > 1) {\n            // Tap or double tap should not trigger if more than one pointer\n            this._clearTapTimer();\n            this.isMultitouch = true;\n        } else {\n            this.isMultitouch = false;\n        }\n    }\n\n    /**\n   * @param {PointerEvent} e\n   */\n    onPointerMove(e) {\n        e.preventDefault(); // always preventDefault move event\n\n        if (!this._numActivePoints) {\n            return;\n        }\n\n        this._updatePoints(e, 'move');\n\n        if (this.pswp.dispatch('pointerMove', { originalEvent: e }).defaultPrevented) {\n            return;\n        }\n\n        if (this._numActivePoints === 1 && !this.isDragging) {\n            if (!this.dragAxis) {\n                this._calculateDragDirection();\n            }\n\n            // Drag axis was detected, emit drag.start\n            if (this.dragAxis && !this.isDragging) {\n                if (this.isZooming) {\n                    this.isZooming = false;\n                    this.zoomLevels.end();\n                }\n\n                this.isDragging = true;\n                this._clearTapTimer(); // Tap can not trigger after drag\n\n                // Adjust starting point\n                this._updateStartPoints();\n                this._intervalTime = Date.now();\n                // this._startTime = this._intervalTime;\n                this._velocityCalculated = false;\n                equalizePoints(this._intervalP1, this.p1);\n                this.velocity.x = 0;\n                this.velocity.y = 0;\n                this.drag.start();\n\n                this._rafStopLoop();\n                this._rafRenderLoop();\n            }\n        } else if (this._numActivePoints > 1 && !this.isZooming) {\n            this._finishDrag();\n\n            this.isZooming = true;\n\n            // Adjust starting points\n            this._updateStartPoints();\n\n            this.zoomLevels.start();\n\n            this._rafStopLoop();\n            this._rafRenderLoop();\n        }\n    }\n\n    /**\n   * @private\n   */\n    _finishDrag() {\n        if (this.isDragging) {\n            this.isDragging = false;\n\n            // Try to calculate velocity,\n            // if it wasn't calculated yet in drag.change\n            if (!this._velocityCalculated) {\n                this._updateVelocity(true);\n            }\n\n            this.drag.end();\n            this.dragAxis = null;\n        }\n    }\n\n    /**\n   * @param {PointerEvent} e\n   */\n    onPointerUp(e) {\n        if (!this._numActivePoints) {\n            return;\n        }\n\n        this._updatePoints(e, 'up');\n\n        if (this.pswp.dispatch('pointerUp', { originalEvent: e }).defaultPrevented) {\n            return;\n        }\n\n        if (this._numActivePoints === 0) {\n            this.pointerDown = false;\n            this._rafStopLoop();\n\n            if (this.isDragging) {\n                this._finishDrag();\n            } else if (!this.isZooming && !this.isMultitouch) {\n                // this.zoomLevels.correctZoomPan();\n                this._finishTap(e);\n            }\n        }\n\n        if (this._numActivePoints < 2 && this.isZooming) {\n            this.isZooming = false;\n            this.zoomLevels.end();\n\n            if (this._numActivePoints === 1) {\n                // Since we have 1 point left, we need to reinitiate drag\n                this.dragAxis = null;\n                this._updateStartPoints();\n            }\n        }\n    }\n\n    /**\n   * @private\n   */\n    _rafRenderLoop() {\n        if (this.isDragging || this.isZooming) {\n            this._updateVelocity();\n\n            if (this.isDragging) {\n                // make sure that pointer moved since the last update\n                if (!pointsEqual(this.p1, this.prevP1)) {\n                    this.drag.change();\n                }\n            } else /* if (this.isZooming) */ if (!pointsEqual(this.p1, this.prevP1) ||\n            !pointsEqual(this.p2, this.prevP2)) {\n                this.zoomLevels.change();\n            }\n\n            this._updatePrevPoints();\n            this.raf = requestAnimationFrame(this._rafRenderLoop.bind(this));\n        }\n    }\n\n    /**\n   * Update velocity at 50ms interval\n   *\n   * @param {boolean=} force\n   */\n    _updateVelocity(force) {\n        const time = Date.now();\n        const duration = time - this._intervalTime;\n\n        if (duration < 50 && !force) {\n            return;\n        }\n\n        this.velocity.x = this._getVelocity('x', duration);\n        this.velocity.y = this._getVelocity('y', duration);\n\n        this._intervalTime = time;\n        equalizePoints(this._intervalP1, this.p1);\n        this._velocityCalculated = true;\n    }\n\n    /**\n   * @private\n   * @param {PointerEvent} e\n   */\n    _finishTap(e) {\n        const { mainScroll } = this.pswp;\n\n        // Do not trigger tap events if main scroll is shifted\n        if (mainScroll.isShifted()) {\n            // restore main scroll position\n            // (usually happens if stopped in the middle of animation)\n            mainScroll.moveIndexBy(0, true);\n            return;\n        }\n\n        // Do not trigger tap for touchcancel or pointercancel\n        if (e.type.indexOf('cancel') > 0) {\n            return;\n        }\n\n        // Trigger click instead of tap for mouse events\n        if (e.type === 'mouseup' || e.pointerType === 'mouse') {\n            this.tapHandler.click(this.startP1, e);\n            return;\n        }\n\n        // Disable delay if there is no doubleTapAction\n        const tapDelay = this.pswp.options.doubleTapAction ? DOUBLE_TAP_DELAY : 0;\n\n        // If tapTimer is defined - we tapped recently,\n        // check if the current tap is close to the previous one,\n        // if yes - trigger double tap\n        if (this._tapTimer) {\n            this._clearTapTimer();\n            // Check if two taps were more or less on the same place\n            if (getDistanceBetween(this._lastStartP1, this.startP1) < MIN_TAP_DISTANCE) {\n                this.tapHandler.doubleTap(this.startP1, e);\n            }\n        } else {\n            equalizePoints(this._lastStartP1, this.startP1);\n            this._tapTimer = setTimeout(() => {\n                this.tapHandler.tap(this.startP1, e);\n                this._clearTapTimer();\n            }, tapDelay);\n        }\n    }\n\n    /**\n   * @private\n   */\n    _clearTapTimer() {\n        if (this._tapTimer) {\n            clearTimeout(this._tapTimer);\n            this._tapTimer = null;\n        }\n    }\n\n    /**\n   * Get velocity for axis\n   *\n   * @private\n   * @param {'x' | 'y'} axis\n   * @param {number} duration\n   */\n    _getVelocity(axis, duration) {\n    // displacement is like distance, but can be negative.\n        const displacement = this.p1[axis] - this._intervalP1[axis];\n\n        if (Math.abs(displacement) > 1 && duration > 5) {\n            return displacement / duration;\n        }\n\n        return 0;\n    }\n\n    /**\n   * @private\n   */\n    _rafStopLoop() {\n        if (this.raf) {\n            cancelAnimationFrame(this.raf);\n            this.raf = null;\n        }\n    }\n\n    /**\n   * @private\n   * @param {PointerEvent} e\n   */\n    _preventPointerEventBehaviour(e) {\n    // TODO find a way to disable e.preventDefault on some elements\n    //      via event or some class or something\n        e.preventDefault();\n        return true;\n    }\n\n    /**\n   * Parses and normalizes points from the touch, mouse or pointer event.\n   * Updates p1 and p2.\n   *\n   * @private\n   * @param {PointerEvent | TouchEvent} e\n   * @param {'up' | 'down' | 'move'} pointerType Normalized pointer type\n   */\n    _updatePoints(e, pointerType) {\n        if (this._pointerEventEnabled) {\n            const pointerEvent = /** @type {PointerEvent} */ (e);\n            // Try to find the current pointer in ongoing pointers by its ID\n            const pointerIndex = this._ongoingPointers.findIndex((ongoingPoiner) => ongoingPoiner.id === pointerEvent.pointerId);\n\n            if (pointerType === 'up' && pointerIndex > -1) {\n                // release the pointer - remove it from ongoing\n                this._ongoingPointers.splice(pointerIndex, 1);\n            } else if (pointerType === 'down' && pointerIndex === -1) {\n                // add new pointer\n                this._ongoingPointers.push(this._convertEventPosToPoint(pointerEvent, {}));\n            } else if (pointerIndex > -1) {\n                // update existing pointer\n                this._convertEventPosToPoint(pointerEvent, this._ongoingPointers[pointerIndex]);\n            }\n\n            this._numActivePoints = this._ongoingPointers.length;\n\n            // update points that PhotoSwipe uses\n            // to calculate position and scale\n            if (this._numActivePoints > 0) {\n                equalizePoints(this.p1, this._ongoingPointers[0]);\n            }\n\n            if (this._numActivePoints > 1) {\n                equalizePoints(this.p2, this._ongoingPointers[1]);\n            }\n        } else {\n            const touchEvent = /** @type {TouchEvent} */ (e);\n\n            this._numActivePoints = 0;\n            if (touchEvent.type.indexOf('touch') > -1) {\n                // Touch Event\n                // https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent\n                if (touchEvent.touches && touchEvent.touches.length > 0) {\n                    this._convertEventPosToPoint(touchEvent.touches[0], this.p1);\n                    this._numActivePoints++;\n                    if (touchEvent.touches.length > 1) {\n                        this._convertEventPosToPoint(touchEvent.touches[1], this.p2);\n                        this._numActivePoints++;\n                    }\n                }\n            } else {\n                // Mouse Event\n                this._convertEventPosToPoint(/** @type {PointerEvent} */ (e), this.p1);\n                if (pointerType === 'up') {\n                    // clear all points on mouseup\n                    this._numActivePoints = 0;\n                } else {\n                    this._numActivePoints++;\n                }\n            }\n        }\n    }\n\n    // update points that were used during previous rAF tick\n    _updatePrevPoints() {\n        equalizePoints(this.prevP1, this.p1);\n        equalizePoints(this.prevP2, this.p2);\n    }\n\n    // update points at the start of gesture\n    _updateStartPoints() {\n        equalizePoints(this.startP1, this.p1);\n        equalizePoints(this.startP2, this.p2);\n        this._updatePrevPoints();\n    }\n\n    _calculateDragDirection() {\n        if (this.pswp.mainScroll.isShifted()) {\n            // if main scroll position is shifted – direction is always horizontal\n            this.dragAxis = 'x';\n        } else {\n            // calculate delta of the last touchmove tick\n            const diff = Math.abs(this.p1.x - this.startP1.x) - Math.abs(this.p1.y - this.startP1.y);\n\n            if (diff !== 0) {\n                // check if pointer was shifted horizontally or vertically\n                const axisToCheck = diff > 0 ? 'x' : 'y';\n\n                if (Math.abs(this.p1[axisToCheck] - this.startP1[axisToCheck]) >= AXIS_SWIPE_HYSTERISIS) {\n                    this.dragAxis = axisToCheck;\n                }\n            }\n        }\n    }\n\n    /**\n   * Converts touch, pointer or mouse event\n   * to PhotoSwipe point.\n   *\n   * @private\n   * @param {Touch | PointerEvent} e\n   * @param {Point} p\n   */\n    _convertEventPosToPoint(e, p) {\n        p.x = e.pageX - this.pswp.offset.x;\n        p.y = e.pageY - this.pswp.offset.y;\n\n        if ('pointerId' in e) {\n            p.id = e.pointerId;\n        } else if (e.identifier !== undefined) {\n            p.id = e.identifier;\n        }\n\n        return p;\n    }\n\n    /**\n   * @private\n   * @param {PointerEvent} e\n   */\n    _onClick(e) {\n    // Do not allow click event to pass through after drag\n        if (this.pswp.mainScroll.isShifted()) {\n            e.preventDefault();\n            e.stopPropagation();\n        }\n    }\n}\n\n/** @typedef {import('./photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('./slide/slide.js').default} Slide */\n\n/** @typedef {{ el: HTMLDivElement; slide?: Slide }} ItemHolder */\n\nconst MAIN_SCROLL_END_FRICTION = 0.35;\n\n// const MIN_SWIPE_TRANSITION_DURATION = 250;\n// const MAX_SWIPE_TRABSITION_DURATION = 500;\n// const DEFAULT_SWIPE_TRANSITION_DURATION = 333;\n\n/**\n * Handles movement of the main scrolling container\n * (for example, it repositions when user swipes left or right).\n *\n * Also stores its state.\n */\nclass MainScroll {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n        this.x = 0;\n\n        /** @type {number} */\n        this.slideWidth = undefined;\n\n        /** @type {ItemHolder[]} */\n        this.itemHolders = undefined;\n\n        this.resetPosition();\n    }\n\n    /**\n   * Position the scroller and slide containers\n   * according to viewport size.\n   *\n   * @param {boolean=} resizeSlides Whether slides content should resized\n   */\n    resize(resizeSlides) {\n        const { pswp } = this;\n        const newSlideWidth = Math.round(\n            pswp.viewportSize.x + pswp.viewportSize.x * pswp.options.spacing,\n        );\n        // Mobile browsers might trigger a resize event during a gesture.\n        // (due to toolbar appearing or hiding).\n        // Avoid re-adjusting main scroll position if width wasn't changed\n        const slideWidthChanged = (newSlideWidth !== this.slideWidth);\n\n        if (slideWidthChanged) {\n            this.slideWidth = newSlideWidth;\n            this.moveTo(this.getCurrSlideX());\n        }\n\n        this.itemHolders.forEach((itemHolder, index) => {\n            if (slideWidthChanged) {\n                setTransform(itemHolder.el, (index + this._containerShiftIndex) *\n                                    this.slideWidth);\n            }\n\n            if (resizeSlides && itemHolder.slide) {\n                itemHolder.slide.resize();\n            }\n        });\n    }\n\n    /**\n   * Reset X position of the main scroller to zero\n   */\n    resetPosition() {\n    // Position on the main scroller (offset)\n    // it is independent from slide index\n        this._currPositionIndex = 0;\n        this._prevPositionIndex = 0;\n\n        // This will force recalculation of size on next resize()\n        this.slideWidth = 0;\n\n        // _containerShiftIndex*viewportSize will give you amount of transform of the current slide\n        this._containerShiftIndex = -1;\n    }\n\n    /**\n   * Create and append array of three items\n   * that hold data about slides in DOM\n   */\n    appendHolders() {\n        this.itemHolders = [];\n\n        // append our three slide holders -\n        // previous, current, and next\n        for (let i = 0; i < 3; i++) {\n            const el = createElement('pswp__item', false, this.pswp.container);\n\n            // hide nearby item holders until initial zoom animation finishes (to avoid extra Paints)\n            el.style.display = (i === 1) ? 'block' : 'none';\n\n            this.itemHolders.push({\n                el,\n                // index: -1\n            });\n        }\n    }\n\n    /**\n   * Whether the main scroll can be horizontally swiped to the next or previous slide.\n   */\n    canBeSwiped() {\n        return this.pswp.getNumItems() > 1;\n    }\n\n    /**\n   * Move main scroll by X amount of slides.\n   * For example:\n   *   `-1` will move to the previous slide,\n   *    `0` will reset the scroll position of the current slide,\n   *    `3` will move three slides forward\n   *\n   * If loop option is enabled - index will be automatically looped too,\n   * (for example `-1` will move to the last slide of the gallery).\n   *\n   * @param {number} diff\n   * @param {boolean=} animate\n   * @param {number=} velocityX\n   * @returns {boolean} whether index was changed or not\n   */\n    moveIndexBy(diff, animate, velocityX) {\n        const { pswp } = this;\n        let newIndex = pswp.potentialIndex + diff;\n        const numSlides = pswp.getNumItems();\n\n        if (pswp.canLoop()) {\n            newIndex = pswp.getLoopedIndex(newIndex);\n            const distance = (diff + numSlides) % numSlides;\n            if (distance <= numSlides / 2) {\n                // go forward\n                diff = distance;\n            } else {\n                // go backwards\n                diff = distance - numSlides;\n            }\n        } else {\n            if (newIndex < 0) {\n                newIndex = 0;\n            } else if (newIndex >= numSlides) {\n                newIndex = numSlides - 1;\n            }\n            diff = newIndex - pswp.potentialIndex;\n        }\n\n        pswp.potentialIndex = newIndex;\n        this._currPositionIndex -= diff;\n\n        pswp.animations.stopMainScroll();\n\n        const destinationX = this.getCurrSlideX();\n        if (!animate) {\n            this.moveTo(destinationX);\n            this.updateCurrItem();\n        } else {\n            pswp.animations.startSpring({\n                isMainScroll: true,\n                start: this.x,\n                end: destinationX,\n                velocity: velocityX || 0,\n                naturalFrequency: 30,\n                dampingRatio: 1, // 0.7,\n                onUpdate: (x) => {\n                    this.moveTo(x);\n                },\n                onComplete: () => {\n                    this.updateCurrItem();\n                    pswp.appendHeavy();\n                },\n            });\n\n            let currDiff = pswp.potentialIndex - pswp.currIndex;\n            if (pswp.canLoop()) {\n                const currDistance = (currDiff + numSlides) % numSlides;\n                if (currDistance <= numSlides / 2) {\n                    // go forward\n                    currDiff = currDistance;\n                } else {\n                    // go backwards\n                    currDiff = currDistance - numSlides;\n                }\n            }\n\n            // Force-append new slides during transition\n            // if difference between slides is more than 1\n            if (Math.abs(currDiff) > 1) {\n                this.updateCurrItem();\n            }\n        }\n\n        if (diff) {\n            return true;\n        }\n    }\n\n    /**\n   * X position of the main scroll for the current slide\n   * (ignores position during dragging)\n   */\n    getCurrSlideX() {\n        return this.slideWidth * this._currPositionIndex;\n    }\n\n    /**\n   * Whether scroll position is shifted.\n   * For example, it will return true if the scroll is being dragged or animated.\n   */\n    isShifted() {\n        return this.x !== this.getCurrSlideX();\n    }\n\n    /**\n   * Update slides X positions and set their content\n   */\n    updateCurrItem() {\n        const { pswp } = this;\n        const positionDifference = this._prevPositionIndex - this._currPositionIndex;\n\n        if (!positionDifference) {\n            return;\n        }\n\n        this._prevPositionIndex = this._currPositionIndex;\n\n        pswp.currIndex = pswp.potentialIndex;\n\n        let diffAbs = Math.abs(positionDifference);\n        let tempHolder;\n\n        if (diffAbs >= 3) {\n            this._containerShiftIndex += positionDifference + (positionDifference > 0 ? -3 : 3);\n            diffAbs = 3;\n        }\n\n        for (let i = 0; i < diffAbs; i++) {\n            if (positionDifference > 0) {\n                tempHolder = this.itemHolders.shift();\n                this.itemHolders[2] = tempHolder; // move first to last\n\n                this._containerShiftIndex++;\n\n                setTransform(tempHolder.el, (this._containerShiftIndex + 2) * this.slideWidth);\n\n                pswp.setContent(tempHolder, (pswp.currIndex - diffAbs) + i + 2);\n            } else {\n                tempHolder = this.itemHolders.pop();\n                this.itemHolders.unshift(tempHolder); // move last to first\n\n                this._containerShiftIndex--;\n\n                setTransform(tempHolder.el, this._containerShiftIndex * this.slideWidth);\n\n                pswp.setContent(tempHolder, (pswp.currIndex + diffAbs) - i - 2);\n            }\n        }\n\n        // Reset transfrom every 50ish navigations in one direction.\n        //\n        // Otherwise transform will keep growing indefinitely,\n        // which might cause issues as browsers have a maximum transform limit.\n        // I wasn't able to reach it, but just to be safe.\n        // This should not cause noticable lag.\n        if (Math.abs(this._containerShiftIndex) > 50 && !this.isShifted()) {\n            this.resetPosition();\n            this.resize();\n        }\n\n        // Pan transition might be running (and consntantly updating pan position)\n        pswp.animations.stopAllPan();\n\n        this.itemHolders.forEach((itemHolder, i) => {\n            if (itemHolder.slide) {\n                // Slide in the 2nd holder is always active\n                itemHolder.slide.setIsActive(i === 1);\n            }\n        });\n\n        pswp.currSlide = this.itemHolders[1].slide;\n        pswp.contentLoader.updateLazy(positionDifference);\n\n        if (pswp.currSlide) {\n            pswp.currSlide.applyCurrentZoomPan();\n        }\n\n        pswp.dispatch('change');\n    }\n\n    /**\n   * Move the X position of the main scroll container\n   *\n   * @param {number} x\n   * @param {boolean=} dragging\n   */\n    moveTo(x, dragging) {\n    /** @type {number} */\n        let newSlideIndexOffset;\n        /** @type {number} */\n        let delta;\n\n        if (!this.pswp.canLoop() && dragging) {\n            // Apply friction\n            newSlideIndexOffset = ((this.slideWidth * this._currPositionIndex) - x) / this.slideWidth;\n            newSlideIndexOffset += this.pswp.currIndex;\n            delta = Math.round(x - this.x);\n\n            if ((newSlideIndexOffset < 0 && delta > 0) ||\n          (newSlideIndexOffset >= this.pswp.getNumItems() - 1 && delta < 0)) {\n                x = this.x + (delta * MAIN_SCROLL_END_FRICTION);\n            }\n        }\n\n        this.x = x;\n        setTransform(this.pswp.container, x);\n\n        this.pswp.dispatch('moveMainScroll', { x, dragging });\n    }\n}\n\n/** @typedef {import('./photoswipe.js').default} PhotoSwipe */\n\n/**\n * @template T\n * @typedef {import('./types.js').Methods<T>} Methods<T>\n */\n\n/**\n * - Manages keyboard shortcuts.\n * - Heps trap focus within photoswipe.\n */\nclass Keyboard {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n\n        pswp.on('bindEvents', () => {\n            // Dialog was likely opened by keyboard if initial point is not defined\n            if (!pswp.options.initialPointerPos) {\n                // focus causes layout,\n                // which causes lag during the animation,\n                // that's why we delay it until the opener transition ends\n                this._focusRoot();\n            }\n\n            pswp.events.add(document, 'focusin', this._onFocusIn.bind(this));\n            pswp.events.add(document, 'keydown', this._onKeyDown.bind(this));\n        });\n\n        const lastActiveElement = /** @type {HTMLElement} */ (document.activeElement);\n        pswp.on('destroy', () => {\n            if (pswp.options.returnFocus &&\n          lastActiveElement &&\n          this._wasFocused) {\n                lastActiveElement.focus();\n            }\n        });\n    }\n\n    _focusRoot() {\n        if (!this._wasFocused) {\n            this.pswp.element.focus();\n            this._wasFocused = true;\n        }\n    }\n\n    /**\n   * @param {KeyboardEvent} e\n   */\n    _onKeyDown(e) {\n        const { pswp } = this;\n\n        if (pswp.dispatch('keydown', { originalEvent: e }).defaultPrevented) {\n            return;\n        }\n\n        if (specialKeyUsed(e)) {\n            // don't do anything if special key pressed\n            // to prevent from overriding default browser actions\n            // for example, in Chrome on Mac cmd+arrow-left returns to previous page\n            return;\n        }\n\n        /** @type {Methods<PhotoSwipe>} */\n        let keydownAction;\n        /** @type {'x' | 'y'} */\n        let axis;\n        let isForward;\n\n        switch (e.keyCode) {\n            case 27: // esc\n                if (pswp.options.escKey) {\n                    keydownAction = 'close';\n                }\n                break;\n            case 90: // z key\n                keydownAction = 'toggleZoom';\n                break;\n            case 37: // left\n                axis = 'x';\n                break;\n            case 38: // top\n                axis = 'y';\n                break;\n            case 39: // right\n                axis = 'x';\n                isForward = true;\n                break;\n            case 40: // bottom\n                isForward = true;\n                axis = 'y';\n                break;\n            case 9: // tab\n                this._focusRoot();\n                break;\n        }\n\n        // if left/right/top/bottom key\n        if (axis) {\n            // prevent page scroll\n            e.preventDefault();\n\n            const { currSlide } = pswp;\n\n            if (pswp.options.arrowKeys &&\n          axis === 'x' &&\n          pswp.getNumItems() > 1) {\n                keydownAction = isForward ? 'next' : 'prev';\n            } else if (currSlide && currSlide.currZoomLevel > currSlide.zoomLevels.fit) {\n                // up/down arrow keys pan the image vertically\n                // left/right arrow keys pan horizontally.\n                // Unless there is only one image,\n                // or arrowKeys option is disabled\n                currSlide.pan[axis] += isForward ? -80 : 80;\n                currSlide.panTo(currSlide.pan.x, currSlide.pan.y);\n            }\n        }\n\n        if (keydownAction) {\n            e.preventDefault();\n            pswp[keydownAction]();\n        }\n    }\n\n    /**\n   * Trap focus inside photoswipe\n   *\n   * @param {FocusEvent} e\n   */\n    _onFocusIn(e) {\n        const { template } = this.pswp;\n        if (document !== e.target &&\n        template !== e.target &&\n        !template.contains(/** @type {Node} */ (e.target))) {\n            // focus root element\n            template.focus();\n        }\n    }\n}\n\nconst DEFAULT_EASING = 'cubic-bezier(.4,0,.22,1)';\n\n/** @typedef {import('./animations.js').AnimationProps} AnimationProps */\n\n/**\n * Runs CSS transition.\n */\nclass CSSAnimation {\n    /**\n   * onComplete can be unpredictable, be careful about current state\n   *\n   * @param {AnimationProps} props\n   */\n    constructor(props) {\n        this.props = props;\n        const {\n            target,\n            onComplete,\n            transform,\n            onFinish,\n            // opacity\n        } = props;\n\n        let {\n            duration,\n            easing,\n        } = props;\n\n        /** @type {() => void} */\n        this.onFinish = onFinish;\n\n        // support only transform and opacity\n        const prop = transform ? 'transform' : 'opacity';\n        const propValue = props[prop];\n\n        /** @private */\n        this._target = target;\n        /** @private */\n        this._onComplete = onComplete;\n\n        duration = duration || 333;\n        easing = easing || DEFAULT_EASING;\n\n        /** @private */\n        this._onTransitionEnd = this._onTransitionEnd.bind(this);\n\n        // Using timeout hack to make sure that animation\n        // starts even if the animated property was changed recently,\n        // otherwise transitionend might not fire or transiton won't start.\n        // https://drafts.csswg.org/css-transitions/#starting\n        //\n        // ¯\\_(ツ)_/¯\n        /** @private */\n        this._helperTimeout = setTimeout(() => {\n            setTransitionStyle(target, prop, duration, easing);\n            this._helperTimeout = setTimeout(() => {\n                target.addEventListener('transitionend', this._onTransitionEnd, false);\n                target.addEventListener('transitioncancel', this._onTransitionEnd, false);\n\n                // Safari occasionally does not emit transitionend event\n                // if element propery was modified during the transition,\n                // which may be caused by resize or third party component,\n                // using timeout as a safety fallback\n                this._helperTimeout = setTimeout(() => {\n                    this._finalizeAnimation();\n                }, duration + 500);\n                target.style[prop] = propValue;\n            }, 30); // Do not reduce this number\n        }, 0);\n    }\n\n    /**\n   * @private\n   * @param {TransitionEvent} e\n   */\n    _onTransitionEnd(e) {\n        if (e.target === this._target) {\n            this._finalizeAnimation();\n        }\n    }\n\n    /**\n   * @private\n   */\n    _finalizeAnimation() {\n        if (!this._finished) {\n            this._finished = true;\n            this.onFinish();\n            if (this._onComplete) {\n                this._onComplete();\n            }\n        }\n    }\n\n    // Destroy is called automatically onFinish\n    destroy() {\n        if (this._helperTimeout) {\n            clearTimeout(this._helperTimeout);\n        }\n        removeTransitionStyle(this._target);\n        this._target.removeEventListener('transitionend', this._onTransitionEnd, false);\n        this._target.removeEventListener('transitioncancel', this._onTransitionEnd, false);\n        if (!this._finished) {\n            this._finalizeAnimation();\n        }\n    }\n}\n\nconst DEFAULT_NATURAL_FREQUENCY = 12;\nconst DEFAULT_DAMPING_RATIO = 0.75;\n\n/**\n * Spring easing helper\n */\nclass SpringEaser {\n    /**\n   * @param {number} initialVelocity Initial velocity, px per ms.\n   *\n   * @param {number} dampingRatio\n   * Determines how bouncy animation will be.\n   * From 0 to 1, 0 - always overshoot, 1 - do not overshoot.\n   * \"overshoot\" refers to part of animation that\n   * goes beyond the final value.\n   *\n   * @param {number} naturalFrequency\n   * Determines how fast animation will slow down.\n   * The higher value - the stiffer the transition will be,\n   * and the faster it will slow down.\n   * Recommended value from 10 to 50\n   */\n    constructor(initialVelocity, dampingRatio, naturalFrequency) {\n        this.velocity = initialVelocity * 1000; // convert to \"pixels per second\"\n\n        // https://en.wikipedia.org/wiki/Damping_ratio\n        this._dampingRatio = dampingRatio || DEFAULT_DAMPING_RATIO;\n\n        // https://en.wikipedia.org/wiki/Natural_frequency\n        this._naturalFrequency = naturalFrequency || DEFAULT_NATURAL_FREQUENCY;\n\n        if (this._dampingRatio < 1) {\n            this._dampedFrequency = this._naturalFrequency *\n                         Math.sqrt(1 - this._dampingRatio * this._dampingRatio);\n        }\n    }\n\n    /**\n   * @param {number} deltaPosition Difference between current and end position of the animation\n   * @param {number} deltaTime Frame duration in milliseconds\n   *\n   * @returns {number} Displacement, relative to the end position.\n   */\n    easeFrame(deltaPosition, deltaTime) {\n    // Inspired by Apple Webkit and Android spring function implementation\n    // https://en.wikipedia.org/wiki/Oscillation\n    // https://en.wikipedia.org/wiki/Damping_ratio\n    // we ignore mass (assume that it's 1kg)\n\n        let displacement = 0;\n        let coeff;\n\n        deltaTime /= 1000;\n\n        const naturalDumpingPow = Math.E ** (-this._dampingRatio * this._naturalFrequency * deltaTime);\n\n        if (this._dampingRatio === 1) {\n            coeff = this.velocity + this._naturalFrequency * deltaPosition;\n\n            displacement = (deltaPosition + coeff * deltaTime) * naturalDumpingPow;\n\n            this.velocity = displacement *\n                        (-this._naturalFrequency) + coeff *\n                        naturalDumpingPow;\n        } else if (this._dampingRatio < 1) {\n            coeff = (1 / this._dampedFrequency) *\n                (this._dampingRatio * this._naturalFrequency * deltaPosition + this.velocity);\n\n            const dumpedFCos = Math.cos(this._dampedFrequency * deltaTime);\n            const dumpedFSin = Math.sin(this._dampedFrequency * deltaTime);\n\n            displacement = naturalDumpingPow *\n                       (deltaPosition * dumpedFCos + coeff * dumpedFSin);\n\n            this.velocity = displacement *\n                        (-this._naturalFrequency) *\n                        this._dampingRatio +\n                        naturalDumpingPow *\n                        (-this._dampedFrequency * deltaPosition * dumpedFSin +\n                        this._dampedFrequency * coeff * dumpedFCos);\n        }\n\n        // Overdamped (>1) damping ratio is not supported\n\n        return displacement;\n    }\n}\n\n/** @typedef {import('./animations.js').AnimationProps} AnimationProps */\n\nclass SpringAnimation {\n    /**\n   * @param {AnimationProps} props\n   */\n    constructor(props) {\n        this.props = props;\n\n        const {\n            start,\n            end,\n            velocity,\n            onUpdate,\n            onComplete,\n            onFinish,\n            dampingRatio,\n            naturalFrequency,\n        } = props;\n\n        /** @type {() => void} */\n        this.onFinish = onFinish;\n\n        const easer = new SpringEaser(velocity, dampingRatio, naturalFrequency);\n        let prevTime = Date.now();\n        let deltaPosition = start - end;\n\n        const animationLoop = () => {\n            if (this._raf) {\n                deltaPosition = easer.easeFrame(deltaPosition, Date.now() - prevTime);\n\n                // Stop the animation if velocity is low and position is close to end\n                if (Math.abs(deltaPosition) < 1 && Math.abs(easer.velocity) < 50) {\n                    // Finalize the animation\n                    onUpdate(end);\n                    if (onComplete) {\n                        onComplete();\n                    }\n                    this.onFinish();\n                } else {\n                    prevTime = Date.now();\n                    onUpdate(deltaPosition + end);\n                    this._raf = requestAnimationFrame(animationLoop);\n                }\n            }\n        };\n\n        this._raf = requestAnimationFrame(animationLoop);\n    }\n\n    // Destroy is called automatically onFinish\n    destroy() {\n        if (this._raf >= 0) {\n            cancelAnimationFrame(this._raf);\n        }\n        this._raf = null;\n    }\n}\n\n/** @typedef {SpringAnimation | CSSAnimation} Animation */\n\n/**\n * @typedef {Object} AnimationProps\n *\n * @prop {HTMLElement=} target\n *\n * @prop {string=} name\n *\n * @prop {number=} start\n * @prop {number=} end\n * @prop {number=} duration\n * @prop {number=} velocity\n * @prop {number=} dampingRatio\n * @prop {number=} naturalFrequency\n *\n * @prop {(end: number) => void} [onUpdate]\n * @prop {() => void} [onComplete]\n * @prop {() => void} [onFinish]\n *\n * @prop {string=} transform\n * @prop {string=} opacity\n * @prop {string=} easing\n *\n * @prop {boolean=} isPan\n * @prop {boolean=} isMainScroll\n */\n\n/**\n * Manages animations\n */\nclass Animations {\n    constructor() {\n    /** @type {Animation[]} */\n        this.activeAnimations = [];\n    }\n\n    /**\n   * @param {AnimationProps} props\n   */\n    startSpring(props) {\n        this._start(props, true);\n    }\n\n    /**\n   * @param {AnimationProps} props\n   */\n    startTransition(props) {\n        this._start(props);\n    }\n\n    /**\n   * @param {AnimationProps} props\n   * @param {boolean=} isSpring\n   */\n    _start(props, isSpring) {\n    /** @type {Animation} */\n        let animation;\n        if (isSpring) {\n            animation = new SpringAnimation(props);\n        } else {\n            animation = new CSSAnimation(props);\n        }\n\n        this.activeAnimations.push(animation);\n        animation.onFinish = () => this.stop(animation);\n\n        return animation;\n    }\n\n    /**\n   * @param {Animation} animation\n   */\n    stop(animation) {\n        animation.destroy();\n        const index = this.activeAnimations.indexOf(animation);\n        if (index > -1) {\n            this.activeAnimations.splice(index, 1);\n        }\n    }\n\n    stopAll() { // _stopAllAnimations\n        this.activeAnimations.forEach((animation) => {\n            animation.destroy();\n        });\n        this.activeAnimations = [];\n    }\n\n    /**\n   * Stop all pan or zoom transitions\n   */\n    stopAllPan() {\n        this.activeAnimations = this.activeAnimations.filter((animation) => {\n            if (animation.props.isPan) {\n                animation.destroy();\n                return false;\n            }\n\n            return true;\n        });\n    }\n\n    stopMainScroll() {\n        this.activeAnimations = this.activeAnimations.filter((animation) => {\n            if (animation.props.isMainScroll) {\n                animation.destroy();\n                return false;\n            }\n\n            return true;\n        });\n    }\n\n    /**\n   * Returns true if main scroll transition is running\n   */\n    // isMainScrollRunning() {\n    //   return this.activeAnimations.some((animation) => {\n    //     return animation.props.isMainScroll;\n    //   });\n    // }\n\n    /**\n   * Returns true if any pan or zoom transition is running\n   */\n    isPanRunning() {\n        return this.activeAnimations.some((animation) => animation.props.isPan);\n    }\n}\n\n/** @typedef {import('./photoswipe.js').default} PhotoSwipe */\n\n/**\n * Handles scroll wheel.\n * Can pan and zoom current slide image.\n */\nclass ScrollWheel {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n        pswp.events.add(pswp.element, 'wheel', this._onWheel.bind(this));\n    }\n\n    /**\n   * @private\n   * @param {WheelEvent} e\n   */\n    _onWheel(e) {\n        e.preventDefault();\n        const { currSlide } = this.pswp;\n        let { deltaX, deltaY } = e;\n\n        if (!currSlide) {\n            return;\n        }\n\n        if (this.pswp.dispatch('wheel', { originalEvent: e }).defaultPrevented) {\n            return;\n        }\n\n        if (e.ctrlKey || this.pswp.options.wheelToZoom) {\n            // zoom\n            if (currSlide.isZoomable()) {\n                let zoomFactor = -deltaY;\n                if (e.deltaMode === 1 /* DOM_DELTA_LINE */) {\n                    zoomFactor *= 0.05;\n                } else {\n                    zoomFactor *= e.deltaMode ? 1 : 0.002;\n                }\n                zoomFactor = 2 ** zoomFactor;\n\n                const destZoomLevel = currSlide.currZoomLevel * zoomFactor;\n                currSlide.zoomTo(destZoomLevel, {\n                    x: e.clientX,\n                    y: e.clientY,\n                });\n            }\n        } else {\n            // pan\n            if (currSlide.isPannable()) {\n                if (e.deltaMode === 1 /* DOM_DELTA_LINE */) {\n                    // 18 - average line height\n                    deltaX *= 18;\n                    deltaY *= 18;\n                }\n\n                currSlide.panTo(\n                    currSlide.pan.x - deltaX,\n                    currSlide.pan.y - deltaY,\n                );\n            }\n        }\n    }\n}\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/**\n * @template T\n * @typedef {import('../types.js').Methods<T>} Methods<T>\n */\n\n/**\n * @typedef {Object} UIElementMarkupProps\n * @prop {boolean=} isCustomSVG\n * @prop {string} inner\n * @prop {string=} outlineID\n * @prop {number | string} [size]\n */\n\n/**\n * @typedef {Object} UIElementData\n * @prop {DefaultUIElements | string} [name]\n * @prop {string=} className\n * @prop {UIElementMarkup=} html\n * @prop {boolean=} isButton\n * @prop {keyof HTMLElementTagNameMap} [tagName]\n * @prop {string=} title\n * @prop {string=} ariaLabel\n * @prop {(element: HTMLElement, pswp: PhotoSwipe) => void} [onInit]\n * @prop {Methods<PhotoSwipe> | ((e: MouseEvent, element: HTMLElement, pswp: PhotoSwipe) => void)} [onClick]\n * @prop {'bar' | 'wrapper' | 'root'} [appendTo]\n * @prop {number=} order\n */\n\n/** @typedef {'arrowPrev' | 'arrowNext' | 'close' | 'zoom' | 'counter'} DefaultUIElements */\n\n/** @typedef {string | UIElementMarkupProps} UIElementMarkup */\n\n/**\n * @param {UIElementMarkup} [htmlData]\n */\nfunction addElementHTML(htmlData) {\n    if (typeof htmlData === 'string') {\n    // Allow developers to provide full svg,\n    // For example:\n    // <svg viewBox=\"0 0 32 32\" width=\"32\" height=\"32\" aria-hidden=\"true\" class=\"pswp__icn\">\n    //   <path d=\"...\" />\n    //   <circle ... />\n    // </svg>\n    // Can also be any HTML string.\n        return htmlData;\n    }\n\n    if (!htmlData || !htmlData.isCustomSVG) {\n        return '';\n    }\n\n    const svgData = htmlData;\n    let out = '<svg aria-hidden=\"true\" class=\"pswp__icn\" viewBox=\"0 0 %d %d\" width=\"%d\" height=\"%d\">';\n    // replace all %d with size\n    out = out.split('%d').join(/** @type {string} */ (svgData.size || 32));\n\n    // Icons may contain outline/shadow,\n    // to make it we \"clone\" base icon shape and add border to it.\n    // Icon itself and border are styled via CSS.\n    //\n    // Property shadowID defines ID of element that should be cloned.\n    if (svgData.outlineID) {\n        out += `<use class=\"pswp__icn-shadow\" xlink:href=\"#${svgData.outlineID}\"/>`;\n    }\n\n    out += svgData.inner;\n\n    out += '</svg>';\n\n    return out;\n}\n\nclass UIElement {\n    /**\n   * @param {PhotoSwipe} pswp\n   * @param {UIElementData} data\n   */\n    constructor(pswp, data) {\n        const name = data.name || data.className;\n        let elementHTML = data.html;\n\n        // @ts-expect-error lookup only by `data.name` maybe?\n        if (pswp.options[name] === false) {\n            // exit if element is disabled from options\n            return;\n        }\n\n        // Allow to override SVG icons from options\n        // @ts-expect-error lookup only by `data.name` maybe?\n        if (typeof pswp.options[`${name}SVG`] === 'string') {\n            // arrowPrevSVG\n            // arrowNextSVG\n            // closeSVG\n            // zoomSVG\n            // @ts-expect-error lookup only by `data.name` maybe?\n            elementHTML = pswp.options[`${name}SVG`];\n        }\n\n        pswp.dispatch('uiElementCreate', { data });\n\n        let className = '';\n        if (data.isButton) {\n            className += 'pswp__button ';\n            className += (data.className || `pswp__button--${data.name}`);\n        } else {\n            className += (data.className || `pswp__${data.name}`);\n        }\n\n        /** @type {HTMLElement} */\n        let element;\n        let tagName = data.isButton ? (data.tagName || 'button') : (data.tagName || 'div');\n        tagName = /** @type {keyof HTMLElementTagNameMap} */ (tagName.toLowerCase());\n        element = createElement(className, tagName);\n\n        if (data.isButton) {\n            // create button element\n            element = createElement(className, tagName);\n            if (tagName === 'button') {\n                /** @type {HTMLButtonElement} */ (element).type = 'button';\n            }\n\n            let { title } = data;\n            const { ariaLabel } = data;\n\n            // @ts-expect-error lookup only by `data.name` maybe?\n            if (typeof pswp.options[`${name}Title`] === 'string') {\n                // @ts-expect-error lookup only by `data.name` maybe?\n                title = pswp.options[`${name}Title`];\n            }\n\n            if (title) {\n                element.title = title;\n            }\n\n            if (ariaLabel || title) {\n                /** @type {HTMLElement} */ (element).setAttribute('aria-label', ariaLabel || title);\n            }\n        }\n\n        element.innerHTML = addElementHTML(elementHTML);\n\n        if (data.onInit) {\n            data.onInit(element, pswp);\n        }\n\n        if (data.onClick) {\n            element.onclick = (e) => {\n                if (typeof data.onClick === 'string') {\n                    pswp[data.onClick]();\n                } else {\n                    data.onClick(e, element, pswp);\n                }\n            };\n        }\n\n        // Top bar is default position\n        const appendTo = data.appendTo || 'bar';\n        let container;\n        if (appendTo === 'bar') {\n            if (!pswp.topBar) {\n                pswp.topBar = createElement('pswp__top-bar pswp__hide-on-close', 'div', pswp.scrollWrap);\n            }\n            container = pswp.topBar;\n        } else {\n            // element outside of top bar gets a secondary class\n            // that makes element fade out on close\n            element.classList.add('pswp__hide-on-close');\n\n            if (appendTo === 'wrapper') {\n                container = pswp.scrollWrap;\n            } else {\n                // root element\n                container = pswp.element;\n            }\n        }\n\n        container.appendChild(pswp.applyFilters('uiElement', element, data));\n    }\n}\n\n/*\n  Backward and forward arrow buttons\n */\n\n/** @typedef {import('./ui-element.js').UIElementData} UIElementData */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/**\n *\n * @param {HTMLElement} element\n * @param {PhotoSwipe} pswp\n * @param {boolean=} isNextButton\n */\nfunction initArrowButton(element, pswp, isNextButton) {\n    element.classList.add('pswp__button--arrow');\n    pswp.on('change', () => {\n        if (!pswp.options.loop) {\n            if (isNextButton) {\n                /** @type {HTMLButtonElement} */\n                (element).disabled = !(pswp.currIndex < pswp.getNumItems() - 1);\n            } else {\n                /** @type {HTMLButtonElement} */\n                (element).disabled = !(pswp.currIndex > 0);\n            }\n        }\n    });\n}\n\n/** @type {UIElementData} */\nconst arrowPrev = {\n    name: 'arrowPrev',\n    className: 'pswp__button--arrow--prev',\n    title: 'Previous',\n    order: 10,\n    isButton: true,\n    appendTo: 'wrapper',\n    html: {\n        isCustomSVG: true,\n        size: 60,\n        inner: '<path d=\"M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z\" id=\"pswp__icn-arrow\"/>',\n        outlineID: 'pswp__icn-arrow',\n    },\n    onClick: 'prev',\n    onInit: initArrowButton,\n};\n\n/** @type {UIElementData} */\nconst arrowNext = {\n    name: 'arrowNext',\n    className: 'pswp__button--arrow--next',\n    title: 'Next',\n    order: 11,\n    isButton: true,\n    appendTo: 'wrapper',\n    html: {\n        isCustomSVG: true,\n        size: 60,\n        inner: '<use xlink:href=\"#pswp__icn-arrow\"/>',\n        outlineID: 'pswp__icn-arrow',\n    },\n    onClick: 'next',\n    onInit: (el, pswp) => {\n        initArrowButton(el, pswp, true);\n    },\n};\n\n/** @type {import('./ui-element.js').UIElementData} UIElementData */\nconst closeButton = {\n    name: 'close',\n    title: 'Close',\n    order: 20,\n    isButton: true,\n    html: {\n        isCustomSVG: true,\n        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\"/>',\n        outlineID: 'pswp__icn-close',\n    },\n    onClick: 'close',\n};\n\n/** @type {import('./ui-element.js').UIElementData} UIElementData */\nconst zoomButton = {\n    name: 'zoom',\n    title: 'Zoom',\n    order: 10,\n    isButton: true,\n    html: {\n        isCustomSVG: true,\n        // eslint-disable-next-line max-len\n        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\"/>' +\n          '<path fill=\"currentColor\" class=\"pswp__zoom-icn-bar-h\" d=\"M11 16v-2h6v2z\"/>' +\n          '<path fill=\"currentColor\" class=\"pswp__zoom-icn-bar-v\" d=\"M13 12h2v6h-2z\"/>',\n        outlineID: 'pswp__icn-zoom',\n    },\n    onClick: 'toggleZoom',\n};\n\n/** @type {import('./ui-element.js').UIElementData} UIElementData */\nconst loadingIndicator = {\n    name: 'preloader',\n    appendTo: 'bar',\n    order: 7,\n    html: {\n        isCustomSVG: true,\n        // eslint-disable-next-line max-len\n        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\"/>',\n        outlineID: 'pswp__icn-loading',\n    },\n    onInit: (indicatorElement, pswp) => {\n    /** @type {boolean} */\n        let isVisible;\n        /** @type {NodeJS.Timeout} */\n        let delayTimeout;\n\n        /**\n     * @param {string} className\n     * @param {boolean} add\n     */\n        const toggleIndicatorClass = (className, add) => {\n            indicatorElement.classList[add ? 'add' : 'remove'](`pswp__preloader--${className}`);\n        };\n\n        /**\n     * @param {boolean} visible\n     */\n        const setIndicatorVisibility = (visible) => {\n            if (isVisible !== visible) {\n                isVisible = visible;\n                toggleIndicatorClass('active', visible);\n            }\n        };\n\n        const updatePreloaderVisibility = () => {\n            if (!pswp.currSlide.content.isLoading()) {\n                setIndicatorVisibility(false);\n                if (delayTimeout) {\n                    clearTimeout(delayTimeout);\n                    delayTimeout = null;\n                }\n                return;\n            }\n\n            if (!delayTimeout) {\n                // display loading indicator with delay\n                delayTimeout = setTimeout(() => {\n                    setIndicatorVisibility(pswp.currSlide.content.isLoading());\n                    delayTimeout = null;\n                }, pswp.options.preloaderDelay);\n            }\n        };\n\n        pswp.on('change', updatePreloaderVisibility);\n\n        pswp.on('loadComplete', (e) => {\n            if (pswp.currSlide === e.slide) {\n                updatePreloaderVisibility();\n            }\n        });\n\n        // expose the method\n        pswp.ui.updatePreloaderVisibility = updatePreloaderVisibility;\n    },\n};\n\n/** @type {import('./ui-element.js').UIElementData} UIElementData */\nconst counterIndicator = {\n    name: 'counter',\n    order: 5,\n    onInit: (counterElement, pswp) => {\n        pswp.on('change', () => {\n            counterElement.innerText = (pswp.currIndex + 1) +\n                                  pswp.options.indexIndicatorSep +\n                                  pswp.getNumItems();\n        });\n    },\n};\n\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('./ui-element.js').UIElementData} UIElementData */\n\n/**\n * Set special class on element when image is zoomed.\n *\n * By default it is used to adjust\n * zoom icon and zoom cursor via CSS.\n *\n * @param {HTMLElement} el\n * @param {boolean} isZoomedIn\n */\nfunction setZoomedIn(el, isZoomedIn) {\n    el.classList[isZoomedIn ? 'add' : 'remove']('pswp--zoomed-in');\n}\n\nclass UI {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n\n        /** @type {() => void} */\n        this.updatePreloaderVisibility = undefined;\n\n        /** @type {number} */\n        this._lastUpdatedZoomLevel = undefined;\n    }\n\n    init() {\n        const { pswp } = this;\n        this.isRegistered = false;\n        /** @type {UIElementData[]} */\n        this.uiElementsData = [\n            closeButton,\n            arrowPrev,\n            arrowNext,\n            zoomButton,\n            loadingIndicator,\n            counterIndicator,\n        ];\n\n        pswp.dispatch('uiRegister');\n\n        // sort by order\n        this.uiElementsData.sort((a, b) =>\n        // default order is 0\n            (a.order || 0) - (b.order || 0));\n\n        /** @type {(UIElement | UIElementData)[]} */\n        this.items = [];\n\n        this.isRegistered = true;\n        this.uiElementsData.forEach((uiElementData) => {\n            this.registerElement(uiElementData);\n        });\n\n        pswp.on('change', () => {\n            pswp.element.classList[pswp.getNumItems() === 1 ? 'add' : 'remove']('pswp--one-slide');\n        });\n\n        pswp.on('zoomPanUpdate', () => this._onZoomPanUpdate());\n    }\n\n    /**\n   * @param {UIElementData} elementData\n   */\n    registerElement(elementData) {\n        if (this.isRegistered) {\n            this.items.push(\n                new UIElement(this.pswp, elementData),\n            );\n        } else {\n            this.uiElementsData.push(elementData);\n        }\n    }\n\n    /**\n   * Fired each time zoom or pan position is changed.\n   * Update classes that control visibility of zoom button and cursor icon.\n   */\n    _onZoomPanUpdate() {\n        const { template, currSlide, options } = this.pswp;\n        let { currZoomLevel } = currSlide;\n\n        if (this.pswp.opener.isClosing) {\n            return;\n        }\n\n        // if not open yet - check against initial zoom level\n        if (!this.pswp.opener.isOpen) {\n            currZoomLevel = currSlide.zoomLevels.initial;\n        }\n\n        if (currZoomLevel === this._lastUpdatedZoomLevel) {\n            return;\n        }\n        this._lastUpdatedZoomLevel = currZoomLevel;\n\n        const currZoomLevelDiff = currSlide.zoomLevels.initial - currSlide.zoomLevels.secondary;\n\n        // Initial and secondary zoom levels are almost equal\n        if (Math.abs(currZoomLevelDiff) < 0.01 || !currSlide.isZoomable()) {\n            // disable zoom\n            setZoomedIn(template, false);\n            template.classList.remove('pswp--zoom-allowed');\n            return;\n        }\n\n        template.classList.add('pswp--zoom-allowed');\n\n        const potentialZoomLevel = currZoomLevel === currSlide.zoomLevels.initial\n            ? currSlide.zoomLevels.secondary : currSlide.zoomLevels.initial;\n\n        setZoomedIn(template, potentialZoomLevel <= currZoomLevel);\n\n        if (options.imageClickAction === 'zoom' ||\n        options.imageClickAction === 'zoom-or-close') {\n            template.classList.add('pswp--click-to-zoom');\n        }\n    }\n}\n\n/** @typedef {import('./slide.js').SlideData} SlideData */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n\n/** @typedef {{ x: number; y: number; w: number; innerRect?: { w: number; h: number; x: number; y: number } }} Bounds */\n\n/**\n * @param {HTMLElement} el\n */\nfunction getBoundsByElement(el) {\n    const thumbAreaRect = el.getBoundingClientRect();\n    return {\n        x: thumbAreaRect.left,\n        y: thumbAreaRect.top,\n        w: thumbAreaRect.width,\n    };\n}\n\n/**\n * @param {HTMLElement} el\n * @param {number} imageWidth\n * @param {number} imageHeight\n */\nfunction getCroppedBoundsByElement(el, imageWidth, imageHeight) {\n    const thumbAreaRect = el.getBoundingClientRect();\n\n    // fill image into the area\n    // (do they same as object-fit:cover does to retrieve coordinates)\n    const hRatio = thumbAreaRect.width / imageWidth;\n    const vRatio = thumbAreaRect.height / imageHeight;\n    const fillZoomLevel = hRatio > vRatio ? hRatio : vRatio;\n\n    const offsetX = (thumbAreaRect.width - imageWidth * fillZoomLevel) / 2;\n    const offsetY = (thumbAreaRect.height - imageHeight * fillZoomLevel) / 2;\n\n    /**\n   * Coordinates of the image,\n   * as if it was not cropped,\n   * height is calculated automatically\n   *\n   * @type {Bounds}\n   */\n    const bounds = {\n        x: thumbAreaRect.left + offsetX,\n        y: thumbAreaRect.top + offsetY,\n        w: imageWidth * fillZoomLevel,\n    };\n\n    // Coordinates of inner crop area\n    // relative to the image\n    bounds.innerRect = {\n        w: thumbAreaRect.width,\n        h: thumbAreaRect.height,\n        x: offsetX,\n        y: offsetY,\n    };\n\n    return bounds;\n}\n\n/**\n * Get dimensions of thumbnail image\n * (click on which opens photoswipe or closes photoswipe to)\n *\n * @param {number} index\n * @param {SlideData} itemData\n * @param {PhotoSwipe} instance PhotoSwipe instance\n * @returns {Bounds | undefined}\n */\nfunction getThumbBounds(index, itemData, instance) {\n    // legacy event, before filters were introduced\n    const event = instance.dispatch('thumbBounds', {\n        index,\n        itemData,\n        instance,\n    });\n    // @ts-expect-error\n    if (event.thumbBounds) {\n    // @ts-expect-error\n        return event.thumbBounds;\n    }\n\n    const { element } = itemData;\n    let thumbBounds;\n    /** @type {HTMLElement} */\n    let thumbnail;\n\n    if (element && instance.options.thumbSelector !== false) {\n        const thumbSelector = instance.options.thumbSelector || 'img';\n        thumbnail = element.matches(thumbSelector)\n            ? element : element.querySelector(thumbSelector);\n    }\n\n    thumbnail = instance.applyFilters('thumbEl', thumbnail, itemData, index);\n\n    if (thumbnail) {\n        if (!itemData.thumbCropped) {\n            thumbBounds = getBoundsByElement(thumbnail);\n        } else {\n            thumbBounds = getCroppedBoundsByElement(\n                thumbnail,\n                itemData.width || itemData.w,\n                itemData.height || itemData.h,\n            );\n        }\n    }\n\n    return instance.applyFilters('thumbBounds', thumbBounds, itemData, index);\n}\n\n/** @typedef {import('../lightbox/lightbox.js').default} PhotoSwipeLightbox */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../photoswipe.js').PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import('../photoswipe.js').DataSource} DataSource */\n/** @typedef {import('../ui/ui-element.js').UIElementData} UIElementData */\n/** @typedef {import('../slide/content.js').default} ContentDefault */\n/** @typedef {import('../slide/slide.js').default} Slide */\n/** @typedef {import('../slide/slide.js').SlideData} SlideData */\n/** @typedef {import('../slide/zoom-level.js').default} ZoomLevel */\n/** @typedef {import('../slide/get-thumb-bounds.js').Bounds} Bounds */\n\n/**\n * Allow adding an arbitrary props to the Content\n * https://photoswipe.com/custom-content/#using-webp-image-format\n * @typedef {ContentDefault & Record<string, any>} Content\n */\n/** @typedef {{ x?: number; y?: number }} Point */\n\n/**\n * @typedef {Object} PhotoSwipeEventsMap https://photoswipe.com/events/\n *\n *\n * https://photoswipe.com/adding-ui-elements/\n *\n * @prop {undefined} uiRegister\n * @prop {{ data: UIElementData }} uiElementCreate\n *\n *\n * https://photoswipe.com/events/#initialization-events\n *\n * @prop {undefined} beforeOpen\n * @prop {undefined} firstUpdate\n * @prop {undefined} initialLayout\n * @prop {undefined} change\n * @prop {undefined} afterInit\n * @prop {undefined} bindEvents\n *\n *\n * https://photoswipe.com/events/#opening-or-closing-transition-events\n *\n * @prop {undefined} openingAnimationStart\n * @prop {undefined} openingAnimationEnd\n * @prop {undefined} closingAnimationStart\n * @prop {undefined} closingAnimationEnd\n *\n *\n * https://photoswipe.com/events/#closing-events\n *\n * @prop {undefined} close\n * @prop {undefined} destroy\n *\n *\n * https://photoswipe.com/events/#pointer-and-gesture-events\n *\n * @prop {{ originalEvent: PointerEvent }} pointerDown\n * @prop {{ originalEvent: PointerEvent }} pointerMove\n * @prop {{ originalEvent: PointerEvent }} pointerUp\n * @prop {{ bgOpacity: number }} pinchClose can be default prevented\n * @prop {{ panY: number }} verticalDrag can be default prevented\n *\n *\n * https://photoswipe.com/events/#slide-content-events\n *\n * @prop {{ content: Content }} contentInit\n * @prop {{ content: Content; isLazy: boolean }} contentLoad can be default prevented\n * @prop {{ content: Content; isLazy: boolean }} contentLoadImage can be default prevented\n * @prop {{ content: Content; slide: Slide; isError?: boolean }} loadComplete\n * @prop {{ content: Content; slide: Slide }} loadError\n * @prop {{ content: Content; width: number; height: number }} contentResize can be default prevented\n * @prop {{ content: Content; width: number; height: number; slide: Slide }} imageSizeChange\n * @prop {{ content: Content }} contentLazyLoad can be default prevented\n * @prop {{ content: Content }} contentAppend can be default prevented\n * @prop {{ content: Content }} contentActivate can be default prevented\n * @prop {{ content: Content }} contentDeactivate can be default prevented\n * @prop {{ content: Content }} contentRemove can be default prevented\n * @prop {{ content: Content }} contentDestroy can be default prevented\n *\n *\n * undocumented\n *\n * @prop {{ point: Point; originalEvent: PointerEvent }} imageClickAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} bgClickAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} tapAction can be default prevented\n * @prop {{ point: Point; originalEvent: PointerEvent }} doubleTapAction can be default prevented\n *\n * @prop {{ originalEvent: KeyboardEvent }} keydown can be default prevented\n * @prop {{ x: number; dragging: boolean }} moveMainScroll\n * @prop {{ slide: Slide }} firstZoomPan\n * @prop {{ slide: Slide, data: SlideData, index: number }} gettingData\n * @prop {undefined} beforeResize\n * @prop {undefined} resize\n * @prop {undefined} viewportSize\n * @prop {undefined} updateScrollOffset\n * @prop {{ slide: Slide }} slideInit\n * @prop {{ slide: Slide }} afterSetContent\n * @prop {{ slide: Slide }} slideLoad\n * @prop {{ slide: Slide }} appendHeavy can be default prevented\n * @prop {{ slide: Slide }} appendHeavyContent\n * @prop {{ slide: Slide }} slideActivate\n * @prop {{ slide: Slide }} slideDeactivate\n * @prop {{ slide: Slide }} slideDestroy\n * @prop {{ destZoomLevel: number, centerPoint: Point, transitionDuration: number | false }} beforeZoomTo\n * @prop {{ slide: Slide }} zoomPanUpdate\n * @prop {{ slide: Slide }} initialZoomPan\n * @prop {{ slide: Slide }} calcSlideSize\n * @prop {undefined} resolutionChanged\n * @prop {{ originalEvent: WheelEvent }} wheel can be default prevented\n * @prop {{ content: Content }} contentAppendImage can be default prevented\n * @prop {{ index: number; itemData: SlideData }} lazyLoadSlide can be default prevented\n * @prop {undefined} lazyLoad\n * @prop {{ slide: Slide }} calcBounds\n * @prop {{ zoomLevels: ZoomLevel, slideData: SlideData }} zoomLevelsUpdate\n *\n *\n * legacy\n *\n * @prop {undefined} init\n * @prop {undefined} initialZoomIn\n * @prop {undefined} initialZoomOut\n * @prop {undefined} initialZoomInEnd\n * @prop {undefined} initialZoomOutEnd\n * @prop {{ dataSource: DataSource, numItems: number }} numItems\n * @prop {{ itemData: SlideData; index: number }} itemData\n * @prop {{ index: number, itemData: SlideData, instance: PhotoSwipe }} thumbBounds\n */\n\n/**\n * @typedef {Object} PhotoSwipeFiltersMap https://photoswipe.com/filters/\n *\n * @prop {(numItems: number, dataSource: DataSource) => number} numItems\n * Modify the total amount of slides. Example on Data sources page.\n * https://photoswipe.com/filters/#numitems\n *\n * @prop {(itemData: SlideData, index: number) => SlideData} itemData\n * Modify slide item data. Example on Data sources page.\n * https://photoswipe.com/filters/#itemdata\n *\n * @prop {(itemData: SlideData, element: HTMLElement, linkEl: HTMLAnchorElement) => SlideData} domItemData\n * Modify item data when it's parsed from DOM element. Example on Data sources page.\n * https://photoswipe.com/filters/#domitemdata\n *\n * @prop {(clickedIndex: number, e: MouseEvent, instance: PhotoSwipeLightbox) => number} clickedIndex\n * Modify clicked gallery item index.\n * https://photoswipe.com/filters/#clickedindex\n *\n * @prop {(placeholderSrc: string | false, content: Content) => string | false} placeholderSrc\n * Modify placeholder image source.\n * https://photoswipe.com/filters/#placeholdersrc\n *\n * @prop {(isContentLoading: boolean, content: Content) => boolean} isContentLoading\n * Modify if the content is currently loading.\n * https://photoswipe.com/filters/#iscontentloading\n *\n * @prop {(isContentZoomable: boolean, content: Content) => boolean} isContentZoomable\n * Modify if the content can be zoomed.\n * https://photoswipe.com/filters/#iscontentzoomable\n *\n * @prop {(useContentPlaceholder: boolean, content: Content) => boolean} useContentPlaceholder\n * Modify if the placeholder should be used for the content.\n * https://photoswipe.com/filters/#usecontentplaceholder\n *\n * @prop {(isKeepingPlaceholder: boolean, content: Content) => boolean} isKeepingPlaceholder\n * Modify if the placeholder should be kept after the content is loaded.\n * https://photoswipe.com/filters/#iskeepingplaceholder\n *\n *\n * @prop {(contentErrorElement: HTMLElement, content: Content) => HTMLElement} contentErrorElement\n * Modify an element when the content has error state (for example, if image cannot be loaded).\n * https://photoswipe.com/filters/#contenterrorelement\n *\n * @prop {(element: HTMLElement, data: UIElementData) => HTMLElement} uiElement\n * Modify a UI element that's being created.\n * https://photoswipe.com/filters/#uielement\n *\n * @prop {(thumbnail: HTMLElement, itemData: SlideData, index: number) => HTMLElement} thumbEl\n * Modify the thubmnail element from which opening zoom animation starts or ends.\n * https://photoswipe.com/filters/#thumbel\n *\n * @prop {(thumbBounds: Bounds, itemData: SlideData, index: number) => Bounds} thumbBounds\n * Modify the thubmnail bounds from which opening zoom animation starts or ends.\n * https://photoswipe.com/filters/#thumbbounds\n *\n * @prop {(srcsetSizesWidth: number, content: Content) => number} srcsetSizesWidth\n *\n */\n\n/**\n * @template {keyof PhotoSwipeFiltersMap} T\n * @typedef {{ fn: PhotoSwipeFiltersMap[T], priority: number }} Filter<T>\n */\n\n/**\n * @template {keyof PhotoSwipeEventsMap} T\n * @typedef {PhotoSwipeEventsMap[T] extends undefined ? PhotoSwipeEvent<T> : PhotoSwipeEvent<T> & PhotoSwipeEventsMap[T]} AugmentedEvent\n */\n\n/**\n * @template {keyof PhotoSwipeEventsMap} T\n * @typedef {(event: AugmentedEvent<T>) => void} EventCallback<T>\n */\n\n/**\n * Base PhotoSwipe event object\n *\n * @template {keyof PhotoSwipeEventsMap} T\n */\nclass PhotoSwipeEvent {\n    /**\n   * @param {T} type\n   * @param {PhotoSwipeEventsMap[T]} [details]\n   */\n    constructor(type, details) {\n        this.type = type;\n        if (details) {\n            Object.assign(this, details);\n        }\n    }\n\n    preventDefault() {\n        this.defaultPrevented = true;\n    }\n}\n\n/**\n * PhotoSwipe base class that can listen and dispatch for events.\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox, extended by base.js\n */\nclass Eventable {\n    constructor() {\n    /**\n     * @type {{ [T in keyof PhotoSwipeEventsMap]?: ((event: AugmentedEvent<T>) => void)[] }}\n     */\n        this._listeners = {};\n\n        /**\n     * @type {{ [T in keyof PhotoSwipeFiltersMap]?: Filter<T>[] }}\n     */\n        this._filters = {};\n\n        /** @type {PhotoSwipe=} */\n        this.pswp = undefined;\n\n        /** @type {PhotoSwipeOptions} */\n        this.options = undefined;\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {PhotoSwipeFiltersMap[T]} fn\n   * @param {number} priority\n   */\n    addFilter(name, fn, priority = 100) {\n        if (!this._filters[name]) {\n            this._filters[name] = [];\n        }\n\n        this._filters[name].push({ fn, priority });\n        this._filters[name].sort((f1, f2) => f1.priority - f2.priority);\n\n        if (this.pswp) {\n            this.pswp.addFilter(name, fn, priority);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {PhotoSwipeFiltersMap[T]} fn\n   */\n    removeFilter(name, fn) {\n        if (this._filters[name]) {\n            // @ts-expect-error\n            this._filters[name] = this._filters[name].filter((filter) => (filter.fn !== fn));\n        }\n\n        if (this.pswp) {\n            this.pswp.removeFilter(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeFiltersMap} T\n   * @param {T} name\n   * @param {Parameters<PhotoSwipeFiltersMap[T]>} args\n   * @returns {Parameters<PhotoSwipeFiltersMap[T]>[0]}\n   */\n    applyFilters(name, ...args) {\n        if (this._filters[name]) {\n            this._filters[name].forEach((filter) => {\n                // @ts-expect-error\n                args[0] = filter.fn.apply(this, args);\n            });\n        }\n        return args[0];\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {EventCallback<T>} fn\n   */\n    on(name, fn) {\n        if (!this._listeners[name]) {\n            this._listeners[name] = [];\n        }\n        this._listeners[name].push(fn);\n\n        // When binding events to lightbox,\n        // also bind events to PhotoSwipe Core,\n        // if it's open.\n        if (this.pswp) {\n            this.pswp.on(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {EventCallback<T>} fn\n   */\n    off(name, fn) {\n        if (this._listeners[name]) {\n            // @ts-expect-error\n            this._listeners[name] = this._listeners[name].filter((listener) => (fn !== listener));\n        }\n\n        if (this.pswp) {\n            this.pswp.off(name, fn);\n        }\n    }\n\n    /**\n   * @template {keyof PhotoSwipeEventsMap} T\n   * @param {T} name\n   * @param {PhotoSwipeEventsMap[T]} [details]\n   * @returns {AugmentedEvent<T>}\n   */\n    dispatch(name, details) {\n        if (this.pswp) {\n            return this.pswp.dispatch(name, details);\n        }\n\n        const event = /** @type {AugmentedEvent<T>} */ (new PhotoSwipeEvent(name, details));\n\n        if (!this._listeners) {\n            return event;\n        }\n\n        if (this._listeners[name]) {\n            this._listeners[name].forEach((listener) => {\n                listener.call(this, event);\n            });\n        }\n\n        return event;\n    }\n}\n\nclass Placeholder {\n    /**\n   * @param {string | false} imageSrc\n   * @param {HTMLElement} container\n   */\n    constructor(imageSrc, container) {\n    // Create placeholder\n    // (stretched thumbnail or simple div behind the main image)\n        this.element = createElement(\n            'pswp__img pswp__img--placeholder',\n            imageSrc ? 'img' : '',\n            container,\n        );\n\n        if (imageSrc) {\n            /** @type {HTMLImageElement} */\n            (this.element).decoding = 'async';\n            /** @type {HTMLImageElement} */\n            (this.element).alt = '';\n            /** @type {HTMLImageElement} */\n            (this.element).src = imageSrc;\n            this.element.setAttribute('role', 'presentation');\n        }\n\n        this.element.setAttribute('aria-hidden', 'true');\n    }\n\n    /**\n   * @param {number} width\n   * @param {number} height\n   */\n    setDisplayedSize(width, height) {\n        if (!this.element) {\n            return;\n        }\n\n        if (this.element.tagName === 'IMG') {\n            // Use transform scale() to modify img placeholder size\n            // (instead of changing width/height directly).\n            // This helps with performance, specifically in iOS15 Safari.\n            setWidthHeight(this.element, 250, 'auto');\n            this.element.style.transformOrigin = '0 0';\n            this.element.style.transform = toTransformString(0, 0, width / 250);\n        } else {\n            setWidthHeight(this.element, width, height);\n        }\n    }\n\n    destroy() {\n        if (this.element.parentNode) {\n            this.element.remove();\n        }\n        this.element = null;\n    }\n}\n\n/** @typedef {import('./slide.js').default} Slide */\n/** @typedef {import('./slide.js').SlideData} SlideData */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../util/util.js').LoadState} LoadState */\n\nclass Content {\n    /**\n   * @param {SlideData} itemData Slide data\n   * @param {PhotoSwipe} instance PhotoSwipe or PhotoSwipeLightbox instance\n   * @param {number} index\n   */\n    constructor(itemData, instance, index) {\n        this.instance = instance;\n        this.data = itemData;\n        this.index = index;\n\n        /** @type {HTMLImageElement | HTMLDivElement} */\n        this.element = undefined;\n\n        this.displayedImageWidth = 0;\n        this.displayedImageHeight = 0;\n\n        this.width = Number(this.data.w) || Number(this.data.width) || 0;\n        this.height = Number(this.data.h) || Number(this.data.height) || 0;\n\n        this.isAttached = false;\n        this.hasSlide = false;\n        /** @type {LoadState} */\n        this.state = LOAD_STATE.IDLE;\n\n        if (this.data.type) {\n            this.type = this.data.type;\n        } else if (this.data.src) {\n            this.type = 'image';\n        } else {\n            this.type = 'html';\n        }\n\n        this.instance.dispatch('contentInit', { content: this });\n    }\n\n    removePlaceholder() {\n        if (this.placeholder && !this.keepPlaceholder()) {\n            // With delay, as image might be loaded, but not rendered\n            setTimeout(() => {\n                if (this.placeholder) {\n                    this.placeholder.destroy();\n                    this.placeholder = null;\n                }\n            }, 1000);\n        }\n    }\n\n    /**\n   * Preload content\n   *\n   * @param {boolean=} isLazy\n   * @param {boolean=} reload\n   */\n    load(isLazy, reload) {\n        if (this.slide && this.usePlaceholder()) {\n            if (!this.placeholder) {\n                const placeholderSrc = this.instance.applyFilters(\n                    'placeholderSrc',\n                    // use  image-based placeholder only for the first slide,\n                    // as rendering (even small stretched thumbnail) is an expensive operation\n                    (this.data.msrc && this.slide.isFirstSlide) ? this.data.msrc : false,\n                    this,\n                );\n                this.placeholder = new Placeholder(\n                    placeholderSrc,\n                    this.slide.container,\n                );\n            } else {\n                const placeholderEl = this.placeholder.element;\n                // Add placeholder to DOM if it was already created\n                if (placeholderEl && !placeholderEl.parentElement) {\n                    this.slide.container.prepend(placeholderEl);\n                }\n            }\n        }\n\n        if (this.element && !reload) {\n            return;\n        }\n\n        if (this.instance.dispatch('contentLoad', { content: this, isLazy }).defaultPrevented) {\n            return;\n        }\n\n        if (this.isImageContent()) {\n            this.element = createElement('pswp__img', 'img');\n            // Start loading only after width is defined, as sizes might depend on it.\n            // Due to Safari feature, we must define sizes before srcset.\n            if (this.displayedImageWidth) {\n                this.loadImage(isLazy);\n            }\n        } else {\n            this.element = createElement('pswp__content');\n            this.element.innerHTML = this.data.html || '';\n        }\n\n        if (reload && this.slide) {\n            this.slide.updateContentSize(true);\n        }\n    }\n\n    /**\n   * Preload image\n   *\n   * @param {boolean} isLazy\n   */\n    loadImage(isLazy) {\n        const imageElement = /** @type HTMLImageElement */ (this.element);\n\n        if (this.instance.dispatch('contentLoadImage', { content: this, isLazy }).defaultPrevented) {\n            return;\n        }\n\n        this.updateSrcsetSizes();\n\n        if (this.data.srcset) {\n            imageElement.srcset = this.data.srcset;\n        }\n\n        imageElement.src = this.data.src;\n\n        imageElement.alt = this.data.alt || '';\n\n        this.state = LOAD_STATE.LOADING;\n\n        if (imageElement.complete) {\n            this.onLoaded();\n        } else {\n            imageElement.onload = () => {\n                this.onLoaded();\n            };\n\n            imageElement.onerror = () => {\n                this.onError();\n            };\n        }\n    }\n\n    /**\n   * Assign slide to content\n   *\n   * @param {Slide} slide\n   */\n    setSlide(slide) {\n        this.slide = slide;\n        this.hasSlide = true;\n        this.instance = slide.pswp;\n\n    // todo: do we need to unset slide?\n    }\n\n    /**\n   * Content load success handler\n   */\n    onLoaded() {\n        this.state = LOAD_STATE.LOADED;\n\n        if (this.slide) {\n            this.instance.dispatch('loadComplete', { slide: this.slide, content: this });\n\n            // if content is reloaded\n            if (this.slide.isActive &&\n          this.slide.heavyAppended &&\n          !this.element.parentNode) {\n                this.append();\n                this.slide.updateContentSize(true);\n            }\n\n            if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n                this.removePlaceholder();\n            }\n        }\n    }\n\n    /**\n   * Content load error handler\n   */\n    onError() {\n        this.state = LOAD_STATE.ERROR;\n\n        if (this.slide) {\n            this.displayError();\n            this.instance.dispatch('loadComplete', { slide: this.slide, isError: true, content: this });\n            this.instance.dispatch('loadError', { slide: this.slide, content: this });\n        }\n    }\n\n    /**\n   * @returns {boolean} If the content is currently loading\n   */\n    isLoading() {\n        return this.instance.applyFilters(\n            'isContentLoading',\n            this.state === LOAD_STATE.LOADING,\n            this,\n        );\n    }\n\n    isError() {\n        return this.state === LOAD_STATE.ERROR;\n    }\n\n    /**\n   * @returns {boolean} If the content is image\n   */\n    isImageContent() {\n        return this.type === 'image';\n    }\n\n    /**\n   * Update content size\n   *\n   * @param {number} width\n   * @param {number} height\n   */\n    setDisplayedSize(width, height) {\n        if (!this.element) {\n            return;\n        }\n\n        if (this.placeholder) {\n            this.placeholder.setDisplayedSize(width, height);\n        }\n\n        // eslint-disable-next-line max-len\n        if (this.instance.dispatch('contentResize', { content: this, width, height }).defaultPrevented) {\n            return;\n        }\n\n        setWidthHeight(this.element, width, height);\n\n        if (this.isImageContent() && !this.isError()) {\n            const isInitialSizeUpdate = (!this.displayedImageWidth && width);\n\n            this.displayedImageWidth = width;\n            this.displayedImageHeight = height;\n\n            if (isInitialSizeUpdate) {\n                this.loadImage(false);\n            } else {\n                this.updateSrcsetSizes();\n            }\n\n            if (this.slide) {\n                // eslint-disable-next-line max-len\n                this.instance.dispatch('imageSizeChange', {\n                    slide: this.slide, width, height, content: this,\n                });\n            }\n        }\n    }\n\n    /**\n   * @returns {boolean} If the content can be zoomed\n   */\n    isZoomable() {\n        return this.instance.applyFilters(\n            'isContentZoomable',\n            this.isImageContent() && (this.state !== LOAD_STATE.ERROR),\n            this,\n        );\n    }\n\n    /**\n   * Update image srcset sizes attribute based on width and height\n   */\n    updateSrcsetSizes() {\n    // Handle srcset sizes attribute.\n    //\n    // Never lower quality, if it was increased previously.\n    // Chrome does this automatically, Firefox and Safari do not,\n    // so we store largest used size in dataset.\n    // Handle srcset sizes attribute.\n    //\n    // Never lower quality, if it was increased previously.\n    // Chrome does this automatically, Firefox and Safari do not,\n    // so we store largest used size in dataset.\n        if (this.data.srcset) {\n            const image = /** @type HTMLImageElement */ (this.element);\n            const sizesWidth = this.instance.applyFilters(\n                'srcsetSizesWidth',\n                this.displayedImageWidth,\n                this,\n            );\n\n            if (!image.dataset.largestUsedSize ||\n          sizesWidth > parseInt(image.dataset.largestUsedSize, 10)) {\n                image.sizes = `${sizesWidth}px`;\n                image.dataset.largestUsedSize = String(sizesWidth);\n            }\n        }\n    }\n\n    /**\n   * @returns {boolean} If content should use a placeholder (from msrc by default)\n   */\n    usePlaceholder() {\n        return this.instance.applyFilters(\n            'useContentPlaceholder',\n            this.isImageContent(),\n            this,\n        );\n    }\n\n    /**\n   * Preload content with lazy-loading param\n   */\n    lazyLoad() {\n        if (this.instance.dispatch('contentLazyLoad', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        this.load(true);\n    }\n\n    /**\n   * @returns {boolean} If placeholder should be kept after content is loaded\n   */\n    keepPlaceholder() {\n        return this.instance.applyFilters(\n            'isKeepingPlaceholder',\n            this.isLoading(),\n            this,\n        );\n    }\n\n    /**\n   * Destroy the content\n   */\n    destroy() {\n        this.hasSlide = false;\n        this.slide = null;\n\n        if (this.instance.dispatch('contentDestroy', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        this.remove();\n\n        if (this.placeholder) {\n            this.placeholder.destroy();\n            this.placeholder = null;\n        }\n\n        if (this.isImageContent() && this.element) {\n            this.element.onload = null;\n            this.element.onerror = null;\n            this.element = null;\n        }\n    }\n\n    /**\n   * Display error message\n   */\n    displayError() {\n        if (this.slide) {\n            /** @type {HTMLElement} */\n            let errorMsgEl = createElement('pswp__error-msg');\n            errorMsgEl.innerText = this.instance.options.errorMsg;\n            errorMsgEl = this.instance.applyFilters(\n                'contentErrorElement',\n                errorMsgEl,\n                this,\n            );\n            this.element = createElement('pswp__content pswp__error-msg-container');\n            this.element.appendChild(errorMsgEl);\n            this.slide.container.innerText = '';\n            this.slide.container.appendChild(this.element);\n            this.slide.updateContentSize(true);\n            this.removePlaceholder();\n        }\n    }\n\n    /**\n   * Append the content\n   */\n    append() {\n        if (this.isAttached) {\n            return;\n        }\n\n        this.isAttached = true;\n\n        if (this.state === LOAD_STATE.ERROR) {\n            this.displayError();\n            return;\n        }\n\n        if (this.instance.dispatch('contentAppend', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        const supportsDecode = ('decode' in this.element);\n\n        if (this.isImageContent()) {\n            // Use decode() on nearby slides\n            //\n            // Nearby slide images are in DOM and not hidden via display:none.\n            // However, they are placed offscreen (to the left and right side).\n            //\n            // Some browsers do not composite the image until it's actually visible,\n            // using decode() helps.\n            //\n            // You might ask \"why dont you just decode() and then append all images\",\n            // that's because I want to show image before it's fully loaded,\n            // as browser can render parts of image while it is loading.\n            // We do not do this in Safari due to partial loading bug.\n            if (supportsDecode && this.slide && (!this.slide.isActive || isSafari())) {\n                this.isDecoding = true;\n                // purposefully using finally instead of then,\n                // as if srcset sizes changes dynamically - it may cause decode error\n                /** @type {HTMLImageElement} */\n                (this.element).decode().catch(() => {}).finally(() => {\n                    this.isDecoding = false;\n                    this.appendImage();\n                });\n            } else {\n                this.appendImage();\n            }\n        } else if (this.element && !this.element.parentNode) {\n            this.slide.container.appendChild(this.element);\n        }\n    }\n\n    /**\n   * Activate the slide,\n   * active slide is generally the current one,\n   * meaning the user can see it.\n   */\n    activate() {\n        if (this.instance.dispatch('contentActivate', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        if (this.slide) {\n            if (this.isImageContent() && this.isDecoding && !isSafari()) {\n                // add image to slide when it becomes active,\n                // even if it's not finished decoding\n                this.appendImage();\n            } else if (this.isError()) {\n                this.load(false, true); // try to reload\n            }\n        }\n    }\n\n    /**\n   * Deactivate the content\n   */\n    deactivate() {\n        this.instance.dispatch('contentDeactivate', { content: this });\n    }\n\n    /**\n   * Remove the content from DOM\n   */\n    remove() {\n        this.isAttached = false;\n\n        if (this.instance.dispatch('contentRemove', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        if (this.element && this.element.parentNode) {\n            this.element.remove();\n        }\n\n        if (this.placeholder && this.placeholder.element) {\n            this.placeholder.element.remove();\n        }\n    }\n\n    /**\n   * Append the image content to slide container\n   */\n    appendImage() {\n        if (!this.isAttached) {\n            return;\n        }\n\n        if (this.instance.dispatch('contentAppendImage', { content: this }).defaultPrevented) {\n            return;\n        }\n\n        // ensure that element exists and is not already appended\n        if (this.slide && this.element && !this.element.parentNode) {\n            this.slide.container.appendChild(this.element);\n        }\n\n        if (this.state === LOAD_STATE.LOADED || this.state === LOAD_STATE.ERROR) {\n            this.removePlaceholder();\n        }\n    }\n}\n\n/** @typedef {import('./content.js').default} Content */\n/** @typedef {import('./slide.js').default} Slide */\n/** @typedef {import('./slide.js').SlideData} SlideData */\n/** @typedef {import('../core/base.js').default} PhotoSwipeBase */\n/** @typedef {import('../photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('../lightbox/lightbox.js').default} PhotoSwipeLightbox */\n\nconst MIN_SLIDES_TO_CACHE = 5;\n\n/**\n * Lazy-load an image\n * This function is used both by Lightbox and PhotoSwipe core,\n * thus it can be called before dialog is opened.\n *\n * @param {SlideData} itemData Data about the slide\n * @param {PhotoSwipe | PhotoSwipeLightbox | PhotoSwipeBase} instance PhotoSwipe instance\n * @param {number} index\n * @returns Image that is being decoded or false.\n */\nfunction lazyLoadData(itemData, instance, index) {\n    // src/slide/content/content.js\n    const content = instance.createContentFromData(itemData, index);\n\n    if (!content || !content.lazyLoad) {\n        return;\n    }\n\n    const { options } = instance;\n\n    // We need to know dimensions of the image to preload it,\n    // as it might use srcset and we need to define sizes\n    // @ts-expect-error should provide pswp instance?\n    const viewportSize = instance.viewportSize || getViewportSize(options, instance);\n    const panAreaSize = getPanAreaSize(options, viewportSize, itemData, index);\n\n    const zoomLevel = new ZoomLevel(options, itemData, -1);\n    zoomLevel.update(content.width, content.height, panAreaSize);\n\n    content.lazyLoad();\n    content.setDisplayedSize(\n        Math.ceil(content.width * zoomLevel.initial),\n        Math.ceil(content.height * zoomLevel.initial),\n    );\n\n    return content;\n}\n\n/**\n * Lazy-loads specific slide.\n * This function is used both by Lightbox and PhotoSwipe core,\n * thus it can be called before dialog is opened.\n *\n * By default it loads image based on viewport size and initial zoom level.\n *\n * @param {number} index Slide index\n * @param {PhotoSwipe | PhotoSwipeLightbox} instance PhotoSwipe or PhotoSwipeLightbox eventable instance\n */\nfunction lazyLoadSlide(index, instance) {\n    const itemData = instance.getItemData(index);\n\n    if (instance.dispatch('lazyLoadSlide', { index, itemData }).defaultPrevented) {\n        return;\n    }\n\n    return lazyLoadData(itemData, instance, index);\n}\n\nclass ContentLoader {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n        // Total amount of cached images\n        this.limit = Math.max(\n            pswp.options.preload[0] + pswp.options.preload[1] + 1,\n            MIN_SLIDES_TO_CACHE,\n        );\n        /** @type {Content[]} */\n        this._cachedItems = [];\n    }\n\n    /**\n   * Lazy load nearby slides based on `preload` option.\n   *\n   * @param {number=} diff Difference between slide indexes that was changed recently, or 0.\n   */\n    updateLazy(diff) {\n        const { pswp } = this;\n\n        if (pswp.dispatch('lazyLoad').defaultPrevented) {\n            return;\n        }\n\n        const { preload } = pswp.options;\n        const isForward = diff === undefined ? true : (diff >= 0);\n        let i;\n\n        // preload[1] - num items to preload in forward direction\n        for (i = 0; i <= preload[1]; i++) {\n            this.loadSlideByIndex(pswp.currIndex + (isForward ? i : (-i)));\n        }\n\n        // preload[0] - num items to preload in backward direction\n        for (i = 1; i <= preload[0]; i++) {\n            this.loadSlideByIndex(pswp.currIndex + (isForward ? (-i) : i));\n        }\n    }\n\n    /**\n   * @param {number} index\n   */\n    loadSlideByIndex(index) {\n        index = this.pswp.getLoopedIndex(index);\n        // try to get cached content\n        let content = this.getContentByIndex(index);\n        if (!content) {\n            // no cached content, so try to load from scratch:\n            content = lazyLoadSlide(index, this.pswp);\n            // if content can be loaded, add it to cache:\n            if (content) {\n                this.addToCache(content);\n            }\n        }\n    }\n\n    /**\n   * @param {Slide} slide\n   */\n    getContentBySlide(slide) {\n        let content = this.getContentByIndex(slide.index);\n        if (!content) {\n            // create content if not found in cache\n            content = this.pswp.createContentFromData(slide.data, slide.index);\n            if (content) {\n                this.addToCache(content);\n            }\n        }\n\n        if (content) {\n            // assign slide to content\n            content.setSlide(slide);\n        }\n        return content;\n    }\n\n    /**\n   * @param {Content} content\n   */\n    addToCache(content) {\n    // move to the end of array\n        this.removeByIndex(content.index);\n        this._cachedItems.push(content);\n\n        if (this._cachedItems.length > this.limit) {\n            // Destroy the first content that's not attached\n            const indexToRemove = this._cachedItems.findIndex((item) => !item.isAttached && !item.hasSlide);\n            if (indexToRemove !== -1) {\n                const removedItem = this._cachedItems.splice(indexToRemove, 1)[0];\n                removedItem.destroy();\n            }\n        }\n    }\n\n    /**\n   * Removes an image from cache, does not destroy() it, just removes.\n   *\n   * @param {number} index\n   */\n    removeByIndex(index) {\n        const indexToRemove = this._cachedItems.findIndex((item) => item.index === index);\n        if (indexToRemove !== -1) {\n            this._cachedItems.splice(indexToRemove, 1);\n        }\n    }\n\n    /**\n   * @param {number} index\n   */\n    getContentByIndex(index) {\n        return this._cachedItems.find((content) => content.index === index);\n    }\n\n    destroy() {\n        this._cachedItems.forEach((content) => content.destroy());\n        this._cachedItems = null;\n    }\n}\n\n/** @typedef {import(\"../photoswipe.js\").default} PhotoSwipe */\n/** @typedef {import(\"../photoswipe.js\").PhotoSwipeOptions} PhotoSwipeOptions */\n/** @typedef {import(\"../slide/slide.js\").SlideData} SlideData */\n\n/**\n * PhotoSwipe base class that can retrieve data about every slide.\n * Shared by PhotoSwipe Core and PhotoSwipe Lightbox\n */\nclass PhotoSwipeBase extends Eventable {\n    /**\n   * Get total number of slides\n   *\n   * @returns {number}\n   */\n    getNumItems() {\n        let numItems;\n        const { dataSource } = this.options;\n        if (!dataSource) {\n            numItems = 0;\n        } else if ('length' in dataSource) {\n            // may be an array or just object with length property\n            numItems = dataSource.length;\n        } else if ('gallery' in dataSource) {\n            // query DOM elements\n            if (!dataSource.items) {\n                dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n            }\n\n            if (dataSource.items) {\n                numItems = dataSource.items.length;\n            }\n        }\n\n        // legacy event, before filters were introduced\n        const event = this.dispatch('numItems', {\n            dataSource,\n            numItems,\n        });\n        return this.applyFilters('numItems', event.numItems, dataSource);\n    }\n\n    /**\n   * @param {SlideData} slideData\n   * @param {number} index\n   */\n    createContentFromData(slideData, index) {\n    // @ts-expect-error\n        return new Content(slideData, this, index);\n    }\n\n    /**\n   * Get item data by index.\n   *\n   * \"item data\" should contain normalized information that PhotoSwipe needs to generate a slide.\n   * For example, it may contain properties like\n   * `src`, `srcset`, `w`, `h`, which will be used to generate a slide with image.\n   *\n   * @param {number} index\n   */\n    getItemData(index) {\n        const { dataSource } = this.options;\n        let dataSourceItem;\n        if (Array.isArray(dataSource)) {\n            // Datasource is an array of elements\n            dataSourceItem = dataSource[index];\n        } else if (dataSource && dataSource.gallery) {\n            // dataSource has gallery property,\n            // thus it was created by Lightbox, based on\n            // gallery and children options\n\n            // query DOM elements\n            if (!dataSource.items) {\n                dataSource.items = this._getGalleryDOMElements(dataSource.gallery);\n            }\n\n            dataSourceItem = dataSource.items[index];\n        }\n\n        let itemData = dataSourceItem;\n\n        if (itemData instanceof Element) {\n            itemData = this._domElementToItemData(itemData);\n        }\n\n        // Dispatching the itemData event,\n        // it's a legacy verion before filters were introduced\n        const event = this.dispatch('itemData', {\n            itemData: itemData || {},\n            index,\n        });\n\n        return this.applyFilters('itemData', event.itemData, index);\n    }\n\n    /**\n   * Get array of gallery DOM elements,\n   * based on childSelector and gallery element.\n   *\n   * @param {HTMLElement} galleryElement\n   */\n    _getGalleryDOMElements(galleryElement) {\n        if (this.options.children || this.options.childSelector) {\n            return getElementsFromOption(\n                this.options.children,\n                this.options.childSelector,\n                galleryElement,\n            ) || [];\n        }\n\n        return [galleryElement];\n    }\n\n    /**\n   * Converts DOM element to item data object.\n   *\n   * @param {HTMLElement} element DOM element\n   */\n    // eslint-disable-next-line class-methods-use-this\n    _domElementToItemData(element) {\n    /** @type {SlideData} */\n        const itemData = {\n            element,\n        };\n\n        // eslint-disable-next-line max-len\n        const linkEl = /** @type {HTMLAnchorElement} */ (element.tagName === 'A' ? element : element.querySelector('a'));\n\n        if (linkEl) {\n            // src comes from data-pswp-src attribute,\n            // if it's empty link href is used\n            itemData.src = linkEl.dataset.pswpSrc || linkEl.href;\n\n            if (linkEl.dataset.pswpSrcset) {\n                itemData.srcset = linkEl.dataset.pswpSrcset;\n            }\n\n            itemData.width = parseInt(linkEl.dataset.pswpWidth, 10);\n            itemData.height = parseInt(linkEl.dataset.pswpHeight, 10);\n\n            // support legacy w & h properties\n            itemData.w = itemData.width;\n            itemData.h = itemData.height;\n\n            if (linkEl.dataset.pswpType) {\n                itemData.type = linkEl.dataset.pswpType;\n            }\n\n            const thumbnailEl = element.querySelector('img');\n\n            if (thumbnailEl) {\n                // msrc is URL to placeholder image that's displayed before large image is loaded\n                // by default it's displayed only for the first slide\n                itemData.msrc = thumbnailEl.currentSrc || thumbnailEl.src;\n                itemData.alt = thumbnailEl.getAttribute('alt');\n            }\n\n            if (linkEl.dataset.pswpCropped || linkEl.dataset.cropped) {\n                itemData.thumbCropped = true;\n            }\n        }\n\n        return this.applyFilters('domItemData', itemData, element, linkEl);\n    }\n\n    /**\n   * Lazy-load by slide data\n   *\n   * @param {SlideData} itemData Data about the slide\n   * @param {number} index\n   * @returns Image that is being decoded or false.\n   */\n    lazyLoadData(itemData, index) {\n        return lazyLoadData(itemData, this, index);\n    }\n}\n\n/** @typedef {import('./photoswipe.js').default} PhotoSwipe */\n/** @typedef {import('./slide/get-thumb-bounds.js').Bounds} Bounds */\n/** @typedef {import('./util/animations.js').AnimationProps} AnimationProps */\n\n// some browsers do not paint\n// elements which opacity is set to 0,\n// since we need to pre-render elements for the animation -\n// we set it to the minimum amount\nconst MIN_OPACITY = 0.003;\n\n/**\n * Manages opening and closing transitions of the PhotoSwipe.\n *\n * It can perform zoom, fade or no transition.\n */\nclass Opener {\n    /**\n   * @param {PhotoSwipe} pswp\n   */\n    constructor(pswp) {\n        this.pswp = pswp;\n        this.isClosed = true;\n        this._prepareOpen = this._prepareOpen.bind(this);\n\n        /** @type {false | Bounds} */\n        this._thumbBounds = undefined;\n\n        // Override initial zoom and pan position\n        pswp.on('firstZoomPan', this._prepareOpen);\n    }\n\n    open() {\n        this._prepareOpen();\n        this._start();\n    }\n\n    close() {\n        if (this.isClosed || this.isClosing || this.isOpening) {\n            // if we close during opening animation\n            // for now do nothing,\n            // browsers aren't good at changing the direction of the CSS transition\n            return false;\n        }\n\n        const slide = this.pswp.currSlide;\n\n        this.isOpen = false;\n        this.isOpening = false;\n        this.isClosing = true;\n        this._duration = this.pswp.options.hideAnimationDuration;\n\n        if (slide && slide.currZoomLevel * slide.width >= this.pswp.options.maxWidthToAnimate) {\n            this._duration = 0;\n        }\n\n        this._applyStartProps();\n        setTimeout(() => {\n            this._start();\n        }, this._croppedZoom ? 30 : 0);\n\n        return true;\n    }\n\n    _prepareOpen() {\n        this.pswp.off('firstZoomPan', this._prepareOpen);\n        if (!this.isOpening) {\n            const slide = this.pswp.currSlide;\n            this.isOpening = true;\n            this.isClosing = false;\n            this._duration = this.pswp.options.showAnimationDuration;\n            if (slide && slide.zoomLevels.initial * slide.width >= this.pswp.options.maxWidthToAnimate) {\n                this._duration = 0;\n            }\n            this._applyStartProps();\n        }\n    }\n\n    _applyStartProps() {\n        const { pswp } = this;\n        const slide = this.pswp.currSlide;\n        const { options } = pswp;\n\n        if (options.showHideAnimationType === 'fade') {\n            options.showHideOpacity = true;\n            this._thumbBounds = false;\n        } else if (options.showHideAnimationType === 'none') {\n            options.showHideOpacity = false;\n            this._duration = 0;\n            this._thumbBounds = false;\n        } else if (this.isOpening && pswp._initialThumbBounds) {\n            // Use initial bounds if defined\n            this._thumbBounds = pswp._initialThumbBounds;\n        } else {\n            this._thumbBounds = this.pswp.getThumbBounds();\n        }\n\n        this._placeholder = slide.getPlaceholderElement();\n\n        pswp.animations.stopAll();\n\n        // Discard animations when duration is less than 50ms\n        this._useAnimation = (this._duration > 50);\n        this._animateZoom = Boolean(this._thumbBounds) &&\n                        (slide.content && slide.content.usePlaceholder()) &&\n                        (!this.isClosing || !pswp.mainScroll.isShifted());\n        if (!this._animateZoom) {\n            this._animateRootOpacity = true;\n\n            if (this.isOpening) {\n                slide.zoomAndPanToInitial();\n                slide.applyCurrentZoomPan();\n            }\n        } else {\n            this._animateRootOpacity = options.showHideOpacity;\n        }\n        this._animateBgOpacity = !this._animateRootOpacity && this.pswp.options.bgOpacity > MIN_OPACITY;\n        this._opacityElement = this._animateRootOpacity ? pswp.element : pswp.bg;\n\n        if (!this._useAnimation) {\n            this._duration = 0;\n            this._animateZoom = false;\n            this._animateBgOpacity = false;\n            this._animateRootOpacity = true;\n            if (this.isOpening) {\n                pswp.element.style.opacity = String(MIN_OPACITY);\n                pswp.applyBgOpacity(1);\n            }\n            return;\n        }\n\n        if (this._animateZoom && this._thumbBounds && this._thumbBounds.innerRect) {\n            // Properties are used when animation from cropped thumbnail\n            this._croppedZoom = true;\n            this._cropContainer1 = this.pswp.container;\n            this._cropContainer2 = this.pswp.currSlide.holderElement;\n\n            pswp.container.style.overflow = 'hidden';\n            pswp.container.style.width = `${pswp.viewportSize.x}px`;\n        } else {\n            this._croppedZoom = false;\n        }\n\n        if (this.isOpening) {\n            // Apply styles before opening transition\n            if (this._animateRootOpacity) {\n                pswp.element.style.opacity = String(MIN_OPACITY);\n                pswp.applyBgOpacity(1);\n            } else {\n                if (this._animateBgOpacity) {\n                    pswp.bg.style.opacity = String(MIN_OPACITY);\n                }\n                pswp.element.style.opacity = '1';\n            }\n\n            if (this._animateZoom) {\n                this._setClosedStateZoomPan();\n                if (this._placeholder) {\n                    // tell browser that we plan to animate the placeholder\n                    this._placeholder.style.willChange = 'transform';\n\n                    // hide placeholder to allow hiding of\n                    // elements that overlap it (such as icons over the thumbnail)\n                    this._placeholder.style.opacity = String(MIN_OPACITY);\n                }\n            }\n        } else if (this.isClosing) {\n            // hide nearby slides to make sure that\n            // they are not painted during the transition\n            pswp.mainScroll.itemHolders[0].el.style.display = 'none';\n            pswp.mainScroll.itemHolders[2].el.style.display = 'none';\n\n            if (this._croppedZoom) {\n                if (pswp.mainScroll.x !== 0) {\n                    // shift the main scroller to zero position\n                    pswp.mainScroll.resetPosition();\n                    pswp.mainScroll.resize();\n                }\n            }\n        }\n    }\n\n    _start() {\n        if (this.isOpening &&\n        this._useAnimation &&\n        this._placeholder &&\n        this._placeholder.tagName === 'IMG') {\n            // To ensure smooth animation\n            // we wait till the current slide image placeholder is decoded,\n            // but no longer than 250ms,\n            // and no shorter than 50ms\n            // (just using requestanimationframe is not enough in Firefox,\n            // for some reason)\n            new Promise((resolve) => {\n                let decoded = false;\n                let isDelaying = true;\n                decodeImage(/** @type {HTMLImageElement} */ (this._placeholder)).finally(() => {\n                    decoded = true;\n                    if (!isDelaying) {\n                        resolve();\n                    }\n                });\n                setTimeout(() => {\n                    isDelaying = false;\n                    if (decoded) {\n                        resolve();\n                    }\n                }, 50);\n                setTimeout(resolve, 250);\n            }).finally(() => this._initiate());\n        } else {\n            this._initiate();\n        }\n    }\n\n    _initiate() {\n        this.pswp.element.style.setProperty('--pswp-transition-duration', `${this._duration}ms`);\n\n        this.pswp.dispatch(\n            this.isOpening ? 'openingAnimationStart' : 'closingAnimationStart',\n        );\n\n        // legacy event\n        this.pswp.dispatch(\n            /** @type {'initialZoomIn' | 'initialZoomOut'} */\n            (`initialZoom${this.isOpening ? 'In' : 'Out'}`),\n        );\n\n        this.pswp.element.classList[this.isOpening ? 'add' : 'remove']('pswp--ui-visible');\n\n        if (this.isOpening) {\n            if (this._placeholder) {\n                // unhide the placeholder\n                this._placeholder.style.opacity = '1';\n            }\n            this._animateToOpenState();\n        } else if (this.isClosing) {\n            this._animateToClosedState();\n        }\n\n        if (!this._useAnimation) {\n            this._onAnimationComplete();\n        }\n    }\n\n    _onAnimationComplete() {\n        const { pswp } = this;\n        this.isOpen = this.isOpening;\n        this.isClosed = this.isClosing;\n        this.isOpening = false;\n        this.isClosing = false;\n\n        pswp.dispatch(\n            this.isOpen ? 'openingAnimationEnd' : 'closingAnimationEnd',\n        );\n\n        // legacy event\n        pswp.dispatch(\n            /** @type {'initialZoomInEnd' | 'initialZoomOutEnd'} */\n            (`initialZoom${this.isOpen ? 'InEnd' : 'OutEnd'}`),\n        );\n\n        if (this.isClosed) {\n            pswp.destroy();\n        } else if (this.isOpen) {\n            if (this._animateZoom) {\n                pswp.container.style.overflow = 'visible';\n                pswp.container.style.width = '100%';\n            }\n            pswp.currSlide.applyCurrentZoomPan();\n        }\n    }\n\n    _animateToOpenState() {\n        const { pswp } = this;\n        if (this._animateZoom) {\n            if (this._croppedZoom) {\n                this._animateTo(this._cropContainer1, 'transform', 'translate3d(0,0,0)');\n                this._animateTo(this._cropContainer2, 'transform', 'none');\n            }\n\n            pswp.currSlide.zoomAndPanToInitial();\n            this._animateTo(\n                pswp.currSlide.container,\n                'transform',\n                pswp.currSlide.getCurrentTransform(),\n            );\n        }\n\n        if (this._animateBgOpacity) {\n            this._animateTo(pswp.bg, 'opacity', String(pswp.options.bgOpacity));\n        }\n\n        if (this._animateRootOpacity) {\n            this._animateTo(pswp.element, 'opacity', '1');\n        }\n    }\n\n    _animateToClosedState() {\n        const { pswp } = this;\n\n        if (this._animateZoom) {\n            this._setClosedStateZoomPan(true);\n        }\n\n        if (this._animateBgOpacity &&\n        pswp.bgOpacity > 0.01) { // do not animate opacity if it's already at 0\n            this._animateTo(pswp.bg, 'opacity', '0');\n        }\n\n        if (this._animateRootOpacity) {\n            this._animateTo(pswp.element, 'opacity', '0');\n        }\n    }\n\n    /**\n   * @param {boolean=} animate\n   */\n    _setClosedStateZoomPan(animate) {\n        if (!this._thumbBounds) return;\n\n        const { pswp } = this;\n        const { innerRect } = this._thumbBounds;\n        const { currSlide, viewportSize } = pswp;\n\n        if (this._croppedZoom) {\n            const containerOnePanX = -viewportSize.x + (this._thumbBounds.x - innerRect.x) + innerRect.w;\n            const containerOnePanY = -viewportSize.y + (this._thumbBounds.y - innerRect.y) + innerRect.h;\n            const containerTwoPanX = viewportSize.x - innerRect.w;\n            const containerTwoPanY = viewportSize.y - innerRect.h;\n\n            if (animate) {\n                this._animateTo(\n                    this._cropContainer1,\n                    'transform',\n                    toTransformString(containerOnePanX, containerOnePanY),\n                );\n\n                this._animateTo(\n                    this._cropContainer2,\n                    'transform',\n                    toTransformString(containerTwoPanX, containerTwoPanY),\n                );\n            } else {\n                setTransform(this._cropContainer1, containerOnePanX, containerOnePanY);\n                setTransform(this._cropContainer2, containerTwoPanX, containerTwoPanY);\n            }\n        }\n\n        equalizePoints(currSlide.pan, innerRect || this._thumbBounds);\n        currSlide.currZoomLevel = this._thumbBounds.w / currSlide.width;\n\n        if (animate) {\n            this._animateTo(currSlide.container, 'transform', currSlide.getCurrentTransform());\n        } else {\n            currSlide.applyCurrentZoomPan();\n        }\n    }\n\n    /**\n   * @param {HTMLElement} target\n   * @param {'transform' | 'opacity'} prop\n   * @param {string} propValue\n   */\n    _animateTo(target, prop, propValue) {\n        if (!this._duration) {\n            target.style[prop] = propValue;\n            return;\n        }\n\n        const { animations } = this.pswp;\n        /** @type {AnimationProps} */\n        const animProps = {\n            duration: this._duration,\n            easing: this.pswp.options.easing,\n            onComplete: () => {\n                if (!animations.activeAnimations.length) {\n                    this._onAnimationComplete();\n                }\n            },\n            target,\n        };\n        animProps[prop] = propValue;\n        animations.startTransition(animProps);\n    }\n}\n\n/**\n * @template T\n * @typedef {import('./types.js').Type<T>} Type<T>\n */\n\n/** @typedef {import('./slide/slide.js').SlideData} SlideData */\n/** @typedef {import('./slide/zoom-level.js').ZoomLevelOption} ZoomLevelOption */\n/** @typedef {import('./ui/ui-element.js').UIElementData} UIElementData */\n/** @typedef {import('./main-scroll.js').ItemHolder} ItemHolder */\n/** @typedef {import('./core/eventable.js').PhotoSwipeEventsMap} PhotoSwipeEventsMap */\n/** @typedef {import('./core/eventable.js').PhotoSwipeFiltersMap} PhotoSwipeFiltersMap */\n/**\n * @template T\n * @typedef {import('./core/eventable.js').EventCallback<T>} EventCallback<T>\n */\n/**\n * @template T\n * @typedef {import('./core/eventable.js').AugmentedEvent<T>} AugmentedEvent<T>\n */\n\n/** @typedef {{ x?: number; y?: number; id?: string | number }} Point */\n/** @typedef {{ x?: number; y?: number }} Size */\n/** @typedef {{ top: number; bottom: number; left: number; right: number }} Padding */\n/** @typedef {SlideData[]} DataSourceArray */\n/** @typedef {{ gallery: HTMLElement; items?: HTMLElement[] }} DataSourceObject */\n/** @typedef {DataSourceArray | DataSourceObject} DataSource */\n/** @typedef {(point: Point, originalEvent: PointerEvent) => void} ActionFn */\n/** @typedef {'close' | 'next' | 'zoom' | 'zoom-or-close' | 'toggle-controls'} ActionType */\n/** @typedef {Type<PhotoSwipe> | { default: Type<PhotoSwipe> }} PhotoSwipeModule */\n/** @typedef {PhotoSwipeModule | Promise<PhotoSwipeModule> | (() => Promise<PhotoSwipeModule>)} PhotoSwipeModuleOption */\n\n/**\n * @typedef {string | NodeListOf<HTMLElement> | HTMLElement[] | HTMLElement} ElementProvider\n */\n\n/**\n * @typedef {Object} PhotoSwipeOptions https://photoswipe.com/options/\n *\n * @prop {DataSource=} dataSource\n * Pass an array of any items via dataSource option. Its length will determine amount of slides\n * (which may be modified further from numItems event).\n *\n * Each item should contain data that you need to generate slide\n * (for image slide it would be src (image URL), width (image width), height, srcset, alt).\n *\n * If these properties are not present in your initial array, you may \"pre-parse\" each item from itemData filter.\n *\n * @prop {number=} bgOpacity\n * Background backdrop opacity, always define it via this option and not via CSS rgba color.\n *\n * @prop {number=} spacing\n * Spacing between slides. Defined as ratio relative to the viewport width (0.1 = 10% of viewport).\n *\n * @prop {boolean=} allowPanToNext\n * Allow swipe navigation to the next slide when the current slide is zoomed. Does not apply to mouse events.\n *\n * @prop {boolean=} loop\n * If set to true you'll be able to swipe from the last to the first image.\n * Option is always false when there are less than 3 slides.\n *\n * @prop {boolean=} wheelToZoom\n * By default PhotoSwipe zooms image with ctrl-wheel, if you enable this option - image will zoom just via wheel.\n *\n * @prop {boolean=} pinchToClose\n * Pinch touch gesture to close the gallery.\n *\n * @prop {boolean=} closeOnVerticalDrag\n * Vertical drag gesture to close the PhotoSwipe.\n *\n * @prop {Padding=} padding\n * Slide area padding (in pixels).\n *\n * @prop {(viewportSize: Size, itemData: SlideData, index: number) => Padding} [paddingFn]\n * The option is checked frequently, so make sure it's performant. Overrides padding option if defined. For example:\n *\n * @prop {number | false} [hideAnimationDuration]\n * Transition duration in milliseconds, can be 0.\n *\n * @prop {number | false} [showAnimationDuration]\n * Transition duration in milliseconds, can be 0.\n *\n * @prop {number | false} [zoomAnimationDuration]\n * Transition duration in milliseconds, can be 0.\n *\n * @prop {string=} easing\n * String, 'cubic-bezier(.4,0,.22,1)'. CSS easing function for open/close/zoom transitions.\n *\n * @prop {boolean=} escKey\n * Esc key to close.\n *\n * @prop {boolean=} arrowKeys\n * Left/right arrow keys for navigation.\n *\n * @prop {boolean=} returnFocus\n * Restore focus the last active element after PhotoSwipe is closed.\n *\n * @prop {boolean=} clickToCloseNonZoomable\n * If image is not zoomable (for example, smaller than viewport) it can be closed by clicking on it.\n *\n * @prop {ActionType | ActionFn | false} [imageClickAction]\n * Refer to click and tap actions page.\n *\n * @prop {ActionType | ActionFn | false} [bgClickAction]\n * Refer to click and tap actions page.\n *\n * @prop {ActionType | ActionFn | false} [tapAction]\n * Refer to click and tap actions page.\n *\n * @prop {ActionType | ActionFn | false} [doubleTapAction]\n * Refer to click and tap actions page.\n *\n * @prop {number=} preloaderDelay\n * Delay before the loading indicator will be displayed,\n * if image is loaded during it - the indicator will not be displayed at all. Can be zero.\n *\n * @prop {string=} indexIndicatorSep\n * Used for slide count indicator (\"1 of 10 \").\n *\n * @prop {(options: PhotoSwipeOptions, pswp: PhotoSwipe) => { x: number; y: number }} [getViewportSizeFn]\n * A function that should return slide viewport width and height, in format {x: 100, y: 100}.\n *\n * @prop {string=} errorMsg\n * Message to display when the image wasn't able to load. If you need to display HTML - use contentErrorElement filter.\n *\n * @prop {[number, number]=} preload\n * Lazy loading of nearby slides based on direction of movement. Should be an array with two integers,\n * first one - number of items to preload before the current image, second one - after the current image.\n * Two nearby images are always loaded.\n *\n * @prop {string=} mainClass\n * Class that will be added to the root element of PhotoSwipe, may contain multiple separated by space.\n * Example on Styling page.\n *\n * @prop {HTMLElement=} appendToEl\n * Element to which PhotoSwipe dialog will be appended when it opens.\n *\n * @prop {number=} maxWidthToAnimate\n * Maximum width of image to animate, if initial rendered image width\n * is larger than this value - the opening/closing transition will be automatically disabled.\n *\n * @prop {string=} closeTitle\n * Translating\n *\n * @prop {string=} zoomTitle\n * Translating\n *\n * @prop {string=} arrowPrevTitle\n * Translating\n *\n * @prop {string=} arrowNextTitle\n * Translating\n *\n * @prop {'zoom' | 'fade' | 'none'} [showHideAnimationType]\n * To adjust opening or closing transition type use lightbox option `showHideAnimationType` (`String`).\n * It supports three values - `zoom` (default), `fade` (default if there is no thumbnail) and `none`.\n *\n * Animations are automatically disabled if user `(prefers-reduced-motion: reduce)`.\n *\n * @prop {number=} index\n * Defines start slide index.\n *\n * @prop {(e: MouseEvent) => number} [getClickedIndexFn]\n *\n * @prop {boolean=} arrowPrev\n * @prop {boolean=} arrowNext\n * @prop {boolean=} zoom\n * @prop {boolean=} close\n * @prop {boolean=} counter\n *\n * @prop {string=} arrowPrevSVG\n * @prop {string=} arrowNextSVG\n * @prop {string=} zoomSVG\n * @prop {string=} closeSVG\n * @prop {string=} counterSVG\n *\n * @prop {string=} arrowPrevTitle\n * @prop {string=} arrowNextTitle\n * @prop {string=} zoomTitle\n * @prop {string=} closeTitle\n * @prop {string=} counterTitle\n *\n * @prop {ZoomLevelOption=} initialZoomLevel\n * @prop {ZoomLevelOption=} secondaryZoomLevel\n * @prop {ZoomLevelOption=} maxZoomLevel\n *\n * @prop {boolean=} mouseMovePan\n * @prop {Point | null} [initialPointerPos]\n * @prop {boolean=} showHideOpacity\n *\n * @prop {PhotoSwipeModuleOption} [pswpModule]\n * @prop {() => Promise<any>} [openPromise]\n * @prop {boolean=} preloadFirstSlide\n * @prop {ElementProvider=} gallery\n * @prop {string=} gallerySelector\n * @prop {ElementProvider=} children\n * @prop {string=} childSelector\n * @prop {string | false} [thumbSelector]\n */\n\n/** @type {PhotoSwipeOptions} */\nconst defaultOptions = {\n    allowPanToNext: true,\n    spacing: 0.1,\n    loop: true,\n    pinchToClose: true,\n    closeOnVerticalDrag: true,\n    hideAnimationDuration: 333,\n    showAnimationDuration: 333,\n    zoomAnimationDuration: 333,\n    escKey: true,\n    arrowKeys: true,\n    returnFocus: true,\n    maxWidthToAnimate: 4000,\n    clickToCloseNonZoomable: true,\n    imageClickAction: 'zoom-or-close',\n    bgClickAction: 'close',\n    tapAction: 'toggle-controls',\n    doubleTapAction: 'zoom',\n    indexIndicatorSep: ' / ',\n    preloaderDelay: 2000,\n    bgOpacity: 0.8,\n\n    index: 0,\n    errorMsg: 'The image cannot be loaded',\n    preload: [1, 2],\n    easing: 'cubic-bezier(.4,0,.22,1)',\n};\n\n/**\n * PhotoSwipe Core\n */\nclass PhotoSwipe extends PhotoSwipeBase {\n    /**\n   * @param {PhotoSwipeOptions} options\n   */\n    constructor(options) {\n        super();\n\n        this._prepareOptions(options);\n\n        /**\n     * offset of viewport relative to document\n     *\n     * @type {{ x?: number; y?: number }}\n     */\n        this.offset = {};\n\n        /**\n     * @type {{ x?: number; y?: number }}\n     * @private\n     */\n        this._prevViewportSize = {};\n\n        /**\n     * Size of scrollable PhotoSwipe viewport\n     *\n     * @type {{ x?: number; y?: number }}\n     */\n        this.viewportSize = {};\n\n        /**\n     * background (backdrop) opacity\n     *\n     * @type {number}\n     */\n        this.bgOpacity = 1;\n\n        /** @type {HTMLDivElement} */\n        this.topBar = undefined;\n\n        this.events = new DOMEvents();\n\n        /** @type {Animations} */\n        this.animations = new Animations();\n\n        this.mainScroll = new MainScroll(this);\n        this.gestures = new Gestures(this);\n        this.opener = new Opener(this);\n        this.keyboard = new Keyboard(this);\n        this.contentLoader = new ContentLoader(this);\n    }\n\n    init() {\n        if (this.isOpen || this.isDestroying) {\n            return;\n        }\n\n        this.isOpen = true;\n        this.dispatch('init'); // legacy\n        this.dispatch('beforeOpen');\n\n        this._createMainStructure();\n\n        // add classes to the root element of PhotoSwipe\n        let rootClasses = 'pswp--open';\n        if (this.gestures.supportsTouch) {\n            rootClasses += ' pswp--touch';\n        }\n        if (this.options.mainClass) {\n            rootClasses += ` ${this.options.mainClass}`;\n        }\n        this.element.className += ` ${rootClasses}`;\n\n        this.currIndex = this.options.index || 0;\n        this.potentialIndex = this.currIndex;\n        this.dispatch('firstUpdate'); // starting index can be modified here\n\n        // initialize scroll wheel handler to block the scroll\n        this.scrollWheel = new ScrollWheel(this);\n\n        // sanitize index\n        if (Number.isNaN(this.currIndex) ||\n        this.currIndex < 0 ||\n        this.currIndex >= this.getNumItems()) {\n            this.currIndex = 0;\n        }\n\n        if (!this.gestures.supportsTouch) {\n            // enable mouse features if no touch support detected\n            this.mouseDetected();\n        }\n\n        // causes forced synchronous layout\n        this.updateSize();\n\n        this.offset.y = window.pageYOffset;\n\n        this._initialItemData = this.getItemData(this.currIndex);\n        this.dispatch('gettingData', {\n            index: this.currIndex,\n            data: this._initialItemData,\n            slide: undefined,\n        });\n\n        // *Layout* - calculate size and position of elements here\n        this._initialThumbBounds = this.getThumbBounds();\n        this.dispatch('initialLayout');\n\n        this.on('openingAnimationEnd', () => {\n            this.mainScroll.itemHolders[0].el.style.display = 'block';\n            this.mainScroll.itemHolders[2].el.style.display = 'block';\n\n            // Add content to the previous and next slide\n            this.setContent(this.mainScroll.itemHolders[0], this.currIndex - 1);\n            this.setContent(this.mainScroll.itemHolders[2], this.currIndex + 1);\n\n            this.appendHeavy();\n\n            this.contentLoader.updateLazy();\n\n            this.events.add(window, 'resize', this._handlePageResize.bind(this));\n            this.events.add(window, 'scroll', this._updatePageScrollOffset.bind(this));\n            this.dispatch('bindEvents');\n        });\n\n        // set content for center slide (first time)\n        this.setContent(this.mainScroll.itemHolders[1], this.currIndex);\n        this.dispatch('change');\n\n        this.opener.open();\n\n        this.dispatch('afterInit');\n\n        return true;\n    }\n\n    /**\n   * Get looped slide index\n   * (for example, -1 will return the last slide)\n   *\n   * @param {number} index\n   */\n    getLoopedIndex(index) {\n        const numSlides = this.getNumItems();\n\n        if (this.options.loop) {\n            if (index > numSlides - 1) {\n                index -= numSlides;\n            }\n\n            if (index < 0) {\n                index += numSlides;\n            }\n        }\n\n        index = clamp(index, 0, numSlides - 1);\n\n        return index;\n    }\n\n    appendHeavy() {\n        this.mainScroll.itemHolders.forEach((itemHolder) => {\n            if (itemHolder.slide) {\n                itemHolder.slide.appendHeavy();\n            }\n        });\n    }\n\n    /**\n   * Change the slide\n   * @param {number} index New index\n   */\n    goTo(index) {\n        this.mainScroll.moveIndexBy(\n            this.getLoopedIndex(index) - this.potentialIndex,\n        );\n    }\n\n    /**\n   * Go to the next slide.\n   */\n    next() {\n        this.goTo(this.potentialIndex + 1);\n    }\n\n    /**\n   * Go to the previous slide.\n   */\n    prev() {\n        this.goTo(this.potentialIndex - 1);\n    }\n\n    /**\n   * @see slide/slide.js zoomTo\n   *\n   * @param {Parameters<Slide['zoomTo']>} args\n   */\n    zoomTo(...args) {\n        this.currSlide.zoomTo(...args);\n    }\n\n    /**\n   * @see slide/slide.js toggleZoom\n   */\n    toggleZoom() {\n        this.currSlide.toggleZoom();\n    }\n\n    /**\n   * Close the gallery.\n   * After closing transition ends - destroy it\n   */\n    close() {\n        if (!this.opener.isOpen || this.isDestroying) {\n            return;\n        }\n\n        this.isDestroying = true;\n\n        this.dispatch('close');\n\n        this.events.removeAll();\n        this.opener.close();\n    }\n\n    /**\n   * Destroys the gallery:\n   * - instantly closes the gallery\n   * - unbinds events,\n   * - cleans intervals and timeouts\n   * - removes elements from DOM\n   */\n    destroy() {\n        if (!this.isDestroying) {\n            this.options.showHideAnimationType = 'none';\n            this.close();\n            return;\n        }\n\n        this.dispatch('destroy');\n\n        this.listeners = null;\n\n        this.scrollWrap.ontouchmove = null;\n        this.scrollWrap.ontouchend = null;\n\n        this.element.remove();\n\n        this.mainScroll.itemHolders.forEach((itemHolder) => {\n            if (itemHolder.slide) {\n                itemHolder.slide.destroy();\n            }\n        });\n\n        this.contentLoader.destroy();\n        this.events.removeAll();\n    }\n\n    /**\n   * Refresh/reload content of a slide by its index\n   *\n   * @param {number} slideIndex\n   */\n    refreshSlideContent(slideIndex) {\n        this.contentLoader.removeByIndex(slideIndex);\n        this.mainScroll.itemHolders.forEach((itemHolder, i) => {\n            let potentialHolderIndex = this.currSlide.index - 1 + i;\n            if (this.canLoop()) {\n                potentialHolderIndex = this.getLoopedIndex(potentialHolderIndex);\n            }\n            if (potentialHolderIndex === slideIndex) {\n                // set the new slide content\n                this.setContent(itemHolder, slideIndex, true);\n\n                // activate the new slide if it's current\n                if (i === 1) {\n                    /** @type {Slide} */\n                    this.currSlide = itemHolder.slide;\n                    itemHolder.slide.setIsActive(true);\n                }\n            }\n        });\n\n        this.dispatch('change');\n    }\n\n    /**\n   * Set slide content\n   *\n   * @param {ItemHolder} holder mainScroll.itemHolders array item\n   * @param {number} index Slide index\n   * @param {boolean=} force If content should be set even if index wasn't changed\n   */\n    setContent(holder, index, force) {\n        if (this.canLoop()) {\n            index = this.getLoopedIndex(index);\n        }\n\n        if (holder.slide) {\n            if (holder.slide.index === index && !force) {\n                // exit if holder already contains this slide\n                // this could be common when just three slides are used\n                return;\n            }\n\n            // destroy previous slide\n            holder.slide.destroy();\n            holder.slide = null;\n        }\n\n        // exit if no loop and index is out of bounds\n        if (!this.canLoop() && (index < 0 || index >= this.getNumItems())) {\n            return;\n        }\n\n        const itemData = this.getItemData(index);\n        holder.slide = new Slide(itemData, index, this);\n\n        // set current slide\n        if (index === this.currIndex) {\n            this.currSlide = holder.slide;\n        }\n\n        holder.slide.append(holder.el);\n    }\n\n    getViewportCenterPoint() {\n        return {\n            x: this.viewportSize.x / 2,\n            y: this.viewportSize.y / 2,\n        };\n    }\n\n    /**\n   * Update size of all elements.\n   * Executed on init and on page resize.\n   *\n   * @param {boolean=} force Update size even if size of viewport was not changed.\n   */\n    updateSize(force) {\n    // let item;\n    // let itemIndex;\n\n        if (this.isDestroying) {\n            // exit if PhotoSwipe is closed or closing\n            // (to avoid errors, as resize event might be delayed)\n            return;\n        }\n\n        // const newWidth = this.scrollWrap.clientWidth;\n        // const newHeight = this.scrollWrap.clientHeight;\n\n        const newViewportSize = getViewportSize(this.options, this);\n\n        if (!force && pointsEqual(newViewportSize, this._prevViewportSize)) {\n            // Exit if dimensions were not changed\n            return;\n        }\n\n        // this._prevViewportSize.x = newWidth;\n        // this._prevViewportSize.y = newHeight;\n        equalizePoints(this._prevViewportSize, newViewportSize);\n\n        this.dispatch('beforeResize');\n\n        equalizePoints(this.viewportSize, this._prevViewportSize);\n\n        this._updatePageScrollOffset();\n\n        this.dispatch('viewportSize');\n\n        // Resize slides only after opener animation is finished\n        // and don't re-calculate size on inital size update\n        this.mainScroll.resize(this.opener.isOpen);\n\n        if (!this.hasMouse && window.matchMedia('(any-hover: hover)').matches) {\n            this.mouseDetected();\n        }\n\n        this.dispatch('resize');\n    }\n\n    /**\n   * @param {number} opacity\n   */\n    applyBgOpacity(opacity) {\n        this.bgOpacity = Math.max(opacity, 0);\n        this.bg.style.opacity = String(this.bgOpacity * this.options.bgOpacity);\n    }\n\n    /**\n   * Whether mouse is detected\n   */\n    mouseDetected() {\n        if (!this.hasMouse) {\n            this.hasMouse = true;\n            this.element.classList.add('pswp--has_mouse');\n        }\n    }\n\n    /**\n   * Page resize event handler\n   *\n   * @private\n   */\n    _handlePageResize() {\n        this.updateSize();\n\n        // In iOS webview, if element size depends on document size,\n        // it'll be measured incorrectly in resize event\n        //\n        // https://bugs.webkit.org/show_bug.cgi?id=170595\n        // https://hackernoon.com/onresize-event-broken-in-mobile-safari-d8469027bf4d\n        if (/iPhone|iPad|iPod/i.test(window.navigator.userAgent)) {\n            setTimeout(() => {\n                this.updateSize();\n            }, 500);\n        }\n    }\n\n    /**\n   * Page scroll offset is used\n   * to get correct coordinates\n   * relative to PhotoSwipe viewport.\n   *\n   * @private\n   */\n    _updatePageScrollOffset() {\n        this.setScrollOffset(0, window.pageYOffset);\n    }\n\n    /**\n   * @param {number} x\n   * @param {number} y\n   */\n    setScrollOffset(x, y) {\n        this.offset.x = x;\n        this.offset.y = y;\n        this.dispatch('updateScrollOffset');\n    }\n\n    /**\n   * Create main HTML structure of PhotoSwipe,\n   * and add it to DOM\n   *\n   * @private\n   */\n    _createMainStructure() {\n    // root DOM element of PhotoSwipe (.pswp)\n        this.element = createElement('pswp');\n        this.element.setAttribute('tabindex', '-1');\n        this.element.setAttribute('role', 'dialog');\n\n        // template is legacy prop\n        this.template = this.element;\n\n        // Background is added as a separate element,\n        // as animating opacity is faster than animating rgba()\n        this.bg = createElement('pswp__bg', false, this.element);\n        this.scrollWrap = createElement('pswp__scroll-wrap', false, this.element);\n        this.container = createElement('pswp__container', false, this.scrollWrap);\n\n        this.mainScroll.appendHolders();\n\n        this.ui = new UI(this);\n        this.ui.init();\n\n        // append to DOM\n        (this.options.appendToEl || document.body).appendChild(this.element);\n    }\n\n    /**\n   * Get position and dimensions of small thumbnail\n   *   {x:,y:,w:}\n   *\n   * Height is optional (calculated based on the large image)\n   */\n    getThumbBounds() {\n        return getThumbBounds(\n            this.currIndex,\n            this.currSlide ? this.currSlide.data : this._initialItemData,\n            this,\n        );\n    }\n\n    /**\n   * If the PhotoSwipe can have continious loop\n   * @returns Boolean\n   */\n    canLoop() {\n        return (this.options.loop && this.getNumItems() > 2);\n    }\n\n    /**\n   * @param {PhotoSwipeOptions} options\n   * @private\n   */\n    _prepareOptions(options) {\n        if (window.matchMedia('(prefers-reduced-motion), (update: slow)').matches) {\n            options.showHideAnimationType = 'none';\n            options.zoomAnimationDuration = 0;\n        }\n\n        /** @type {PhotoSwipeOptions} */\n        this.options = {\n            ...defaultOptions,\n            ...options,\n        };\n    }\n}\n\nexport { PhotoSwipe as default };\n// # sourceMappingURL=photoswipe.esm.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n      // Include Lightbox\n      import PhotoSwipeLightbox from './photoswipe/photoswipe-lightbox.esm.js';\n      import PhotoSwipe from './photoswipe/photoswipe.esm.js';\n\n      const arrowPrevSVGString = '<svg height=\"100\" viewBox=\"0 0 46 100\" width=\"46\" xmlns=\"http://www.w3.org/2000/svg\"><g transform=\"matrix(-1 0 0 -1 46 100)\"><path d=\"m0 6.273 6.273-6.273 6.273 6.273\" fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-miterlimit=\"10\" stroke-width=\"2\" transform=\"matrix(0 1 -1 0 26.082 43.672)\"/></g></svg>';\n      const arrowNextSVGString = '<svg height=\"100\" viewBox=\"0 0 46 100\" width=\"46\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 6.273 6.273-6.273 6.273 6.273\" fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-miterlimit=\"10\" stroke-width=\"2\" transform=\"matrix(0 1 -1 0 26.082 43.672)\"/></svg>';\n      const closeSVG = '<svg height=\"36\" viewBox=\"0 0 36 36\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 0h36v36h-36z\" fill=\"#d0d0d0\" opacity=\"0\"/><g fill=\"#fff\" opacity=\"1\" transform=\"matrix(.70710678 -.70710678 .70710678 .70710678 -244.689 245.128)\"><path d=\"m337 24.5h18v2h-18z\"/><path d=\"m0 0h18v2h-18z\" transform=\"matrix(0 1 -1 0 347 16.5)\"/></g></svg>';\n      const shareSVG = '<svg height=\"36\" viewBox=\"0 0 36 36\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 0h36v36h-36z\" fill=\"#d0d0d0\" opacity=\"0\"/><g fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-width=\"2\"><g><circle cx=\"11\" cy=\"18\" r=\"4\" stroke=\"none\"/><circle cx=\"11\" cy=\"18\" fill=\"none\" r=\"3\"/></g><g><circle cx=\"25\" cy=\"11\" r=\"4\" stroke=\"none\"/><circle cx=\"25\" cy=\"11\" fill=\"none\" r=\"3\"/></g><g><circle cx=\"25\" cy=\"25\" r=\"4\" stroke=\"none\"/><circle cx=\"25\" cy=\"25\" fill=\"none\" r=\"3\"/></g><path d=\"m23 12-10 5\"/><path d=\"m23 24-10-5\"/></g></svg>';\n      const fullScreenSVG = '<svg height=\"36\" viewBox=\"0 0 36 36\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 0h36v36h-36z\" fill=\"#d0d0d0\" opacity=\"0\"/><g fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-miterlimit=\"10\" stroke-width=\"2\"><path d=\"m0 4 4-4 4 4\" transform=\"matrix(-.70710678 -.70710678 .70710678 -.70710678 11.914 28.243)\"/><path d=\"m0 4 4-4 4 4\" transform=\"matrix(.70710678 .70710678 -.70710678 .70710678 24.086 7.758)\"/><path d=\"m0 4 4-4 4 4\" transform=\"matrix(.70710678 -.70710678 .70710678 .70710678 6.258 13.414)\"/><path d=\"m0 4 4-4 4 4\" transform=\"matrix(-.70710678 .70710678 -.70710678 -.70710678 29.742 22.585)\"/></g></svg>';\n      const zoomSVG = '<svg height=\"36\" viewBox=\"0 0 36 36\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 0h36v36h-36z\" fill=\"#d0d0d0\" opacity=\"0\"/><g fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-width=\"2\" transform=\"translate(-1363.5 -30.827)\"><path d=\"m14.5 9.828a7 7 0 1 1 -7-7 7 7 0 0 1 7 7z\" stroke-miterlimit=\"10\" transform=\"translate(1372 36)\"/><path d=\"m1390.5 57.828-6.55-6.691\" stroke-miterlimit=\"10\"/><path d=\"m1375.5 45.827h8\"/><path d=\"m0 0h8\" transform=\"matrix(0 1 -1 0 1379.5 41.827)\"/></g></svg><svg height=\"36\" viewBox=\"0 0 36 36\" width=\"36\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m0 0h36v36h-36z\" fill=\"#d0d0d0\" opacity=\"0\"/><g fill=\"none\" opacity=\"1\" stroke=\"#fff\" stroke-width=\"2\" transform=\"translate(-1363.5 -30.827)\"><path d=\"m14.5 9.828a7 7 0 1 1 -7-7 7 7 0 0 1 7 7z\" stroke-miterlimit=\"10\" transform=\"translate(1372 36)\"/><path d=\"m1390.5 57.828-6.55-6.691\" stroke-miterlimit=\"10\"/><path d=\"m1375.5 45.827h8\"/></g></svg>';\n\n      let is_fullScreen = false;\n      function requestFullscreen(target) {\n         if (target.webkitRequestFullscreen) {\n            target.webkitRequestFullscreen();\n         } else if (target.mozRequestFullScreen) {\n            target.mozRequestFullScreen();\n         } else if (target.msRequestFullscreen) {\n            target.msRequestFullscreen();\n         } else if (target.requestFullscreen) {\n            target.requestFullscreen();\n         }\n\n         is_fullScreen = true;\n      }\n      function exitFullscreen() {\n         if (document.webkitCancelFullScreen) {\n            document.webkitCancelFullScreen();\n         } else if (document.mozCancelFullScreen) {\n            document.mozCancelFullScreen();\n         } else if (document.msExitFullscreen) {\n            document.msExitFullscreen();\n         } else if(document.cancelFullScreen) {\n            document.cancelFullScreen();\n         } else if(document.exitFullscreen) {\n            document.exitFullscreen();\n         }\n         is_fullScreen = false;\n      }\n\n      /**\n       * Returns a string of parent ID for the main product image\n       *\n       * @returns {string|null} - Parent ID or null if not found\n       */\n      function getClassForMainImage() {\n         // Gets the div with the class name \"product-content__detail-col-slider__main\"\n         const divTags = document.querySelector('.product-content__detail-col-slider__main');\n         let parentId = null;\n         if(divTags) {\n            // Check for all the images within the div\n            let imgTags = divTags.querySelectorAll('img');\n            imgTags.forEach(tag => {\n               // Check if the image is not hidden\n               const style = window.getComputedStyle(tag);\n               if (style.display !== 'none') {\n                  // Find the nearest parent div with an ID\n                  parentId = tag.closest('div').id;\n                  return;\n               }\n            });\n         }\n         return parentId || null;\n      }\n\n      /**\n       * Sets the data attributes for the parent element to dimensions\n       * @param {Object} img - The image element for which dimensions to be set\n       * @returns {void}\n       */\n      function setPswpDimensions(img) {\n         const a = img.parentElement; // get reference to the parent <a> element\n         a.dataset.pswpWidth = img.naturalWidth;\n         a.dataset.pswpHeight = img.naturalHeight;\n      }\n\n      let mainDivId = getClassForMainImage(); // Get the main image id\n\n      // Set dimensions for slide images\n      $('img.pswp__original_img').each((index, img) => {\n         // Set the image dimensions after loaded\n         $(img).on('load contentLoadImage', () => setPswpDimensions(img));\n      });\n\n      // Set dimensions for the main image\n      $(document).ready(function() {\n         let img = $(`img.${mainDivId}`);\n         if(img.length) {\n            setPswpDimensions($(`img.${mainDivId}`)[0]);\n         }\n      });\n\n      const lightbox = new PhotoSwipeLightbox({\n         arrowPrevSVG: arrowPrevSVGString,\n         arrowNextSVG: arrowNextSVGString,\n         closeSVG: closeSVG,\n         zoomSVG: zoomSVG,\n         gallery: `#my-gallery${(',#' + mainDivId) || ''}`,\n         children: 'a',\n         pswpModule: PhotoSwipe,\n         bgOpacity: 1,\n         padding: { top: 56, bottom: 36, left: 0, right: 0 },\n         initialZoomLevel: 'fit',\n         secondaryZoomLevel: 1.5,\n         maxZoomLevel: 1,\n      });\n      // const temporaryDataSource = [];\n      // $('#my-gallery a').each(function(index) {\n      //   const element = $('#my-gallery a').eq(index);\n      //   const temporaryItem = {}\n      //   temporaryItem.src = element.attr('href');\n      //   temporaryItem.width = element.attr('data-pswp-width');\n      //   temporaryItem.height = element.attr('data-pswp-height');\n      //   temporaryItem.alt = element.find('img').attr('alt');\n      //   temporaryDataSource.push(temporaryItem);\n      // });\n      // lightbox.options.dataSource = temporaryDataSource;\n\n      function lightboxInit(el, pswp) {}\n\n      lightbox.on('uiRegister', function() {\n         lightbox.pswp.ui.registerElement({\n          name: 'custom-caption',\n          order: 9,\n          isButton: false,\n          appendTo: 'root',\n          html: 'Caption text',\n          onInit: (el, pswp) => {\n            lightbox.pswp.on('change', () => {\n              const currSlideElement = lightbox.pswp.currSlide.data.element;\n              let captionHTML = '';\n              if (currSlideElement) {\n                  const hiddenCaption = currSlideElement.querySelector('.hidden-caption-content');\n                  if (hiddenCaption) {\n                    // get caption from element with class hidden-caption-content\n                    captionHTML = hiddenCaption.innerHTML;\n                  } else {\n                    // get caption from alt attribute\n                    captionHTML = currSlideElement.querySelector('img').getAttribute('alt');\n                  }\n              }\n              el.innerHTML = captionHTML && captionHTML !== 'null' ? captionHTML : '';\n            });\n          }\n         });\n         lightbox.pswp.ui.registerElement({\n            name: 'full-screen',\n            ariaLabel: 'FullScreen',\n            order: 9,\n            isButton: true,\n            html: fullScreenSVG,\n            onClick: (event, el) => {\n               if(!is_fullScreen) {\n                  requestFullscreen(document.querySelector('.pswp'));\n               } else {\n                  exitFullscreen();\n               }\n            }\n         });\n         lightbox.pswp.ui.registerElement({\n            name: 'share',\n            ariaLabel: 'Share',\n            order: 9,\n            isButton: true,\n            html: shareSVG,\n            onClick: (event, el) => {\n               if($('.pswp__share') != null){\n                  $('.pswp').append('<div class=\"pswp__share\"><ul><li class=\"pswp__share__facebook\"><a target=\"_blank\">Share on Facebook</a></li><li class=\"pswp__share__twitter\"><a target=\"_blank\">Tweet</a></li><li class=\"pswp__share__download\"><div>Download Image</div></li></ul></div>');\n\n                  let facebookUrl = 'https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(location.href);\n                  $('.pswp__share__facebook a').attr('href',facebookUrl);\n\n                  let twitterUrl = 'https://twitter.com/intent/tweet?text=';\n                  twitterUrl += encodeURIComponent($('.pswp__custom-caption').text());\n                  twitterUrl += '&url=';\n                  twitterUrl += encodeURIComponent(location.href);\n                  $('.pswp__share__twitter a').attr('href',twitterUrl);\n\n                  $('.pswp__share__download div').on('click', function(){\n                     downloadImage();\n                  });\n               };\n\n               if($('.pswp__share').css('display') == 'block') {\n                  $('.pswp__share').stop().fadeOut(300);\n               } else {\n                  $('.pswp__share').stop().fadeIn(300);\n               }\n            }\n         });\n      });\n\n      lightbox.on('contentLoadImage', ({ content, isLazy }) => {\n         $(content.element).on('load', (e) => {\n            let link = $(content.data.element);\n            const naturalWidth = e.currentTarget.naturalWidth * 1.5;\n            const naturalHeight = e.currentTarget.naturalHeight * 1.5;\n            // Set the image size if the height is larger than widtth\n            if (\n               e.currentTarget.width < e.currentTarget.height &&\n               content.width > content.height\n            ) {\n               if (content.slide) {\n                  // Swap between the values\n                  let swapVal = content.slide.width;\n                  content.slide.width = content.slide.height;\n                  content.slide.height = swapVal;\n               } else {\n                  let swapVal = content.width;\n                  content.width = content.height;\n                  content.height = swapVal;\n               }\n\n               if (link.attr('data-pswp-width') > link.attr('data-pswp-height')) {\n                  link.attr('data-pswp-width', naturalWidth);\n                  link.attr('data-pswp-height', naturalHeight);\n               }\n            } else {\n               // If the width and height have already been set, not update the pswp\n               if (content.width === e.currentTarget.width && content.height === e.currentTarget.height) {\n                  return;\n               }\n               if (content.slide) {\n                  content.slide.width = e.currentTarget.width;\n                  content.slide.height = e.currentTarget.height;\n               } else {\n                  content.width = e.currentTarget.width;\n                  content.height = e.currentTarget.height;\n               }\n               link.attr('data-pswp-width', naturalWidth);\n               link.attr('data-pswp-height', naturalHeight);\n            }\n            content.instance.updateSize(true); // Update pswp\n         });\n      });\n\n      lightbox.on('close', () => {\n         $('.pswp__share').stop().hide();\n      });\n\n      lightbox.init();\n\n      function downloadImage() {\n         const temporarySrc = lightbox.pswp.currSlide.data.src;\n         const element = document.createElement('a');\n         element.href = temporarySrc;\n         element.download = temporarySrc.split('/').slice(-1)[0];\n         element.target = '_blank';\n         element.click();\n      }\n"],"names":["createElement","className","tagName","appendToEl","el","document","appendChild","toTransformString","x","y","scale","propValue","concat","undefined","setWidthHeight","w","h","style","width","height","LOAD_STATE","IDLE","LOADING","LOADED","ERROR","specialKeyUsed","e","which","ctrlKey","metaKey","altKey","shiftKey","getElementsFromOption","option","legacySelector","parent","arguments","length","elements","Element","NodeList","Array","isArray","from","selector","querySelectorAll","isPswpClass","fn","prototype","goTo","isSafari","navigator","vendor","match","PhotoSwipeEvent","type","details","_classCallCheck","Object","assign","_createClass","key","value","preventDefault","defaultPrevented","Eventable","_listeners","_filters","pswp","options","addFilter","name","priority","push","sort","f1","f2","removeFilter","filter","applyFilters","_this","_len","args","_key","forEach","apply","on","off","listener","dispatch","_this2","event","call","Placeholder","imageSrc","container","element","decoding","alt","src","setAttribute","setDisplayedSize","transformOrigin","transform","destroy","parentNode","remove","Content","itemData","instance","index","data","displayedImageWidth","displayedImageHeight","Number","isAttached","hasSlide","state","content","removePlaceholder","_this3","placeholder","keepPlaceholder","setTimeout","load","isLazy","reload","slide","usePlaceholder","placeholderSrc","msrc","isFirstSlide","placeholderEl","parentElement","prepend","isImageContent","loadImage","innerHTML","html","updateContentSize","_this4","imageElement","updateSrcsetSizes","srcset","complete","onLoaded","onload","onerror","onError","setSlide","isActive","heavyAppended","append","displayError","isError","isLoading","isInitialSizeUpdate","isZoomable","image","sizesWidth","dataset","largestUsedSize","parseInt","sizes","String","lazyLoad","errorMsgEl","innerText","errorMsg","_this5","supportsDecode","isDecoding","decode","appendImage","activate","deactivate","getViewportSize","getViewportSizeFn","newViewportSize","documentElement","clientWidth","window","innerHeight","parsePaddingOption","prop","viewportSize","paddingValue","paddingFn","padding","legacyPropName","toUpperCase","slice","getPanAreaSize","MAX_IMAGE_WIDTH","ZoomLevel","update","maxWidth","maxHeight","panAreaSize","elementSize","hRatio","vRatio","fit","Math","min","fill","vFill","initial","_getInitial","secondary","_getSecondary","max","_getMax","zoomLevels","slideData","_parseZoomLevelOption","optionPrefix","optionName","optionValue","currZoomLevel","lazyLoadData","createContentFromData","zoomLevel","ceil","lazyLoadSlide","getItemData","PhotoSwipeBase","_Eventable","_callSuper","_inherits","getNumItems","numItems","dataSource","items","_getGalleryDOMElements","gallery","dataSourceItem","_domElementToItemData","galleryElement","children","childSelector","linkEl","querySelector","pswpSrc","href","pswpSrcset","pswpWidth","pswpHeight","pswpType","thumbnailEl","currentSrc","getAttribute","pswpCropped","cropped","thumbCropped","PhotoSwipeLightbox","_PhotoSwipeBase","_this6","_uid","init","_this7","onThumbnailsClick","bind","gallerySelector","addEventListener","onLine","initialPoint","clientX","clientY","clickedIndex","getClickedIndex","currentTarget","loadAndOpen","getClickedIndexFn","clickedTarget","target","childElements","clickedChildIndex","findIndex","child","contains","initialPointerPos","shouldOpen","preload","_this8","promiseArray","pswpModuleType","_typeof","pswpModule","Promise","resolve","Error","openPromise","preloadFirstSlide","_preloadedContent","uid","all","then","iterableModules","mainModule","_openPhotoswipe","module","_this9","keys","contentLoader","addToCache","_this10","removeEventListener","default","equalizePoints","p1","p2","id","roundPoint","p","round","getDistanceBetween","abs","sqrt","pointsEqual","clamp","val","setTransform","defaultCSSEasing","setTransitionStyle","duration","ease","transition","removeTransitionStyle","decodeImage","img","reject","supportsPassive","defineProperty","get","DOMEvents","_pool","add","passive","_toggleListener","removeAll","poolItem","unbind","skipPool","methodName","types","split","eType","eventOptions","PanBounds","center","reset","_updateAxis","axis","elSize","paddingProp","correctPan","panOffset","Slide","currIndex","currentResolution","opener","isOpen","pan","getContentBySlide","bounds","prevDisplayedWidth","prevDisplayedHeight","setIsActive","holderElement","calculateSize","appendHeavy","zoomAndPanToInitial","applyCurrentZoomPan","appendHeavyNearby","mainScroll","isShifted","resize","panTo","force","scaleMultiplier","sizeChanged","getPlaceholderElement","zoomTo","destZoomLevel","centerPoint","transitionDuration","ignoreBounds","animations","stopAllPan","prevZoomLevel","setZoomLevel","calculateZoomToPanOffset","finishTransition","_setResolution","startTransition","isPan","getCurrentTransform","onComplete","easing","toggleZoom","zoomAnimationDuration","point","totalPanDistance","getViewportCenterPoint","zoomFactor","panX","panY","isPannable","_applyZoomTransform","currSlide","zoom","newResolution","PAN_END_FRICTION","VERTICAL_DRAG_FRICTION","MIN_RATIO_TO_CLOSE","MIN_NEXT_SLIDE_SPEED","project","initialVelocity","decelerationRate","DragHandler","gestures","startPan","start","stopAll","change","_this$gestures","prevP1","dragAxis","closeOnVerticalDrag","isMultitouch","_setPanWithFriction","bgOpacity","_getVerticalDragRatio","applyBgOpacity","mainScrollChanged","_panOrMoveMainScroll","end","_this$gestures2","velocity","indexDiff","mainScrollShiftDiff","getCurrSlideX","currentSlideVisibilityRatio","moveIndexBy","correctZoomPan","_finishPanGestureForAxis","panPos","restoreBgOpacity","projectedPosition","vDragRatio","projectedVDragRatio","close","correctedPanPosition","dampingRatio","initialBgOpacity","totalPanDist","startSpring","onUpdate","pos","animationProgressRatio","floor","_this$gestures3","delta","newMainScrollX","moveTo","newPan","allowPanToNext","currSlideMainScrollX","isLeftToRight","isRightToLeft","wasAtMinPanPosition","wasAtMaxPanPosition","potentialPan","customFriction","_this$pswp$currSlide","correctedPan","UPPER_ZOOM_FRICTION","LOWER_ZOOM_FRICTION","getZoomPointsCenter","ZoomHandler","_startPan","_startZoomPoint","_zoomPoint","_startZoomLevel","_wasOverFitZoomLevel","_this$gestures4","startP1","startP2","minZoomLevel","maxZoomLevel","pinchToClose","_calculatePanForZoomLevel","ignoreGesture","destinationZoomLevel","currZoomLevelNeedsChange","initialPan","destinationPan","panNeedsChange","naturalFrequency","now","newZoomLevel","didTapOnMainContent","closest","TapHandler","click","originalEvent","targetClassList","classList","isImageClick","isBackgroundClick","_doClickOrTapAction","tap","doubleTap","actionName","actionFullName","clickToCloseNonZoomable","toggle","AXIS_SWIPE_HYSTERISIS","DOUBLE_TAP_DELAY","MIN_TAP_DISTANCE","Gestures","prevP2","_lastStartP1","_intervalP1","_numActivePoints","_ongoingPointers","_touchEventEnabled","_pointerEventEnabled","PointerEvent","supportsTouch","maxTouchPoints","drag","tapHandler","events","scrollWrap","_onClick","_bindEvents","ontouchmove","ontouchend","pref","down","up","cancel","cancelEvent","onPointerDown","onPointerMove","onPointerUp","isMousePointer","pointerType","button","mouseDetected","_preventPointerEventBehaviour","_updatePoints","pointerDown","_clearTapTimer","isDragging","_calculateDragDirection","isZooming","_updateStartPoints","_intervalTime","Date","_velocityCalculated","_rafStopLoop","_rafRenderLoop","_finishDrag","_updateVelocity","_finishTap","_updatePrevPoints","raf","requestAnimationFrame","time","_getVelocity","indexOf","tapDelay","doubleTapAction","_tapTimer","clearTimeout","displacement","cancelAnimationFrame","pointerEvent","pointerIndex","ongoingPoiner","pointerId","splice","_convertEventPosToPoint","touchEvent","touches","diff","axisToCheck","pageX","offset","pageY","identifier","stopPropagation","MAIN_SCROLL_END_FRICTION","MainScroll","slideWidth","itemHolders","resetPosition","resizeSlides","newSlideWidth","spacing","slideWidthChanged","itemHolder","_containerShiftIndex","_currPositionIndex","_prevPositionIndex","appendHolders","i","display","canBeSwiped","animate","velocityX","newIndex","potentialIndex","numSlides","canLoop","getLoopedIndex","distance","stopMainScroll","destinationX","updateCurrItem","isMainScroll","currDiff","currDistance","positionDifference","diffAbs","tempHolder","shift","setContent","pop","unshift","updateLazy","dragging","newSlideIndexOffset","Keyboard","_focusRoot","_onFocusIn","_onKeyDown","lastActiveElement","activeElement","returnFocus","_wasFocused","focus","keydownAction","isForward","keyCode","escKey","arrowKeys","template","DEFAULT_EASING","CSSAnimation","props","onFinish","_target","_onComplete","_onTransitionEnd","_helperTimeout","_finalizeAnimation","_finished","DEFAULT_NATURAL_FREQUENCY","DEFAULT_DAMPING_RATIO","SpringEaser","_dampingRatio","_naturalFrequency","_dampedFrequency","easeFrame","deltaPosition","deltaTime","coeff","naturalDumpingPow","pow","E","dumpedFCos","cos","dumpedFSin","sin","SpringAnimation","easer","prevTime","animationLoop","_raf","Animations","activeAnimations","_start","isSpring","_this11","animation","stop","isPanRunning","some","ScrollWheel","_onWheel","deltaX","deltaY","wheelToZoom","deltaMode","addElementHTML","htmlData","isCustomSVG","svgData","out","join","size","outlineID","inner","UIElement","elementHTML","isButton","toLowerCase","title","ariaLabel","onInit","onClick","onclick","appendTo","topBar","initArrowButton","isNextButton","loop","disabled","arrowPrev","order","arrowNext","closeButton","zoomButton","loadingIndicator","indicatorElement","isVisible","delayTimeout","toggleIndicatorClass","setIndicatorVisibility","visible","updatePreloaderVisibility","preloaderDelay","ui","counterIndicator","counterElement","indexIndicatorSep","setZoomedIn","isZoomedIn","UI","_lastUpdatedZoomLevel","_this12","isRegistered","uiElementsData","a","b","uiElementData","registerElement","_onZoomPanUpdate","elementData","_this$pswp","isClosing","currZoomLevelDiff","potentialZoomLevel","imageClickAction","getBoundsByElement","thumbAreaRect","getBoundingClientRect","left","top","getCroppedBoundsByElement","imageWidth","imageHeight","fillZoomLevel","offsetX","offsetY","innerRect","getThumbBounds","thumbBounds","thumbnail","thumbSelector","matches","_this13","_this14","_this15","_this16","_this17","MIN_SLIDES_TO_CACHE","ContentLoader","limit","_cachedItems","loadSlideByIndex","getContentByIndex","removeByIndex","indexToRemove","item","removedItem","find","MIN_OPACITY","Opener","isClosed","_prepareOpen","_thumbBounds","open","_this18","isOpening","_duration","hideAnimationDuration","maxWidthToAnimate","_applyStartProps","_croppedZoom","showAnimationDuration","showHideAnimationType","showHideOpacity","_initialThumbBounds","_placeholder","_useAnimation","_animateZoom","Boolean","_animateRootOpacity","_animateBgOpacity","_opacityElement","bg","opacity","_cropContainer1","_cropContainer2","overflow","_setClosedStateZoomPan","willChange","_this19","decoded","isDelaying","_initiate","setProperty","_animateToOpenState","_animateToClosedState","_onAnimationComplete","_animateTo","containerOnePanX","containerOnePanY","containerTwoPanX","containerTwoPanY","_this20","animProps","defaultOptions","bgClickAction","tapAction","PhotoSwipe","_this21","_prepareOptions","_prevViewportSize","keyboard","_this22","isDestroying","_createMainStructure","rootClasses","mainClass","scrollWheel","isNaN","updateSize","pageYOffset","_initialItemData","_handlePageResize","_updatePageScrollOffset","next","prev","_this$currSlide","listeners","refreshSlideContent","slideIndex","_this23","potentialHolderIndex","holder","hasMouse","matchMedia","_this24","test","userAgent","setScrollOffset","body","_objectSpread","arrowPrevSVGString","arrowNextSVGString","closeSVG","shareSVG","fullScreenSVG","zoomSVG","is_fullScreen","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullscreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen","cancelFullScreen","getClassForMainImage","divTags","parentId","imgTags","tag","getComputedStyle","setPswpDimensions","naturalWidth","naturalHeight","mainDivId","$","each","ready","lightbox","arrowPrevSVG","arrowNextSVG","bottom","right","initialZoomLevel","secondaryZoomLevel","lightboxInit","currSlideElement","captionHTML","hiddenCaption","facebookUrl","encodeURIComponent","location","attr","twitterUrl","text","downloadImage","css","fadeOut","fadeIn","_ref","link","swapVal","hide","temporarySrc","download"],"sourceRoot":""}