PageSourceSearch

https://www.bestofbigred.com/mm5/themes/genesis/branches/productio…/dist/3725.0bd0c6c92b08894badc4.chunk.js

js bestofbigred.com collected 2026-10-10 02:00:46 UTC 5,523 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_mvps_genesis_quickstart_theme=self.webpackChunk_mvps_genesis_quickstart_theme||[]).push([[3725],{3725:(e,t,i)=>{i.d(t,{Facets:()=>l});var s=i(1093);function n(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function o(e,t,i){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}function r(e,t){return e.get(a(e,t))}function a(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var c=new WeakMap;class l{constructor(e){let{appliedFacetElements:t=".js-facets__applied-label",showMore:i={countAttribute:"data-facet-show-count",defaultCount:5,elements:".g-facet-set__list-show-more",lessTextAttribute:"data-facet-show-less-text",linkElementSelector:".g-facet-set__list-show-more-link",moreTextAttribute:"data-facet-show-more-text"}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var l,h,d;o(this,c,void 0),n(this,"containerElement",void 0),n(this,"showMoreElements",void 0),n(this,"showMoreOptions",void 0),l=c,h=this,d=new s.A(this),l.set(a(l,h),d),this.containerElement=r(c,this).isElement("containerElement",e),this.appliedFacetElements=r(c,this).isElementList("appliedFacetElements",t),this.showMoreOptions=r(c,this).isObject("showMore",i),r(c,this).isString("showMore.countAttribute",this.showMoreOptions.countAttribute),r(c,this).isInt("showMore.defaultCount",this.showMoreOptions.defaultCount),r(c,this).isString("showMore.lessTextAttribute",this.showMoreOptions.lessTextAttribute),r(c,this).isString("showMore.linkElementSelector",this.showMoreOptions.linkElementSelector),r(c,this).isString("showMore.moreTextAttribute",this.showMoreOptions.moreTextAttribute),this.showMoreElements=r(c,this).isElementList("showMore.elements",this.showMoreOptions.elements,{container:this.containerElement,required:!1}),this.bindEvents()}bindEvents(){this.bindFacetSetAccordions(),this.bindShowMoreEvents(),this.bindRangeSliders(),this.bindMediaQueryEvents(),this.bindAppliedFacetEvents()}bindFacetSetAccordions(){const e=this.containerElement.getElementsByClassName("g-facet-set");if(!e.length)return;const t="g-facet-set--collapsed";for(const i of e){const e=i.querySelector(".g-facet-set__list"),s=i.querySelector(".g-facet-set__label");if(!e||!s)return;s.addEventListener("click",(e=>{e.preventDefault(),i.classList.contains(t)?(i.classList.remove(t),s.setAttribute("aria-expanded","true")):(i.classList.add(t),s.setAttribute("aria-expanded","false"))}))}}bindShowMoreEvents(){if(!this.showMoreElements||!this.showMoreElements.length)return;const e="is-show-less";for(const t of this.showMoreElements){const i=t.querySelector(this.showMoreOptions.linkElementSelector),s=t.closest(".g-facet-set__list");if(!i||!s)return;const n=s.querySelectorAll(".g-facet-set__list-item:not(".concat(this.showMoreOptions.element,")"));if(!n.length)return;let o=parseInt(t.getAttribute(this.showMoreOptions.countAttribute),10);o&&!isNaN(o)||(o=this.showMoreOptions.defaultCount);const r=i.getAttribute(this.showMoreOptions.moreTextAttribute)||"Show More",a=i.getAttribute(this.showMoreOptions.lessTextAttribute)||"Show Less";for(let e=0,t=n.length;e<t;e++)e>=o&&n[e].classList.add("u-hidden");i.addEventListener("click",(t=>{t.preventDefault();let s=!1;i.classList.contains(e)?i.classList.remove(e):(i.classList.add(e),s=!0);for(let e=0,t=n.length;e<t;e++){const t=n[e];e>=o&&!s?t.classList.add("u-hidden"):t.classList.remove("u-hidden")}i.textContent=s?a:r})),t.classList.remove("u-hidden")}}bindRangeSliders(){new MutationObserver(((e,t)=>{if("function"==typeof window.MMFacet_RangeSlider_Initialize){t.disconnect();let e=0;const i=this.containerElement.querySelectorAll("[data-mm-facet-rangeslider-name]");window.addEventListener("resize",(()=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame((()=>{i.length&&window.MMFacet_RangeSlider_Initialize()}))}),!1)}})).observe(document,{childList:!0,subtree:!0})}bindMediaQueryEvents(){const e=window.matchMedia("(min-width: 60rem)");this.mediaChanged(e.matches),e.addEventListener("change",(e=>this.mediaChanged(e.matches)))}mediaChanged(e){if(e){if(window.MicroModal&&this.containerElement.classList.contains("is-open")){const e=this.containerElement.querySelector("[data-micromodal-close]");e&&e.click()}this.containerElement.setAttribute("aria-hidden","false")}else this.containerElement.setAttribute("aria-hidden","true")}bindAppliedFacetEvents(){for(const e of this.appliedFacetElements)e.addEventListener("click",(()=>
1this.clearAppliedFacet(e)))}clearAppliedFacet(e){const t=e.form;if(!t||"function"!=typeof window.MMProdList_UpdateQuery)return;const i=t.querySelector('[name="'.concat(e.getAttribute("data-facet-code"),'"]'));if(!i)return;if("SELECT"===i.nodeName)return i.value="",void window.MMProdList_UpdateQuery(i);const s=t.querySelector('[name="'.concat(e.getAttribute("data-facet-code"),'"][value="').concat(e.getAttribute("data-facet-value"),'"]'));s&&(s.checked=!1,window.MMProdList_UpdateQuery(s))}}}}]);
2//# sourceMappingURL=3725.0bd0c6c92b08894badc4.chunk.js.map

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.