"use strict";(self.webpackChunk_roots_bud_sage=self.webpackChunk_roots_bud_sage||[]).push([[759],{"./scripts/helpers/block.js":(e,t,n)=>{n.d(t,{AE:()=>o,Qc:()=>s});const s=e=>{window.requestAnimationFrame(async function t(){document.body?await e():window.requestAnimationFrame(t)})},o=(e,t)=>{let o,n=[];s(async()=>{if(n=await e(),n){o=new IntersectionObserver(async(e,s)=>{for(const o of e)o.isIntersecting&&(s.unobserve(o.target),n=n.filter(e=>e!==o.target),await t(o.target))},{root:null,rootMargin:"200px 0px 200px 0px",threshold:.01});for(const e of n)o.observe(e)}}),document.addEventListener("ws-loadallsections",()=>{s(async()=>{for(const e of n)o.unobserve(e),await t(e)})})}},"./views/blocks/gutenberg-dual-image-grid/index.js":(e,t,n)=>{var b=n("./scripts/helpers/block.js");function o(e,t,n){const s=document.createElement(t);return e&&(s.className=e),n&&n.appendChild(s),s}function r(e,t,n){e.style.width="number"==typeof t?`${t}px`:t,e.style.height="number"==typeof n?`${n}px`:n}const h="idle",d="loading",c="loaded",s="error";function i(e,t,n=document){let s=[];if(e instanceof Element)s=[e];else if(e instanceof NodeList||Array.isArray(e))s=Array.from(e);else{const o="string"==typeof e?e:t;o&&(s=Array.from(n.querySelectorAll(o)))}return s}function u(){return!!navigator.vendor&&!!navigator.vendor.match(/apple/i)}class g{constructor(e,t){this.type=e,this.defaultPrevented=!1,t&&Object.assign(this,t)}preventDefault(){this.defaultPrevented=!0}}class m{constructor(){this._listeners={},this._filters={},this.pswp=0[0],this.options=0[0]}addFilter(e,t,n=100){var s,o,i;this._filters[e]||(this._filters[e]=[]),null===(s=this._filters[e])||0[0]===s||s.push({fn:t,priority:n}),null===(o=this._filters[e])||0[0]===o||o.sort((e,t)=>e.priority-t.priority),null===(i=this.pswp)||0[0]===i||i.addFilter(e,t,n)}removeFilter(e,t){this._filters[e]&&(this._filters[e]=this._filters[e].filter(e=>e.fn!==t)),this.pswp&&this.pswp.removeFilter(e,t)}applyFilters(n,...e){var t;return null===(t=this._filters[n])||0[0]===t||t.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(e,t){var n,s;this._listeners[e]||(this._listeners[e]=[]),null===(n=this._listeners[e])||0[0]===n||n.push(t),null===(s=this.pswp)||0[0]===s||s.on(e,t)}off(e,t){var n;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(e=>t!==e)),null===(n=this.pswp)||0[0]===n||n.off(e,t)}dispatch(e,t){var n;if(this.pswp)return this.pswp.dispatch(e,t);const s=new g(e,t);return null===(n=this._listeners[e])||0[0]===n||n.forEach(e=>{e.call(this,s)}),s}}class f{constructor(e,t){if(this.element=o("pswp__img pswp__img--placeholder",e?"img":"div",t),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,t){this.element&&("IMG"===this.element.tagName?(r(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(e,t,n){let s=`translate3d(${e}px,${t||0}px,0)`;return 0[0]!==n&&(s+=` scale3d(${n},${n},1)`),s}(0,0,e/250)):r(this.element,e,t))}destroy(){var e;null!==(e=this.element)&&0[0]!==e&&e.parentNode&&this.element.remove(),this.element=null}}class p{constructor(e,t,n){this.instance=t,this.data=e,this.index=n,this.element=0[0],this.placeholder=0[0],this.slide=0[0],this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=h,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=0[0])},1e3)}load(e,t){if(this.slide&&this.usePlaceholder())if(this.placeholder){const e=this.placeholder.element;e&&!e.parentElement&&this.slide.container.prepend(e)}else{const e=this.instance.applyFilters("placeholderSrc",!!this.data.msrc&&!!this.slide.isFirstSlide&&this.data.msrc,this);this.placeholder=new f(e,this.slide.container)}this.element&&!t||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=o("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=o("pswp__content","div"),this.element.innerHTML=this.data.html||""),t&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var n,s;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const t=this.element;this.updateSrcsetSizes(),this.data.srcset&&(t.srcset=this.data.srcset),t.src=null!==(n=this.data.src)&&0[0]!==n?n:"",t.alt=null!==(s=this.data.alt)&&0[0]!==s?s:"",this.state=d,t.complete?this.onLoaded():(t.onload=()=>{this.onLoaded()},t.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=c,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==c&&this.state!==s||this.removePlaceholder())}onError(){this.state=s,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d,this)}isError(){return this.state===s}isImageContent(){return"image"===this.type}setDisplayedSize(e,t){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,t),!this.instance.dispatch("contentResize",{content:this,width:e,height:t}).defaultPrevented&&(r(this.element,e,t),this.isImageContent()&&!this.isError()))){const n=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=t,n?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:t,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==s,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,t=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||t>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=t+"px",e.dataset.largestUsedSize=String(t))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=0[0],this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=0[0]),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=0[0]))}displayError(){if(this.slide){var e,t;let n=o("pswp__error-msg","div");n.innerText=null!==(e=null===(t=this.instance.options)||0[0]===t?0[0]:t.errorMsg)&&0[0]!==e?e:"",n=this.instance.applyFilters("contentErrorElement",n,this),this.element=o("pswp__content pswp__error-msg-container","div"),this.element.appendChild(n),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===s)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||u())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!u()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==c&&this.state!==s||this.removePlaceholder()))}}function a(e,t,n,s,o){let i=0;if(t.paddingFn)i=t.paddingFn(n,s,o)[e];else if(t.padding)i=t.padding[e];else{const n="padding"+e[0].toUpperCase()+e.slice(1);t[n]&&(i=t[n])}return Number(i)||0}class v{constructor(e,t,n,s){this.pswp=s,this.options=e,this.itemData=t,this.index=n,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,t,n){const i={x:e,y:t};this.elementSize=i,this.panAreaSize=n;const o=n.x/i.x,s=n.y/i.y;this.fit=Math.min(1,o<s?o:s),this.fill=Math.min(1,o>s?o:s),this.vFill=Math.min(1,s),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const n=e+"ZoomLevel",t=this.options[n];if(t)return"function"==typeof t?t(this):"fill"===t?this.fill:"fit"===t?this.fit:Number(t)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,3*this.fit),this.elementSize&&e*this.elementSize.x>4e3&&(e=4e3/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function l(e,t,n){const s=t.createContentFromData(e,n);let o;const{options:i}=t;if(i){let r;o=new v(i,e,-1),r=t.pswp?t.pswp.viewportSize:function(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(i,t);const c=function(e,t,n,s){return{x:t.x-a("left",e,t,n,s)-a("right",e,t,n,s),y:t.y-a("top",e,t,n,s)-a("bottom",e,t,n,s)}}(i,r,e,n);o.update(s.width,s.height,c)}return s.lazyLoad(),o&&s.setDisplayedSize(Math.ceil(s.width*o.initial),Math.ceil(s.height*o.initial)),s}class j extends m{getNumItems(){var t;let n=0;const e=null===(t=this.options)||0[0]===t?0[0]:t.dataSource;e&&"length"in e?n=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(n=e.items.length));const s=this.dispatch("numItems",{dataSource:e,numItems:n});return this.applyFilters("numItems",s.numItems,e)}createContentFromData(e,t){return new p(e,this,t)}getItemData(e){var s;const t=null===(s=this.options)||0[0]===s?0[0]:s.dataSource;let o={};Array.isArray(t)?o=t[e]:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),o=t.items[e]);let n=o;n instanceof Element&&(n=this._domElementToItemData(n));const i=this.dispatch("itemData",{itemData:n||{},index:e});return this.applyFilters("itemData",i.itemData,e)}_getGalleryDOMElements(e){var t,n;return null!==(t=this.options)&&0[0]!==t&&t.children||null!==(n=this.options)&&0[0]!==n&&n.childSelector?i(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const n={element:e},t="A"===e.tagName?e:e.querySelector("a");if(t){n.src=t.dataset.pswpSrc||t.href,t.dataset.pswpSrcset&&(n.srcset=t.dataset.pswpSrcset),n.width=t.dataset.pswpWidth?parseInt(t.dataset.pswpWidth,10):0,n.height=t.dataset.pswpHeight?parseInt(t.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,t.dataset.pswpType&&(n.type=t.dataset.pswpType);const o=e.querySelector("img");var s;o&&(n.msrc=o.currentSrc||o.src,n.alt=null!==(s=o.getAttribute("alt"))&&0[0]!==s?s:""),(t.dataset.pswpCropped||t.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,e,t)}lazyLoadData(e,t){return l(e,this,t)}}class y extends j{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=0[0],this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){i(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if(function(e){return"button"in e&&1===e.button||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}(e)||window.pswp)return;let t={x:e.clientX,y:e.clientY};t.x||t.y||(t=null);let n=this.getClickedIndex(e);n=this.applyFilters("clickedIndex",n,e,this);const s={gallery:e.currentTarget};n>=0&&(e.preventDefault(),this.loadAndOpen(n,s,t))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const t=e.target,n=i(this.options.children,this.options.childSelector,e.currentTarget).findIndex(e=>e===t||e.contains(t));return-1!==n?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,t,n){if(window.pswp||!this.options)return!1;if(!t&&this.options.gallery&&this.options.children){const e=i(this.options.gallery);e[0]&&(t={gallery:e[0]})}return this.options.index=e,this.options.initialPointerPos=n,this.shouldOpen=!0,this.preload(e,t),!0}preload(e,t){const{options:n}=this;t&&(n.dataSource=t);const s=[],i=typeof n.pswpModule;if("function"==typeof(o=n.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(n.pswpModule));else{if("string"===i)throw new Error("pswpModule as string is no longer supported");if("function"!==i)throw new Error("pswpModule is not valid");s.push(n.pswpModule())}var o;"function"==typeof n.openPromise&&s.push(n.openPromise()),!1!==n.preloadFirstSlide&&e>=0&&(this._preloadedContent=function(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return l(n,t,e)}(e,this));const a=++this._uid;Promise.all(s).then(e=>{if(this.shouldOpen){const t=e[0];this._openPhotoswipe(t,a)}})}_openPhotoswipe(e,t){if(t!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const n="object"==typeof e?new e.default(this.options):new e(this.options);this.pswp=n,window.pswp=n,Object.keys(this._listeners).forEach(e=>{var t;null===(t=this._listeners[e])||0[0]===t||t.forEach(t=>{n.on(e,t)})}),Object.keys(this._filters).forEach(e=>{var t;null===(t=this._filters[e])||0[0]===t||t.forEach(t=>{n.addFilter(e,t.fn,t.priority)})}),this._preloadedContent&&(n.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=0[0]),n.on("destroy",()=>{this.pswp=0[0],delete window.pswp}),n.init()}destroy(){var e;null===(e=this.pswp)||0[0]===e||e.destroy(),this.shouldOpen=!1,this._listeners={},i(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}const _={captionContent:".pswp-caption-content",type:"auto",horizontalEdgeThreshold:20,mobileCaptionOverlapRatio:.3,mobileLayoutBreakpoint:600,verticallyCenterImage:!1},w=class{constructor(e,t){this.options={..._,...t},this.lightbox=e,this.lightbox.on("init",()=>{this.pswp=this.lightbox.pswp,this.initCaption()})}initCaption(){const{pswp:e}=this;e.on("change",()=>{this.showCaption(this.pswp.currSlide)}),e.on("calcSlideSize",e=>this.onCalcSlideSize(e)),e.on("slideDestroy",e=>{e.slide.dynamicCaption&&(e.slide.dynamicCaption.element&&e.slide.dynamicCaption.element.remove(),delete e.slide.dynamicCaption)}),e.on("zoomPanUpdate",({slide:t})=>{if(e.opener.isOpen&&t.dynamicCaption){if(t.currZoomLevel>t.zoomLevels.initial?this.hideCaption(t):this.showCaption(t),t.dynamicCaption.element){let e=0;if(t.currZoomLevel<=t.zoomLevels.initial){const n=t.pan.y-t.bounds.center.y;(n<0?-n:n)>1&&(e=n)}this.setCaptionYOffset(t.dynamicCaption.element,e)}this.adjustPanArea(t,t.currZoomLevel)}}),e.on("beforeZoomTo",t=>{this.adjustPanArea(e.currSlide,t.destZoomLevel)}),e.on("tapAction",e=>{e.originalEvent.target.closest(".pswp__dynamic-caption")&&e.preventDefault()})}adjustPanArea(e,t){e.dynamicCaption&&e.dynamicCaption.adjustedPanAreaSize&&(t>e.zoomLevels.initial?(e.panAreaSize.x=e.dynamicCaption.originalPanAreaSize.x,e.panAreaSize.y=e.dynamicCaption.originalPanAreaSize.y):(e.panAreaSize.x=e.dynamicCaption.adjustedPanAreaSize.x,e.panAreaSize.y=e.dynamicCaption.adjustedPanAreaSize.y))}useMobileLayout(){const{mobileLayoutBreakpoint:e}=this.options;return"function"==typeof e?e.call(this):"number"==typeof e&&window.innerWidth<e}hideCaption(e){if(e.dynamicCaption&&!e.dynamicCaption.hidden){const t=e.dynamicCaption.element;if(!t)return;e.dynamicCaption.hidden=!0,t.classList.add("pswp__dynamic-caption--faded"),e.captionFadeTimeout&&clearTimeout(e.captionFadeTimeout),e.captionFadeTimeout=setTimeout(()=>{t.style.visibility="hidden",delete e.captionFadeTimeout},400)}}setCaptionYOffset(e,t){e.style.transform=`translateY(${t}px)`}showCaption(e){if(e.dynamicCaption&&e.dynamicCaption.hidden){const t=e.dynamicCaption.element;if(!t)return;e.dynamicCaption.hidden=!1,t.style.visibility="visible",clearTimeout(e.captionFadeTimeout),e.captionFadeTimeout=setTimeout(()=>{t.classList.remove("pswp__dynamic-caption--faded"),delete e.captionFadeTimeout},50)}}setCaptionPosition(e,t,n){const s=t<=this.options.horizontalEdgeThreshold;e.classList[s?"add":"remove"]("pswp__dynamic-caption--on-hor-edge"),e.style.left=t+"px",e.style.top=n+"px"}setCaptionWidth(e,t){t?e.style.width=t+"px":e.style.removeProperty("width")}setCaptionType(e,t){const n=e.dataset.pswpCaptionType;t!==n&&(e.classList.add("pswp__dynamic-caption--"+t),e.classList.remove("pswp__dynamic-caption--"+n),e.dataset.pswpCaptionType=t)}updateCaptionPosition(e){if(!e.dynamicCaption||!e.dynamicCaption.type||!e.dynamicCaption.element)return;if("mobile"===e.dynamicCaption.type)return this.setCaptionType(e.dynamicCaption.element,e.dynamicCaption.type),e.dynamicCaption.element.style.removeProperty("left"),e.dynamicCaption.element.style.removeProperty("top"),void this.setCaptionWidth(e.dynamicCaption.element,!1);const t=e.zoomLevels.initial,n=Math.ceil(e.width*t),s=Math.ceil(e.height*t);this.setCaptionType(e.dynamicCaption.element,e.dynamicCaption.type),"aside"===e.dynamicCaption.type?(this.setCaptionPosition(e.dynamicCaption.element,e.bounds.center.x+n,e.bounds.center.y),this.setCaptionWidth(e.dynamicCaption.element,!1)):"below"===e.dynamicCaption.type&&(this.setCaptionPosition(e.dynamicCaption.element,e.bounds.center.x,e.bounds.center.y+s),this.setCaptionWidth(e.dynamicCaption.element,n))}onCalcSlideSize(e){const{slide:t}=e;let n,s;if(!t.dynamicCaption){t.dynamicCaption={element:0[0],type:!1,hidden:!1};const e=this.getCaptionHTML(t);if(!e)return;t.dynamicCaption.element=document.createElement("div"),t.dynamicCaption.element.className="pswp__dynamic-caption pswp__hide-on-close",t.dynamicCaption.element.innerHTML=e,this.pswp.dispatch("dynamicCaptionUpdateHTML",{captionElement:t.dynamicCaption.element,slide:t}),t.holderElement.appendChild(t.dynamicCaption.element)}if(!t.dynamicCaption.element)return;this.storeOriginalPanAreaSize(t),t.bounds.update(t.zoomLevels.initial),this.useMobileLayout()?(t.dynamicCaption.type="mobile",s=!0):"auto"===this.options.type?t.bounds.center.x>t.bounds.center.y?t.dynamicCaption.type="aside":t.dynamicCaption.type="below":t.dynamicCaption.type=this.options.type;const o=Math.ceil(t.width*t.zoomLevels.initial),i=Math.ceil(t.height*t.zoomLevels.initial);if(this.setCaptionType(t.dynamicCaption.element,t.dynamicCaption.type),"aside"===t.dynamicCaption.type){this.setCaptionWidth(t.dynamicCaption.element,!1),n=this.measureCaptionSize(t.dynamicCaption.element,e.slide);const s=n.x,i=o+t.bounds.center.x;t.panAreaSize.x-i<=s&&(t.panAreaSize.x-=s,this.recalculateZoomLevelAndBounds(t))}else if("below"===t.dynamicCaption.type||s){this.setCaptionWidth(t.dynamicCaption.element,s?this.pswp.viewportSize.x:o),n=this.measureCaptionSize(t.dynamicCaption.element,e.slide);const a=n.y;if(this.options.verticallyCenterImage)t.panAreaSize.y-=a,this.recalculateZoomLevelAndBounds(t);else{const n=i+t.bounds.center.y,e=t.panAreaSize.y-n,o=t.panAreaSize.y;if(e<=a){t.panAreaSize.y-=Math.min(2*(a-e),a),this.recalculateZoomLevelAndBounds(t);const n=t.panAreaSize.x*this.options.mobileCaptionOverlapRatio/2;s&&t.bounds.center.x>n&&(t.panAreaSize.y=o,this.recalculateZoomLevelAndBounds(t))}}}this.storeAdjustedPanAreaSize(t),this.updateCaptionPosition(t)}measureCaptionSize(e,t){const n=e.getBoundingClientRect();return this.pswp.dispatch("dynamicCaptionMeasureSize",{captionEl:e,slide:t,captionSize:{x:n.width,y:n.height}}).captionSize}recalculateZoomLevelAndBounds(e){e.zoomLevels.update(e.width,e.height,e.panAreaSize),e.bounds.update(e.zoomLevels.initial)}storeAdjustedPanAreaSize(e){e.dynamicCaption&&(e.dynamicCaption.adjustedPanAreaSize||(e.dynamicCaption.adjustedPanAreaSize={}),e.dynamicCaption.adjustedPanAreaSize.x=e.panAreaSize.x,e.dynamicCaption.adjustedPanAreaSize.y=e.panAreaSize.y)}storeOriginalPanAreaSize(e){e.dynamicCaption&&(e.dynamicCaption.originalPanAreaSize||(e.dynamicCaption.originalPanAreaSize={}),e.dynamicCaption.originalPanAreaSize.x=e.panAreaSize.x,e.dynamicCaption.originalPanAreaSize.y=e.panAreaSize.y)}getCaptionHTML(e){if("function"==typeof this.options.captionContent)return this.options.captionContent.call(this,e);const t=e.data.element;let n="";if(t){const e=t.querySelector(this.options.captionContent);if(e)n=e.innerHTML;else{const e=t.querySelector("img");e&&(n=e.getAttribute("alt"))}}return n}};(0,b.AE)(async()=>Array.from(document.getElementsByClassName("b-gutenberg-dual-image-grid")),async e=>{const t=new y({gallery:e,children:"a",pswpModule:()=>n.e(746).then(n.bind(n,"../node_modules/photoswipe/dist/photoswipe.esm.js")),wheelToZoom:!0});new w(t,{type:"auto"}),t.init()})}},e=>{var t="./views/blocks/gutenberg-dual-image-grid/index.js";e(e.s=t)}])