PageSourceSearch

https://www.womensweekly.com.sg/assets/ProductDeals-CKoN4iYv.js

js womensweekly.com.sg collected 2026-10-02 15:03:58 UTC 7,346 bytes, 2 lines download raw bytes

1import{j as e}from"./components-BY0-s8-E.js";import{T as k,R as B,a1 as S,a0 as T,b as j,J as A,_ as W,a as H,a8 as z,l as O,a9 as g,x as F,aa as G,Z as $,ab as R}from"./ErrorLayoutTypes-CchxrjKV.js";import{S as U}from"./VariantByIndex-pI-quhSm.js";import{a as E,e as M,f as w,b as V}from"./Annotation-DRGQRgpm.js";import{u as J}from"./UseMediaQuery-d6tSQ24x.js";import{g as Q}from"./swr-BI_0k4t7.js";import{s as Z}from"./product.module-BtyKcVAS.js";const q="_container_7y2f1_1",K="_floatingContainer_7y2f1_23",X="_titleContainer_7y2f1_38",Y="_imageContainer_7y2f1_72",ee="_linkContainer_7y2f1_66",ne="_pricingContainer_7y2f1_108",ie="_currentPrice_7y2f1_113",ae="_originalPrice_7y2f1_138",te="_withDiscountPercentage_7y2f1_156",re="_originalPriceStrikethrough_7y2f1_174",oe="_floatingPercentageLabel_7y2f1_178",ce="_sourceNameContainer_7y2f1_190",se="_badgeContainer_7y2f1_196",s={container:q,floatingContainer:K,titleContainer:X,imageContainer:Y,linkContainer:ee,pricingContainer:ne,currentPrice:ie,originalPrice:ae,withDiscountPercentage:te,originalPriceStrikethrough:re,floatingPercentageLabel:oe,s
1ourceNameContainer:ce,badgeContainer:se},{Pagination:le}=k,{SubHeading4:de}=T;function I({item:n,itemWidth:l,cta:t,enforceDoublePriceLine:u,options:i}){const a=n.dealsSource&&n.dealsSource[0],d=a?.discountPrice!==void 0||a?.originalPrice!==void 0,o=a?.discountInPercentage&&a?.discountPrice&&e.jsx(le,{size:"small",children:a?.discountInPercentage});return e.jsxs("div",{className:s.container,style:{width:l,minWidth:l},"data-layout-position":"affiliateproduct",children:[e.jsxs("a",{href:a?a?.link:n.link,className:s.linkContainer,target:"_blank",rel:"noopener nofollow",children:[e.jsxs("span",{className:s.imageContainer,children:[!i?.discountPercentageBesidePrice&&o&&e.jsx("div",{className:s.floatingContainer,children:e.jsx("span",{className:s.floatingPercentageLabel,children:o})}),e.jsx(B,{...n.image,fill:"contain",fillAspectRatio:1,displayWidth:180,loading:"lazy"})]}),i?.hasHeaderTitle&&n.productInfo?.headerTitle&&e.jsx(S,{children:n.productInfo?.headerTitle}),e.jsx("span",{className:s.titleContainer,"data-layout-position":"affiliateproductname",children:e.jsx(de,{children:n.title})}),i?.hasBadge&&n.productInfo?.discountText&&e.jsx("div",{className:s.badgeContainer,children:e.jsx(S,{children:n.productInfo?.discountText})})]}),d!==!1&&e.jsxs("div",{className:s.pricingContainer,children:[e.jsx("div",{className:s.currentPrice,children:a?.discountPrice?`${a?.discountPriceLabel} ${a?.discountPrice}`:`${a?.originalPrice}`}),a?.discountPrice?e.jsxs("div",{className:j(s.originalPrice,i?.discountPercentageBesidePrice&&s.withDiscountPercentage),children:[a?.originalPriceLabel,e.jsx("s",{className:s.originalPriceStrikethrough,children:a?.originalPrice}),i?.discountPercentageBesidePrice&&o]}):u?e.jsx("div",{className:s.originalPrice,children:" "}):null]}),n.dealsSource&&n.dealsSource.length>0&&e.jsx("div",{className:s.sourceNameContainer,children:n.dealsSource.map((m,P)=>t&&e.jsx(A,{href:m?.link,variant:t.variant||"secondary",icon:t.buttonIcon,iconPlacement:"before",target:t.target??"_blank",rel:"noopener nofollow",children:i?.sourceNameAsLabel?m?.sourceName:t.label},P))})]})}const ue="_container_wha3o_1",me="_carouselContainer_wha3o_14",ge="_disclaimer_wha3o_60",y={container:ue,carouselContainer:me,disclaimer:ge};function Pe({items:n,itemWidth:l,itemHeight:t,cta:u,noOfItemsInFrame:i,carouselWidthLeeWay:a,arrowSize:d,arrowVariant:o,disclaimer:m}){const P=J("screen and (min-width: 1000px)"),_=i??3,b=P&&l?(l+(a??30))*_:290,r=P?l:290,f=n.some(c=>{const{discountPrice:C,originalPrice:x}=c.dealsSource?.[0]||{};return C&&x});return e.jsxs("div",{className:y.container,children:[e.jsx("div",{className:y.carouselContainer,style:{width:b+"px"},children:e.jsx(W,{isLooping:!1,showArrowsOnMobile:!0,arrowSize:d||40,arrowVariant:o,children:n.map((c,C)=>e.jsx(I,{cta:u,item:{...c,dealsSource:c.dealsSource&&c.dealsSource.slice(0,1)},itemWidth:r,itemHeight:t,enforceDoublePriceLine:f},C))})}),m&&e.jsx("div",{className:y.disclaimer,children:m})]})}const fe="_contentBlockContainer_1tumx_1",he="_contentBlockContainerHeading_1tumx_19",_e="_mDownGutterSides_1tumx_32",Ce="_ctaContainer_1tumx_40",xe="_imuContainer_1tumx_62",pe="_innerContainer_1tumx_66",be="_userSubmission_1tumx_83",h={contentBlockContainer:fe,contentBlockContainerHeading:he,mDownGutterSides:_e,ctaContainer:Ce,imuContainer:xe,innerContainer:pe,userSubmission:be},{Heading:je,TextLink:ye}=k,Be=({heading:n,headingZH:l,arrows:t,inlineGutter:u=!1,cta:i,children:a,isHeadingClickable:d=!1,imu:o,withDivider:m=!0,description:P,userSubmissionBox:_})=>{const p=H();return e.jsxs("div",{className:h.contentBlockContainer,children:[n&&e.jsxs("div",{className:j(h.contentBlockContainerHeading,u&&h.mDownGutterSides),children:[l?e.jsx(je.SubSectionTitle,{nameZH:l,headingUrl:d&&i&&i.url||"",children:n}):e.jsx(U,{title:n,arrows:t,headingUrl:d&&i&&i.url||"",withDivider:m,description:P}),i?.headingIcon]}),e.jsxs("div",{className:j(!!o&&h.innerContainer),children:[e.jsxs("div",{children:[a,i?.name&&e.jsx("div",{className:j(h.ctaContainer,p?.contentBlock?.cta),children:e.jsxs(ye,{href:i.url,children:[i.name,i.icon]})}),_&&e.jsx("div",{className:h.userSubmission,children:e.jsx(z,{inPage:!0,..._,buttonType:"primary"})})]}),o&&e.jsx("div",{className:h.imuContainer,children:o})]})]})};function ve({items:n,itemWidth:l,itemHeight:t,cta:u,options:i}){const a=n.some(d=>
1{const{discountPrice:o,originalPrice:m}=d.dealsSource?.[0]||{};return o&&m});return e.jsx("div",{className:Z.contentProducts,children:n.map((d,o)=>e.jsx(I,{cta:u,item:d,itemWidth:l,itemHeight:t,enforceDoublePriceLine:a,options:i},o))})}function Te({data:n,isCarousel:l=!0,options:t={withPriceLabel:!0}}){const{items:u,itemHeight:i,itemWidth:a,noOfItemsInFrame:d,carouselWidthLeeWay:o}=n,m=u.map(r=>r.deals&&r.deals[0]?.additionalFields?.dynamicPricing?.value).filter(Boolean),{data:P,isLoading:_}=O(m,r=>E.loadMany(r).then(f=>M(f))),p=r=>!r||r.length===0?[]:r.map(f=>{const c=f.additionalFields,C=c?.dynamicPricing?.value,x=C?P?.find(D=>D.asin===C):void 0,v=w(x?.originalPrice||c?.price?.value),N=w(x?.discountPrice||c?.discountedPrice?.value),L=Q(c?.destinationUrl?.value||"");return{discountInPercentage:V(x?.discountPercentage||c?.discount?.value,!0,!1)||"",discountPrice:N||"",discountPriceLabel:N&&t.withPriceLabel?"Now":"",link:$(L,R),originalPrice:v||"",originalPriceLabel:v&&t.withPriceLabel?g.originalPriceLabel:"",dynamicPricing:c?.dynamicPricing?.value,sourceName:c?.sourceName?.value}}),b=u.map(r=>{const f=r.image?.crops[t.imageCropType||g.imageCrop||"original"]||F.portrait,c=p(r.deals);return{image:f,title:r.title,dealsSource:c,productInfo:{headerTitle:r.productInfo?.additionalFields.headerTitle?.value,discountText:r.productInfo?.additionalFields.discountText?.value}}});return!_&&u.length>0&&(l?e.jsx(Pe,{cta:{variant:g.cta?.variant,buttonIcon:g.cta?.buttonIcon||"",label:g.cta?.label||"SHOP NOW"},itemHeight:i||400,itemWidth:g.itemWidth||a||190,items:b,noOfItemsInFrame:d||4,carouselWidthLeeWay:o,arrowSize:g.arrowSize,arrowVariant:g.arrowVariant,disclaimer:G.disclaimer}):e.jsx(ve,{cta:{variant:g.cta?.variant,buttonIcon:g.cta?.buttonIcon||"",label:g.cta?.label||"SHOP NOW"},items:b,options:t}))}export{Pe as A,Be as C,Te as P};
2//# sourceMappingURL=ProductDeals-CKoN4iYv.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.