PageSourceSearch

https://www.aaggrrii.com/wp-content/plugins/shopwp-pro/dist/OptionCollections-public.4560a8c8b0f8cc17f87f.js

js aaggrrii.com collected 2026-10-02 15:25:43 UTC 8,067 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["OptionCollections-public","StorefrontFilterOptionsGroup-public"],{
1"./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 c=function(e){var t=e.itemValue,n=e.itemType,s=e.storefrontDispatch,c=e.isLoading,l=e.initialSelections,p=wp.element,u=p.useState,m=p.useEffect,d=u((function(){var e=l[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(!c){var e={itemValue:t,itemType:n,isSelected:!h};g(!h),s({type:"SET_LAST_SELECTED",payload:e})}},disabled:c,checked:h?"checked":"",className:"wps-input-value"}),w&&React.createElement("span",null,w)))};var l=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,l=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(c,{itemType:r,itemValue:u,storefrontDispatch:i,isLoading:l,initialSelections:p}))})),m=(0,s.default)((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,l.V)(),r=m(t,n,s,a.isFetchingNew,o.selections),c=wp.element.useRef(),d=(0,p.Te)({count:t.length,getScrollElement:function(){return c.current},estimateSize:wp.element.useCallback((function(){return 30}),[])});return React.createElement("ul",{className:"wps-"+n,ref:c,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})}))))}},
1"./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,c=e.isLoadingItems,l=e.onOpen,p=void 0!==l&&l,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,x=w.useEffect,b=(0,a.T)(),v=y(m),E=(0,s.A)(v,2),R=E[0],T=E[1];return x((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":c},f?React.createElement(r,{status:"error"},f):i&&!c?React.createElement(r,{status:"info"},h):c&&"collections"!==t?React.createElement("p",{className:"swp-storefront-loading-text"},b.t.l.loading+" "+t+" ..."):React.createElement(k,{fallback:b.t.l.loading+" "+t+" ..."},R?g:null)))}},
1"./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"),c=n("./node_modules/lodash-es/union.js"),l=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],x=y[1],b=a(!1),v=(0,o.A)(b,2),E=v[0],R=v[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=arguments;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=w.length>0&&void 0!==w[0]&&w[0],!shopwp.general.syncByCollections.length){e.next=9;break}return n={edges:shopwp.general.syncByCollections.map((function(e){return{node:e}}))},I(n.edges),R(!1),s=wp.hooks.applyFilters("storefront.availableCollections",q(n)),G(s),L(s),e.abrupt("return");case 9:return x(!0),a={query:"*",sortKey:"TITLE",first:wp.hooks.applyFilters("storefront.collectionsToFetch",shopwp.general.numPosts),reverse:!1},t&&(a.cursor=t),e.next=14,(0,u.to)((0,l.A)(a,P));case 14:if(i=e.sent,m=(0,o.A)(i,2),d=m[0],f=m[1],x(!1),!(h=(0,p.FL)(d,f))){e.next=23;break}return S(h),e.abrupt("return");case 23:f&&(I(f.edges),f.pageInfo.hasNextPage?R(!0):R(!1),g=wp.hooks.applyFilters("storefront.availableCollections",(0,c.A)(C.concat(q(f)))),G(g),L(g));case 24: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 2: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)})}}
1}]);

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.