PageSourceSearch

https://www.durex.com.my/429-860fea4adab8bbda9207.js

js durex.com.my collected 2026-10-06 22:29:41 UTC 7,175 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhusky_site=self.webpackChunkhusky_site||[]).push([[429],{42429:function(e,t,s){s.r(t),s.d(t,{default:function(){return f}});var o=s(58168),a=s(32554),c=s(74848),i=s(23832),d=s(48958),r=s(32485),l=s.n(r),n=s(96540),p=s(25145),u=s(57471),m=s(35863);try{s(91313)}catch(w){if("MODULE_NOT_FOUND"!==w.code)throw w;console.warn("index.css / index-new.css not found, proceeding without it.")}const b=({firstProductDetails:e,secondProductDetails:t,featureLabels:s,isMobileView:o})=>(0,c.jsx)("table",Object.assign({className:"product-feature-comparison-table"},{children:o?(0,c.jsx)("tbody",{children:Object.entries(s).map(([s,{label:o,$:a}])=>(0,c.jsxs)(n.Fragment,{children:[(0,c.jsx)("tr",{children:(0,c.jsx)("th",Object.assign({colSpan:2,className:"cds-product-comparison__label-cell"},null==a?void 0:a.value,{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__label","data-testid":"label",tag:"h3",variant:"headline",weight:"bold",size:"xl",content:o})}))}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",Object.assign({className:"cds-product-comparison__description-cell"},{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__description","data-testid":"first-description",tag:"p",variant:"body",size:"xl",content:(null==e?void 0:e.features[s])||""})})),(0,c.jsx)("td",Object.assign({className:"cds-product-comparison__description-cell"},{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__description","data-testid":"second-description",tag:"p",variant:"body",size:"xl",content:(null==t?void 0:t.features[s])||""})}))]})]},`feature-${s}`))}):(0,c.jsx)("tbody",{children:Object.entries(s).map(([s,{label:o,$:a}])=>(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",Object.assign({className:"cds-product-comparison__description-cell"},{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__description","data-testid":"first-description",tag:"p",variant:"body",size:"xl",content:(null==e?void 0:e.features[s])||""})})),(0,c.jsx)("td",Object.assign({className:"cds-product-comparison__label-cell"},null==a?void 0:a.value,{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__label","data-testid":"label",tag:"p",variant:"headline",weight:"bold",size:"xl",content:o})})),(0,c.jsx)("td",Object.assign({className:"cds-product-comparison__description-cell"},{children:(0,c.jsx)(i.o,{className:"cds-product-comparison__description","data-testid":"second-description",tag:"p",variant:"body",size:"xl",content:(null==t?void 0:t.features[s])||""})}))]},`feature-${s}`))})})),g=({id:e,dropdownPlaceholder:t,productOptions:s,handleProductChange:o,isSelectedProducts:a,selectedProduct:d,isMobileView:r,labelDataCslp:n})=>(0,c.jsxs)("div",Object.assign({className:l()("cds-product-comparison__dropdown",{"mobile-view":r})},{children:[(0,c.jsx)(p.m,{id:e,label:t,placeholder:t,options:s,value:d,onChange:o,name:e,"data-testid":`${e}-dropdown`,labelDataCslp:n}),a&&d&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.Y,Object.assign({className:"cds-product-comparison__image"},d.image)),(0,c.jsx)(i.o,{className:"cds-product-comparison__product-name",tag:"p",variant:"headline",size:"m",content:d.label})]})]})),v=({navigate:e,navigateTo:t,ctaText:s,isMobileView:o})=>(0,c.jsx)("div",Object.assign({className:l()("cds-product-comparison__load-more",{"mobile-view":o})},{children:(0,c.jsx)(m.$,Object.assign({className:"cds-product-comparison__load-more-button",variant:"primary",onClick:()=>{t&&e(t)}},{children:s}))})),h=(0,n.forwardRef)(({className:e,title:t,description:s,dropdownPlaceholder:o,ctaText:a,productOptions:r,featureLabels:p,navigate:u,$:m},h)=>{var j,_;const[x,f]=(0,n.useState)({product1:null,product2:null}),w=(e,t)=>{f(s=>Object.assign(Object.assign({},s),{[t]:e}))},N=r.filter(e=>!(x.product2&&e.category!==x.product2.category||x.product2&&e.value===x.product2.value)),O=r.filter(e=>!(x.product1&&e.category!==x.product1.category||x.product1&&e.value===x.product1.value)),{isMobile:P}=(0,d.j)(),y=Boolean(x.product1&&x.product2);return(0,c.jsxs)("div",Object.assign({ref:h,className:l()("cds-product-comparison",e)},{children:[(0,c.jsx)(i.o,Object.assign({className:"cds-product-comparison__headline","data-testid":"headline",tag:"h2",weight:"bold",variant:"headline",size:"xl",content:t}
1,null==m?void 0:m.productComparisonTitle)),(0,c.jsx)(i.o,Object.assign({className:"cds-product-comparison__description","data-testid":"description",tag:"p",variant:"body",size:"l",content:s},null==m?void 0:m.productComparisonDescription)),(0,c.jsxs)("div",Object.assign({className:"cds-product-comparison__dropdowns"},{children:[(0,c.jsx)(g,{id:"product1",selectedProduct:x.product1,dropdownPlaceholder:o,productOptions:N,handleProductChange:e=>w(e,"product1"),isSelectedProducts:y,isMobileView:P,labelDataCslp:null==m?void 0:m.dropdownPlaceholderText}),!P&&(0,c.jsx)("div",{className:"cds-product-comparison__placeholder"}),(0,c.jsx)(g,{id:"product2",selectedProduct:x.product2,dropdownPlaceholder:o,productOptions:O,handleProductChange:e=>w(e,"product2"),isSelectedProducts:y,isMobileView:P,labelDataCslp:null==m?void 0:m.dropdownPlaceholderText})]})),y&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(b,{firstProductDetails:x.product1,secondProductDetails:x.product2,featureLabels:p,isMobileView:P}),(0,c.jsxs)("div",Object.assign({className:"cds-product-comparison__load-more-buttons"},{children:[(0,c.jsx)(v,{navigate:u,navigateTo:null===(j=x.product1)||void 0===j?void 0:j.url,ctaText:a,isMobileView:P}),!P&&(0,c.jsx)("div",{className:"cds-product-comparison__placeholder"}),(0,c.jsx)(v,{navigate:u,navigateTo:null===(_=x.product2)||void 0===_?void 0:_.url,ctaText:a,isMobileView:P})]}))]})]}))});var j=s(55268),_=s(72121),x=s(97322);var f=(0,n.forwardRef)((e,t)=>{let{pageBlock:{...s},title:c,description:i,featureLabels:d,ctaText:r,dropdownPlaceholder:l,componentId:p,$:u}=e;const{0:m,1:b}=(0,n.useState)([]),{currentLang:{locale:g}}=(0,_.F)(),v=(0,j.useStaticQuery)("1878492767");return(0,n.useEffect)(()=>{const e=v.allContentstackL2ProductPage.nodes.filter(e=>e.locale===g),t=(0,x.o)({nodes:e});b(t)},[v,g]),n.createElement(a.B,(0,o.A)({},s,{id:p,className:"product-comparison-block",ref:t,dataCslp:null==u?void 0:u.pageBlock}),n.createElement(h,{title:c,description:i,productOptions:m,featureLabels:d,ctaText:r,dropdownPlaceholder:l,navigate:j.navigate,$:u}))})},91313:function(e,t,s){s.r(t)},97322:function(e,t){t.o=void 0;const s={Product_Title:"label",Description_Long:"description",Aroma_Scent:"scent",Ingredients:"ingredients",Net_Content_Statement:"netContentStatement",Variant_And_Icon:"variantAndIcon",Directions_for_Use:"directionsForUse",Safety_Warnings:"safetyWarnings"};t.o=e=>(e.nodes||[]).map(e=>{var t,o,a;if(!e.fields||!e.fields.productData)return null;const{productData:c}=e.fields,i={};Object.keys(c).forEach(e=>{const t=s[e];t?i[t]=c[e]:i[e]=c[e]});return{label:c.Product_Title||"",value:c.sku||"",features:i,image:{props:{src:(null===(t=c.heroImage)||void 0===t?void 0:t.url)||"",alt:(null===(o=c.heroImage)||void 0===o?void 0:o.alt)||""}},url:e.fields.fullPath||"",category:(null===(a=e.categories)||void 0===a?void 0:a.title)||""}}).filter(e=>null!==e)}}]);
2//# sourceMappingURL=429-860fea4adab8bbda9207.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.