PageSourceSearch

https://brandclub.com/assets/index-BwZLMslb.js

js brandclub.com collected 2026-09-24 21:16:40 UTC 6,859 bytes, 45 lines download raw bytes

1import{u as _,j as e,P as m,a as u,b as l,d as p,L as x,F as h,e as g,f as T,C as Z,g as K,h as G,k as J,l as Q,_ as U,m as M,n as X,p as ee,s as C,o as te,M as k,T as re,q as ae,r as ne,t as ie}from"./main-BYZrZZGA.js";import{L}from"./LongProductCard-DFB8gLWJ.js";import{u as oe,R as se,a as de,b as ce}from"./text-B7KpK9rt.js";import{g as P,j as f,k as c,m as R,n as le}from"./_virtual_mf___mfe_internal__landing_page__loadShare__react__loadShare__.js-Dv-Ba2z-.js";import{u as me,B as ue,a as pe,b as he}from"./text-CD3jkWmb.js";import{u as ge,I as fe,a as Ie,b as we}from"./text-CHs2q7ve.js";import{d as F}from"./departmentMapping-Dw_mmakV.js";import"./modulepreload-polyfill-B5Qt9EMX.js";import"./virtualExposes-_ivNhQLP.js";import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__landing_page__remoteEntry-_hash_--SeD_qA1.js";import"./preload-helper-CLcXU_4U.js";import"./_virtual_mf___mfe_internal__landing_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-CbiZti7P.js";import"./_virtual_mf___mfe_internal__landing_page__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-C7EVl2En.js";import"./_virtual_mf___mfe_internal__landing_page__loadShare__react_mf_2_dom__loadShare__.js-DGeARG2H.js";import"./__virtual_mf___mfe_internal__landing_page__loadShare__react__loadShare__.js_commonjs-proxy-CvIKNteT.js";import"./_virtual_mf___mfe_internal__landing_page__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-Du32swiV.js";import"./__vite-browser-external-D7Ct-6yo.js";import"./_virtual_mf___mfe_internal__landing_page__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-C6ent65a.js";import"./__virtual_mf___mfe_internal__landing_page__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-9VPuBf5h.js";import"./InstantRewards-BIzOrnSn.js";const _e=t=>{const n=P(null),r=_(n,T),{data:a,loading:i,fetchInit:o}=oe({pageSize:8,autoInitFetch:!1,brandIds:t.brandIds});return f(()=>{r&&o()},[r,o]),!i&&a.length===0?null:e(g,{ref:n,children:e(m,{children:i?e(u,{header:!0,cardStyle:"longCard",row:4}):l(h,{children:[e(p,{title:ce,linkTo:de,subtitle:se,indicator:"grey"}),e(x,{children:a.map(s=>e(L,{product:s},s.stacklineSku))})]})})})},Te=()=>{const t=P(null),n=_(t,T),{data:r,loading:a,fetchInit:i}=me({pageSize:8,autoInitFetch:!1});return f(()=>{n&&i()},[n,i]),!a&&r.length===0?null:e(g,{ref:t,children:e(m,{children:a?e(u,{header:!0,cardStyle:"longCard",row:4}):l(h,{children:[e(p,{title:he,linkTo:pe,subtitle:ue,indicator:"grey"}),e(x,{children:r.map(o=>e(L,{product:o},o.stacklineSku))})]})})})},Pe=t=>{const n=P(null),r=_(n,T),{data:a,loading:i,fetchInit:o}=ge({pageSize:10,autoInitFetch:!1,brandIds:t.brandIds});return f(()=>{r&&o()},[r,o]),!i&&a.length===0?null:e(g,{ref:n,children:e(m,{children:i?e(u,{header:!0,row:2}
1):l(h,{children:[e(p,{title:we,linkTo:Ie,subtitle:fe,indicator:"grey"}),e(Z,{children:a.map(s=>e(K,{LinkComponent:G,product:s},`trending:${s.stacklineSku}`))})]})})})},Se=J`
2  query getSpotlight {
3    BrandSpotlight {
4      name
5      imageUrl
6      brandclubId
7      brandId
8      trendingProducts {
9        stacklineSku
10        title
11        brandId
12        retailerId
13        retailerSku
14        retailPrice
15        totalRewardAmount
16        scores {
17          maxPurchaseRewardPercent
18          maxPurchaseRewardAmount
19          maxAffiliateRewardPercent
20          maxAffiliateRewardAmount
21          totalReviewRewardFeesAmount
22        }
23        hasActiveInstantReward
24        affiliateRewardAmount
25        activeProductPromotion {
26          promoType
27          isActive
28          listPrice
29          promoPrice
30        }
31        campaignRewards {
32          campaignId
33          campaignType
34          rewardAmount
35          rewardAmountType
36          campaignStatus
37        }
38        retailerProductPageUrl
39        childProductMinRetailPrice
40        childProductMaxRetailPrice
41      }
42    }
43  }
44`,b=U.default||U,Ee=M.default||M,A="BrandSpotlight",ye=({pageSize:t=25,autoInitFetch:n=!0})=>{const r=Q(),[a,i]=c(),[o,s]=c([]),[I,W]=c(!1),[S,v]=c(0),[V,B]=c(!0),[$,N]=c(!1),[q,D]=c(null),w=R(async(y=0)=>{try{D(null);const d=await r.query({query:Se,variables:{page:{start:y,size:t}},fetchPolicy:"network-only"}),j=b(d,["data",A,"trendingProducts"],[]),z=b(d,["data",A],{}),H=b(d,["data",A,"hasMore"],!1);s(O=>Ee([...O,...j],"stacklineSku")),i({...z,trendingProducts:void 0}),W(H)}catch(d){d instanceof Error&&D(d.message),console.error(d)}},[t,r]),E=R(async()=>{try{B(!0),await w(0)}finally{v(0),B(!1)}},[w]),Y=R(async()=>{try{N(!0),await w((S+1)*t)}finally{v(y=>y+1),N(!1)}},[w,S,t]);return f(()=>{n&&E()},[n,E]),{data:o.slice(0,(S+1)*t),loading:V,error:q,hasMore:I,fetchMore:Y,loadingMore:$,spotlightBrand:a,fetchInit:E}},Re=()=>{const t=P(null),{data:n,loading:r,spotlightBrand:a,fetchInit:i}=ye({pageSize:10,autoInitFetch:!1}),o=_(t,T);f(()=>{o&&i()},[o,i]);let s="";return a&&(s=`/${X(a.name)}/b/${a.brandId}/home`),!r&&n.length===0?null:e(g,{ref:t,children:e(m,{children:r?e(u,{header:!0,row:2}):l(h,{children:[e(p,{logoImg:a?.imageUrl??ee(a?.brandId??"","brand"),title:a?.name??"Top picks",linkTo:s,subtitle:`Top picks from ${a?.name}`,indicator:"grey"}),e(x,{children:n.map(I=>e(L,{product:I},`trending:${I.stacklineSku}`))})]})})})},be=C("div")(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"center",gap:10,cursor:"pointer",transition:"transform 0.4s",width:"100%",[`@media screen and (max-width: ${k}px)`]:{gap:7},".image_container":{width:"100%",aspectRatio:"1/1",backgroundColor:te.blueWhite,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:8,img:{width:"60%",height:"60%",maxWidth:56,maxHeight:56,objectFit:"contain"}},".label":{color:t.vars.palette.text.primary,fontSize:16,fontWeight:600,[`@media screen and (max-width: ${k}px)`]:{fontSize:12}}})),Ae=({department:t})=>e(G,{to:`/department/${t.departmentId}`,style:{textDecoration:"none"},children:l(be,{children:[e("div",{className:"image_container",children:e("img",{alt:"bc_action",src:t.imageUrl})}),e("div",{className:"label",children:t.departmentName})]})}),ke=C("div")({width:"100%",display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(100px, 122px))",columnGap:20,rowGap:40,[`@media screen and (max-width: ${(re+k)/2}px)`]:{columnGap:10}}),xe=()=>{const t=ae(({departments:r})=>r),n=le(()=>{const r=[];return t?.departments&&t.departments.forEach((a,i)=>{const{departmentId:o}=a;F[o]&&r.push(F[o])}),r.sort((a,i)=>a.order-i.order),r},[t?.departments]);return e(g,{children:e(m,{children:t?.loading?e(u,{header:!0,row:2}):l(h,{children:[e(p,{title:"Departments",subtitle:"Shop popular products in each department"}),e(ke,{children:n.map(r=>e(Ae,{department:r},`department:${r.departmentId}`))})]})})})},Ce=C("div")({marginTop:30,width:"100%"}),Qe=()=>l(Ce,{children:[e(_e,{}),e(ne,{}),e(Te,{}),e(xe,{}),e(Pe,{}),e(Re,{}),e(ie,{})]});export{Qe as default};
45//# sourceMappingURL=index-BwZLMslb.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.