PageSourceSearch

https://ministryofsound.com/wp-content/plugins/shopwp-pro/dist/Opt…nCollections-public.7a466a63cdd963194ad4.js

js ministryofsound.com collected 2026-09-24 18:15:01 UTC 8,101 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["OptionCollections-public","StorefrontFilterOptionsGroup-public"],{"./npm-packages/@shopwp/components/src/storefront/options/group-items/index.jsx"(e,t,n){n.d(t,{A:()=>d});var s=n("./node_modules/memoize-one/dist/memoize-one.esm.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("./node_modules/lodash-es/isEmpty.js"),r=n("./node_modules/lodash-es/some.js"),i=n("./npm-packages/@shopwp/components/src/storefront/_state/hooks.jsx");const l=function(e){var t=e.itemValue,n=e.itemType,s=e.storefrontDispatch,l=e.isLoading,c=e.initialSelections,p=wp.element,u=p.useState,m=p.useEffect,d=u((function(){var e=c[n];return!(!e||0===e.length)&&("collections"===n?e.filter((function(e){return e.label===t.label})).length:!!(e&&e.length&&t)&&e.includes(String(t).toLowerCase()))})),f=(0,o.A)(d,2),h=f[0],g=f[1],w="collections"===n?t.label:t,y=(0,i.z)();return m((function(){if((0,a.A)(y.selections)&&g(!1),(0,a.A)(y.selections[n])&&g(!1),"collections"===n)var e=(0,r.A)(y.selections[n],t);else e=y.selections[n]&&t&&y.selections[n].length?y.selections[n].includes(String(t).toLowerCase()):h;e||g(!1)}),[y.selections]),React.createElement("li",{"data-wps-is-selected":h,"data-wps-filter-value":w,"data-wps-display-style":"checkbox",className:"wps-checkbox-wrapper"},React.createElement("label",{className:"wps-input-label"},React.createElement("input",{type:"checkbox",onChange:function(){if(!l){var e={itemValue:t,itemType:n,isSelected:!h};g(!h),s({type:"SET_LAST_SELECTED",payload:e})}},disabled:l,checked:h?"checked":"",className:"wps-input-value"}),w&&React.createElement("span",null,w)))};var c=n("./npm-packages/@shopwp/components/src/items/_state/requests/hooks.jsx"),p=n("./node_modules/@tanstack/react-virtual/dist/esm/index.js"),u=wp.element.memo((function(e){var t=e.data,n=e.index,s=e.size,o=e.start,a=t.filterOptions,r=t.itemType,i=t.storefrontDispatch,c=t.isLoading,p=t.initialSelections,u=a[n];return React.createElement("ul",{style:{position:"absolute",top:0,left:0,width:"100%",height:"".concat(s,"px"),transform:"translateY(".concat(o,"px)"),listStyle:"none",margin:0,padding:0}},React.createElement(l,{itemType:r,itemValue:u,storefrontDispatch:i,isLoading:c,initialSelections:p}))})),m=(0,s.A)((function(e,t,n,s,o){return{filterOptions:e,itemType:t,storefrontDispatch:n,isLoading:s,initialSelections:o}}));const d=function(e){var t=e.filterOptions,n=e.itemType,s=(0,i.U)(),o=(0,i.z)(),a=(0,c.V)(),r=m(t,n,s,a.isFetchingNew,o.selections),l=wp.element.useRef(),d=(0,p.Te)({count:t.length,getScrollElement:function(){return l.current},estimateSize:wp.element.useCallback((function(){return 30}),[])});return React.createElement("ul",{className:"wps-"+n,ref:l,style:{height:"auto",width:"300px",overflow:"auto"}},React.createElement("li",{className:"ListInner",style:{height:"".concat(d.getTotalSize(),"px"),width:"100%",position:"relative",listStyle:"none",margin:0,padding:0}},d.getVirtualItems().map((function(e){return React.createElement(u,{key:e.key,data:r,index:e.index,size:e.size,start:e.start})}))))}},"./npm-packages/@shopwp/components/src/storefront/options/group/index.jsx"(e,t,n){n.r(t),n.d(t,{default:()=>i});var s=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");const o=function(e){var t=e.heading,n=e.children,s=e.isOpen,o=e.setIsOpen;return React.createElement("div",{className:"swp-storefront-filter wps-filter","data-is-drawer-open":s,"data-wps-drawer-toggle":s},React.createElement("h3",{className:"swp-storefront-filter-heading wps-drawer-trigger wps-filter-heading",onClick:o},t,React.createElement("span",{className:"swp-storefront-drawer-icon wps-drawer-icon"})),React.createElement("div",{className:"swp-storefront-drawer-content wps-drawer-content"},n))};var a=n("./npm-packages/@shopwp/components/src/shop/_state/hooks.js"),r=wp.element.lazy((function(){return Promise.resolve().then(n.bind(n,"./npm-packages/@shopwp/components/src/notice/index.jsx"))}));const i=function(e){var t=e.groupType,n=e.heading,i=e.areFilterOptionsEmpty,l=e.isLoadingItems,c=e.onOpen,p=void 0!==c&&c,u=e.openOnLoad,m=void 0!==u&&u,d=e.error,f=void 0!==d&&d,h=e.noFilterGroupFoundText,g=e.items,w=wp.element,y=w.useState,k=w.Suspense,v=w.useEffect,x=(0,a.T)(),b=y(m),E=(0,s.A)(b,2),R=E[0],T=E[1];return v((function(){T(!!m)}),[m]),React.createElement(o,{heading:n,isOpen:R,setIsOpen:function(){T(!R),p&&p(!R)}},React.createElement("div",{className:"swp-storefront-filter-content wps-filter-content","data-is-loading-items":l},f?React.createElement(r,{status:"error"},f):i&&!l?React.createElement(r,{status:"info"},h):l&&"collections"!==t?React.createElement("p",{className:"swp-storefront-loading-text"},x.t.l.loading+" "+t+" ..."):React.createElement(k,{fallback:x.t.l.loading+" "+t+" ..."},R?g:null)))}},"./npm-packages/@shopwp/components/src/storefront/options/option-collections/index.jsx"(e,t,n){n.r(t),n.d(t,{default:()=>g});var s=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),a=n("./node_modules/@babel/runtime/regenerator/index.js"),r=n.n(a),i=n("./node_modules/lodash-es/isEmpty.js"),l=n("./node_modules/lodash-es/union.js"),c=n("./npm-packages/@shopwp/api/src/collections/index.js"),p=n("./npm-packages/@shopwp/api/src/errors/index.js"),u=n("./npm-packages/@shopwp/common/src/utils/index.jsx"),m=n("./npm-packages/@shopwp/components/src/shop/_state/hooks.js");const d=function(e){var t=e.onClick,n=e.shopState,s=e.isBusy,o=void 0!==s&&s;return React.createElement("button",{onClick:t,disabled:o,className:"swp-btn-secondary"},o?n.t.l.loading:n.t.l.seeMore)};var f=n("./npm-packages/@shopwp/components/src/storefront/options/group-items/index.jsx"),h=n("./npm-packages/@shopwp/components/src/storefront/options/group/index.jsx");const g=function(e){var t=e.settings,n=wp.element,a=n.useState,g=n.useEffect,w=a(!0),y=(0,o.A)(w,2),k=y[0],v=y[1],x=a(!1),b=(0,o.A)(x,2),E=b[0],R=b[1],T=a(!1),j=(0,o.A)(T,2),A=j[0],S=j[1],O=a([]),_=(0,o.A)(O,2),C=_[0],L=_[1],F=a([]),N=(0,o.A)(F,2),z=N[0],I=N[1],D=a([]),B=(0,o.A)(D,2),
1V=B[0],G=B[1],P=(0,m.T)();function q(e){return e.edges.map((function(e){return{label:e.node.title,id:e.node.id}}))}function H(){return K.apply(this,arguments)}function K(){return K=(0,s.A)(r().mark((function e(){var t,n,s,a,i,m,d,f,h,g,w,y=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y.length>0&&void 0!==y[0]&&y[0],null===(t=shopwp.general)||void 0===t||null===(t=t.syncByCollections)||void 0===t||!t.length){e.next=1;break}return s={edges:shopwp.general.syncByCollections.map((function(e){return{node:e}}))},I(s.edges),R(!1),a=wp.hooks.applyFilters("storefront.availableCollections",q(s)),G(a),L(a),e.abrupt("return");case 1:return v(!0),i={query:"*",sortKey:"TITLE",first:wp.hooks.applyFilters("storefront.collectionsToFetch",shopwp.general.numPosts),reverse:!1},n&&(i.cursor=n),e.next=2,(0,u.to)((0,c.A)(i,P));case 2:if(m=e.sent,d=(0,o.A)(m,2),f=d[0],h=d[1],v(!1),!(g=(0,p.FL)(f,h))){e.next=3;break}return S(g),e.abrupt("return");case 3:h&&(I(h.edges),h.pageInfo.hasNextPage?R(!0):R(!1),w=wp.hooks.applyFilters("storefront.availableCollections",(0,l.A)(C.concat(q(h)))),G(w),L(w));case 4:case"end":return e.stop()}}),e)}))),K.apply(this,arguments)}function M(e){e&&(C.length?G(C):H())}function U(){return(U=(0,s.A)(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=z[z.length-1])&&t.hasOwnProperty("cursor")&&H(t.cursor);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g((function(){M(!0)}),[]),React.createElement(h.default,{error:A,onOpen:M,openOnLoad:(0,u.Dw)(t,"collections"),isLoadingItems:k,groupType:"collections",areFilterOptionsEmpty:(0,i.A)(V),noFilterGroupFoundText:P.t.n.noItemsLeft,heading:t.collectionsHeading,items:React.createElement(React.Fragment,null,React.createElement(f.A,{filterOptions:V,isBusy:k,itemType:"collections"}),E?React.createElement(d,{shopState:P,isBusy:k,onClick:function(){return U.apply(this,arguments)}}):null)})}}}]);

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.