PageSourceSearch

https://www.dorothyperkins.com/build/_shared/chunk-LG3EBYQS.js

js dorothyperkins.com collected 2026-09-26 02:55:50 UTC 28,875 bytes, 6 lines download raw bytes

1import{b as le}from"/build/_shared/chunk-UG4BIQ6V.js";import{a as J}from"/build/_shared/chunk-CTH3JSOV.js";import{d as Y}from"/build/_shared/chunk-WOCI7MY6.js";import{a as se}from"/build/_shared/chunk-66U5G6T7.js";import{a as ce}from"/build/_shared/chunk-UVIKTRJH.js";import{a as ie,c as re}from"/build/_shared/chunk-Q6UAPYBM.js";import{a as be}from"/build/_shared/chunk-Y3BPLONU.js";import{b as K,c as Q}from"/build/_shared/chunk-PE2RAMGK.js";import{a as xe}from"/build/_shared/chunk-NUNS6FJ7.js";import{a as fe}from"/build/_shared/chunk-FD5H2VPE.js";import{h as q}from"/build/_shared/chunk-SDVBCS2Z.js";import{a as ae}from"/build/_shared/chunk-J6EJ4OCR.js";import{a as pe}from"/build/_shared/chunk-FONEQPGK.js";import{a as E}from"/build/_shared/chunk-I5UT2UAU.js";import{a as g}from"/build/_shared/chunk-UXJUA2QE.js";import{a as ve}from"/build/_shared/chunk-ZZB7OGT7.js";import{b as ee}from"/build/_shared/chunk-V53WT573.js";import{a as P}from"/build/_shared/chunk-YUUKFOQM.js";import{a as S}from"/build/_shared/chunk-5OBEDPFR.js";import{a as W}from"/build/_shared/chunk-H6S7FWVP.js";import{d as y}from"/build/_shared/chunk-T36URGAI.js";var ge=y(W());var $=y(S()),oe=({label:a,minLabel:b,maxLabel:r,ratingRange:u,rating:d,width:f,slidingProgressBar:l,splitProgressBar:p,darkPrimaryColour:x,ratingDescription:k})=>{let o=v=>{switch(v){case"Quality of Product":return"Quality";case"Value of Product":return"Value";default:return v}};return p?(0,$.jsxs)("div",{className:"w-full flex gap-4 justify-between items-center",children:[(0,$.jsx)(g,{className:"text-sm italic w-12",children:o(a)}),(0,$.jsx)(ce,{splitProgressBar:p,slidingProgressBar:l,total:u,count:d,darkPrimaryColour:x!=null?x:!1,ratingDescription:k!=null?k:""})]}):(0,$.jsx)($.Fragment,{children:(0,$.jsxs)("div",{className:`grid gap-2 ${f&&"md:w-[60%]"}`,children:[(0,$.jsx)(xe,{children:o(a)}),(0,$.jsx)(ce,{slidingProgressBar:l,total:u,count:d,darkPrimaryColour:x!=null?x:!1}),(0,$.jsxs)("div",{className:"flex flex-col",children:[(0,$.jsx)(g,{className:"text-sm font-bold",children:b}),(0,$.jsx)(g,{className:"text-sm font-bold float-right",children:r})]})]})})};var we=y(W());var D=y(S()),M=({characterLimit:a,characterLimitTolerance:b,text:r,isBottomStyle:u,...d})=>{let[f,l]=(0,we.useState)(!1);if(!r)return null;if(r.length<a+(b!=null?b:0))return(0,D.jsx)("p",{...d,children:r});let p=r.substring(0,a),x=r.substring(a);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("p",{...d,children:[p,f?null:(0,D.jsx)(D.Fragment,{children:"..."}),(0,D.jsx)("span",{className:f?"":"h-0 text-[0px]",children:x}),!u&&(0,D.jsxs)(ee,{className:"underline ml-2",onClick:()=>l(!f),children:["Read ",f?"less":"more"]})]}),u&&(0,D.jsxs)(ee,{className:"underline text-sm !font-normal",onClick:()=>l(!f),children:["Read ",f?"less":"more"]})]})};var ne=a=>{switch(a){case 5:return"Excellent";case 4:return"Good";case 3:return"Average";case 2:return"Fair";case 1:return"Poor";default:return""}};var he={width:24,height:24,paths:`
2    <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
3    <rect x="0.5" y="0.5" width="15" height="15" rx="7.5" stroke="#1E6F63"/>
4    <path d="M4.22168 8.4451L6.4439 10.6673L11.7772 5.33398" stroke="#1E6F63" stroke-linecap="round"/>
5    </svg>
6    `};var me={paths:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><g clip-path="url(#clip0_2023_5295)"><path d="M7.99768 0.666688C6.67158 0.667102 5.37041 1.02731 4.23277 1.70894C3.09514 2.39057 2.16364 3.3681 1.53749 4.53741C0.911334 5.70672 0.61398 7.02403 0.677094 8.34901C0.740207 9.67401 1.16143 10.9571 1.89589 12.0615L0.666504 15.3334L4.78324 14.5887C5.77454 15.0733 6.86238 15.3278 7.9657 15.3332C9.06901 15.3387 10.1593 15.095 11.1554 14.6202C12.1514 14.1456 13.0276 13.4521 13.7183 12.5915C14.4091 11.731 14.8969 10.7256 15.1451 9.65023C15.3934 8.57489 15.3959 7.45736 15.1523 6.38095C14.9086 5.30453 14.4254 4.297 13.7383 3.43345C13.0512 2.5699 12.1782 1.87261 11.1842 1.39356C10.1902 0.914499 9.101 0.666037 7.99768 0.666688Z" stroke="black" stroke-width="0.666667" stroke-linecap="round" stroke-linejoin="round"/><circle cx="8.00016" cy="7.99998" r="0.666667" fill="black"/><circle cx="5.33317" cy="7.99998" r="0.666667" fill="black"/><circle cx="10.6667" cy="7.99998" r="0.666667" fill="black"/></g><defs><clipPath id="clip0_2023_5295"><rect width="16" height="16" fill="white"/></clipPath></defs></svg>'};var e=y(S()),ue=({rating:a,title:b,reviewText:r,userLocation:u,username:d,submittedAt:f,secondaryRatings:l,responses:p,isSyndicated:x,syndicationSource:k,photos:o,isInModal:v,initialImageIndex:U=0,onPhotoClick:T,closeModal:z,onPlpModal:c,verifiedPurchaser:j})=>{var V,H;let{translate:_}=P(),w=new Date(f!=null?f:0),N=`${w.getDate().toString().padStart(2,"0")}/${(w.getMonth()+1).toString().padStart(2,"0")}/${w.getFullYear().toString().slice(2)}`,B=r==null?void 0:r.startsWith("[This review");r&&B&&(r=(H=(V=r.split("]")[1])==null?void 0:V.trim())!=null?H:r);let I=o&&o.length===3?3:2,s=o&&o.length===3?3:2,C=o&&o.length>0;return(0,e.jsxs)("div",{onClick:C?n=>n.stopPropagation():void 0,className:`${v?`${c?"":"md:flex md:w-[80%] md:rounded md:overflow-y-hidden"} bg-site-background overflow-y-auto`:""} h-full ${c?"":"md:h-auto"}`,children:[v&&C&&(0,e.jsx)(Y,{carouselConfig:{all:{enableAutoplay:!1},"(min-width: 0px)":{slidesToShow:1,slideGap:"0px"}},carouselName:"review-item-carousel",containerClassName:ae("bg-grey-2",{"md:w-1/2 md:max-h-[560px]":!c}),renderControls:()=>(0,e.jsx)(K,{origin:"ratings_reviews_photo_modal",children:(0,e.jsx)(J,{showControls:o.length>1})}),children:o.map((n,L)=>(0,e.jsx)("div",{className:`${c?"":"md:h-[560px]"} w-full h-[390px] flex justify-center items-center`,children:(0,e.jsx)(q,{objectFit:"contain",className:"w-full h-full",src:n.sizes.normal.url||"",alt:n.caption||""},L)},L))}),(0,e.jsxs)("div",{className:`bg-site-background ${v?`${c?"":"md:overflow-y-auto"} pt-4`:""} ${C&&v?`h-auto ${c?"":"md:w-1/2 md:max-h-[560px]"}`:`${c?"":"md:w-full"}`}`,children:[" ",v&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:`${c?"":"md:flex"} hidden justify-between px-6`,children:[(0,e.jsx)(g,{className:"font-semibold text-lg",children:_("pdp.reviews.title")}),(0,e.jsx)("div",{className:"cursor-pointer",onClick:z,children:(0,e.jsx)(E,{icon:ie})})]})}),(0,e.jsx)("div",{className:`${v?"p-6":c?"md:border md:border-grey-2 rounded md:p-5 px-5 pt-6":"pt-6"}`,children:(0,e.jsxs)("div",{className:`flex flex-col ${v||c?"":"md:flex-row md:gap-10"} gap-6 justify-between`,children:[(0,e.jsxs)("div",{className:`${v||c?"":"md:w-[38%]"} flex flex-col gap-6`,children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(g,{children:`${a||""}`}),(0,e.jsx)(le,{rating:a!=null?a:0,size:16})]})," ",(0,e.jsx)("div",{"data-test-id":`review-date-${N}`,className:`${v||c?"":"md:hidden"} text-sm font-light ml-auto`,children:N})]}),(0,e.jsxs)("div",{className:"flex",children:[(0,e.jsx)(g,{"data-test-id":"review-username",className:`text-sm ${d?"mr-1":""}`,children:`${d&&u?`${d}, `:d||""}`}),(0,e.jsx)(g,{"data-test-id":"review-user-location",className:"text-sm",children:u})]}),j&&(0,e.jsxs)("span",{className:"inline-flex items-center text-default-text-colour text-xs font-light rounded italic",children:[(0,e.jsx)(E,{width:16,height:16,icon:he}),(0,e.jsx)("span",{className:"mb-1",children:_("productPage.reviewVerifiedBuyer")})]}),B&&(0,e.jsx)(g,{className:"text-grey-4 text-xs italic",children:_("pdp.reviews.promotion")})]}),l!=null&&l.length&&!c?(0,e.jsx)("div",{className:"flex flex-col w-full max-w-[350px] gap-2",children:l.map(n=>{let{rating:L,ratingRange:G,label:Z,minLabel:m,maxLabel:A,splitProgressBar:O=!0}=n,X=ne(L||0);return(0,e.jsx)("div",{children:(0,e.jsx)(oe,{splitProgressBar:O,rating:L,ratingRange:G,label:Z,minLabel:m,maxLabel:A,width:!0,darkPrimaryColour:!0,ratingDescription:X},Z)},Z)})}):null,o&&o.length>0&&!v&&!c&&(0,e.jsx)("div",{className:"h-[100px] hidden md:flex items-center w-full",children:(0,e.jsxs)("div",{className:"flex gap-2",children:[o.slice(0,I).map(n=>(0,e.jsx)("div",{className:"flex items-center justify-center bg-grey-2 w-[75px] h-[100px] cursor-pointer",onClick:T,children:(0,e.jsx)("img",{className:"w-auto max-h-[100px]",src:n.sizes.normal.url||"",alt:n.caption||""})},n.id)),o.length>I&&(0,e.jsxs)("div",{className:"relative flex items-center justify-center w-[75px] h-[100px] cursor-pointer bg-contain bg-center",style:{backgroundImage:`url(${o[I].sizes.normal.url||""})`,backgroundRepeat:"no-repeat"},onClick:T,children:[(0,e.jsx)("div",{className:"absolute inset-0 bg-grey-2 opacity-80"}),(0,e.jsxs)("span",{className:"z-10",children:["+",o.length-I]})]})]})})]}),(0,e.jsxs)("div",{className:`${v||c?"":"md:w-[55%]"} flex flex-col gap-6`,children:[r&&(0,e.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,e.jsx)(g,{className:"text-sm font-semibold block mb-2",children:b&&se(b)}),(0,e.jsx)(M,{isBottomStyle:!0,className:"text-sm font-light",text:r,characterLimit:v?2e3:250,characterLimitTolerance:50})]}),o&&o.length>0&&!v&&(0,e.jsx)("div",{className:`h-[133px] flex ${c?"":"md:hidden"} items-center w-full`,children:(0,e.jsxs)("div",{className:"flex gap-2",children:[o.slice(0,s).map(n=>(0,e.jsx)("div",{className:"flex items-center justify-center bg-grey-2 w-[100px] h-[133px] curs
6or-pointer",onClick:T,children:(0,e.jsx)("img",{className:"w-auto max-h-[133px]",src:n.sizes.normal.url||"",alt:n.caption||""})},n.id)),o.length>s&&(0,e.jsxs)("div",{className:"relative flex items-center justify-center w-[100px] h-[133px] cursor-pointer bg-contain bg-center",style:{backgroundImage:`url(${o[s].sizes.normal.url||""})`,backgroundRepeat:"no-repeat"},onClick:T,children:[(0,e.jsx)("div",{className:"absolute inset-0 bg-grey-2 opacity-80"}),(0,e.jsxs)("span",{className:"z-10",children:["+",o.length-s]})]})]})}),x&&k?(0,e.jsxs)("div",{"data-test-id":"review-syndication",className:"w-fit text-sm border border-grey-2 p-2",children:[k.logoImageUrl?(0,e.jsx)(q,{className:"max-h-5 inline-block mr-2",src:k.logoImageUrl}):null,(0,e.jsx)("span",{className:"mr-1 font-light italic",children:_("pdp.reviews.syndicated")}),k.contentLink?(0,e.jsx)("a",{className:"font-semibold italic",href:k.contentLink,target:"_blank",rel:"noopener noreferrer",onClick:n=>{n.stopPropagation()},children:k.name}):(0,e.jsx)("span",{className:"font-semibold pt-4",children:k.name})]}):null,p&&p.length>0&&(0,e.jsxs)("div",{"data-test-id":"review-response",className:"flex",children:[(0,e.jsx)("div",{children:(0,e.jsx)(E,{icon:me})}),p==null?void 0:p.map((n,L)=>{var G;return(0,e.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,e.jsx)(g,{className:"font-semibold text-sm block mb-2",children:`Response ${n!=null&&n.clientName?`from ${n==null?void 0:n.clientName}`:""}`}),(0,e.jsx)(M,{isBottomStyle:!0,className:"text-sm font-light",text:(G=n==null?void 0:n.text)!=null?G:"",characterLimit:v?1e3:250,characterLimitTolerance:50})]},L)})]})]}),(0,e.jsx)("div",{"data-test-id":`review-date-${N}`,className:`hidden ${v||c?"":"md:flex"} text-sm font-light ml-auto`,children:N})]})})]})]})};var h=y(S()),ct=({reviews:a,handlePagination:b,handleSortBy:r,currentSortOption:u,remainingResults:d,loading:f,onPlpModal:l,setIsPhotosModalOpen:p})=>{var _;let[x,k]=(0,ge.useState)(null),[o,v]=(0,ge.useState)(!1),{trackUserInteraction:U}=Q(),T={["Recent"]:"most_recent",["HighestRating"]:"rating_high-low",["LowestRating"]:"rating_low-high"},z=w=>{l&&(p==null||p(!0)),k(w),v(!0),U({section:"ratings_reviews_photo",action:"open"})},c=()=>{l&&(p==null||p(!1)),k(null),v(!1),U({section:"ratings_reviews_photo",action:"close"})},j=(_=x==null?void 0:x.badges)==null?void 0:_.some(w=>(w==null?void 0:w.id)==="verifiedPurchaser");return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"text-right md:mb-4",children:[(0,h.jsx)("label",{className:"inline h-9 p-1 hidden sm:inline",children:"Sort By: "}),(0,h.jsxs)("div",{className:"relative inline-block",children:[(0,h.jsxs)("select",{className:"inline h-9 p-1 pr-8 bg-transparent appearance-none",id:"reviewSortOptions",value:u,onChange:w=>{let N=w.target.value;r==null||r(N),U({section:"ratings_sort",action:"select",value:T[N]})},children:[(0,h.jsx)("option",{value:"Recent",children:"Most Recent"}),(0,h.jsx)("option",{value:"HighestRating",children:"Rating: High-Low"}),(0,h.jsx)("option",{value:"LowestRating",children:"Rating: Low-High"})]}),(0,h.jsx)(E,{icon:be,width:16,height:16,className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]})]}),(0,h.jsx)("div",{className:`${l&&o?"hidden":"flex"} flex-col gap-6 mb-6 divide-y border-grey-2 ${l?"md:border-none md:mx-0 md:divide-y-0 -mx-5 border-t":"md:pb-6 md:border-b"}`,children:a.map((w,N)=>{var I;let B=(I=w==null?void 0:w.badges)==null?void 0:I.some(s=>(s==null?void 0:s.id)==="verifiedPurchaser");return(0,h.jsx)("div",{"data-test-id":`bv-review-${w.id}`,children:(0,h.jsx)(ue,{...w,onPhotoClick:()=>z(w),onPlpModal:l,verifiedPurchaser:B})},`${w.id}-${N}`)})}),(0,h.jsxs)("div",{className:"text-center",children:[(0,h.jsxs)("b",{children:["1-",a.length]})," of ",(0,h.jsx)("b",{children:a.length+d})," reviews"]}),d>0&&(0,h.jsx)(ee,{onClick:b,disabled:f,loading:f,variant:l?"custom":"secondary",className:`${l?"uppercase border border-grey-3 rounded":"bg-site-background block md:max-w-sm mx-auto"} w-full mt-5 h-[50px]`,children:`Show ${d>5?5:d} more`}),x&&(0,h.jsx)(re,{containerClassName:`flex-1 w-full h-full flex flex-col items-center ${l?"":"md:justify-center"}`,show:o,onClose:c,title:"Reviews",backgroundClick:c,titleClass:`${l?"":"md:hidden"} bg-site-background flex flex-row justify-between items-center w-full p-4 border-b`,setStopPropagation:!0,children:(0,h.jsx)(ue,{...x,closeModal:c,isInModal:!0,onPlpModal:l,verifiedPurchaser:j})})]})};var de=y(W());var te=y(W());var i=y(S()),Ne=({reviewsWithPhotos:a,initialImageIndex:b=0,id:r,closeModal:u,onPlpModal:d})=>{var n,L,G,Z;let{translate:f}=P(),l=a==null?void 0:a.flatMap(m=>m.photos||[]),p=(a==null?void 0:a.findIndex(m=>m.id===r))||0,x=(L=(n=a==null?void 0:a[p])==null?void 0:n.photos)==null?void 0:L[b],k=(0,te.useMemo)(()=>l==null?void 0:l.findIndex(m=>m.id===(x==null?void 0:x.id)),[l,x]),[o,v]=(0,te.useState)(k),U=(0,te.useMemo)(()=>
6{if(l&&l.length>0){let m=l[o||0];return a==null?void 0:a.find(A=>{var O;return(O=A.photos)==null?void 0:O.some(X=>X.id===(m==null?void 0:m.id))})}return null},[o,l,a]);if(!U)return null;let{rating:T,username:z,userLocation:c,secondaryRatings:j,title:_,isSyndicated:w,syndicationSource:N,responses:B,submittedAt:I}=U,{reviewText:s}=U,C=new Date(I!=null?I:0),V=`${C.getDate().toString().padStart(2,"0")}/${(C.getMonth()+1).toString().padStart(2,"0")}/${C.getFullYear().toString().slice(2)}`,H=s==null?void 0:s.startsWith("[This review");return s&&H&&(s=(Z=(G=s.split("]")[1])==null?void 0:G.trim())!=null?Z:s),!l||l.length===0?null:(0,i.jsxs)("div",{onClick:m=>m.stopPropagation(),className:`${d?"md:scrollbar-hide":"md:flex md:w-[80%] md:rounded md:h-auto md:overflow-y-hidden"} bg-site-background overflow-y-auto h-full`,children:[(0,i.jsx)(Y,{containerClassName:ae("bg-grey-2",{"md:w-1/2 md:max-h-[560px]":!d}),carouselConfig:{all:{enableAutoplay:!1,loop:!1},"(min-width: 0px)":{slidesToShow:1,slideGap:"0px",draggable:!0}},initialIndex:k,carouselName:"reviews-photos-carousel",onSlideChange:m=>v(m),renderControls:()=>(0,i.jsx)(K,{origin:"ratings_photo_modal",children:(0,i.jsx)(J,{showControls:l.length>1})}),children:l.map((m,A)=>(0,i.jsx)("div",{className:"w-full h-[390px] md:h-[560px] flex justify-center items-center",children:(0,i.jsx)(q,{objectFit:"contain",className:"w-full h-full",src:m.sizes.normal.url||"",alt:m.caption||""},m.id)},m.id))}),(0,i.jsxs)("div",{className:`bg-site-background pt-4 h-auto ${d?"":"md:overflow-y-auto md:w-1/2 md:max-h-[560px]"}`,children:[(0,i.jsxs)("div",{className:`hidden justify-between px-6 ${d?"":"md:flex"}`,children:[(0,i.jsx)(g,{className:"font-semibold text-lg",children:f("pdp.reviews.title")}),(0,i.jsx)("div",{className:"cursor-pointer",onClick:u,children:(0,i.jsx)(E,{icon:ie})})]}),(0,i.jsxs)("div",{className:"p-6 flex flex-col gap-6",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(g,{children:`${T||""}`}),(0,i.jsx)(le,{rating:T!=null?T:0,size:16})]})," ",(0,i.jsx)("div",{"data-test-id":`review-date-${V}`,className:`${d?"":"md:hidden"} text-sm font-light ml-auto`,children:V})]}),(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)(g,{"data-test-id":"review-username",className:`text-sm ${z?"mr-1":""}`,children:`${z&&c?`${z}, `:z||""}`}),(0,i.jsx)(g,{"data-test-id":"review-user-location",className:"text-sm",children:c})]}),H&&(0,i.jsx)(g,{className:"text-grey-4 text-xs italic",children:f("pdp.reviews.promotion")})]}),j!=null&&j.length?(0,i.jsx)("div",{className:"flex flex-col w-full gap-2",children:j.map(m=>{let{rating:A,ratingRange:O,label:X,minLabel:Se,maxLabel:Re,splitProgressBar:$e=!0}=m,Te=ne(A||0);return(0,i.jsx)("div",{children:(0,i.jsx)(oe,{splitProgressBar:$e,rating:A,ratingRange:O,label:X,minLabel:Se,maxLabel:Re,width:!0,darkPrimaryColour:!0,ratingDescription:Te},X)},X)})}):null,(0,i.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,i.jsx)(g,{className:"text-sm font-semibold block mb-2",children:_&&se(_)}),(0,i.jsx)(M,{isBottomStyle:!0,className:"text-sm font-light",text:s!=null?s:"",characterLimit:2e3,characterLimitTolerance:50})]}),w&&N?(0,i.jsxs)("div",{"data-test-id":"review-syndication",className:"w-fit text-sm border border-grey-2 p-2",children:[N.logoImageUrl?(0,i.jsx)(q,{className:"max-h-5 inline-block mr-2",src:N.logoImageUrl}):null,(0,i.jsx)("span",{className:"mr-1 font-light italic",children:f("pdp.reviews.syndicated")}),N.contentLink?(0,i.jsx)(ve,{className:"font-semibold italic",to:N.contentLink,target:"_blank",children:N.name}):(0,i.jsx)("span",{className:"font-semibold pt-4",children:N.name})]}):null,B&&B.length>0&&(0,i.jsxs)("div",{"data-test-id":"review-response",className:"flex",children:[(0,i.jsx)("div",{children:(0,i.jsx)(E,{icon:me})}),B==null?void 0:B.map((m,A)=>{var O;return(0,i.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,i.jsx)(g,{className:"font-semibold text-sm block mb-2",children:`Response ${m!=null&&m.clientName?`from ${m==null?void 0:m.clientName}`:""}`}),(0,i.jsx)(M,{isBottomStyle:!0,className:"text-sm font-light",text:(O=m==null?void 0:m.text)!=null?O:"",characterLimit:1e3,characterLimitTolerance:50})]},A)})]})]})]})]})};var R=y(S()),Ht=({reviewsWithPhotos:a,productID:b,onPlpModal:r,setIsPhotosModalOpen:u})=>{let[d,f]=(0,de.useState)(null),[l,p]=(0,de.useState)(0),[x,k]=(0,de.useState)(!1),o=a.flatMap(s=>s.photos||[]),z=typeof window!="undefined"&&window.innerWidth<768||r?3:6,c=o.length<=z,{translate:j}=P(),{trackUserInteraction:_}=Q(),w=(s,C)=>{r&&(u==null||u(!0)),f(s),p(C),k(!0),_({section:"ratings_photo_summary",action:"open"})},N=()=>{r&&(u==null||u(!1)),f(null),k(!1)},B=s=>
6{var V;let C=a.find(H=>{var n;return(n=H.photos)==null?void 0:n.some(L=>L.id===s.id)});if(C){let H=((V=C.photos)==null?void 0:V.findIndex(n=>n.id===s.id))||0;f(C),w(C,H)}},I=s=>{pe({event:"reviewImageSummaryDirectionClick",value:"Image_summary_pagination: "+s})};return(0,R.jsxs)("div",{className:`${r?"pl-5":"px-4 md:px-8"}`,children:[(0,R.jsx)("div",{className:"mb-4",children:(0,R.jsx)(g,{className:"mr-2",children:j("pdp.reviews.photoSummaryTitle",{photoCount:o.length})})}),!c&&(0,R.jsx)(Y,{carouselConfig:{all:{enableAutoplay:!1,loop:!1},"(min-width: 0px)":{slidesToShow:2.5,slidesToScroll:2,slideGap:"8px",draggable:!0},[`(min-width: ${fe.md}px)`]:{slidesToScroll:r?2:6,slidesToShow:r?2.5:6,slideGap:"8px",draggable:!0}},carouselName:"review-summary-photos-carousel",renderControls:()=>(0,R.jsx)(K,{origin:"ratings_photo_summary",children:(0,R.jsx)(J,{showControls:!0,onControlClick:I})}),children:o.map((s,C)=>(0,R.jsx)("div",{className:"flex justify-center items-center relative bg-grey-2",children:(0,R.jsx)("img",{src:s.sizes.normal.url||"",alt:s.caption||`${C+1}`,className:"h-[250px] object-cover object-center cursor-pointer",onClick:()=>B(s)})},C))},b),c&&o.length>0&&(0,R.jsxs)("div",{className:"flex gap-2 w-full",children:[" ",o.map((s,C)=>(0,R.jsx)("div",{className:"flex w-[150px] justify-center items-center relative bg-grey-2",children:(0,R.jsx)("img",{src:s.sizes.normal.url||"",alt:s.caption||`${C+1}`,className:"h-[250px] object-cover object-center cursor-pointer",onClick:()=>B(s)})},C))]}),d&&(0,R.jsx)(re,{containerClassName:`${r?"":"md:justify-center"} flex-1 w-full h-full flex flex-col items-center `,show:x,onClose:N,title:"Reviews",backgroundClick:N,titleClass:`${r?"":"md:hidden"} bg-site-background flex flex-row justify-between items-center w-full p-4 border-b`,setStopPropagation:!0,children:(0,R.jsx)(Ne,{...d,reviewsWithPhotos:a,closeModal:N,initialImageIndex:l,onPlpModal:r})})]})};var t=y(S()),Ot=({onPlpModal:a,reviewCount:b})=>(0,t.jsx)("div",{className:"my-8 flex flex-col items-center w-full gap-6",children:(0,t.jsxs)("div",{className:"w-full max-w-[900px] gap-6",children:[(0,t.jsxs)("div",{className:`w-full  ${a?"hidden":""}`,children:[(0,t.jsx)(Le,{}),(0,t.jsx)(Ie,{})]}),(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)(Be,{}),[...Array(b&&b<5?b:5)].map((r,u)=>(0,t.jsx)(_e,{},`skeleton-${u}`))]})]})}),_e=()=>(0,t.jsxs)("div",{className:"p-5 md:mb-6 border rounded animate-pulse bg-site-background shadow-sm",children:[(0,t.jsx)("div",{className:"h-5 bg-gray-200 rounded w-1/4 mb-5"}),(0,t.jsx)("div",{className:"h-7 bg-gray-100 rounded w-2/3 mb-3"}),(0,t.jsx)("div",{className:"h-7 bg-gray-100 rounded w-2/3 mb-5"}),(0,t.jsx)("div",{className:"h-5 bg-gray-200 rounded w-1/4 mb-3"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-5/6 mb-5"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-12"})]});var Be=()=>(0,t.jsx)("div",{className:"w-full animate-pulse flex flex-row-reverse mb-4",children:(0,t.jsx)("div",{className:"w-[180px] h-[36px] bg-gray-200"})}),Ie=({onPlpModal:a})=>(0,t.jsxs)("div",{className:"flex flex-col gap-4 mx-5 pb-5 animate-pulse bg-site-background",children:[(0,t.jsx)("div",{className:"h-[20px] w-[180px] bg-grey-2"}),(0,t.jsxs)("div",{className:"h-[250px] gap-2 flex",children:[(0,t.jsx)("div",{className:"h-[250px] w-full bg-grey-2"}),(0,t.jsx)("div",{className:"h-[250px] w-full bg-grey-2"}),(0,t.jsx)("div",{className:`${a?"":"md:flex"} hidden h-[250px] w-full bg-grey-2`}),(0,t.jsx)("div",{className:`${a?"":"md:flex"} hidden h-[250px] w-full bg-grey-2`}),(0,t.jsx)("div",{className:`${a?"":"md:flex"} hidden h-[250px] w-full bg-grey-2`}),(0,t.jsx)("div",{className:`${a?"":"md:flex"} hidden h-[250px] w-full bg-grey-2`}),(0,t.jsx)("div",{className:`${a?"":"md:hidden"} h-[250px] w-[120px] bg-grey-2`})]})]}),Vt=()=>(0,t.jsxs)("div",{className:"p-5 mx-5 border rounded animate-pulse bg-site-background shadow-sm",children:[(0,t.jsx)("div",{className:"h-5 bg-gray-200 rounded w-1/4 mb-5"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-5/6 mb-5"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-full mb-2"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-5/6"})]});var Le=()=>(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:gap-10",children:[(0,t.jsxs)("div",{className:"h-[220px] p-5 w-full md:w-1/2 flex flex-col justify-between rounded animate-pulse",children:[(0,t.jsx)("div",{className:"h-3 bg-gray-200 rounded w-1/3"}),(0,t.jsx)("div",{className:"h-14 bg-gray-200 rounded w-2/3"}),(0,t.jsx)("div",{className:"h-3 bg-gray-100 rounded w-full"}),(0,t.jsx)("div",{className:"h-12 border border-grey-200 rounded w-full"})]}),(0,t.jsxs)("div",{className:"h-[220px] p-5 w-full md:w-1/2 flex flex-col gap-4 roun
6ded animate-pulse",children:[(0,t.jsx)("div",{className:"h-6 bg-gray-100 rounded w-full"}),(0,t.jsx)("div",{className:"h-6 bg-gray-100 rounded w-full"}),(0,t.jsx)("div",{className:"h-6 bg-gray-100 rounded w-full"}),(0,t.jsx)("div",{className:"h-6 bg-gray-100 rounded w-full"}),(0,t.jsx)("div",{className:"h-6 bg-gray-100 rounded w-full"})]})]}),(0,t.jsxs)("div",{className:"flex flex-col md:flex-row p-5 w-full gap-10 animate-pulse",children:[(0,t.jsx)("div",{className:"h-3 w-full md:w-1/2 bg-gray-200 rounded"}),(0,t.jsx)("div",{className:"h-3 w-full md:w-1/2 bg-gray-200 rounded"})]})]});var Gt=(a,b)=>{let r=a+b;if(r===0)return null;let u=a/r*100;return Math.round(u).toString()+"%"};var Ce=y(W());var ye={width:24,height:24,paths:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.19458 2.84355C7.15875 2.67558 7.06637 2.52501 6.93286 2.41697C6.79936 2.30894 6.63282 2.25 6.46108 2.25C6.28934 2.25 6.1228 2.30894 5.98929 2.41697C5.85579 2.52501 5.7634 2.67558 5.72758 2.84355C5.49558 3.93955 5.17758 4.67855 4.73758 5.20455C4.30858 5.72055 3.70858 6.09755 2.78758 6.37055C2.63259 6.41655 2.49661 6.5114 2.39992 6.64096C2.30322 6.77053 2.25098 6.92787 2.25098 7.08955C2.25098 7.25122 2.30322 7.40856 2.39992 7.53813C2.49661 7.66769 2.63259 7.76255 2.78758 7.80855C3.67258 8.07055 4.26758 8.42555 4.70358 8.93355C5.14758 9.44955 5.48558 10.1935 5.72758 11.3355C5.7634 11.5035 5.85579 11.6541 5.98929 11.7621C6.1228 11.8702 6.28934 11.9291 6.46108 11.9291C6.63282 11.9291 6.79936 11.8702 6.93286 11.7621C7.06637 11.6541 7.15875 11.5035 7.19458 11.3355C7.43658 10.1925 7.77458 9.44955 8.21858 8.93355C8.65458 8.42555 9.24858 8.07055 10.1356 7.80855C10.2906 7.76255 10.4265 7.66769 10.5232 7.53813C10.6199 7.40856 10.6722 7.25122 10.6722 7.08955C10.6722 6.92787 10.6199 6.77053 10.5232 6.64096C10.4265 6.5114 10.2906 6.41655 10.1356 6.37055C9.24958 6.10855 8.65458 5.75355 8.21858 5.24555C7.77458 4.72955 7.43658 3.98555 7.19458 2.84355ZM15.4976 6.09455C15.458 5.931 15.3647 5.78549 15.2324 5.68143C15.1002 5.57736 14.9368 5.52078 14.7686 5.52078C14.6003 5.52078 14.4369 5.57736 14.3047 5.68143C14.1725 5.78549 14.0791 5.931 14.0396 6.09455C13.4856 8.38655 12.8986 9.76855 12.0676 10.7325C11.2476 11.6845 10.1206 12.3085 8.29758 12.9245C8.14897 12.9748 8.01986 13.0704 7.9284 13.1978C7.83695 13.3253 7.78776 13.4782 7.78776 13.635C7.78776 13.7919 7.83695 13.9448 7.9284 14.0723C8.01986 14.1997 8.14897 14.2953 8.29758 14.3455C10.2016 14.9885 11.3436 15.6675 12.1496 16.6375C12.9686 17.6235 13.5116 18.9925 14.0396 21.1745C14.0791 21.3381 14.1725 21.4836 14.3047 21.5877C14.4369 21.6917 14.6003 21.7483 14.7686 21.7483C14.9368 21.7483 15.1002 21.6917 15.2324 21.5877C15.3647 21.4836 15.458 21.3381 15.4976 21.1745C16.0516 18.8835 16.6396 17.5015 17.4696 16.5375C18.2896 15.5855 19.4166 14.9615 21.2396 14.3455C21.3882 14.2953 21.5173 14.1997 21.6088 14.0723C21.7002 13.9448 21.7494 13.7919 21.7494 13.635C21.7494 13.4782 21.7002 13.3253 21.6088 13.1978C21.5173 13.0704 21.3882 12.9748 21.2396 12.9245C19.3326 12.2805 18.1926 11.6045 17.3876 10.6345C16.5696 9.65055 16.0276 8.28255 15.4976 6.09455Z" fill="#529C92"/></svg>'};var F=y(S()),ke=new Set,Mt=({summary:a,disclaimer:b,onPlpModal:r,trackView:u=!0,productId:d})=>{let{translate:f}=P(),{trackUserInteraction:l}=Q();return(0,Ce.useEffect)(()=>{if(!u||!a||!d)return;let p=`${d}:${a}`;ke.has(p)||(ke.add(p),l({section:"ai_review_summary",action:"view"}))},[d,a,u,l]),!a||a.length===0?null:(0,F.jsx)("div",{className:`${r?"px-5":"mt-4"} text-start`,"data-test-id":"review-summary",children:(0,F.jsx)("div",{className:"p-px rounded bg-gradient-to-r from-[#70BEB3] to-[#9DEDE2]",children:(0,F.jsxs)("div",{className:"p-5 rounded bg-site-background flex flex-col gap-2.5",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2",children:[(0,F.jsx)(E,{icon:ye}),(0,F.jsx)(g,{children:f("pdp.reviews.aiReviewSummary")})]}),(0,F.jsx)(g,{className:"text-sm font-light",children:a}),(0,F.jsx)(g,{className:"text-xs font-light text-grey-4",children:b})]})})})};export{oe as a,ct as b,Ht as c,Ot as d,Ie as e,Vt as f,Gt as g,Mt as h};

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.