PageSourceSearch

https://flowsolutions.com/wp-content/themes/flowsolutions/dist/scr…?id=5fcfa1cb6df302d72438-10&ver=11152024.7

js flowsolutions.com collected 2026-10-09 03:46:39 UTC 13,659 bytes, 87 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,t,o){o("xYjq"),o("cpPS"),e.exports=o("q8Qp")},"6QbZ":function(e,t,o){"use strict";(function(e){var t=o("L+tW");e(document).ready((function(){e(".products-slider").length&&Object(t.a)({container:".products-slider",loop:!0,items:1,nav:!1,autoplay:!0,speed:1e3,autoplayButtonOutput:!1,controlsContainer:"#product-slider-controls",responsive:{990:{items:4,gutter:20},764:{items:2,gutter:20}}})}))}).call(this,o("xeH2"))},LW0v:function(e,t,o){"use strict";var n=o("xeH2"),r=o.n(n);r()('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click((function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=r()(this.hash);(t=t.length?t:r()("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),r()("html, body").animate({scrollTop:t.offset().top},1500,"swing",(function(){var e=r()(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()})))}}))},cpPS:function(e,t){},dvlR:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},hnQn:function(e,t,o){(function(e){e(document).ready((function(){if(window.location.search){var t=window.location.href.slice(window.location.href.indexOf("?")).split("=")[1].split(",");for(i=0;i<t.length;i++){var o=t[i];e("#resource-table-body").find("[data-id=".concat(o,"]")).prop("checked",!0)}}}))}).call(this,o("xeH2"))},ltmP:function(e,t,o){"use strict";(function(e){var t=o("Iab2"),n=o("xOOu"),r=o.n(n),a=o("AIMp"),c=o.n(a),s=window.Promise;function i(){e("#result").removeClass().text("")}function l(t){i(),e("#result").addClass("alert alert-success").text(t)}s||(s=r.a.external.Promise),e(".resource-download").on("click",(function(){i();var o=new r.a;if(e("#resource-table-body").find(":checked").each((function(){var t=e(this),n=t.data("url"),r=t.data("filename");o.file(r,function(e){return new s((function(t,o){c.a.getBinaryContent(e,(function(e,n){e?o(e):t(n)}))}))}(n),{binary:!0})})),Object.keys(o.files).length>0)return o.generateAsync({type:"blob"},(function(t){var o,n="progression : "+t.percent.toFixed(2)+" %";t.currentFile&&(n+=", current file = "+t.currentFile),l(n),o=0|t.percent,e("#progress_bar").removeClass("hide").find(".progress-bar").attr("aria-valuenow",o).css({width:o+"%"})})).then((function(e){Object(t.saveAs)(e,"flowsolutions-resources.zip"),l("Done !")}),(function(t){var o;o=t,i(),e("#result").addClass("alert alert-danger").text(o)})),!1;alert("Please make a selection")}))}).call(this,o("xeH2"))},luKs:function(e,t,o){(function(e){e.fn.isInViewport=function(){var t=e(this).offset().top,o=t+e(this).outerHeight(),n=e(window).scrollTop(),r=n+e(window).height();return o>n&&t<r}}).call(this,o("xeH2"))},miaU:function(e,t,o){"use strict";var n,r=o("xeH2"),a=o.n(r);o("luKs"),(n=jQuery)(document).on("facetwp-loaded",(function(){n(".facetwp-input-wrap").each((function(){n(this).find(".facetwp-search-submit").length<1&&n(this).find(".facetwp-search").after('<button class="btn btn-third facetwp-search-submit" onclick="FWP.refresh()">Submit</button>')}))})),a()(window).on("resize scroll",(function(){if(a()(".facetwp-load-more").isInViewport()){var e=a()(".facetwp-load-more").attr("data-loading");a()(".facetwp-load-more").text()!=e&&(a()(".facetwp-load-more").html(e),FWP.is_load_more=!0,FWP.load_more_paged+=1,FWP.paged=FWP.load_more_paged,FWP.soft_refresh=!0,FWP.refresh())}}))},q06m:function(e,t,o){(function(e){e("#collapseDescription").innerHeight()<=400&&e(".description-collapse-wrapper").addClass("d-none")}).call(this,o("xeH2"))},q8Qp:function(e,t){},wWRF:function(e,t,o){(function(e){e("input.check-all").change((function(){e(this).is(":checked")?e(".resource-checkbox").prop("checked",!0):e(".resource-checkbox").prop("checked",!1)})),e(".resource-email").click((function(){var t=location.protocol+"//"+location.host+location.pathname,o=[];e("#resource-table-body").find(":checked").each((function(){var t=e(this).data("id");o.push(t)}));var n=t+"?downloadfiles="+o.join(",");0===o.length?alert("Please make a selection"):window.location.href="mailto:?subject=Flow Solutions Resource Downloads&body=Please follow this link to download selected resources "+n,o=[]})),e(".resource-clear").click((function(){e(".check-all").prop("checked",!1),e(".resource-checkbox").each((function(){e(this).is(":checked")&&e(".resource-checkbox").prop("checked",!1)}))}))}).call(this,o("xeH2"))},xYjq:function(e,t,o){"use strict";o.r(t),function(e){var t=o("dvlR"),n=o.n(t),r=o("yXPU"),a=o.n(r);o("xeH2"),o("SYky"),o("ltmP"),o("wWRF"),o("hnQn"),o("LW0v"),o("q06m"),o("6QbZ"),o("miaU"),e(document).ready((function(){if(e(".hamburger").click((function(){e(this).toggleClass("is-active")})),e("#hero-carousel").length&&(e("#hero-carousel").on("slide.bs.carousel",(function(t){console.log(e(t.relatedTarget).attr("data-sli
1de-content"));var o=e(t.relatedTarget).attr("data-slide-content"),n=e(t.relatedTarget).attr("data-cta-link"),r=e(t.relatedTarget).attr("data-cta-text"),a=e(t.relatedTarget).attr("data-video-content");e(".hero-header-carousel .carousel-header").fadeOut("fast",(function(){e(this).find(".hero-video").empty(),""!=a&&e(this).find(".hero-video").html('<iframe width="560" height="315" src="'.concat(a,'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>')),e(this).find("h1").text(o),e(this).find(".carousel-cta").empty(),""!=n&&e(this).find(".carousel-cta").html('<a href="'.concat(n,'">').concat(r,"</a>")),e(this).fadeIn("fast")})),e(".carousel-indicators").find(".active").removeClass("active"),e(".carousel-indicators").find("li[data-slide-to='".concat(t.to,"']")).addClass("active")})),e("#carousel-content").hover((function(){console.log("hovered over hero carousel"),e("#hero-carousel").carousel("pause")}),(function(){console.log("hovered out of hero carousel"),e("#hero-carousel").carousel("cycle")})),e(".hero-video").hover((function(){console.log("hovered over hero carousel"),e("#hero-carousel").carousel("pause")}),(function(){console.log("hovered out of hero carousel"),e("#hero-carousel").carousel("cycle")}))),e(".product-gallery").length&&e(".product-gallery a[data-modal-image]").on("click",(function(t){t.preventDefault();var o=e(this).attr("href");e("#empImgModal").find(".modal-body").html("<img src='".concat(o,"'>")),e("#empImgModal").modal("show")})),e("#product-configurator-carousel").length){console.log("product test");var t={},o=[],r=[],c=e("#resource-links ul").html();e("#product-configurator-carousel .pump-select").find("figure").on("click",(function(){var o=e(this).attr("data-pump-id");t.pumpID=o,e("#product-configurator-carousel").carousel("next"),e(".carousel-controls").addClass("show")})),e("#product-configurator-carousel .pump-config").find("button").on("click",(function(){var s=e(this).attr("data-type"),i=e(this).attr("data-value"),l=e(this).parents(".config-col");t["".concat(s)]=i,o.push("".concat(i)),e(this).prop("disabled",!0).addClass("disabled"),e(this).parent().find("button:not(.disabled)").addClass("invisible"),l.addClass("disabled"),e("#product-configurator-carousel .pump-config > div > .show").length<e("#product-configurator-carousel .pump-config > div > .config-col").length?l.next(".config-col").addClass("show"):function(t,o){console.log("CONFIG COMPLETED");var s=o.join(",");fetch("/wp-json/wp/v2/resource?resource_type[terms]=256,".concat(s,"&resource_type[operator]=AND&oilminder_pump_type=").concat(t.pumpID)).then((function(e){return e.json()})).then(function(){var t=a()(n.a.mark((function t(o){return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.reduce(function(){var e=a()(n.a.mark((function e(t,o){var a;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return e.next=4,fetch(o._links["wp:attachment"][0].href).then((function(e){return e.json()}));case 4:(a=e.sent)[0]&&r.push(a[0].source_url);case 6:case"end":return e.stop()}}),e)})));return function(t,o){return e.apply(this,arguments)}}(),Promise.resolve());case 2:r.length>0?(e("#resource-links ul").empty(),e("#resource-links").addClass("show"),r.forEach((function(t){var o=t.substr(t.lastIndexOf("/")).replace("/","");e("#resource-links ul").append("<li><a href='".concat(t,"' target='_blank' title='").concat(o,"'>").concat(o,"</a></li>"))}))):(e("#resource-links ul").empty().html(c),e("#resource-links").addClass("show"));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}(t,o)})),e("#clearPumpConfig").on("click",(function(n){n.preventDefault(),e("#product-configurator-carousel").carousel("prev"),e("#product-configurator-carousel").find(".show, .disabled, .invisible").removeClass("show disabled invisible"),e("#product-configurator-carousel .pump-config").find("button:disabled").prop("disabled",!1),e("#product-configurator-carou
1sel .pump-config > div > .config-col").first().addClass("show"),e("#resource-links ul").empty(),t={},o=[],r=[]}))}e(document).on("scroll",(function(){e(document).scrollTop()>350?e(".navbar-brand img.logo").addClass("shrink"):e(".navbar-brand img.logo").removeClass("shrink")})),e('a[href="#contact-footer"]').click((function(t){t.preventDefault(),e("html, body").stop().animate({scrollTop:e("#contact-footer").offset().top-e("header.banner").outerHeight()},1500)})),e(".product-filter-collapse").length&&e(".product-filter-collapse button").append('<span class="filter-open">open</span><span class="filter-close">close</span>'),e(".facetwp-expand").length&&e(".facetwp-expand").click((function(){e(".facetwp-expand").addClass("filter-close")})),e(".wc-product-table-wrapper").length&&setTimeout((function(){e(".wc-product-table-wrapper td").each((function(){e(this).html(e(this).html().split(",").join(""))}))}),150)})),e(document).on("facetwp-loaded",(function(){0==FWP.settings.pager.total_rows?e(".no-search-results").removeClass("d-none"):e(".no-search-results").addClass("d-none"),e(".facetwp-expand").length&&setTimeout((function(){e(".facetwp-expand").each((function(){e(this).addClass("filter-close"),e(this).on("click",(function(){e(this).toggleClass("filter-close"),e(this).toggleClass("filter-open")}))}
1))}),150)}))}.call(this,o("xeH2"))},xeH2:function(e,t){!function(){e.exports=this.jQuery}()}},[[0,0,4]]]);
2
3function megaMobileFix() {
4    var mq = window.matchMedia("(max-width: 992px)");
5    var megaContainer = document.querySelector('li#menu-item-5827 > ul > .mega-container');
6    var megaUl = document.querySelector('li#menu-item-5827 > ul');
7    var megaCta = document.querySelector('li#menu-item-5827 > ul > .mega-products-cta');
8    if (mq.matches && megaContainer.childNodes.length > 0) {
9        if (megaContainer) {
10            const parentElement = megaContainer.parentNode;
11            // Move the children of the div element to the parent node
12            while (megaContainer.firstChild) {
13                parentElement.insertBefore(megaContainer.firstChild, megaContainer);
14            }
15        }
16    } else if (!mq.matches && megaContainer.childNodes.length === 0){
17        if (megaContainer && megaUl) {
18            // Move the contents of megaUl into megaContainer
19            while (megaUl.firstChild) {
20                megaContainer.appendChild(megaUl.firstChild);
21            }
22        }
23    }
24}
25
26function megaPosition() {
27    var mq = window.matchMedia("(min-width: 992px) and (max-width: 1199px)");
28    var mq2 = window.matchMedia("(min-width: 1200px)");
29    var liElement = document.querySelector('li#menu-item-5827');
30    var ulElement = liElement.closest('ul');
31
32    if (mq.matches) {
33//         console.log(992);
34        var liRect = liElement.getBoundingClientRect();
35        var ulRect = ulElement.getBoundingClientRect();
36        
37        var distanceFromLeftOfScreen = liRect.left;
38
39        console.log();
40
41        var mega = document.querySelector('li#menu-item-5827 > .dropdown-menu');
42        var mega2 = document.querySelector('li#menu-item-6296 > .dropdown-menu');
43        
44        if (mega || mega2) {
45            mega.style.left = `-${distanceFromLeftOfScreen}px`;
46        }
47    } else if (mq2.matches) {
48//         console.log(1200);
49        var liRect = liElement.getBoundingClientRect();
50        var ulRect = ulElement.getBoundingClientRect();
51
52        var distanceFromLeft = liRect.left - ulRect.left;
53
54        var mega = document.querySelector('li#menu-item-5827 > .dropdown-menu');
55        var mega2 = document.querySelector('li#menu-item-6296 > .dropdown-menu');
56
57        if (mega) {
58            mega.style.left = `-${distanceFromLeft}px`;
59        }
60    }
61}
62
63document.addEventListener('DOMContentLoaded', function() {
64    megaMobileFix();
65    megaPosition();
66    window.addEventListener('resize', megaMobileFix);
67    window.addEventListener('resize', megaPosition);
68});
69
70function mega_product_hoverin() {
71    const megaImg = document.getElementById('mega-cta-img');
72    let hoverImg = event.target.getAttribute('data-hoverimg');
73    if(hoverImg){
74        megaImg.src= hoverImg;
75    }
76    
77}
78function mega_product_hoverout() {
79    const megaImg = document.getElementById('mega-cta-img');
80    const origImg = 'https://flowsolutions.com/wp-content/uploads/2024/04/all-products-img.png'
81    megaImg.src= origImg;
82}
83const prodMenuItems = document.querySelectorAll('#menu-item-5827 > .dropdown-menu > .mega-container li.menu-item');
84prodMenuItems.forEach(item => {
85    item.addEventListener('mouseenter', mega_product_hoverin); // Mouse enters the element
86    item.addEventListener('mouseleave', mega_product_hoverout); // Mouse leaves the element
87});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.