document.addEventListener("jet-smart-filters/inited", function(initEvent) {
    JetSmartFilters.events.subscribe("ajaxFilters/updated", function(provider, queryId, response) {
        let layersElements = document.querySelectorAll(".wp-block-query [data-gspbactions]");
        if(typeof GSPB_Trigger_Actions === 'function'){
            GSPB_Trigger_Actions("front", layersElements);
        }
        if (typeof GSPBSlidingPanelInit == 'function') {
            GSPBSlidingPanelInit(layersElements);
        }
        if (typeof gsInitTabs == 'function') {
            gsInitTabs('.gspb-tabs', layersElements);
        }
        if (typeof GSPB_Swiper_Init == 'function') {
            GSPB_Swiper_Init(layersElements);
        }
        if (typeof GS_Videos_Init == 'function') {
            GS_Videos_Init(layersElements);
        }
        if (typeof GSPB_Toggler_Init == 'function') {
            GSPB_Toggler_Init(layersElements);
        }
        if (typeof GSPB_quantityInput == 'function') {
            GSPB_quantityInput(layersElements);
        }
    });
 });