!function(d){d(window).on("elementor/frontend/init",()=>{class e extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{container:".pp-image-gallery-container",gallery:".pp-image-gallery",justifiedGallery:".pp-image-gallery-justified",filterItems:".pp-gallery-filter"}}}getDefaultElements(){var e=this.getSettings("selectors");return{$container:this.$element.find(e.container),$gallery:this.$element.find(e.gallery),$justifiedGallery:this.$element.find(e.justifiedGallery),$filterItems:this.$element.find(e.filterItems)}}bindEvents(){var e=this.elements.$container.data("settings"),t=this.elements.$gallery;elementorFrontend.isEditMode()||("justified"!=e.layout&&this.initMasonryLayout(t),t.hasClass("pp-image-gallery-filter-enabled")&&this.initFilters(t,e),"yes"===e.pagination&&this.initLoadMore(t,e,[],[])),"yes"===e.tilt_enable&&this.initTilt(),"justified"===e.layout&&this.initjustifiedLayout(),this.initLightbox()}initMasonryLayout(e){var t=e.hasClass("pp-image-gallery-masonry")?"masonry":"fitRows",i=this.elements.$filterItems;let a="",n=(d(i).each(function(){""!==a&&a!==undefined||(a=d(this).attr("data-default"))}),{itemSelector:".pp-grid-item-wrap",layoutMode:t,percentPosition:!0,filter:a});this.elements.$container.imagesLoaded(function(){e.isotope(n),e.find(".pp-gallery-slide-image").on("load",function(){d(this).hasClass("lazyloaded")||setTimeout(function(){e.isotope("layout")},500)})}),elementorFrontend.elements.$window.on("elementor-pro/motion-fx/recalc",function(){e.isotope("layout")})}initFilters(n,s){const l=this.getID(),o=this.getElementSettings("lightbox_library"),r=this;this.elements.$container.on("click",".pp-gallery-filter",function(){let e=d(this),t=e.attr("data-filter"),i=e.attr("data-gallery-index"),a=n.find(t);"*"===t&&(a=n.find(".pp-grid-item-wrap")),d(a).each(function(){var e=d(this).find(".pp-image-gallery-item-link");"fancybox"===o?e.attr("data-fancybox",i+"_"+l):e.attr("data-elementor-lightbox-slideshow",i+"_"+l)}),e.siblings().removeClass("pp-active"),e.addClass("pp-active"),"justified"===s.layout?r.initjustifiedLayout(t):n.isotope({filter:t})}),d(".pp-filters-dropdown").on("change",function(){let e=this.value,t=d(this).find(":selected").attr("data-gallery-index"),i=n.find(e);"*"===e&&(i=n.find(".pp-grid-item-wrap")),d(i).each(function(){var e=d(this).find(".pp-image-gallery-item-link");"fancybox"===o?e.attr("data-fancybox",t+"_"+l):e.attr("data-elementor-lightbox-slideshow",t+"_"+l)}),n.isotope({filter:e})}),this.hashChange(),d(window).on("hashchange",function(){this.hashChange()}.bind(this))}initjustifiedLayout(e){const t=this.elements.$container.data("settings"),i=this.elements.$justifiedGallery;let a={rowHeight:t.row_height,lastRow:t.last_row,selector:"div",waitThumbnailsLoad:!0,margins:t.image_spacing,border:0};e&&(a.filter=e),i.imagesLoaded(function(){i.justifiedGallery(a).on("jg.complete jg.resize",function(e){var t=d(this).data("jg.controller");0===t.rows&&"hide"===t.settings.lastRow&&(a.lastRow="justify",d(this).justifiedGallery(a))})}.bind(this))}initLoadMore(e,t,i,a){const n=this;e.find(".pp-grid-item-wrap").each(function(){a.push(d(this).data("item-id"))}),this.elements.$container.find(".pp-gallery-load-more").off("click").on("click",function(e){e.preventDefault(),d(this).addClass("disabled pp-loading"),0