"use strict";(globalThis.webpackChunkverso=globalThis.webpackChunkverso||[]).push([[4589],{15343:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(13465),n=o(27517);const a=(0,i.y)(n.A,"ToggleChip")},16631:(e,t,o)=>{o.d(t,{Bs:()=>W,By:()=>C,CH:()=>Y,Ei:()=>A,El:()=>O,FM:()=>y,GM:()=>X,Ig:()=>F,Mc:()=>h,Pu:()=>S,Q7:()=>P,R9:()=>_,RF:()=>g,TD:()=>u,Vs:()=>D,W6:()=>L,Wx:()=>T,Xo:()=>V,Xt:()=>$,Xu:()=>U,Yl:()=>v,ZZ:()=>j,an:()=>R,d0:()=>Q,eI:()=>H,fm:()=>E,hh:()=>b,iA:()=>q,iT:()=>x,o:()=>K,oE:()=>M,op:()=>f,ow:()=>k,pV:()=>z,qJ:()=>w,sJ:()=>B,sh:()=>p,tG:()=>I,vX:()=>N,w0:()=>G});var i=o(38267),n=o(76955),a=o(26865),r=o(96472),s=o(43438),l=o(73275),d=o(73730),c=o(18161),m=o(97927);const u=(0,i.Ay)(d.A.Primary).withConfig({displayName:"ReviewListButton"})`
align-self: center;
margin-top: ${(0,a.Kq)(4)};
margin-bottom: ${(0,a.Kq)(4)};
`,g=i.Ay.ul.withConfig({displayName:"ReviewListItems"})`
display: flex;
flex-direction: column;
margin: 0;
padding: 0;
list-style: none;
`,p=(0,i.Ay)(s.A).withConfig({displayName:"ReviewListCarat"})`
margin-left: ${(0,a.Kq)(1)};
width: ${(0,a.Kq)(1)};
height: ${(0,a.Kq)(1)};
${({theme:e})=>(0,a._o)(e,"fill","colors.interactive.base.black")};
path {
transform: rotate(180deg);
transform-origin: center;
}
`,b=(0,i.Ay)(n.sH).withConfig({displayName:"ReviewListUtilityLink"})``;b.defaultProps={colorToken:"colors.interactive.base.black",typeIdentity:"typography.definitions.utility.button-bulletin"};const h=(0,i.Ay)(n.sH).withConfig({displayName:"ReviewListGuidelinesLink"})``;h.defaultProps={colorStaticLinkToken:"colors.consumption.body.standard.body-deemphasized",typeToken:"typography.definitions.utility.label"};const y=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewListTitle"})``;y.defaultProps={as:"h2",colorToken:"colors.consumption.body.standard.subhed",typeIdentity:"typography.definitions.consumptionEditorial.subhed-aux-primary"};const f=i.Ay.div.withConfig({displayName:"ReviewListTitleWrapper"})`
display: flex;
align-items: center;
justify-content: space-between;
margin: ${(0,a.Kq)(4)} 0 0;
padding-bottom: ${({hasSubtext:e})=>e?(0,a.Kq)(1):(0,a.Kq)(4)};
`,w=i.Ay.div.withConfig({displayName:"ReviewListSubtext"})`
display: block;
${(0,a.H4)(r.LO.lg)} {
margin-top: ${(0,a.Kq)(1)};
}
margin-bottom: ${(0,a.Kq)(3)};
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.body-deemphasized")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.utility.label")};
`,v=i.Ay.div.withConfig({displayName:"ReviewListWrapper"})`
display: flex;
flex-direction: column;
outline: none;
${(0,a.L7)(r.LO.md)} {
margin-left: calc(-1 * var(--grid-margin));
padding-right: var(--grid-margin);
padding-left: var(--grid-margin);
/* Full bleed effect */
width: calc(100% + (2 * var(--grid-margin)));
}
`,C=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewListError"})`
margin: ${(0,a.Kq)(4)} 0;
text-align: center;
`,R=i.Ay.li.withConfig({displayName:"ReviewItem"})`
margin-top: ${(0,a.Kq)(3)};
border-width: 1px 0 0;
border-style: solid;
${({theme:e})=>(0,a._o)(e,"border-color","colors.consumption.body.standard.divider")};
padding-top: ${(0,a.Kq)(3)};
:first-child {
margin-top: ${(0,a.Kq)(4)};
border-top: 0;
padding-top: 0;
${(0,a.L7)(r.LO.md)} {
margin-top: ${(0,a.Kq)(3)};
}
}
.pinned-comment + & {
margin-top: ${(0,a.Kq)(3)};
border-top: 0;
padding-top: 0;
}
:last-child {
margin-bottom: ${(0,a.Kq)(3)};
${(0,a.L7)(r.LO.md)} {
margin-bottom: ${(0,a.Kq)(3)};
}
}
${c.f} {
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.link-utility")};
background-color: rgba(
${(0,a.HK)("colors.background.brand",{rgbOnly:!0})},
${({shouldUseFullOpacity:e})=>e?1:.2}
);
${({theme:e})=>(0,a._o)(e,"color","colors.interactive.base.black")};
&:not(:first-of-type) {
margin-left: ${(0,a.Kq)(1)};
}
&[aria-checked='true'] {
transition: none;
text-decoration: none;
}
&:hover,
&:focus {
outline: 0;
box-shadow: none;
cursor: unset;
text-decoration: none;
}
${({shouldUseTagsInvertedTheme:e,theme:t})=>e&&`\n ${(0,a._o)(t,"background-color","colors.interactive.base.black")};\n ${(0,a._o)(t,"color","colors.interactive.base.white")};\n `}
}
${m.Ft} {
padding: 0;
}
`,E=i.Ay.div.withConfig({displayName:"PinnedCommentContainer"})`
${g} {
padding: 0 ${(0,a.Kq)(3)};
}
margin-top: ${(0,a.Kq)(4)};
border: 1px solid;
border-color: ${({shouldUseDarkPinnedTheme:e})=>(0,a.HK)(e?"colors.background.black":"colors.background.brand")};
width: 100%;
${({shouldUseSoftRoundedEdges:e})=>e&&`\n border-radius: ${(0,a.Kq)(1)};\n `}
${R} {
margin-top: 0;
margin-bottom: 0;
padding: ${(0,a.Kq)(3)} 0;
}
`,L=i.Ay.div.withConfig({displayName:"PinnedContainerHeading"})`
display: flex;
align-items: center;
justify-content: flex-start;
background-color: rgba(
${({shouldUseDarkPinnedTheme:e})=>(0,a.HK)(e?"colors.background.black":"colors.background.brand",{rgbOnly:!0})},
${({shouldUseFullOpacity:e})=>e?1:.1}
);
${({shouldUseSoftRoundedEdges:e})=>e&&`\n border-radius: ${(0,a.Kq)(.75)} ${(0,a.Kq)(.75)} 0 0;\n `}
padding: 10px;
width: 100%;
height: ${(0,a.Kq)(4.25)};
`,M=i.Ay.div.withConfig({displayName:"PinnedTextLabel"})`
${(0,a.Gg)("typography.definitions.foundation.meta-secondary")}
${({shouldUseAlternateColorToken:e,shouldUseInvertedColor:t})=>e?(0,a._o)("color","colors.interactive.social.primary"):(0,a._o)("color",t?"colors.background.white":"colors.background.brand")};
transform: translateY(1px);
margin-right: 5px;
`,I=(0,i.Ay)(l.A).withConfig({displayName:"CommunityBrandLogoImage"})`
img {
height: 16px;
vertical-align: middle;
}
`,T=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewerUserName"})`
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
`,S=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewListTimeStamp"})`
${({theme:e})=>(0,a._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.meta-secondary")};
`,x=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewText"})`
word-wrap: break-word;
white-space: pre-wrap;
a {
overflow-wrap: break-word;
}
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.consumptionEditorial.body-core")};
`,k=i.Ay.img.withConfig({displayName:"ReviewImage"})`
cursor: pointer;
width: ${(0,a.Kq)(20.5)};
max-width: 100%;
height: ${(0,a.Kq)(20.5)};
object-fit: cover;
${(0,a.H4)(r.LO.md)} {
width: ${(0,a.Kq)(15)};
height: ${(0,a.Kq)(15)};
}
`,$=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewListRatingStars"})`
display: flex;
flex-direction: row;
align-items: center;
&&& {
${m.By} {
left: 0;
path {
${({theme:e})=>(0,a._o)(e,"fill","colors.consumption.body.special.accent")};
}
}
${m.Ou} {
width: ${(0,a.Kq)(2.5)};
}
${m.wb} {
&:disabled + ${m.KX} {
cursor: unset;
}
}
}
`,N=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewLikeCount"})`
padding-right: ${(0,a.Kq)(2)};
${({theme:e})=>(0,a._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.link-secondary")};
`,U=(0,i.Ay)(n.vm).withConfig({displayName:"ReviewReplyLabel"})`
${({theme:e,disabled:t})=>t?(0,a._o)(e,"color","colors.interactive.disabled.dark"):(0,a._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.link-secondary")};
opacity: ${({disabled:e})=>e?.5:1};
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
padding-right: ${(0,a.Kq)(.5)};
`,A=i.Ay.div.withConfig({displayName:"ReviewReplyWrapper"})`
display: flex;
flex-direction: row;
align-items: center;
opacity: ${({disabled:e})=>e?.5:1};
cursor: ${({disabled:e})=>e?"not-allowed":"pointer"};
svg {
opacity: ${({disabled:e})=>e?.5:1};
}
`,B=i.Ay.ul.withConfig({displayName:"ReviewListMetaInfo"})`
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
margin-top: ${(0,a.Kq)(4)}, ${(0,a.Kq)(4)};
padding: 0;
list-style: none;
:first-child {
margin-bottom: 10px;
${(0,a.L7)(r.LO.md)} {
margin-bottom: ${(0,a.Kq)(1)};
}
}
&:not(:first-child) {
margin-bottom: ${(0,a.Kq)(1.5)};
${(0,a.L7)(r.LO.md)} {
margin-bottom: ${(0,a.Kq)(2)};
}
}
:last-child {
margin-top: ${(0,a.Kq)(1.5)};
margin-bottom: ${(0,a.Kq)(1)};
${(0,a.L7)(r.LO.md)} {
margin-top: ${(0,a.Kq)(2)};
margin-bottom: 0;
}
}
.icon-dots {
padding-right: 6px;
padding-left: 6px;
${({theme:e})=>(0,a._o)(e,"fill","colors.interactive.base.dark")};
${(0,a.L7)(r.LO.md)} {
padding-right: ${(0,a.Kq)(.5)};
padding-left: ${(0,a.Kq)(.5)};
}
}
.icon-like,
.icon-like-filled,
.icon-comment {
margin-top: 3px;
cursor: pointer;
width: ${(0,a.Kq)(4)};
height: 18px;
path {
${({theme:e})=>(0,a._o)(e,"fill","colors.interactive.base.dark")};
${({theme:e})=>(0,a._o)(e,"stroke","colors.interactive.base.dark")};
}
&:hover path {
${({theme:e})=>(0,a._o)(e,"fill","colors.interactive.base.black")};
${({theme:e})=>(0,a._o)(e,"stroke","colors.interactive.base.black")};
}
}
.icon-p4k-upvote,
.icon-p4k-upvote-filled {
margin-right: ${(0,a.Kq)(.5)};
cursor: pointer;
width: auto;
height: auto;
&:hover path[fill='#757575'] {
${({theme:e})=>(0,a._o)(e,"fill","colors.interactive.base.brand-secondary")};
}
}
${({applyRowGap:e})=>e&&`\n row-gap: ${(0,a.Kq)(1)};\n `}
`,_=i.Ay.div.withConfig({displayName:"ReviewListMetaInfoItem"})`
display: flex;
align-items: center;
&:empty + &:empty + & > .icon-dots:first-child {
display: none;
}
`,K=(0,i.Ay)(d.A.Utility).withConfig({displayName:"ReviewListReactionButton"})`
padding: 0;
&,
&:focus,
&:hover {
border: 0;
background-color: transparent;
}
`,q=i.Ay.div.withConfig({displayName:"ReviewMetaGrid"})`
display: grid;
grid-template-columns: ${({badgeValue:e})=>e?"repeat(1, max-content)":"repeat(2, max-content)"};
align-items: center;
column-gap: ${(0,a.Kq)(1.25)};
margin-bottom: ${(0,a.Kq)(1.25)};
justify-items: start;
`,H=i.Ay.div.withConfig({displayName:"UserBadgeWrapper"})`
display: grid;
grid-template-columns: repeat(2, max-content);
align-items: center;
column-gap: ${({badgeValue:e})=>e?(0,a.Kq)(1.25):"0"};
`,F=i.Ay.div.withConfig({displayName:"BadgesToggleChipListWrapper"})`
margin-left: ${(0,a.Kq)()};
&&& {
${c.f} {
align-self: center;
margin-bottom: ${({isReply:e})=>e?(0,a.Kq)(1):"0"};
margin-left: ${({isReply:e})=>e?"0":(0,a.Kq)(1.25)};
${({theme:e})=>(0,a._o)(e,"background-color","colors.background.light")};
${({theme:e})=>(0,a._o)(e,"color","colors.background.dark")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.meta-primary")};
padding: 8px 16px;
height: 40px;
box-sizing: border-box;
text-transform: none;
}
}
`,D=i.Ay.div.withConfig({displayName:"CircularRatingCircle"})`
display: flex;
position: relative;
align-items: center;
justify-content: center;
border: ${({size:e})=>"sm"===e?"2px":(0,a.Kq)(.375)}
solid ${(0,a.HK)("colors.interactive.base.black")};
border-radius: 50%;
background-color: transparent;
width: ${({size:e})=>"sm"===e?(0,a.Kq)(5):(0,a.Kq)(9.25)};
height: ${({size:e})=>"sm"===e?(0,a.Kq)(5):(0,a.Kq)(9.25)};
&::before {
position: absolute;
top: ${({size:e})=>"sm"===e?"-6px":(0,a.Kq)(.375)};
right: ${({size:e})=>"sm"===e?"-6px":(0,a.Kq)(.375)};
bottom: ${({size:e})=>"sm"===e?"-6px":(0,a.Kq)(.375)};
left: ${({size:e})=>"sm"===e?"-6px":(0,a.Kq)(.375)};
border: ${({size:e})=>"sm"===e?"2px":(0,a.Kq)(.375)}
solid ${(0,a.HK)("colors.interactive.base.black")};
border-radius: 50%;
content: '';
}
`,O=(0,i.Ay)(n.vm).withConfig({displayName:"CircularRatingNumber"})`
color: ${(0,a.HK)("colors.interactive.base.black")};
${({size:e})=>"lg"===e&&"\n font-size: 24px;\n "}
`,P=i.Ay.div.withConfig({displayName:"CircularRatingWrapper"})`
display: flex;
align-items: center;
justify-content: center;
&.blurred ${O} {
filter: blur(10px);
}
`;O.defaultProps={typeIdentity:"typography.definitions.discovery.hed-bulletin-primary"};const j=i.Ay.div.withConfig({displayName:"ScoreComparisonWrapper"})`
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: ${(0,a.Kq)(3)};
`,G=i.Ay.div.withConfig({displayName:"ScoreComparisonCard"})`
display: flex;
align-items: flex-end;
border: 1px solid
${({theme:e})=>(0,a.HK)(e,"colors.background.black")};
border-radius: 8px;
width: 100%;
height: 140px;
gap: ${(0,a.Kq)(5.5)};
${(0,a.H4)(r.LO.md)} {
gap: ${(0,a.Kq)(7)};
}
`,V=i.Ay.div.withConfig({displayName:"ScoreColumn"})`
display: flex;
flex: 1;
flex-direction: column;
align-items: ${({align:e})=>e||"center"};
justify-content: flex-end;
padding-top: ${(0,a.Kq)(1.375)};
padding-bottom: ${(0,a.Kq)(2)};
height: 140px;
`,Y=i.Ay.div.withConfig({displayName:"ScoreDivider"})`
margin: auto;
background-color: #999;
width: 1px;
height: 113px;
`,W=i.Ay.div.withConfig({displayName:"ScoreLabel"})`
margin-top: ${(0,a.Kq)(1)};
text-align: center;
color: #2b2b2b;
font-size: 12px;
${(0,a.Gg)("typography.definitions.globalEditorial.accreditation-core")};
`,z=i.Ay.div.withConfig({displayName:"ScoreComparisonMessage"})`
margin-top: 8px;
border-bottom: 1px solid;
padding-bottom: 8px;
width: 100%;
${({theme:e})=>(0,a._o)(e,"border-color","colors.consumption.body.standard.divider")};
text-align: center;
${(0,a.L7)(r.LO.md)} {
text-align: left;
}
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.body-deemphasized")};
${(0,a.Gg)("typography.definitions.utility.label")};
`,X=i.Ay.div.withConfig({displayName:"ScoreComparisonSubscriptionMessage"})`
display: flex;
align-items: center;
justify-content: center;
gap: ${(0,a.Kq)(.5)};
margin-top: 8px;
border-bottom: 1px solid;
cursor: pointer;
padding-bottom: 8px;
width: 100%;
${({theme:e})=>(0,a._o)(e,"border-color","colors.consumption.body.standard.divider")};
text-align: center;
text-decoration: none;
${(0,a.Gg)("typography.definitions.utility.label")};
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.body-deemphasized")};
.subscribe-link {
text-decoration: underline;
color: inherit;
font-weight: bold;
&:hover {
${({theme:e})=>(0,a._o)(e,"color","colors.consumption.body.standard.link-hover")};
text-decoration: none;
}
}
`,Q=i.Ay.span.withConfig({displayName:"ReviewerLocation"})`
${({theme:e})=>(0,a._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,a.Gg)(e,"typography.definitions.foundation.meta-primary")};
`},21735:(e,t,o)=>{o.d(t,{A:()=>v});var i=o(96540),n=o(5556),a=o.n(n),r=o(54370),s=o(53499),l=o(70920),d=o(64663),c=o(37210),m=o(72362),u=o(37978),g=o(35739);const{useContext:p,useEffect:b,useRef:h,useState:y}=i,f=()=>{if(!document.getElementById("tiktok-embed")){const e=document.createElement("script");e.id="tiktok-embed",e.src="https://www.tiktok.com/embed.js",document.body.appendChild(e)}},w=({attributes:e,className:t,tiktokUrl:o})=>{i.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(s.G.RENDER,{name:"TiktokEmbed"})},[]);const n=h(),a=p(d.c$),[w]=(0,l.A)(),[v,C]=y(!1),R=(e=>new URL(e).pathname.split("/").filter(e=>e.length>0).pop())(o),[E]=y((0,m.ox)()),L=e=>{let t=e.target;t?.addEventListener("load",()=>{setTimeout(()=>{t=e.target,t.style.minHeight=`${t.offsetHeight+1}px`},1e3)})};return b(()=>{C(a.targeting)},[a.targeting]),b(()=>{const e=n.current,t=e.querySelector("blockquote");return t&&!t.hasAttribute("id")&&f(),E&&e.addEventListener("DOMNodeInserted",e=>L(e)),v&&f(),()=>{E&&e.removeEventListener("DOMNodeInserted",e=>L(e))}},[E,n,v,R]),i.createElement(g.l,{className:t,ref:(0,r.P)(n,w)},v?i.createElement(g.H,{...e,className:"tiktok-embed","data-video-id":R,cite:o},i.createElement("section",null)):i.createElement(c.A,{hasConsent:a.targeting,url:o,consentBannerHeader:u.A.consentBannerHeader}))};w.propTypes={attributes:a().object,className:a().string,tiktokUrl:a().string.isRequired},w.displayName="TiktokEmbed";const v=w},24494:(e,t,o)=>{o.d(t,{A:()=>i});const i=["at","be","bg","hr","cy","cz","dk","ee","fi","fr","de","gr","hu","ie","it","lv","lt","lu","mt","nl","pl","pt","ro","sk","si","es","se","is","li","no","gb","uk","ch"]},26576:(e,t,o)=>{o.d(t,{BM:()=>l,D4:()=>s,Rg:()=>a,a0:()=>r,s_:()=>n});var i=o(91470);const n=(e,t)=>`${t}/eu-central-1/api/v2/optimize?format=type_jpeg&url=`+encodeURIComponent(e),a=e=>e&&i.default[e]?i.default[e]:null,r=(e,t=null)=>{let o=0;let i=null;const n=()=>{if(!window.jBus)return o++,void(o<=10&&(i=setTimeout(n,1e3)));i&&(clearTimeout(i),i=null),window.jBus.whenAnEventOccurs({id:"listener.score.unblurred",callback:o=>{e(!1),t&&t(!1)}}),window.jBus.whenAnEventOccurs({id:"listener.score.gated",callback:e=>{t&&t(!0)}})};return n(),()=>{i&&(clearTimeout(i),i=null)}},s=({role:e,coralBadges:t=[],reviewerCreatedAt:o,reviewerBadges:i=[]})=>{const{badge:n}=i?.find(t=>t.role===e)||{};if(!(("COMMENTER"===e||"MEMBER"===e)&&!!t?.length))return{badgeValue:n,dateBadges:[],userSpecificBadges:[],showCoralBadges:!1};const a=t.filter(e=>!0===e?.isUserSpecific);return{badgeValue:a.length>0?a[0].badge:n,dateBadges:0===a.length&&"COMMENTER"===e?t.filter(e=>{if(!0===e?.isUserSpecific)return!1;const{startDate:t,endDate:i}=e||{};if(!t||!i||!o)return!1;const n=new Date(o),a=new Date(t),r=new Date(i);return n>=a&&n<=r}):[],userSpecificBadges:a,showCoralBadges:!0}},l=e=>e?.badge||""},55659:(e,t,o)=>{o.d(t,{$B:()=>s,I0:()=>n,Je:()=>f,Lp:()=>g,Uz:()=>d,Vr:()=>l,dV:()=>m,pD:()=>p,rO:()=>u,s6:()=>b,sZ:()=>c,vY:()=>a,wX:()=>h});var i=o(26865);o(96472);const n=e=>Math.ceil(e.scrollLeft+e.offsetWidth+1)>=e.scrollWidth,a=e=>0===e.scrollLeft,r=e=>!!window.matchMedia&&window.matchMedia(e).matches,s=()=>r("(max-width: 767px)"),l=()=>r("(min-width: 768px) and (max-width: 1024px)"),d=({isMobile:e,position:t,showControls:o})=>{let i;return i=e?"bottom":"header"===t?"top":"bottom",{showNavControlsAtTop:o&&"top"===i,showNavControlsAtBottom:o&&"bottom"===i}},c=e=>e%1<.5?Math.trunc(e):Math.ceil(e),m=({isSelected:e,theme:t,fullPageTheme:o})=>{const n="inverted"===t.palette||"inverted"===o;return e?n?(0,i._o)(t,"fill","colors.interactive.base.white"):(0,i._o)(t,"fill","colors.interactive.base.black"):n?(0,i._o)(t,"fill","colors.interactive.base.dark"):(0,i._o)(t,"fill","colors.interactive.base.light")},u="mobile",g="tablet",p="desktop",b=(e,t,o,i,n,a,r,s=null)=>{const l=e?.current;if(!l)return;const d=e.current?.children[0]?.offsetWidth||0,c=l.scrollLeft;if(null!==s){const e=(r?d:d*i)*(s-1);return void l.scrollTo({left:e,behavior:"smooth"})}const m=o%i;let u="one-by-one"===t||r?d:d*i;"back"===a&&n&&"one-by-one"!==t&&m>0&&(u=d*m);const g="back"===a?c-u:c+u;l.scrollTo({left:g,behavior:"smooth"})},h=(e,t,o)=>e?"min"!==o?1:2:t?"min"!==o?2:3:"min"!==o?3:4,y={TextCenter:"center",TextCenterPaddingTop:"center",TextLeft:"left",LogoLeftTextLeft:"left",LineAboveLineBelowTextCenter:"center",LineBelowTextCenter:"center",LineAboveLineBelowTextLeft:"left",FullBleedLineAboveOrnamentAboveTextLeft:"left",OrnamentAboveTextLeft:"left",TextLeftWithLineAboveTitle:"left",TextLeftWithLineBelowTitle:"left",TextLeftLineAboveWithHedBackground:"left",FullBleedLineAboveLineBelowTextCenter:"center",LineAboveTextLeft:"left",LineAboveTextCenter:"center",SoftDivider:"center",LineBelowHedTextCenter:"center"},f=(e,t)=>e&&y[e]?y[e]:t},57819:(e,t,o)=>{o.d(t,{h:()=>s});var i=o(96540),n=o(5556),a=o.n(n);const r=(0,i.createContext)({instance:void 0}),s=({children:e,instance:t})=>i.createElement(r.Provider,{value:{instance:t}},e);s.propTypes={children:a().node.isRequired,instance:a().any},s.displayName="DynamicLayoutConfigProvider"},58002:(e,t,o)=>{o.d(t,{u:()=>Ko});var i=o(13465),n=o(11542),a=o(5556),r=o.n(a),s=o(96540),l=o(6442),d=o(81291),c=o(31989),m=o(62282),u=o(38080),g=o(16631),p=o(11025),b=o(53499),h=o(89957),y=o(86659),f=o(62193),w=o.n(f),v=o(22354),C=o(21093),R=o(7285),E=o(72267);const L=(0,E.defineMessages)({ReviewReplyLabel:{id:"ReviewReplyNote.ReviewReplyLabel",defaultMessage:"Replying to:",description:"The label for the reply note field"},ReplyFieldPlaceHolder:{id:"ReviewReplyNote.ReplyFieldPlaceHolder",defaultMessage:"Add your reply here...",description:"The placeholder for the reply note text field"},ReplyButtonLabel:{id:"ReviewReplyNote.ReplyButtonLabel",defaultMessage:"Reply",description:"The label for the reply button"},CancelButtonLabel:{id:"ReviewReplyNote.CancelButtonLabel",defaultMessage:"Discard",description:"The label for the cancel button"},ReplyTextFieldLabel:{id:"ReviewReplyNote.ReplyTextFieldLabel",defaultMessage:"Your Reply",description:"The label for the reply text field"},AddReplySuccessToastMessage:{id:"ReviewReplyNote.AddReplySuccessToastMessage",defaultMessage:"Reply added",description:"Success message to show on reply save"},AddReplyFailedToastMessage:{id:"ReviewReplyNote.AddReplyFailedToastMessage",defaultMessage:"Unable to add your reply. Please try again.",description:"Failure message to show on reply save"},ReviewFieldAlertLimitErrorText:{id:"ReviewReplyNote.ReviewFieldAlertLimitErrorText",defaultMessage:"_CHARACTER_LIMIT_CURRENT_ of _CHARACTER_LIMIT_ character limit remaining.",description:"The error message for the review field alert limit"},ReviewFieldMaxLimitErrorText:{id:"ReviewReplyNote.ReviewFieldMaxLimitErrorText",defaultMessage:"_CHARACTER_LIMIT_ character limit met.",description:"The error message for the review field max limit"},ReviewFieldMinLimitErrorText:{id:"ReviewReplyNote.ReviewFieldMinLimitErrorText",defaultMessage:"Enter 2 characters or more to add a reply.",description:"The error message for the review field min limit"}});var M=o(60711),I=o(75454),T=o(38267),S=o(26865),x=o(73730),k=o(76955),$=o(96472),N=o(89662);const U=T.Ay.div.withConfig({displayName:"ImageUploadWrapper"})`
--icon-width: ${({iconWidth:e})=>e?`${e}px`:(0,S.Kq)(10)};
--icon-height: ${({iconHeight:e})=>e?`${e}px`:(0,S.Kq)(10)};
.upload-container {
cursor: pointer;
}
.upload-content {
position: relative;
width: var(--icon-width);
height: var(--icon-height);
}
`,A=T.Ay.div.withConfig({displayName:"UploadedImageContainer"})`
width: var(--icon-width);
height: var(--icon-height);
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
`,B=T.Ay.div.withConfig({displayName:"LoadingOverlay"})`
display: flex;
position: absolute;
align-items: center;
justify-content: center;
transition: opacity 0.5s ease-in-out;
opacity: 0;
inset: 0;
pointer-events: none;
${({isUploading:e})=>e&&"\n opacity: 1;\n pointer-events: auto;\n "}
.image-upload-loader {
width: ${(0,S.Kq)(4)};
height: ${(0,S.Kq)(4)};
}
`,_=T.Ay.div.withConfig({displayName:"LoadingOutline"})`
display: flex;
align-items: center;
justify-content: center;
border: ${(0,S.Kq)(.125)} solid
${({theme:e})=>(0,S.HK)(e,"colors.interactive.base.black")};
border-radius: ${(0,S.Kq)(.5)};
width: var(--icon-width);
height: var(--icon-height);
`,K=(0,T.Ay)(k.vm).withConfig({displayName:"ReviewReplyUsername"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
padding-left: ${(0,S.Kq)(.5)};
`,q=T.Ay.div.withConfig({displayName:"ReviewReplyNoteWrapper"})`
border: 1px solid ${(0,S.HK)("colors.foundation.menu.dividers")};
padding: ${(0,S.Kq)(3)};
gap: ${(0,S.Kq)(1.5)};
${(0,S.L7)($.LO.md)} {
margin-top: ${(0,S.Kq)(1.25)};
}
`,H=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewReplyCancelLink"})`
margin-top: ${(0,S.Kq)(1.25)};
width: 100%;
${(0,S.Gg)("typography.definitions.utility.button-core")}
text-decoration: underline;
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.brand-primary")};
`,F=(0,T.Ay)(N.default.MultiLine).withConfig({displayName:"ReviewReplyMultilineTextField"})`
${(0,S.Gg)("typography.definitions.utility.input-core")}
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.light")};
`,D=T.Ay.span.withConfig({displayName:"ReviewReplyLabel"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body-deemphasized")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
`,O=T.Ay.div.withConfig({displayName:"ReviewReplyNoteInfo"})`
display: flex;
`,P=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewReplyButton"})`
display: block;
margin-top: 0.5rem;
margin-bottom: 20px;
padding: 15px 9px;
width: 100%;
max-width: 100%;
height: unset;
text-align: center;
&:active::before {
top: 0;
left: 0;
}
`,j=T.Ay.div.withConfig({displayName:"ReviewReplyButtonWrapper"})`
${(0,S.H4)($.LO.lg)} {
display: grid;
grid-template-columns: repeat(2, auto);
gap: 32px;
}
${(0,S.L7)($.LO.md)} {
display: flex;
flex-direction: column;
}
`,G=T.Ay.div.withConfig({displayName:"ReviewReplyImageUploadWrapper"})`
${U} {
margin-top: ${(0,S.Kq)(2)};
margin-bottom: ${(0,S.Kq)(1)};
${(0,S.H4)($.LO.lg)} {
margin-top: ${(0,S.Kq)(3)};
margin-bottom: ${(0,S.Kq)(2)};
}
}
`;var V=o(76399);const Y=(0,E.defineMessages)({closeButtonAriaLabel:{id:"ReviewNoteModal.CloseButtonAriaLabel",defaultMessage:"Close ReviewNoteModal Modal",description:"ReviewNoteModal component close button aria label"},closeButtonLabel:{id:"ReviewNoteModal.CloseButtonLabel",defaultMessage:"close modal button label",description:"ReviewNoteModal component close button label"},continueLabel:{id:"ReviewNoteModal.continueLabel",defaultMessage:"No, still writing",description:"ReviewNoteModal component continue button text",isConfigurable:!0},dek:{id:"ReviewNoteModal.dek",defaultMessage:"Everything you've written will be lost",description:"ReviewNoteModal component dek text",isConfigurable:!0},discardLabel:{id:"ReviewNoteModal.discardLabel",defaultMessage:"Yes, discard it",description:"ReviewNoteModal discard button text",isConfigurable:!0},hed:{id:"ReviewNoteModal.Hed",defaultMessage:"Discard this comment?",description:"ReviewNoteModal component hed text",isConfigurable:!0}});var W=o(20312),z=o.n(W),X=o(50531);const Q=(0,T.Ay)(k.vm).withConfig({displayName:"ReviewNoteModalHed"})`
margin-top: ${(0,S.Kq)(0)};
padding: ${(0,S.Kq)(2.5)} ${(0,S.Kq)(1.25)};
text-align: center;
`;Q.defaultProps={as:"div",colorToken:"colors.interactive.base.brand-primary",topSpacing:1,typeIdentity:"typography.definitions.consumptionEditorial.display-large"};const J=T.Ay.p.withConfig({displayName:"ReviewNoteModalDek"})`
${(0,S.Gg)("typography.definitions.consumptionEditorial.body-core")}
margin-top: ${(0,S.Kq)(0)};
margin-bottom: ${(0,S.Kq)(5)};
text-align: center;
color: ${(0,S.HK)("colors.consumption.body.standard.body")};
@media (max-width: ${$.LO.md}) {
margin-bottom: ${(0,S.Kq)(5)};
}
`,Z=(0,T.Ay)(x.A.Utility).withConfig({displayName:"ReviewNoteModalButtonPrimary"})`
position: absolute;
top: ${(0,S.Kq)(1)};
right: ${(0,S.Kq)(1)};
padding: 0;
fill: ${(0,S.HK)("colors.interactive.base.black")};
.icon-close {
padding: 6px;
}
&,
&:focus,
&:hover {
border: 0;
background-color: transparent;
}
width: 42px;
height: 42px;
`,ee=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewNoteModalContinueButton"})`
display: flex;
justify-content: center;
margin-bottom: ${(0,S.Kq)(1)};
padding: ${(0,S.Kq)(2)} ${(0,S.Kq)(0)};
width: 100%;
${X.Lj} {
padding: 0 ${(0,S.Kq)(2.5)};
}
`,te=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewNoteDiscardSection"})`
display: flex;
justify-content: center;
padding: 17px ${(0,S.Kq)(0)};
width: 100%;
text-decoration: underline;
${X.Lj} {
padding: 0 ${(0,S.Kq)(2.5)};
}
`;function oe({className:e,...t}){const o=`${e}__content`,i=`${e}__overlay`;return s.createElement(z(),{portalClassName:e,className:o,overlayClassName:i,...t})}oe.propTypes={className:r().string};const ie=(0,T.Ay)(oe).withConfig({displayName:"ReviewNoteModalBaseWrapper"})`
&__overlay {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: ${$.KV.interstitialLayer};
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0
);
&.ReactModal__Overlay--after-open {
transition: background-color 500ms;
opacity: 1;
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0.4
);
}
&.ReactModal__Overlay--after-close {
transition: background-color 500ms;
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0
);
}
}
&__content {
position: relative;
top: 50%;
left: 50%;
transform: translateY(-50%) translateX(-50%);
border-radius: ${(0,S.Kq)(1)};
box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.1);
background-color: ${(0,S.HK)("colors.background.white")};
padding: ${(0,S.Kq)(6)} ${(0,S.Kq)(5)}
${(0,S.Kq)(5)} ${(0,S.Kq)(5)};
width: ${(0,S.Kq)(57)};
height: 368px;
overflow-y: auto;
@media (max-width: ${$.LO.md}) {
transform: translateY(-50%)
translateX(calc(-50% - ${(0,S.Kq)(2,"px")}));
margin: 0 ${(0,S.Kq)(2,"px")};
padding: ${(0,S.Kq)(4)} ${(0,S.Kq)(5)}
${(0,S.Kq)(4)} ${(0,S.Kq)(5)};
width: auto;
min-width: ${(0,S.Kq)(38)};
max-width: ${(0,S.Kq)(60)};
}
}
`,ne=({className:e,modalProps:{hed:t,dek:o,continueLabel:i,discardLabel:n}={},confirmButtonCallback:a,onClose:r,isVisible:d=!1})=>{s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"ReviewNoteSubmitModal"})},[]);const c=()=>{r()},{formatMessage:m}=(0,l.A)();return s.createElement(ie,{className:e,closeTimeoutMS:200,isOpen:d},s.createElement(Z,{isIconButton:!0,ariaLabel:m(Y.closeButtonAriaLabel),label:m(Y.closeButtonLabel),onClickHandler:c,role:"button",ButtonIcon:V.A}),s.createElement(Q,null,t||m(Y.hed)),s.createElement(J,null,o||m(Y.dek)),s.createElement(ee,{label:i||m(Y.continueLabel),onClickHandler:c}),s.createElement(te,{onClickHandler:a,label:n||m(Y.discardLabel),btnStyle:"text",inputKind:"link"}))};ne.propTypes={className:r().string,confirmButtonCallback:r().func,isVisible:r().bool,modalProps:r().object,onClose:r().func},ne.displayName="ReviewNoteModal";const ae=(0,i.y)(ne,"ReviewNoteModal");var re=o(57743),se=o(56892),le=o(53788);const de=async(e,t={})=>{if(!e)return null;try{const o=await(async e=>{const{file:t,brand:o,product:i,expirationDate:n,pixVaultUrl:a}=e;try{const e=`${a}/upload`,r=(0,se.getCookie)(le.A.oidcCookies.access);if(!r)throw new Error("Authentication token not found");const s=new FormData;s.append("files",t),s.append("brand",o),s.append("product",i),n&&s.append("expirationDate",n);const l=await(0,re.u)(e,{body:s,method:"POST",headers:{Authorization:`Bearer ${r}`}},18e4);if(!l.ok){const e=await l.json();throw new Error(e.message||`Server responded with status: ${l.status}`)}return await l.json()}catch(e){throw e}})({file:e,...t});return o}catch(e){throw e}};var ce=o(32272);const me=["image/jpeg","image/png","image/jpg"],ue=({buttonText:e="Upload Image",allowedExtensions:t=me,onFileChange:o,onUploadStatusChange:i,brand:n,product:a,expirationDate:r,placeholderImage:l='\n',id:d="image-upload",imageUpload:{brandSlug:c,pixVaultUrl:m}={},minFileSize:u=.1,maxFileSize:g=30})=>{s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"ImageUpload"})},[]);const[p,h]=(0,s.useState)(l),[y,f]=(0,s.useState)({width:0,height:0}),[w,v]=(0,s.useState)(!1),C=(0,s.useRef)(null),R=(0,s.useRef)(null),E=p&&p!==l&&p.startsWith("blob:");(0,s.useEffect)(()=>{if(R.current){const e=R.current.querySelector("svg");if(e){const{width:t,height:o}=e.getBoundingClientRect();f({width:t,height:o})}}},[l]),(0,s.useEffect)(()=>()=>{E&&URL.revokeObjectURL(p)},[p,l,E]);return s.createElement(U,{iconWidth:y.width,iconHeight:y.height},s.createElement("form",{onSubmit:e=>{e.preventDefault(),C.current.click()},id:`${d}-form`},s.createElement("label",{htmlFor:d,className:"upload-container","aria-label":e},s.createElement("div",{className:"upload-content"},!w&&p!==l&&s.createElement(A,null,s.createElement("img",{src:p,alt:e})),w&&s.createElement(B,{isUploading:w},s.createElement(_,null,s.createElement(ce.A,{className:"image-upload-loader"}))),!w&&p===l&&s.createElement("div",{className:"placeholder-icon",dangerouslySetInnerHTML:{__html:p},ref:R}))),s.createElement("input",{type:"file",accept:t,onChange:async()=>{const e=C.current.files[0];if(e){const l=(e=>{const t=e.size/1048576;return!(tg)})(e),d=(s=e,!!t.includes(s.type));if(!l||!d)return void(C.current.value="");if(o){v(!0),i&&i(!0);try{const t=n||c,i=a||"test",s=await de(e,{brand:t,product:i,expirationDate:r,pixVaultUrl:m});if(E&&URL.revokeObjectURL(p),200===s?.statusCode&&s?.data?.[0]?.encodedURI){const t=URL.createObjectURL(e);h(t)}o(s)}catch(e){}finally{v(!1),i&&i(!1)}}}var s},ref:C,hidden:!0,id:d,name:d,disabled:w})))};ue.propTypes={allowedExtensions:r().arrayOf(r().string),brand:r().string,buttonText:r().string,expirationDate:r().string,id:r().string,imageUpload:r().shape({pixVaultUrl:r().string,brandSlug:r().string,product:r().string,userAgentValue:r().string}),maxFileSize:r().number,minFileSize:r().number,onFileChange:r().func,onUploadStatusChange:r().func,placeholderImage:r().string,product:r().string};const ge=ue,pe=(0,n.M3)(ge,{keysToPluck:["imageUpload"]}),be=(0,i.y)(pe,"ImageUpload");var he=o(14307);const ye=3e3,fe=({commentId:e,contentId:t,contentTitle:o="",username:i,revisionId:n,commentingUrl:a,closeReply:r,reviewModalProps:d,showMessageBannerHandler:c,storyURL:m,source:u,isFeatured:g,shouldEnableRepliesImageUpload:p,shouldTruncateComments:b})=>{const{formatMessage:h}=(0,l.A)(),[y,f]=(0,s.useState)(!0),[w,v]=(0,s.useState)(0),[C,R]=(0,s.useState)(!1),[E,T]=(0,s.useState)(!1),[S,x]=(0,s.useState)(null),k=(0,s.useRef)(null),[$,N]=(0,s.useState)(!1),U=e=>{const t={type:"discard",label:"YES, DISCARD IT",subject:u,...(0,I.i3)(g)};e.preventDefault(),r(),(0,he.Uw)(t,{skipDuplicateEvent:!1})};return s.createElement(q,null,s.createElement(O,null,s.createElement(D,null,h(L.ReviewReplyLabel)),s.createElement(K,null,i)),s.createElement(F,{name:"reviewReplyNoteText",formName:"reviewReplyNoteText",placeholder:h(L.ReplyFieldPlaceHolder),hasAutoFocus:!0,onInputChange:e=>{const t=e.target.value;v(t.length),e.target.value=t,f(0===t.trim().length),R(!1)},customHeightMultiplier:10,label:h(L.ReplyTextFieldLabel),hideLabel:!0,errorPosition:"belowTextField",errorText:C?h(L.ReviewFieldMinLimitErrorText):b?"":w>2900&&w{v(e)},shouldDisableTypingAtMaxChar:!b}),p&&s.createElement(G,null,s.createElement(be,{onFileChange:e=>{e?.data?.[0]?.filePath&&x({id:e.data[0].filePath,url:e.data[0].encodedURI})},onUploadStatusChange:e=>{T(e)},id:"review-reply-image-upload",product:"commenting"})),s.createElement(ae,{modalProps:d,confirmButtonCallback:e=>U(e),onClose:()=>N(!1),isVisible:$}),s.createElement(j,null,s.createElement(P,{inputKind:"submit",isDisabled:y||E,label:h(L.ReplyButtonLabel),onClickHandler:async i=>{let s;i.preventDefault();const l=k.current?.value?.trim();if(l.length<2)R(!0),f(!0);else if(l.length>0){const i={storyID:t,parentID:e,parentRevisionID:n,body:l,...S&&{images:[S]},clientMutationId:"0"};try{m||await(0,M.u2)({id:t,title:o,url:window.location.origin+window.location.pathname,commentingUrl:a,logger:console});await(0,M.Oe)(a,i)?(r(),c(h(L.AddReplySuccessToastMessage))):c(h(L.AddReplyFailedToastMessage))}catch(e){s=e?.message||"",c(h(L.AddReplyFailedToastMessage))}const d={type:"submit",label:"Reply",subject:"community_reply",error:s,...(0,I.i3)(g)};(0,he.Uw)(d,{skipDuplicateEvent:!1})}}}),s.createElement(H,{btnStyle:"text",label:h(L.CancelButtonLabel),onClickHandler:e=>{k.current&&k.current.value.trim().length>0?N(!0):U(e),k.current.focus()}})))};fe.propTypes={closeReply:r().func,commentId:r().string,commentingUrl:r().string,contentId:r().string,contentTitle:r().string,isFeatured:r().bool,reviewModalProps:r().object,revisionId:r().string,shouldEnableRepliesImageUpload:r().bool,shouldTruncateComments:r().bool,showMessageBannerHandler:r().func,source:r().string,storyURL:r().string,username:r().string};const we=fe;var ve=o(26576);const Ce=(e={},t=!1)=>{{const o={type:t?"attempt":"like",subject:"community_reply",...e};t&&(o.label="vote"),(0,he.Uw)(o,{skipDuplicateEvent:!1})}},Re=(0,E.defineMessages)({loading:{id:"ReviewList.Loading",defaultMessage:"Loading…",description:"Button label while list loads"},reviewListError:{id:"ReviewList.ReviewListError",defaultMessage:"Sorry, more reviews can‘t be loaded right now. {br} Please try again later.",description:"Error message while loading list"},reviewReplyLabel:{id:"ReviewList.ReviewReplyLabel",defaultMessage:"Reply",description:"Reply Icon label"},replyDisabledForEURegion:{id:"ReviewList.ReplyDisabledForEURegion",defaultMessage:"Reply is disabled for EU region",description:"Tooltip text shown when replies are disabled for UK region"},showMoreButtonLabel:{id:"ReviewList.showMoreButtonLabel",defaultMessage:"Read more comments",description:"Label for show more button"},pitchforkScoreLabel:{id:"ScoreComparison.PitchforkScoreLabel",defaultMessage:"Pitchfork score",description:"Label for Pitchfork score in score comparison component"},listenerScoreLabel:{id:"ScoreComparison.ListenerScoreLabel",defaultMessage:"Reader score",description:"Label for reader score in score comparison component"},upvoteLabel:{id:"ReviewList.upvoteLabel",defaultMessage:"Upvote",description:"Label for upvote button"},noListenerScoreYet:{id:"ScoreComparison.NoListenerScoreYet",defaultMessage:"* No reader score available yet.",description:"Message shown when there are no reader scores yet"},listenerScoreAvailableAfter:{id:"ScoreComparison.ListenerScoreAvailableAfter",defaultMessage:"* Reader score available once {count} listeners submit.",description:"Message shown when minimum reader score threshold is not met"},subscribeToSee:{id:"ScoreComparison.subscribeToSee",defaultMessage:"{subscribe} to see all scores",description:"Message shown when user is not subscribed, with subscribe CTA as a link"}});var Ee=o(20656),Le=o(85554),Me=o(22509),Ie=o(61057),Te=o(54283),Se=o(91470),xe=o(24695),ke=o(15343);const $e=(0,T.Ay)(k.vm).withConfig({displayName:"ReplyUserName"})`
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-feature")};
`,Ne=(0,T.Ay)(g.sJ).withConfig({displayName:"ReplyDataInfo"})`
&:first-child {
margin-bottom: ${(0,S.Kq)(1)};
}
.icon-p4k-upvote,
.icon-p4k-upvote-filled {
margin-right: ${(0,S.Kq)(.5)};
cursor: pointer;
width: auto;
height: auto;
&:hover path[fill='#757575'] {
${({theme:e})=>(0,S._o)(e,"fill","colors.interactive.base.brand-secondary")};
}
}
`,Ue=(0,T.Ay)(g.Wx).withConfig({displayName:"ReplierUserName"})``,Ae=T.Ay.div.withConfig({displayName:"ReplyMetaData"})`
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: ${(0,S.Kq)(.5)};
`,Be=T.Ay.div.withConfig({displayName:"ReplyCommentsListWrapper"})`
margin-top: ${(0,S.Kq)(1.25)};
margin-left: ${(0,S.Kq)(6)};
${(0,S.H4)($.LO.md)} {
margin-left: ${(0,S.Kq)(8)};
}
`,_e=T.Ay.div.withConfig({displayName:"ReplyCommentItem"})`
margin-top: ${(0,S.Kq)(4)};
&:first-child {
margin-top: ${(0,S.Kq)(2)};
}
${g.iA} {
grid-template-columns: repeat(4, max-content);
column-gap: ${(0,S.Kq)(.75)};
}
.icon-dots {
width: 12px;
height: 12px;
${({theme:e})=>(0,S._o)(e,"fill","colors.interactive.base.dark")};
${(0,S.L7)($.LO.md)} {
padding-right: ${(0,S.Kq)(.5)};
padding-left: ${(0,S.Kq)(.5)};
}
}
`,Ke=(0,T.Ay)(g.vX).withConfig({displayName:"ReplyLikeCount"})``,qe=(0,T.Ay)(g.Pu).withConfig({displayName:"ReplyTimeStamp"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.foundation.meta-secondary")}
`,He=(0,T.Ay)(g.Xu).withConfig({displayName:"ReplyInfoLabel"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.foundation.meta-secondary")};
`,Fe=(0,T.Ay)(g.iT).withConfig({displayName:"ReplyText"})``,De=(0,T.Ay)(g.ow).withConfig({displayName:"ReplyImage"})`
margin-top: ${(0,S.Kq)(1)};
`,Oe=(0,T.Ay)(g.o).withConfig({displayName:"ReplyReactionButton"})``,Pe=T.Ay.div.withConfig({displayName:"ShowOrHideRepliesLabel"})`
display: flex;
flex-direction: row;
cursor: pointer;
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.foundation.link-secondary")};
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.dark")};
`,je=T.Ay.hr.withConfig({displayName:"ShowOrHideRepliesLabelRule"})`
${({theme:e})=>(0,S._o)(e,"color","colors.discovery.body.dark.divider")};
align-self: center;
margin-right: ${(0,S.Kq)(1)};
width: ${(0,S.Kq)(4)};
`;var Ge=o(39780);const Ve=(0,T.Ay)(k.c7).withConfig({displayName:"ReviewerBadgeWrapper"})`
display: flex;
`,Ye=(0,T.Ay)(k.vm).withConfig({displayName:"ReviewBadgeText"})`
padding-left: ${(0,S.Kq)(.5)};
${(0,S.Gg)("typography.definitions.foundation.meta-secondary")}
${({shouldUsePrimaryColorForBadges:e})=>e?(0,S._o)("color","colors.interactive.social.primary"):(0,S._o)("color","colors.background.brand")};
`,We=(0,T.Ay)(xe.VerificationBadge).withConfig({displayName:"VerificationBadgeIcon"})``,ze=({badgeText:e,shouldUsePrimaryColorForBadges:t=!1,showRoleBadge:o=!1})=>{const i=(0,Ge.DP)(),n=t?(0,S.HK)(i,"colors.interactive.social.primary"):(0,S.HK)(i,"colors.background.brand");return s.createElement(Ve,{"data-testid":"reviewer-badge"},o?(()=>{switch(e){case"Staff":case"Contributor":return s.createElement(xe.BadgeStaff,null);case"Artist":return s.createElement(xe.BadgeArtist,null);case"Day One":return s.createElement(xe.BadgeDayOne,null);default:return s.createElement(We,{color:n})}})():s.createElement(We,{color:n}),s.createElement(Ye,{shouldUsePrimaryColorForBadges:t,showRoleBadge:o},e))};ze.propTypes={badgeText:r().string,shouldUsePrimaryColorForBadges:r().bool,showRoleBadge:r().bool},ze.displayName="ReviewerBadge";const Xe=(0,i.y)(ze,"ReviewerBadge"),Qe=({subscriptionUrl:e,modalConfig:t,redirectURL:o,action:i})=>{(0,Me.Rf)({dangerousHed:t.hed,dangerousDek:t.dek,customCtaLabel:t.customCtaLabel,customCtaUrl:e,signInText:t.signInText,signInLinkText:t.signInLinkText,shouldHideHedSpanTag:!0,redirectURL:o||window.location.href,shouldHideIllustration:!0,shouldOpenCtaInNewTab:!0,isSubscriptionModal:!0,action:i})},Je=(e,t)=>!e&&!!t,Ze=(0,E.defineMessages)({ReviewReplyLabel:{id:"ReviewReplyComment.ReviewReplyLabel",defaultMessage:"Replying to",description:"The label for the reply comment field"},ShowMoreRepliesLabel:{id:"ReviewReplyComment.ShowMoreRepliesLabel",defaultMessage:"Show more replies",description:"The label to show more replies"},ReviewReplyCommentLabel:{id:"ReviewReplyComment.ReviewReplyCommentLabel",defaultMessage:"Reply",description:"The label to show reply icon"},HideRepliesLabel:{id:"ReviewReplyComment.HideRepliesLabel",defaultMessage:"Hide replies",description:"The label to hide replies"},LoadingRepliesLabel:{id:"ReviewReplyComment.LoadingRepliesLabel",defaultMessage:"Loading…",description:"The label to hide replies"},upvoteLabel:{id:"ReviewReplyComment.upvoteLabel",defaultMessage:"Upvote",description:"Label for upvote button"},RepliesMarketRestrictedTooltip:{id:"ReviewReplyComment.RepliesMarketRestrictedTooltip",defaultMessage:"Reply is disabled for EU region",description:"Tooltip shown when replies are market restricted"}});var et=o(48346);const tt=e=>{const t=et.A.find(t=>t.value===e);return t?.flag?`${t.flag} ${e}`:e};var ot=o(48286);const{oidcCookies:it}=le.A,nt=({commentingUrl:e,contentId:t,replies:o,replyPageInfo:i,repliesOrderBy:n,username:a,reviewerBadges:r,reviewModalProps:d,commentReactionHandler:c,user:m={},signInHed:u,usernameSignInDek:p,signInHedSpanTag:b,signInMessage:h,commentId:y,replyLimit:f,shouldUsePrimaryColorForBadges:w,showMessageBannerHandler:v,userReactions:C,useVoteLabels:R=!1,updateUserReactions:E,siteUserName:L,handleUsernameChange:T,shouldEnableReply:S,shouldEnableUpvotes:x,isFeatured:k,spectraUrl:$,shouldEnableRepliesImageUpload:N,enableRepliesMarketRestriction:U,repliesMarketRestrictedTitle:A,upvoteIcon:B,upvoteIconFilled:_,showUpvoteLabel:K,shouldShowLocation:q,shouldTruncateComments:H,truncateLines:F,isSubscribed:D=!0,subscriptionUrl:O="/subscribe",modalConfig:P})=>{const{formatMessage:j}=(0,l.A)(),[G,V]=(0,s.useState)(null),[Y,W]=(0,s.useState)(!1),[z,X]=(0,s.useState)([]),[Q,J]=(0,s.useState)(!1),Z=B&&(0,ve.Rg)(B)||xe.Like,ee=_&&(0,ve.Rg)(_)||xe.LikeFilled,[te,oe]=(0,s.useState)(i.hasNextPage??!1),[ie,ne]=(0,s.useState)(i.hasNextPage?j(Ze.ShowMoreRepliesLabel):""),[ae,re]=(0,s.useState)(!1),[se,le]=(0,s.useState)(!1),[de,ce]=(0,s.useState)(i.endCursor),[me,ue]=(0,s.useState)(i.hasNextPage??!1),[ge,pe]=(0,s.useState)([]),be="community_reply",ye=e=>{const t="COMMUNITY_LIKE_CLICK_REPLY",o={type:"login",source_type:t,...(0,I.i3)(k)},i=(0,I.i3)(k),n=(0,I.An)(k);Ce(i,R);const a={action:gt,commentId:e.commentId,commentRevisionId:e.revisionId,featured:n,source:t},r=(0,Le.$D)({href:window.location.href,hashValue:Le.M$.LIKE_REPLY,queryParams:a});if(Je(D,O))return void Qe({subscriptionUrl:O,modalConfig:P,redirectURL:r,action:Le.M$.LIKE_REPLY});if(!m.isAuthenticated)return void(0,Me.Rf)({dangerousDek:h,dangerousHed:u,dangerousHedSpanTag:b,redirectURL:r,shouldHideIllustration:!0,snowplowData:o,source:t});const s=C[e.commentId]?.viewerActionPresence,l={items:[{content_id:e.commentId}],...(0,I.i3)(k)};s?((e={},t=!1)=>{{const o={type:t?"discard":"unlike",subject:"community_reply",...e};t&&(o.label="discard vote"),(0,he.Uw)(o,{skipDuplicateEvent:!1})}})(l,R):Ce(l,R),c({item:e})};(0,s.useEffect)(()=>{ae?ne(j(Ze.LoadingRepliesLabel)):te&&ne(j(Ze.ShowMoreRepliesLabel))},[ae,te,j]);const fe=o=>{const i=((e,t,o)=>e?e.map(e=>{const{id:i,author:{orgRole:n}={},body:a,createdAt:r,siteUsername:s,parent:l,actionCounts:d,viewerActionPresence:c,revision:m,story:u,images:g=[]}=e;return{role:n,replyId:i,replyText:a,replyDate:(0,Te.BD)(r,t),replyAuthorName:s?.[0]?.name,replyAuthorLocation:s?.[0]?.location,parentAuthorName:(()=>{let e=o;return"Anonymous"===o?e=o:l?.siteUsername?.[0]?.name&&(e=l?.siteUsername?.[0]?.name),e})(),reactionCount:d?.reaction?.total||0,viewerActionPresence:c,revisionId:m?.id,storyURL:u?.url,images:g,coralBadges:s?.[0]?.badges||[],reviewerCreatedAt:s?.[0]?.createdAt}}):[])(o,j,a);return i.map(o=>{const{role:i,replyId:n,replyAuthorName:a,replyAuthorLocation:l,replyDate:c,replyText:y,parentAuthorName:f,revisionId:R,storyURL:E,images:M,coralBadges:B=[],reviewerCreatedAt:_}=o||{},Q={commentId:n,revisionId:R},{badgeValue:J,dateBadges:te,userSpecificBadges:oe}=(0,ve.D4)({role:i,coralBadges:B,reviewerCreatedAt:_,reviewerBadges:r});return s.createElement(_e,{key:n,"data-testid":"reply-comment-item"},s.createElement(g.iA,{badgeValue:J},a&&s.createElement(Ue,null,a),J&&s.createElement(Xe,{badgeText:J,shouldUsePrimaryColorForBadges:w}),q&&l&&s.createElement(s.Fragment,null,s.createElement(Se.Dot,null),s.createElement(g.d0,null,tt(l)))),0===te.length||oe.length>0?null:te.map((e,t)=>{const o=(0,ve.BM)(e);return o?s.createElement(g.Ig,{key:`coral-badge-${t}`},s.createElement(Xe,{badgeText:o,shouldUsePrimaryColorForBadges:w})):null}),s.createElement(Ne,null,s.createElement(Ae,null,s.createElement(He,null,j(Ze.ReviewReplyLabel)),f&&s.createElement($e,null,f)),s.createElement(Ae,null,s.createElement(Se.Dot,null),c&&s.createElement(qe,null,c))),y&&(H?s.createElement(ot.A,{lines:F,isCollapsible:!0},s.createElement("span",null,y)):s.createElement(Fe,{dangerouslySetInnerHTML:{__html:y}})),N&&M.map((e,t)=>s.createElement(De,{key:t,src:(0,ve.s_)(e?.url,$),"data-testid":"reply-image"})),s.createElement(Ne,null,x&&s.createElement(Oe,{isIconButton:!0,name:"reply-reaction",label:"Reaction",onClickHandler:()=>ye(Q),ButtonIcon:C[n]?.viewerActionPresence?ee:Z}),x&&s.createElement(Ke,null,C[n]?.reactionCount&&C[n]?.reactionCount||K&&j(Ze.upvoteLabel)),(S||U)&&s.createElement(g.Ei,{disabled:U,title:A,onClick:U?void 0:e=>((e,t)=>{e.preventDefault();const o="COMMUNITY_REPLY_TO_REPLY",i={subject:be,label:"Reply",source_type:o,type:"login",...(0,I.i3)(k)},n=(0,I.An)(k),a=(0,Le.$D)({href:window.location.href,hash:Le.M$.REPLY_TO_REPLY,queryParams:{featured:n,source:o}});if(Je(D,O))return void Qe({subscriptionUrl:O,modalConfig:P,redirectURL:a,action:Le.M$.REPLY_TO_REPLY});if(m.isAuthenticated)if(L)V(t?.replyAuthorName),X(e=>[...e,t?.replyId]),W(!0);else{(0,Ie.Rf)({dangerousDek:p,successCallback:e=>{T(e),V(t?.replyAuthorName),X(e=>[...e,t?.replyId]),W(!0)},source:be,isFeatured:k});const e={type:"impression",subject:"username_modal",label:"Create Username",source_type:be,...(0,I.i3)(k)};(0,he.lV)(e)}else(0,Me.Rf)({dangerousDek:h,dangerousHed:u,dangerousHedSpanTag:b,redirectURL:a,shouldHideIllustration:!0,source:o,snowplowData:i});const r={type:"attempt",subject:be,label:"reply",items:[{content_id:t?.replyId}],...(0,I.i3)(k)};(0,he.Uw)(r,{skipDuplicateEvent:!1})})(e,o)},s.createElement(xe.Comment,{title:A}),s.createElement(g.Xu,{disabled:U},j(Ze.ReviewReplyCommentLabel)))),Y&&z.includes(n)&&m.isAuthenticated&&L&&s.createElement(we,{commentId:n,username:G,contentId:t,revisionId:R,commentingUrl:e,closeReply:()=>{W(!1)},reviewModalProps:d,showMessageBannerHandler:v,source:"community_reply",storyURL:E,isFeatured:k,shouldEnableRepliesImageUpload:N,shouldTruncateComments:H}))})};return s.createElement(Be,{"data-testid":"reply-comments-list-wrapper"},fe(o),!se&&fe(ge),s.createElement(Ne,null,te&&s.createElement(Pe,{onClick:async()=>{let t;if(le(!1),ge.length>=1&&!me)pe([...ge]),J(!0),oe(!1);else{re(!0);const o=de??i.endCursor;try{const t=Ee.d.getCookieValue(it.id),{replies:i,page:{endCursor:a,hasNextPage:r}}=await(0,M.WE)({commentId:y,after:o,commentingUrl:e,logger:console,accessToken:t,replyLimit:f,repliesOrderBy:n});ce(a),ue(r),r||J(!0),oe(r),pe([...ge,...i]),E(i)}catch(e){t=e?.message||""}re(!1)}const o={type:"show_more",label:"Show more replies",subject:be,error:t,...(0,I.i3)(k)};(0,he.Uw)(o,{skipDuplicateEvent:!1})},"data-testid":"show-more-replies-button"},s.createElement(je,null),ie),Q&&s.createElement(Pe,{onClick:()=>{J(!1),le(!0),oe(!0)},"data-testid":"hide-replies-button"},s.createElement(je,null),j(Ze.HideRepliesLabel))))};nt.propTypes={commentId:r().string,commentingUrl:r().string.isRequired,commentReactionHandler:r().func,contentId:r().string,coralBadges:r().arrayOf(r().shape({badge:r().string.isRequired,startDate:r().string,endDate:r().string,isUserSpecific:r().bool})),enableRepliesMarketRestriction:r().bool,repliesMarketRestrictedTitle:r().string,handleUsernameChange:r().func,isFeatured:r().bool,replies:r().array,repliesOrderBy:r().string,replyLimit:r().number,replyPageInfo:r().object,reviewerBadges:r().arrayOf(r().shape({role:r().string,badge:r().string})),reviewModalProps:r().object,shouldEnableRepliesImageUpload:r().bool,shouldEnableReply:r().bool,shouldEnableUpvotes:r().bool,shouldTruncateComments:r().bool,shouldUseAlternateColorToken:r().bool,shouldUsePrimaryColorForBadges:r().bool,shouldShowLocation:r().bool,showMessageBannerHandler:r().func,showUpvoteLabel:r().bool,signInHed:r().string,signInHedSpanTag:r().string,signInMessage:r().string,siteUserName:r().string,spectraUrl:r().string,truncateLines:r().number,updateUserReactions:r().func,upvoteIcon:r().string,upvoteIconFilled:r().string,useVoteLabels:r().bool,user:r().shape({isAuthenticated:r().bool.isRequired,amguuid:r().string}).isRequired,username:r().string,usernameSignInDek:r().string,userReactions:r().shape({reactionCount:r().number.isRequired,viewerActionPresence:r().bool}).isRequired,isSubscribed:r().bool,subscriptionUrl:r().string,modalConfig:r().object};var at=o(27517);const rt=({className:e,commentingUrl:t,commentReactionHandler:o,contentTitle:i,handleShowMore:n,handleUsernameChange:a,hasErrored:r=!1,shouldEnableCommentsImageUpload:d,shouldEnableRepliesImageUpload:c,hasNextPage:m=!1,id:u,isLoading:p=!1,items:y,replyLimit:f,reviewerBadges:w,repliesOrderBy:v,reviewModalProps:E,shouldEnableRatings:L,shouldEnableReply:M,shouldEnableTags:T=!1,shouldEnableUpvotes:S,shouldUseAlternateColorToken:x,shouldUsePrimaryColorForBadges:k,shouldUseTagsInvertedTheme:$,shouldShowCircularRatings:N,shouldUseFullOpacity:U,ratingPlacement:A="ReviewMetaGrid",shouldShowLocation:B,showMessageBannerHandler:_,showUpvoteLabel:K,showMoreButtonLabel:q,signInHed:H,signInHedSpanTag:F,signInMessage:D,siteUserName:O,updateUserReactions:P,upvoteIcon:j,upvoteIconFilled:G,useVoteLabels:V=!1,user:Y,usernameSignInDek:W,userReactions:z,spectraUrl:X,enableRepliesMarketRestriction:Q,repliesMarketRestrictedTooltip:J,shouldTruncateComments:Z,truncateLines:ee,isSubscribed:te,subscriptionUrl:oe,modalConfig:ie})=>{s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"ReviewList"})},[]);const[ne,ae]=(0,s.useState)({}),[re,se]=(0,s.useState)([]),{formatMessage:le}=(0,l.A)(),de=Q?J||le(Re.replyDisabledForEURegion):null,ce="ReviewListButton",me=j&&(0,ve.Rg)(j)||xe.Like,ue=G&&(0,ve.Rg)(G)||xe.LikeFilled,ge=(0,s.useCallback)((e,t)=>{const o="COMMUNITY_REPLY_TO_COMMENT",i=(0,I.An)(t),n=new URL(window.location);n.hash=Le.M$.LEAVE_REPLY,n.searchParams.set("featured",i),n.searchParams.set("source",o);const r={subject:"community_comment",label:"Reply",source_type:o,type:"login",...(0,I.i3)(t)};if(Je(te,oe))return void Qe({subscriptionUrl:oe,modalConfig:ie,redirectURL:n.href,action:Le.M$.LEAVE_REPLY});if(Y?.isAuthenticated){if(O)se(t=>[...t,e]),ae(t=>({...t,[e]:!0}));else if(void 0!==O){Ie.Rf({dangerousDek:W,successCallback:t=>{a(t),se(t=>[...t,e]),ae(t=>({...t,[e]:!0}))},source:"community_reply",isFeatured:t});const o={type:"impression",subject:"username_modal",label:"Create Username",source_type:"community_reply",...(0,I.i3)(t)};(0,he.lV)(o)}}else Me.Rf({dangerousDek:D,dangerousHed:H,dangerousHedSpanTag:F,redirectURL:n.href,shouldHideIllustration:!0,source:o,snowplowData:r});const s={type:"attempt",subject:"community_comment",label:"reply",items:[{content_id:e}],...(0,I.i3)(t)};(0,he.Uw)(s,{skipDuplicateEvent:!1})},[O,te,oe]),pe=({item:e})=>{const t=z[e.commentId]?.viewerActionPresence,i=(0,I.i3)(e.isFeatured);t?((e={},t=!1)=>{{const o={type:t?"discard":"unlike",subject:"community_comment",...e};t&&(o.label="discard vote"),(0,he.Uw)(o,{skipDuplicateEvent:!1})}})(i,V):((e={},t=!1)=>{{const o={type:t?"attempt":"like",subject:"community_comment",...e};t&&(o.label="vote"),(0,he.Uw)(o,{skipDuplicateEvent:!1})}})(i,V),o({item:e})},be=q??le(Re.showMoreButtonLabel);return(0,h.ol)(`.${ce}`,void 0,e=>{e&&(e=>{const t={type:"impression",label:e,subject:"community"};(0,he.Uw)(t)})(be)}),s.createElement(g.Yl,{className:e,id:u,tabIndex:"-1"},!!y?.length&&s.createElement(g.RF,null,y.map(e=>{const{id:n,commentId:r,text:l,username:m,date:u,rating:p,replies:b,replyPageInfo:h,recipeId:y,revisionId:I,role:q,tags:J,storyURL:se,images:ce=[],isFeatured:be,coralBadges:he=[],reviewerCreatedAt:ye}=e||{},fe=z[r]||{},{viewerActionPresence:Ce=!1,reactionCount:Ee=0}=fe,Le="__RATING_ONLY_COMMENT_PLACEHOLDER__"===e.text,Me=T&&!!J?.length,{badgeValue:Ie,dateBadges:Te,userSpecificBadges:ke}=(0,ve.D4)({role:q,coralBadges:he,reviewerCreatedAt:ye,reviewerBadges:w}),$e=L&&p&&(N?s.createElement(R.A,{rating:p}):s.createElement(g.Xt,{as:"div"},s.createElement(C.A,{averageRatingCount:p})));return s.createElement(g.an,{key:[n,l,m,u].join("-"),shouldUseFullOpacity:U,isRatingOnlyComment:Le,shouldUseTagsInvertedTheme:$},s.createElement(g.iA,{badgeValue:Ie},s.createElement(g.eI,{badgeValue:Ie},m&&s.createElement(g.Wx,null,m),Ie&&s.createElement(Xe,{badgeText:Ie,shouldUsePrimaryColorForBadges:k}),0===Te.length||ke.length>0?null:Te.map((e,t)=>{const o=(0,ve.BM)(e);return o?s.createElement(g.Ig,{key:`coral-badge-${t}`},s.createElement(Xe,{badgeText:o,shouldUsePrimaryColorForBadges:k})):null})),"ReviewMetaGrid"===A&&$e),s.createElement(g.sJ,{applyRowGap:!0},s.createElement(g.R9,null,"ReviewListMetaInfo"===A&&s.createElement(s.Fragment,null,$e)),s.createElement(g.R9,null,Me&&s.createElement(s.Fragment,null,"ReviewListMetaInfo"===A&&$e&&s.createElement(Se.Dot,null),J.map(e=>s.createElement(at.A,{key:e},e)))),s.createElement(g.R9,null,s.createElement(Se.Dot,null),s.createElement(g.Pu,null,u)),s.createElement(g.R9,null,B&&e.location&&s.createElement(s.Fragment,null,s.createElement(Se.Dot,null),s.createElement(g.d0,null,tt(e.location))))),s.createElement(g.sJ,null,l&&!Le&&(Z?s.createElement(ot.A,{lines:ee,isCollapsible:!0},s.createElement("span",null,l)):s.createElement(g.iT,{dangerouslySetInnerHTML:{__html:l}}))),s.createElement(g.sJ,null,d&&ce.map((e,t)=>s.createElement(g.ow,{key:t,src:(0,ve.s_)(e?.url,X)}))),s.createElement(g.sJ,null,S&&s.createElement(g.o,{isIconButton:!0,name:"comment-reaction",label:"Reaction",onClickHandler:()=>pe({item:e}),ButtonIcon:Ce?ue:me}),S&&s.createElement(g.vX,null,Ee&&Ee||K&&le(Re.upvoteLabel)),(M||Q)&&s.createElement(g.Ei,{disabled:Q,title:de,onClick:Q?void 0:()=>ge(r,be)},s.createElement(xe.Comment,{title:de}),s.createElement(g.Xu,{disabled:Q},le(Re.reviewReplyLabel)))),ne[r]&&re.includes(r)&&Y?.isAuthenticated&&s.createElement(we,{commentId:r,username:m,contentId:y,revisionId:I,commentingUrl:t,closeReply:()=>(e=>{ae(t=>({...t,[e]:!1}))})(r),reviewModalProps:E,showMessageBannerHandler:_,source:"community_comment",contentTitle:i,storyURL:se,isFeatured:be,shouldEnableRepliesImageUpload:c,shouldTruncateComments:Z}),b&&b.length>0&&s.createElement(nt,{shouldUseAlternateColorToken:x,shouldUsePrimaryColorForBadges:k,useVoteLabels:V,reviewerBadges:w,username:m,replies:b,replyPageInfo:h,reviewModalProps:E,repliesOrderBy:v,commentReactionHandler:o,user:Y,userReactions:z,updateUserReactions:P,usernameSignInDek:W,signInHed:H,signInHedSpanTag:F,signInMessage:D,shouldEnableReply:M,commentId:r,replyLimit:f,siteUserName:O,handleUsernameChange:a,contentId:y,isSubscribed:te,subscriptionUrl:oe,showMessageBannerHandler:_,commentingUrl:t,shouldEnableUpvotes:S,isFeatured:be,shouldEnableRepliesImageUpload:c,spectraUrl:X,upvoteIcon:j,upvoteIconFilled:G,showUpvoteLabel:K,shouldShowLocation:B,enableRepliesMarketRestriction:Q,repliesMarketRestrictedTitle:de,shouldTruncateComments:Z,truncateLines:ee,modalConfig:ie}))})),!r&&m&&s.createElement(g.TD,{className:ce,inputKind:"button",onClickHandler:()=>{n(),(e=>{{const t={type:"click",label:e,subject:"community"};(0,he.Uw)(t,{skipDuplicateEvent:!1})}})(be)},label:p?le(Re.loading):be,isDisabled:p}),r?s.createElement(g.By,null,le(Re.reviewListError,{br:s.createElement("br",null)})):null)};rt.propTypes={className:r().string,commentingUrl:r().string.isRequired,commentReactionHandler:r().func,contentTitle:r().string,handleShowMore:r().func,handleUsernameChange:r().func,hasErrored:r().bool,hasNextPage:r().bool,id:r().string,isLoading:r().bool,items:r().arrayOf(r().shape({id:r().number,text:r().string,username:r().string,date:r().string,revisionId:r().string.isRequired,commentId:r().string.isRequired,viewerActionPresence:r().bool,reactionCount:r().number,isFeatured:r().bool,coralBadges:r().arrayOf(r().shape({badge:r().string.isRequired,startDate:r().string,endDate:r().string,isUserSpecific:r().bool})),reviewerCreatedAt:r().string})),ratingPlacement:r().oneOf(["ReviewMetaGrid","ReviewListMetaInfo"]),repliesOrderBy:r().string,replyLimit:r().number,reviewerBadges:r().arrayOf(r().shape({role:r().string,badge:r().string})),reviewModalProps:r().object,shouldEnableCommentsImageUpload:r().bool,shouldEnableOptionalRating:r().bool,shouldEnableRatings:r().bool,shouldEnableRepliesImageUpload:r().bool,shouldEnableReply:r().bool,shouldEnableTags:r().bool,shouldEnableUpvotes:r().bool,shouldShowCircularRatings:r().bool,shouldUseAlternateColorToken:r().bool,shouldUsePrimaryColorForBadges:r().bool,shouldUseFullOpacity:r().bool,shouldUseTagsInvertedTheme:r().bool,shouldShowLocation:r().bool,shouldTruncateComments:r().bool,showMessageBannerHandler:r().func,showMoreButtonLabel:r().string,showUpvoteLabel:r().bool,signInHed:r().string,signInHedSpanTag:r().string,signInMessage:r().string,siteUserName:r().string,spectraUrl:r().string,truncateLines:r().number,updateUserReactions:r().func,upvoteIcon:r().string,upvoteIconFilled:r().string,useVoteLabels:r().bool,user:r().shape({amguuid:r().string,isAuthenticated:r().bool.isRequired}).isRequired,usernameSignInDek:r().string,enableRepliesMarketRestriction:r().bool,repliesMarketRestrictedTooltip:r().string,userReactions:r().objectOf(r().shape({viewerActionPresence:r().bool.isRequired,reactionCount:r().number.isRequired}).isRequired),isSubscribed:r().bool,subscriptionUrl:r().string,modalConfig:r().object};const st=rt;var lt=o(73275),dt=o(22914),ct=o(92867),mt=o(62930),ut=o(22761);const gt="createCommentReaction",pt="pinned-comment",bt=({commentingUrl:e,contentTitle:t,defaultReplyLimit:o,entityId:i,handleUsernameChange:n,id:a,initialReviewLimit:r,likeActionErrorMessage:d,replyLimit:c,commentsOrderBy:m,repliesOrderBy:u,reviewLimit:p,reviewerBadges:b,reviewModalProps:y,reviewNoteTags:f,setCommentCount:v,setIsCommentLoading:C,shouldEnableRatings:R,shouldEnableReply:E,shouldEnableTags:L,shouldEnableUpvotes:T,shouldUseAlternateColorToken:S,shouldUsePrimaryColorForBadges:x,shouldUseTagsInvertedTheme:k,shouldUseFullOpacity:$,shouldShowCircularRatings:N,ratingPlacement:U,shouldUseDarkPinnedTheme:A,shouldUseSoftRoundedEdges:B,showMessageBannerHandler:_,showMoreButtonLabel:K,showUpvoteLabel:q,signInHed:H,signInHedSpanTag:F,signInMessage:D,siteUserName:O,unlikeActionErrorMessage:P,upvoteIcon:j,upvoteIconFilled:G,user:V={},usernameSignInDek:Y,communityLogo:W,shouldEnableCommentsImageUpload:z,useVoteLabels:X=!1,shouldEnableRepliesImageUpload:Q,shouldShowLocation:J,spectraUrl:Z,shouldShowQaSection:ee,enableRepliesMarketRestriction:te,repliesMarketRestrictedTooltip:oe,shouldTruncateComments:ie,truncateLines:ne,isSubscribed:ae,subscriptionUrl:re,subscriptionModalProps:se})=>{const{formatMessage:le}=(0,l.A)(),[de,ce]=(0,s.useState)(!1),[me,ue]=(0,s.useState)(),[ge,pe]=(0,s.useState)([]),[be,he]=(0,s.useState)([]),[ye,fe]=(0,s.useState)([]),[we,ve]=(0,s.useState)({}),{isLoading:Ce,reviews:Re,page:Ee,setPage:Ie,featuredReviews:Se,qaReviews:xe,commentTagLabel:ke}=(0,Le.QO)({commentingUrl:e,commentsOrderBy:m,defaultReplyLimit:o,entityId:i,initialReviewLimit:r,setCommentCount:v,setIsCommentLoading:C,repliesOrderBy:u});(0,s.useEffect)(()=>{const e=(0,Te.AA)(Re,le,f).map(e=>({...e,isFeatured:!1}));pe(e);const t=(0,Te.AA)(Se,le,f).map(e=>({...e,isFeatured:!0}));he(t);const o=(0,Te.AA)(xe,le,f).map(e=>({...e,isFeatured:!0}));fe(o)},[Re,Se,le,f,xe]);const $e=(0,s.useMemo)(()=>[...ge,...be,...ye],[ge,be,ye]);(0,Le.AI)($e,ve);const Ne=(0,s.useCallback)(async({item:t,skipSubscriptionModal:o=!1})=>{const i="COMMUNITY_LIKE_CLICK_NOTE",n=t.isFeatured||!1,a={type:"login",source_type:i,...(0,I.i3)(n)},r=(0,I.An)(n),s={action:gt,commentId:t.commentId,commentRevisionId:t.revisionId,featured:r,source:i},l=(0,Le.$D)({href:window.location.href,hashValue:Le.M$.LIKE_COMMENT,queryParams:s});if(!o&&Je(ae,re))return void Qe({subscriptionUrl:re,modalConfig:se,redirectURL:l,action:Le.M$.LIKE_COMMENT});if(!V.isAuthenticated)return void Me.Rf({dangerousHed:H,dangerousHedSpanTag:F,dangerousDek:D,redirectURL:l,analyticsType:"comment reaction",shouldHideIllustration:!0,source:i,snowplowData:a});const{commentId:c,revisionId:m}=t;ve(e=>(0,Le.P$)({reactions:e,id:c}));const{viewerActionPresence:u}=we[c]||{},g=u?"removeCommentReaction":gt,p={commentID:c,commentRevisionID:m,clientMutationId:"0"},b=g===gt,h={operationName:g,query:b?dt.bp:dt.nn,variables:{input:p}};try{await(0,M.nz)(e,h)}catch(e){ve(e=>(0,Le.P$)({reactions:e,id:c}));const t=b?d||le(ct.A.likeActionErrorMessage):P||le(ct.A.unlikeActionErrorMessage);_(t)}},[V,we,e,H,F,D,le,_,d,P,ae,re,se]),Ue=(be?.length||0)+(ye?.length||0);(0,h.ol)(`.${pt}`,void 0,e=>{e&&Ue&&(0,I.AS)(Ue,"community_pinned","pinned_comments")},[Ue]),(0,s.useEffect)(()=>{if(!window.location||!V.isAuthenticated||w()(we))return;const{action:e,commentId:t,commentRevisionId:o}=(0,Le.TS)({searchParams:window.location.search});if(e!==gt)return;const i=we[t];if(i&&t&&o){const{viewerActionPresence:e}=i;!e&&Ne({item:{commentId:t,revisionId:o},skipSubscriptionModal:!0}),window.history.replaceState({},"",(0,Le.iz)({href:window.location.href,paramsToRemove:["action","commentId","commentRevisionId"]}))}},[V.isAuthenticated,Ne,we]);if(Ce)return s.createElement(ut.ey,null,s.createElement(mt.jl,null));if(!(ge.length||be.length||ye.length||me))return null;const Ae={commentingUrl:e,commentReactionHandler:Ne,handleUsernameChange:n,repliesOrderBy:u,replyLimit:c,reviewerBadges:b,reviewModalProps:y,shouldEnableRatings:R,shouldEnableReply:E,shouldEnableTags:L,shouldEnableUpvotes:T,shouldUseAlternateColorToken:S,shouldUsePrimaryColorForBadges:x,shouldUseTagsInvertedTheme:k,shouldUseFullOpacity:$,shouldShowCircularRatings:N,ratingPlacement:U,showMessageBannerHandler:_,showUpvoteLabel:q,signInHed:H,signInHedSpanTag:F,signInMessage:D,siteUserName:O,updateUserReactions:e=>{ve(t=>e.reduce(Le.a8,{...t}))},upvoteIcon:j,upvoteIconFilled:G,user:V,usernameSignInDek:Y,userReactions:we,contentTitle:t,shouldEnableCommentsImageUpload:z,shouldEnableRepliesImageUpload:Q,shouldShowLocation:J,spectraUrl:Z,useVoteLabels:X,enableRepliesMarketRestriction:te,repliesMarketRestrictedTooltip:oe,shouldTruncateComments:ie,truncateLines:ne,isSubscribed:ae,subscriptionUrl:re,modalConfig:se};return s.createElement(s.Fragment,null,!!be?.length&&s.createElement(g.fm,{className:pt,shouldUseFullOpacity:$,shouldUseDarkPinnedTheme:A,shouldUseSoftRoundedEdges:B},s.createElement(g.W6,{shouldUseFullOpacity:$,shouldUseDarkPinnedTheme:A,shouldUseSoftRoundedEdges:B},s.createElement(g.oE,{shouldUseAlternateColorToken:S,shouldUseInvertedColor:A},ke?.FEATURED||le(ct.A.pinnedReviewLabel)),W&&s.createElement(g.tG,{...W})),s.createElement(st,{...Ae,id:`${a}-featured`,items:be})),ee&&!!ye?.length&&s.createElement(g.fm,{shouldUseSoftRoundedEdges:B,className:pt,shouldUseFullOpacity:$,shouldUseDarkPinnedTheme:A},s.createElement(g.W6,{shouldUseSoftRoundedEdges:B,shouldUseFullOpacity:$,shouldUseDarkPinnedTheme:A},s.createElement(g.oE,{shouldUseAlternateColorToken:S,shouldUseInvertedColor:A},ke?.QA||le(ct.A.qaReviewLabel)),W&&s.createElement(g.tG,{...W})),s.createElement(st,{...Ae,id:`${a}-qa`,items:ye})),s.createElement(st,{...Ae,id:a,items:ge,isLoading:de,hasErrored:!!me,hasNextPage:Ee.hasNextPage,handleShowMore:async()=>{ce(!0),ue();const t=Ee.endCursor;try{const{reviews:o,page:n}=await(0,M.SW)({entityId:i,after:t,commentingUrl:e,commentsOrderBy:m,repliesOrderBy:u,reviewLimit:p});Ie(n);const a=(0,Te.AA)(o,le,f);pe([...ge,...a])}catch(e){ue(!0)}ce(!1)},showMoreButtonLabel:K}))};bt.propTypes={commentingUrl:r().string.isRequired,commentsOrderBy:r().string,communityLogo:r().shape(lt.A.propTypes),contentTitle:r().string,defaultReplyLimit:r().number,entityId:r().string.isRequired,handleUsernameChange:r().func,id:r().string,initialReviewLimit:r().number,likeActionErrorMessage:r().string,ratingPlacement:r().oneOf(["ReviewMetaGrid","ReviewListMetaInfo"]),repliesOrderBy:r().string,replyLimit:r().number,reviewerBadges:r().arrayOf(r().shape({role:r().string,badge:r().string})),reviewLimit:r().number,reviewModalProps:r().object,reviewNoteTags:r().array,setCommentCount:r().func.isRequired,setIsCommentLoading:r().func.isRequired,shouldEnableCommentsImageUpload:r().bool,shouldShowLocation:r().bool,shouldEnableRatings:r().bool,shouldEnableRepliesImageUpload:r().bool,shouldEnableReply:r().bool,shouldEnableTags:r().bool,shouldEnableUpvotes:r().bool,shouldShowCircularRatings:r().bool,shouldUseAlternateColorToken:r().bool,shouldUsePrimaryColorForBadges:r().bool,shouldUseTagsInvertedTheme:r().bool,shouldUseDarkPinnedTheme:r().bool,shouldUseSoftRoundedEdges:r().bool,shouldUseFullOpacity:r().bool,showMessageBannerHandler:r().func,showMoreButtonLabel:r().string,shouldShowQaSection:r().bool,shouldTruncateComments:r().bool,showUpvoteLabel:r().bool,signInHed:r().string,signInHedSpanTag:r().string,signInMessage:r().string,siteUserName:r().string,spectraUrl:r().string,truncateLines:r().number,unlikeActionErrorMessage:r().string,upvoteIcon:r().string,upvoteIconFilled:r().string,useVoteLabels:r().bool,user:r().shape({amguuid:r().string,isAuthenticated:r().bool.isRequired}).isRequired,usernameSignInDek:r().string,enableRepliesMarketRestriction:r().bool,repliesMarketRestrictedTooltip:r().string,isSubscribed:r().bool,subscriptionUrl:r().string,subscriptionModalProps:r().object};const ht=(0,v.Ng)(null,{setCommentCount:e=>({type:"SET_KEY",key:"comments.commentCount",value:e}),setIsCommentLoading:e=>({type:"SET_KEY",key:"comments.isCommentLoading",value:e})})(bt);var yt=o(25965),ft=o(83108);const wt=(0,E.defineMessages)({defaultcommunityReviewText:{id:"ReviewNotesForm.defaultcommunityReviewText",defaultMessage:"Ask a question or leave a helpful tip, suggestion or opinion that is relevant and respectful for the community.",description:"Appears when the form is minimised or maximised and enableCommunityExperience is true"},nonLoggedInErrorMessage:{id:"ReviewForm.nonLoggedInErrorMessage",defaultMessage:"Sign in or create an account to add comment.",description:"Message to display non logged in users"},textFieldLabel:{id:"ReviewNotesForm.textFieldLabel",defaultMessage:"Your Review",description:"The label for the main review text field"},addNoteLabel:{id:"ReviewNotesForm.addNoteLabel",defaultMessage:"Add comment",description:"The label for Add Comment submit button"},cancelNoteLabel:{id:"ReviewNotesForm.cancelNoteLabel",defaultMessage:"Discard",description:"The label for cancel button"},reviewerInfoFieldLabel:{id:"ReviewNotesForm.ReviewerInfoFieldLabel",defaultMessage:"Commenting as:",description:"The label for the reviewer name field"},reviewerRatingLabel:{id:"ReviewNotesForm.ReviewerRatingLabel",defaultMessage:"Rate this",description:"The label for the reviewer rating field"},reviewerFieldInfoIconText:{id:"ReviewNotesForm.reviewerFieldInfoIconText",defaultMessage:"Your username appears next to your comments and replies. Change it anytime in your Account.",description:"information text for user to change their user name"},reviewerFieldWithLocationInfoIconText:{id:"ReviewNotesForm.reviewerFieldWithLocationInfoIconText",defaultMessage:"Your username and location appear next to your comments and replies. Change them anytime in your Account.",description:"information text for user to change their user name and location when both exist"},locationFieldInfoIconText:{id:"ReviewNotesForm.locationFieldInfoIconText",defaultMessage:"Your location appears next to your comments and replies. Change it anytime in your Account.",description:"information text for user to change their location"},reviewerStoryScoreIconButtonLabel:{id:"ReviewNotesForm.reviewerStoryScoreIconButtonLabel",defaultMessage:"user score message",description:"Label for reviewer score message icon"},ratingFieldInfoIconText:{id:"ReviewNotesForm.ratingFieldInfoIconText",defaultMessage:"You can add a score to an album or track only once, but you can still leave a comment or review afterward.",description:"information text for user about rating limitations"},reviewerInfoIconButtonLabel:{id:"ReviewNotesForm.reviewerInfoIconButtonLabel",defaultMessage:"user name update message",description:"Label for reviewer user name update message icon"},reviewTagsLabel:{id:"ReviewNotesForm.reviewTagsLabel",defaultMessage:"TAG YOUR COMMENT (OPTIONAL)",description:"Label for adding tags"},reviewTags:{id:"FilterComponent.reviewTags",defaultMessage:"{reviewTag}",description:"Value for the tag"},invalidReviewLength:{id:"ReviewNotesForm.invalidReviewNoteLength",defaultMessage:"Enter {min} characters or more to add a comment.",description:"Error message for invalid review comment length"},requiredField:{id:"ReviewNotesForm.requiredField",defaultMessage:"Select a star rating to add a comment",description:"Error message for required field"},invalidNumericRatingRange:{id:"ReviewNotesForm.invalidNumericRatingRange",defaultMessage:"Rating must be between 0.1 and 10",description:"Error message for numeric rating out of range"},numericRatingPlaceholder:{id:"ReviewNotesForm.numericRatingPlaceholder",defaultMessage:"Enter a number between 0.1 and 10",description:"Placeholder text for numeric rating input field"},maxCharLimitMet:{id:"ReviewNotesForm.maxCharLimitMet",defaultMessage:"_MAX_ character limit met",description:"Warning message for max review comment length"},remainingMaxCharLimit:{id:"ReviewNotesForm.remainingMaxCharLimit",defaultMessage:"_COUNT_ of _MAX_ character limit remaining",description:"Warning message for invalid review comment length"},buttonLabel:{id:"ReviewNotesForm.buttonLabel",defaultMessage:"Sign in or create account",description:"Text for the sign in or create account button"},AddNoteFailedToastMessage:{id:"ReviewNotes.AddNoteFailedToastMessage",defaultMessage:"Unable to add your comment. Please try again.",description:"Failure message to show on comment save"},countryDropdownLabel:{id:"ReviewNotesForm.countryDropdownLabel",defaultMessage:"Location",description:"Label for country dropdown"},countryDropdownPlaceholder:{id:"ReviewNotesForm.countryDropdownPlaceholder",defaultMessage:"Select location",description:"Placeholder text for country dropdown"},requiredCountryField:{id:"ReviewNotesForm.requiredCountryField",defaultMessage:"Please Select location to add a comment",description:"Error message for required country dropdown field"},reviewerStoryScoreFieldLabel:{id:"ReviewNotesForm.ReviewerStoryScoreFieldLabel",defaultMessage:"Score Added:",description:"The label for the reviewer story score field"},reviewerStoryScoreInfoText:{id:"ReviewNotesForm.reviewerStoryScoreInfoText",defaultMessage:"You've already rated this album, but you can still leave a review.",description:"information text for showing the score he already added"},subscribeText:{id:"ReviewNotesForm.subscribeText",defaultMessage:"Subscribe",description:"Text for the subscribe link"},subscriptionLockActionText:{id:"ReviewNotesForm.subscriptionLockActionText",defaultMessage:"to add comments",description:"Text that appears after the Subscribe link"}});var vt=o(63208),Ct=o(12301),Rt=o(97927),Et=o(60434),Lt=o(14952),Mt=o(18161),It=o(79499);const Tt=(0,T.Ay)(N.default.MultiLine).withConfig({displayName:"ReviewNoteTextField"})`
margin-bottom: 0;
textarea:disabled {
background-color: transparent;
}
`,St=T.Ay.div.withConfig({displayName:"ReviewNoteFormWrapper"})``,xt=T.Ay.div.withConfig({displayName:"ReviewNoteSectionContainer"})`
border: 1px solid;
${({theme:e})=>(0,S._o)(e,"border-color","colors.interactive.base.light")};
padding: ${(0,S.Kq)(3)};
${({showTextFieldSoftRoundedEdges:e})=>e&&T.AH`
border-radius: 8px;
`};
${Et.vT} {
margin-top: 0;
padding: ${(0,S.Kq)(2)} ${(0,S.Kq)(1.5)};
${({showTextFieldSoftRoundedEdges:e})=>e&&T.AH`
border-radius: 8px;
`};
${({theme:e,hasError:t})=>t?(0,S._o)(e,"border-color","colors.interactive.base.brand-secondary"):(0,S._o)(e,"border-color","colors.interactive.base.black")};
}
${Et.vB} {
${({hasWarning:e})=>e&&`margin-bottom: ${(0,S.Kq)(1)};`}
}
${Et.vT}
[disabled] {
${({theme:e})=>(0,S._o)(e,"background","colors.interactive.base.white")};
${({theme:e})=>(0,S._o)(e,"border-color","colors.interactive.base.light")};
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.subhed")};
}
${Et.vT}::placeholder {
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.light")};
}
`,kt=T.Ay.div.withConfig({displayName:"ReviewNoteUserInfoWrapper"})``,$t=T.Ay.div.withConfig({displayName:"ReviewNoteUserInfo"})`
margin-bottom: ${(0,S.Kq)(4)};
`,Nt=T.Ay.div.withConfig({displayName:"ReviewNoteRatingWrapper"})`
margin-top: ${(0,S.Kq)(1)};
margin-bottom: ${(0,S.Kq)(4)};
${Et.tw} {
${({showTextFieldSoftRoundedEdges:e})=>e&&T.AH`
border-radius: 8px;
`}
}
`,Ut=T.Ay.span.withConfig({displayName:"ReviewerInfoLabel"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body-deemphasized")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
`,At=T.Ay.span.withConfig({displayName:"ReviewerRatingLabel"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
`,Bt=T.Ay.span.withConfig({displayName:"ReviewerInfo"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
padding-left: ${(0,S.Kq)(.5)};
`,_t=T.Ay.span.withConfig({displayName:"ReviewTagsInfoLabel"})`
${({theme:e})=>(0,S._o)(e,"color","colors.consumption.body.standard.body")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
`,Kt=T.Ay.div.withConfig({displayName:"ReviewerInfoIconButtonWrapper"})`
display: inline;
svg {
width: 24px;
height: 24px;
${({theme:e})=>(0,S._o)(e,"fill","colors.consumption.lead.special.context-tertiary")};
}
.review-note-info-button {
float: inline-end;
margin: 0;
margin-top: 2px;
border: 0;
background-color: ${({theme:e})=>(0,S.HK)(e,"colors.interactive.base.white")};
padding: 0;
padding-left: 12px;
&:hover,
&:focus {
border: 0;
background: none;
}
}
`,qt=T.Ay.div.withConfig({displayName:"ReviewNotesToggleChipListWrapper"})`
${Mt.f} {
${(0,S.Gg)("typography.definitions.foundation.link-utility")}
&[aria-checked='false'] {
${({shouldUseInteractiveBrandColor:e,shouldUseFullOpacity:t})=>{if(e){const e=t?1:.1;return T.AH`
background-color: rgba(
${(0,S.HK)("colors.interactive.social.primary-hover",{rgbOnly:!0})},
${e}
);
`}return`${(0,S._o)("color","colors.interactive.base.black")}`}}
}
&:focus {
box-shadow: none;
}
&:hover {
box-shadow: 0 0 0 1px ${(0,S.HK)("colors.interactive.base.black")}
inset;
}
${(0,S.L7)($.LO.md)} {
&:focus,
&:hover {
box-shadow: none;
}
}
&:disabled {
box-shadow: none;
}
}
${Lt.OO} {
padding-bottom: 8px;
padding-left: 0;
}
`,Ht=(0,T.Ay)(k.vm).withConfig({displayName:"ReviewerInfoText"})`
position: absolute;
left: calc(25% - 10px);
float: inline-end;
z-index: -1;
border-radius: 8px;
box-shadow: 0 0 20px 12px rgba(0, 0, 0, 0.1);
background: white;
padding: 17px 22px;
width: 80%;
box-sizing: border-box;
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.dark")};
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.utility.input-core")};
${(0,S.H4)($.LO.sm)} {
padding: 12px 13px;
}
${(0,S.H4)($.LO.md)} {
padding: 17px 22px;
}
`,Ft=(0,T.Ay)(k.vm).withConfig({displayName:"ReviewerStoryScoreText"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.utility.assistive-text")};
margin-top: ${(0,S.Kq)(2)};
margin-bottom: ${(0,S.Kq)(3)};
color: ${(0,S.HK)("colors.interactive.base.border")};
`,Dt=T.Ay.span.withConfig({displayName:"ReviewerStoryScoreLabel"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.globalEditorial.accreditation-core")};
text-transform: uppercase;
color: ${(0,S.HK)("colors.consumption.body.standard.body-deemphasized")};
`,Ot=(0,T.Ay)(k.vm).withConfig({displayName:"CommunityGuidelinesInfo"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.utility.label")};
margin-top: ${(0,S.Kq)(2)};
color: ${(0,S.HK)("colors.consumption.body.standard.body-deemphasized")};
`,Pt=T.Ay.span.withConfig({displayName:"ReviewerStoryScoreValue"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.utility.input-core")};
margin-left: ${(0,S.Kq)(1)};
color: ${(0,S.HK)("colors.consumption.body.standard.body")};
`,jt=T.Ay.div.withConfig({displayName:"AlertArrow"})`
position: absolute;
top: auto;
bottom: 100%;
left: calc(98% - 11px);
border-width: 0 10px 13px;
border-style: solid;
border-color: rgb(254 254 254) transparent;
`,Gt=T.Ay.div.withConfig({displayName:"ReviewerInfoAlertToolTip"})`
position: relative;
top: 8px;
z-index: 2;
background-color: ${(0,S.HK)("colors.background.white")};
${(0,S.H4)($.LO.sm)} {
${Ht} {
left: calc(8% - 4px);
width: 100%;
}
${jt} {
left: calc(98% - 14px);
border-width: 0 8px 12px;
}
}
${(0,S.H4)($.LO.md)} {
${Ht} {
left: calc(25% - 10px);
width: 80%;
}
${jt} {
left: calc(98% - 12px);
border-width: 0 10px 13px;
}
}
${(0,S.H4)($.LO.lg)} {
${Ht} {
left: calc(7% - 10px);
width: 100%;
}
${jt} {
left: calc(98% - 14px);
border-width: 0 10px 13px;
}
}
${(0,S.H4)($.LO.xl)} {
${Ht} {
left: calc(25% - 10px);
width: 80%;
}
${jt} {
left: calc(98% - 11px);
border-width: 0 10px 13px;
}
}
${(0,S.H4)($.LO.xxl)} {
${Ht} {
left: calc(34% - 10px);
width: 70%;
}
${jt} {
left: calc(98% - 8px);
border-width: 0 10px 13px;
}
}
`,Vt=(0,T.Ay)(Ct.A).withConfig({displayName:"RatingFormRating"})`
align-items: start;
padding: ${(0,S.Kq)()} 0 ${(0,S.Kq)()};
${Rt.Ou} {
transform: scale(1.78);
margin: 0 ${(0,S.Kq)(1.25)};
}
`,Yt=T.Ay.div.withConfig({displayName:"ReviewNotesFormActions"})`
${(0,S.H4)($.LO.lg)} {
display: grid;
grid-template-columns: repeat(2, auto);
gap: 32px;
}
${(0,S.L7)($.LO.md)} {
display: flex;
flex-direction: column;
}
`,Wt=T.Ay.div.withConfig({displayName:"ReviewNotesDivider"})`
margin-top: ${(0,S.Kq)(2)};
border-bottom: 1px solid;
${(0,S._o)("border-color","colors.consumption.body.standard.divider")};
`,zt=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewFormSubmitButton"})`
${(0,S.Gg)("typography.definitions.utility.button-core")}
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.brand-primary")};
margin-top: 0.5rem;
margin-bottom: 20px;
padding: 15px 9px;
width: 100%;
max-width: 100%;
text-decoration: underline;
`,Xt=(0,T.Ay)(x.A.Primary).withConfig({displayName:"ReviewFormSubmitButton"})`
display: block;
margin-top: 0.5rem;
margin-bottom: 20px;
padding: 15px 9px;
width: 100%;
max-width: 100%;
height: unset;
text-align: center;
&:active::before {
top: 0;
left: 0;
}
`,Qt=(0,T.Ay)(Et.HG).withConfig({displayName:"ReviewFormTextFieldErrorText"})``,Jt=(0,T.Ay)(k.sH).withConfig({displayName:"ReviewNotesFormSignin"})``,Zt=T.Ay.div.withConfig({displayName:"ReviewNotesFormMinimised"})`
position: relative;
input.text-field__control {
cursor: pointer;
}
@media (max-width: 768px) {
textarea.text-field__control {
padding: ${(0,S.Kq)(2)};
}
}
@media (min-width: 768px) {
textarea.text-field__control {
padding: ${(0,S.Kq)(2)} ${(0,S.Kq)(3)};
}
}
textarea.text-field__control {
cursor: pointer;
overflow: auto;
overflow-y: hidden;
&::placeholder {
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.light")};
}
}
${Jt} {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
color: transparent;
}
`,eo=T.Ay.div.withConfig({displayName:"ReviewNotesImageUploadWrapper"})`
${U} {
${(0,S.L7)($.LO.lg)} {
margin-top: ${(0,S.Kq)(2)};
margin-bottom: ${(0,S.Kq)(.5)};
}
${(0,S.H4)($.LO.lg)} {
margin-top: ${(0,S.Kq)(3)};
margin-bottom: ${(0,S.Kq)(1.25)};
}
}
`,to=(0,T.Ay)(It.Ay.Searchable).withConfig({displayName:"ReviewNotesLocationDropdown"})`
margin-top: ${(0,S.Kq)(1)};
margin-bottom: ${(0,S.Kq)(2)};
.dropdown__control,
.dropdown__value-container {
border-radius: ${(0,S.Kq)()};
}
.dropdown__menu {
z-index: ${$.KV.persistentTopLayer};
}
`,oo=T.Ay.div.withConfig({displayName:"ReviewNotesSubscriptionLock"})`
display: flex;
align-items: center;
gap: ${(0,S.Kq)(1)};
border: 1px solid;
${({theme:e})=>(0,S._o)(e,"border-color","colors.interactive.base.light")};
border-radius: 999px;
cursor: pointer;
padding: ${(0,S.Kq)(1)} ${(0,S.Kq)(2)};
width: 100%;
.lock-background {
display: flex;
align-items: center;
justify-content: center;
border-radius: ${(0,S.Kq)(1)};
background: ${({theme:e})=>(0,S.HK)(e,"colors.background.light")};
width: ${(0,S.Kq)(4)};
height: ${(0,S.Kq)(4)};
}
&:hover {
${({theme:e})=>(0,S._o)(e,"border-color","colors.interactive.base.dark")};
}
`,io=T.Ay.span.withConfig({displayName:"ReviewNotesSubscriptionText"})`
${({theme:e})=>(0,S.Gg)(e,"typography.definitions.utility.input-core")};
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.base.dark")};
`,no=T.Ay.a.withConfig({displayName:"ReviewNotesSubscriptionLink"})`
${({theme:e})=>(0,S._o)(e,"color","colors.interactive.social.primary")};
text-decoration: underline;
`;var ao=o(87098);const ro=(e,t)=>o=>{o.preventDefault(),o.stopPropagation(),e(!t)},so=({ariaLabel:e,children:t,onMinimise:o,usernameSignInDek:i,trackAddNoteEvent:n,handleUsernameChange:a,siteUserName:r})=>{const l={type:"impression",label:"Create Username",subject:"username_modal",source_type:"community_comment"};return s.createElement(Zt,{role:"button",tabIndex:"0",onClick:e=>{n(),(e=>{r?o(e,r):void 0!==r&&((0,he.lV)(l),(0,Ie.Rf)({dangerousDek:i,successCallback:t=>{a(t),o(e,t)},source:"community_comment"}))})(e)},onKeyPress:o,"aria-label":e},t)};so.propTypes={ariaLabel:r().string.isRequired,children:r().node.isRequired,handleUsernameChange:r().func.isRequired,onMinimise:r().func.isRequired,siteUserName:r().string,trackAddNoteEvent:r().func,usernameSignInDek:r().string};const lo=e=>{const{className:t,addNoteFailedToastMessage:o,addNoteLabel:i,communityGuidelinesInfo:n,shouldEnableTags:a,reviewNoteTags:r=[],reviewerRatingLabel:d,shouldUseInteractiveBrandColor:c,validations:{min:m=5,max:u=3e3,remainingChar:g=100,errorMessage:p={}}={},usernameSignInDek:y,modalProps:f={},minimisedReviewNotesText:w,nonLoggedInErrorMessage:v,isMinimised:C=!0,reviewerInfoText:R,reviewerLocationInfoText:E,locationInfoText:L,signInURL:M,textFieldHeightPx:T,userId:S,handleUsernameChange:k,onSubmitHandler:$,reviewerInfoFieldLabel:U,reviewTagsLabel:A,siteUserName:B,siteUserLocation:_,showSavedRecipeNotes:K,shouldEnableOptionalRating:q,shouldEnableCommentsImageUpload:H,shouldEnableRatings:F,showMessageBannerHandler:D,shouldUseFullOpacity:O,userStoryRating:P,showTextFieldBoxShadow:j,showTextFieldRoundedEdges:G,showTextFieldSoftRoundedEdges:V,shouldUseNumericRatingInput:Y,shouldEnableLocationDropdown:W,isSubscribed:z=!0,subscriptionUrl:X="/subscribe",subscriptionLockActionText:Q,shouldShowRatingInfoAlert:J,shouldShowLocationInfoAlert:Z,shouldEnableMultipleRatings:ee,shouldTruncateComments:te}=e,oe=W&&!_,ie=W&&_;s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"ReviewNotesForm"})},[]);const ne=T?Math.round(T/16):12,re=(0,l.A)(),{minimised:se,setMinimised:le,isSignedIn:de,signInError:ce,setSignInError:me,isSubmitting:ue,setIsSubmitting:ge,formData:pe,setFormData:ye,errors:fe,setErrors:we,warningMessage:ve,setWarningMessage:Ce,shouldHideReviewerInfoAlert:Re,setShouldHideReviewerInfoAlert:Ee,shouldHideRatingInfoAlert:Me,setShouldHideRatingInfoAlert:Ie,shouldHideLocationDropdownInfoAlert:Te,setShouldHideLocationDropdownInfoAlert:Se,shouldHideReviewerStoryScoreAlert:xe,setShouldHideReviewerStoryScoreAlert:$e,tags:Ne,setTags:Ue,isReviewNoteModalOpen:Ae,setIsReviewNoteModalOpen:Be,isImageUploading:_e,setIsImageUploading:Ke}=((e,t,o,i,n)=>{const[a,r]=s.useState(e),[l,d]=s.useState(!1),[c,m]=s.useState(!1),[u,g]=(0,s.useState)(!1),[p,b]=(0,s.useState)(((e,t)=>({reviewNote:"",toggleChip:[],...e&&{rating:null},...t&&{location:null}}))(i,n)),[h,y]=(0,s.useState)({}),[f,w]=(0,s.useState)(""),[v,C]=(0,s.useState)(!0),[R,E]=(0,s.useState)(!0),[L,M]=(0,s.useState)(!0),[I,T]=(0,s.useState)(!0),[S,x]=(0,s.useState)(o||[]),[k,$]=(0,s.useState)(!1),[N,U]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{d(!!t)},[t]),{minimised:a,setMinimised:r,isSignedIn:l,signInError:c,setSignInError:m,isSubmitting:u,setIsSubmitting:g,formData:p,setFormData:b,errors:h,setErrors:y,warningMessage:f,setWarningMessage:w,shouldHideReviewerInfoAlert:v,setShouldHideReviewerInfoAlert:C,shouldHideRatingInfoAlert:R,setShouldHideRatingInfoAlert:E,shouldHideLocationDropdownInfoAlert:L,setShouldHideLocationDropdownInfoAlert:M,shouldHideReviewerStoryScoreAlert:I,setShouldHideReviewerStoryScoreAlert:T,tags:S,setTags:x,isReviewNoteModalOpen:k,setIsReviewNoteModalOpen:$,isImageUploading:N,setIsImageUploading:U}})(C,S,r,F,oe),qe=e=>((e,t,o,i,n,a=!1)=>({reviewNote:[{test:o=>o?a?o.length>=i:o.length>=i&&o.length<=n:e&&t,error:"invalidReviewLength"}],rating:[{test:i=>{if(null===i)return e&&t;const n=Number(i);return!isNaN(n)&&(o?n>=.1&&n<=10:n>=1&&n<=5)},error:o?"invalidNumericRatingRange":"requiredField"}]}))(q,F,e,m,u,te),He=w||re.formatMessage(wt.defaultcommunityReviewText),Fe=e=>{const t=Ne.map(t=>t.slug===e?{...t,active:!t.active}:t);return Ue(e=>(((e,t)=>{const o=e.filter(e=>e.active);if(0===o.length)return;if(!t.some((t,o)=>!t.active&&e[o].active))return;const i=1===o.length?o[0].description:"",n=o.map(({label:e})=>({name:e.toLowerCase(),index:0,total_index:1}));(0,he.Uw)({type:"select",label:i,subject:"community_comment",features_list:n},{skipDuplicateEvent:!1})})(t,e),t)),t},De=e=>{we(t=>{const{[e]:o,...i}=t;return i})},Oe=(e,t,o=!1)=>{const i=qe(o)[e];if(!i)return null;if(q&&F&&("rating"===e?null===t:!t))return De(e),null;for(const o of i)if(!o.test(t))return we(t=>({...t,[e]:o.error})),o.error;return De(e),null},Pe=()=>{const e=pe.reviewNote?.trim().length>=m;if(!F)return e;const t=null!==pe.rating&&void 0!==pe.rating&&((e,t)=>{const o=Number(e);return!isNaN(o)&&(t?o>=.1&&o<=10:o>=1&&o<=5)})(pe.rating,Y);return e||t},je=e=>(t,o)=>{let i;switch(e){case"reviewNote":i=t.target.value.trim(),n=i,te||(n.length>=u?Ce(re.formatMessage(wt.maxCharLimitMet).replace("_MAX_",u)):u-n.length<=g?Ce(re.formatMessage(wt.remainingMaxCharLimit).replace("_COUNT_",u-n.length).replace("_MAX_",u)):Ce(""));break;case"toggleChip":i=Fe(t);break;case"rating":{const e=void 0!==o?o:t?.target?.value||t;i=null===e?null:Number(e);break}case"location":i=t?.value;break;default:i=t}var n;ye({...pe,[e]:i}),"reviewNote"===e&&i.length{{const e={type:"attempt",subject:"community_comment"};(0,he.Uw)(e,{skipDuplicateEvent:!1})}},Ve=(0,s.useRef)(null),Ye=(0,s.useRef)(null),We=(0,s.useRef)(null),ze=(0,s.useRef)(null),Xe=(0,s.useRef)(null),Qe=s.useRef(null),Je=(e,t)=>{e.preventDefault(),t&&le(!1),K(!1)};(0,ao.j)(Ve,()=>Ee(!0)),(0,ao.j)(Ye,()=>Se(!0)),(0,ao.j)(We,()=>Ie(!0)),(0,ao.j)(Xe,()=>$e(!0)),(0,ao.j)(ze,e=>{Ve.current&&!Ve.current.contains(e.target)&&Ee(!0),ze.current&&ze.current.id!==e.target?.firstChild.id&&me(!1)});const Ze=ro(Ee,Re),ot=ro(Ie,Me),it=ro(Se,Te),nt=()=>{Object.values(pe).some(e=>(!Array.isArray(e)||0!==e.length)&&Boolean(e))?Be(!0):(le(!0),we({}))},{discardLabel:at="Yes, discard it"}=f||{},rt=()=>{Qe.current.value="",Ue(r),ye({reviewNote:"",toggleChip:[],...F&&{rating:null},...oe&&{location:null}}),we({}),le(!0),Be(!1),Ce("")},st=()=>{if(!q)return!1;const e=pe.reviewNote?.trim().length>0,t=null!==pe.rating&&void 0!==pe.rating;return!(e||t)},lt=async()=>{ge(!0);const e=(e=>{const t=Object.entries(e).reduce((e,[t,o])=>{const i=Oe(t,o,Y);return i&&(e[t]=i),e},{});return q&&F&&!Pe()&&(e.reviewNote?.trim()||(t.reviewNote="invalidReviewLength"),e.rating||(t.rating="requiredField")),t})(pe);if(0===Object.keys(e).length){const e={...pe,userId:S};null!=await $(e)?(rt(),K(!0)):D&&D(o||re.formatMessage(wt.AddNoteFailedToastMessage))}ge(!1)},dt=()=>{rt(),(()=>{{const e={type:"discard",label:at.toUpperCase(),subject:"community_comment"};(0,he.Uw)(e,{skipDuplicateEvent:!1})}})()},ct=(e,t)=>{const o=e[t];if(!o)return"";const i=p[o];return i?i.replace("_MIN_",m):re.formatMessage(wt[o],{min:m||5})},mt=()=>s.createElement(s.Fragment,null,B&&s.createElement(kt,null,s.createElement(Ut,null,U||re.formatMessage(wt.reviewerInfoFieldLabel)),s.createElement(Bt,null,B),s.createElement(Kt,{ref:Ve},s.createElement(x.A.Utility,{isIconButton:!0,ButtonIcon:yt.A,className:"review-note-info-button",onClickHandler:e=>Ze(e),inputKind:"button",role:"button",label:re.formatMessage(wt.reviewerInfoIconButtonLabel)}),!Re&&s.createElement(Gt,null,s.createElement(jt,null),s.createElement(Ht,null,_?E??re.formatMessage(wt.reviewerFieldWithLocationInfoIconText):R??re.formatMessage(wt.reviewerFieldInfoIconText))))),ie&&s.createElement(kt,null,s.createElement(Ut,null,re.formatMessage(wt.countryDropdownLabel),":"),s.createElement(Bt,null,tt(_)))),ut=()=>s.createElement(s.Fragment,null,s.createElement(kt,null,s.createElement(Dt,null,re.formatMessage(wt.reviewerStoryScoreFieldLabel)),s.createElement(Pt,null,P),s.createElement(Kt,{ref:Xe},s.createElement(x.A.Utility,{isIconButton:!0,ButtonIcon:yt.A,className:"review-note-info-button",onClickHandler:e=>(e=>{e.preventDefault(),$e(!xe)})(e),inputKind:"button",role:"button",label:re.formatMessage(wt.reviewerStoryScoreIconButtonLabel)}),!xe&&s.createElement(Gt,null,s.createElement(jt,null),s.createElement(Ht,null,re.formatMessage(wt.ratingFieldInfoIconText))))),s.createElement(Wt,null),s.createElement(Ft,null,re.formatMessage(wt.reviewerStoryScoreInfoText))),gt=ct(fe,"reviewNote"),pt=ve.length>0,bt=e=>{e?.data?.[0]?.filePath&&ye(t=>({...t,images:[{id:e?.data?.[0]?.filePath,url:e?.data?.[0]?.encodedURI}]}))},ht=e=>{Ke(e)},Ct=Q||re.formatMessage(wt.subscriptionLockActionText),Rt=s.useMemo(()=>({label:`${re.formatMessage(wt.subscribeText)} ${Ct}`,subject:"community_subscribe",source:(0,I.el)(X)}),[Ct,X,re]);(0,h.ol)(`.${Le.i7.SUBSCRIPTION_LOCK}`,void 0,(e,t)=>{e&&!z&&((0,I.cj)(Rt,"impression"),t())},[X,z,Rt]);const Et=()=>s.createElement(Nt,{showTextFieldSoftRoundedEdges:V},s.createElement(kt,null,s.createElement(At,null,d??re.formatMessage(wt.reviewerRatingLabel)),s.createElement(Kt,{ref:We},J&&s.createElement(x.A.Utility,{isIconButton:!0,ButtonIcon:yt.A,className:"review-note-info-button",onClickHandler:e=>ot(e),inputKind:"button",role:"button",label:re.formatMessage(wt.reviewerInfoIconButtonLabel)}),!Me&&s.createElement(Gt,null,s.createElement(jt,null),s.createElement(Ht,null,re.formatMessage(wt.ratingFieldInfoIconText))))),Y?s.createElement(N.default,{name:"rating",formName:"rating",placeholder:"0.0",isNumericInput:!0,onInputChange:je("rating"),isDisabled:ue,hasRoundedEdges:G,errorPosition:"hideError",hideLabel:!0}):s.createElement(Vt,{averageRatingCount:pe.rating,isRatingDisabled:!1,onChange:je("rating"),shouldShowOutline:!1}),((e,t)=>Object.keys(e).length>0&&s.createElement(Qt,null,ct(e,t)))(fe,"rating"));return s.createElement(St,{className:t,"data-testid":"ReviewNotesForm"},de&&(se?z?s.createElement(so,{ariaLabel:He,onMinimise:Je,signInURL:M,isSignedIn:de,trackAddNoteEvent:Ge,handleUsernameChange:k,siteUserName:B,usernameSignInDek:y},s.createElement(Tt,{name:"isMinimised",formName:"isMinimised",label:re.formatMessage(wt.textFieldLabel),placeholder:He,hasDynamicTextArea:!0,hasBoxShadow:j,hasRoundedEdges:G,tabIndex:"-1","aria-hidden":!0,customHeightMultiplier:ne,hideLabel:!0,isInvalid:ce,inputRef:ze,isDisabled:ce}),ce&&s.createElement(Qt,null,v||re.formatMessage(wt.nonLoggedInErrorMessage))):s.createElement(oo,{className:Le.i7.SUBSCRIPTION_LOCK},s.createElement("div",{className:"lock-background"},s.createElement(vt.A,null)),s.createElement(io,null,s.createElement(no,{href:X,target:"_blank",rel:"noopener noreferrer",onClick:()=>(0,I.cj)(Rt,"click")},re.formatMessage(wt.subscribeText))," ",Ct)):s.createElement(xt,{hasError:!!gt,hasWarning:pt,showTextFieldSoftRoundedEdges:V},P&&ut(),s.createElement(N.default.MultiLine,{name:"reviewNoteText",placeholder:He,hideLabel:!0,label:re.formatMessage(wt.textFieldLabel),formName:"reviewNoteText",hasAutoFocus:!0,hasRoundedEdges:G,inputRef:Qe,errorText:gt,onInputChange:je("reviewNote"),max:te?1/0:u,errorPosition:"belowTextField",shouldDisableTypingAtMaxChar:!0,isDisabled:ue}),pt&&s.createElement(Qt,null,ve),H&&s.createElement(eo,null,s.createElement(be,{onFileChange:bt,onUploadStatusChange:ht,id:"review-note-image-upload",product:"commenting"})),a&&s.createElement(s.Fragment,null,s.createElement(_t,null,A||re.formatMessage(wt.reviewTagsLabel)),s.createElement(qt,{shouldUseInteractiveBrandColor:c,shouldUseFullOpacity:O},s.createElement(ft.A,null,Ne&&0!==Ne.length?Ne.map(({slug:e,active:t,description:o})=>s.createElement(ke.A,{key:e,isChecked:t,onChange:()=>je("toggleChip")(e),shouldUrlRedirect:!1,isDisabled:ue},re.formatMessage(wt.reviewTags,{reviewTag:o}))):null))),((e,t,o)=>!(!e||!t&&o))(F,ee,P)&&Et(),oe&&s.createElement(s.Fragment,null,s.createElement(kt,null,s.createElement(_t,null,re.formatMessage(wt.countryDropdownLabel)),s.createElement(Kt,{ref:Ye},Z&&s.createElement(x.A.Utility,{isIconButton:!0,ButtonIcon:yt.A,className:"review-note-info-button",onClickHandler:e=>it(e),inputKind:"button",role:"button",label:re.formatMessage(wt.reviewerInfoIconButtonLabel)}),!Te&&s.createElement(Gt,null,s.createElement(jt,null),s.createElement(Ht,null,L??re.formatMessage(wt.locationFieldInfoIconText))))),s.createElement(to,{assistiveLabel:"",options:et.A,onInputChange:je("location"),placeholderText:re.formatMessage(wt.countryDropdownPlaceholder),isDisabled:ue,isClearable:!0,hideLabel:!0})),mt(),s.createElement($t,null,s.createElement(Wt,null),n&&s.createElement(Ot,{dangerouslySetInnerHTML:{__html:n}})),s.createElement(ae,{confirmButtonCallback:dt,modalProps:f,onClose:()=>Be(!1),isVisible:Ae}),s.createElement(Yt,{"data-testid":"ReviewNotesFormActions"},s.createElement(Xt,{isDisabled:ue||_e||Object.keys(fe).length>0||st(),inputKind:"button",label:i||re.formatMessage(wt.addNoteLabel),onClickHandler:lt}),s.createElement(zt,{isDisabled:ue,btnStyle:"text",inputKind:"link",type:"button",label:re.formatMessage(wt.cancelNoteLabel),onClickHandler:nt})))))};lo.propTypes={addNoteFailedToastMessage:r().string,addNoteLabel:r().string,className:r().string,communityGuidelinesInfo:r().string,handleUsernameChange:r().func,isMinimised:r().bool,isSubscribed:r().bool,locationInfoText:r().string,minimisedReviewNotesText:r().string,modalProps:r().object,nonLoggedInErrorMessage:r().string,onSubmitHandler:r().func,reviewerInfoFieldLabel:r().string,reviewerInfoText:r().string,reviewerLocationInfoText:r().string,reviewerRatingLabel:r().string,reviewNoteTags:r().array,reviewTagsLabel:r().string,shouldEnableCommentsImageUpload:r().bool,shouldEnableLocationDropdown:r().bool,shouldEnableMultipleRatings:r().bool,shouldEnableOptionalRating:r().bool,shouldEnableRatings:r().bool,shouldEnableTags:r().bool,shouldTruncateComments:r().bool,shouldShowLocationInfoAlert:r().bool,shouldShowRatingInfoAlert:r().bool,shouldUseFullOpacity:r().bool,shouldUseInteractiveBrandColor:r().bool,shouldUseNumericRatingInput:r().bool,showMessageBannerHandler:r().func,showSavedRecipeNotes:r().func,showTextFieldBoxShadow:r().bool,showTextFieldRoundedEdges:r().bool,showTextFieldSoftRoundedEdges:r().bool,signInURL:r().string,siteUserLocation:r().string,siteUserName:r().string,subscriptionUrl:r().string,subscriptionLockActionText:r().string,textFieldHeightPx:r().number,usernameSignInDek:r().string,userId:r().string,userStoryRating:r().number,validations:r().shape({errorMessage:r().shape({requiredField:r().string,requiredCountryField:r().string,invalidReviewLength:r().string}),max:r().number,min:r().number,remainingChar:r().number})};const co=e=>s.createElement(lo,{...e}),mo=(0,i.y)(co,"ReviewNotesForm"),uo=({commentingUrl:e,contentId:t,contentTitle:o="",handleUsernameChange:i,handleLocationUpdate:n,hed:a,organizationId:r,ratingScale:l,reviewerInfoText:d,reviewerLocationInfoText:c,locationInfoText:m,reviewNoteTags:u,shouldEnableCommentsImageUpload:g,shouldEnableLocationDropdown:p,shouldEnableMultipleComments:b,shouldEnableMultipleRatings:h,shouldEnableOptionalRating:y,shouldEnableRatings:f,shouldEnableTags:w,showMessageBannerHandler:v,showSavedRecipeNotes:C,signInURL:R,siteUserName:E,siteUserLocation:L,tenantID:I,userId:T,usernameSignInDek:S,shouldUseFullOpacity:x,isSubscribed:k=!0,subscriptionUrl:$="/subscribe",subscriptionLockActionText:N,userStoryRating:U,shouldTruncateComments:A=!1})=>{const[B,_]=(0,s.useState)("");(0,s.useEffect)(()=>{const e=window.location.origin+window.location.pathname;_(e)},[]);const K=(e,t,o)=>{{const i={type:"submit",label:"add note",rating:t,subject:"community_comment",features_list:o};e&&(i.error=e),(0,he.Uw)(i,{skipDuplicateEvent:!1})}};return s.createElement(mo,{shouldUseFullOpacity:x,handleUsernameChange:i,onSubmitHandler:async i=>{let s,d;const c={hed:a,storyLink:B},{reviewNote:m,rating:u,userId:g,toggleChip:p,images:y,location:f}=i||{},w=p?.filter(e=>e.slug&&e.active)||[],v=w.map(e=>e.slug),C=w.map(e=>({name:e.label.toLowerCase(),index:0,total_index:1})),R={review:{storyID:t,siteID:r,body:m,meta:JSON.stringify(c),rating:u,ratingScale:l,reviewTags:v,tenantID:I,...f&&f.trim()&&{location:f},...y&&y.length>0&&{images:y}},clientMutationId:"0",enableMultipleRatings:h,enableMultipleComments:b},E=g;try{await(0,M._u)({id:t,title:o,organizationId:r,commentingUrl:e,console}),s=await(0,M.kD)(R,E,e,console),s&&f&&n&&n(f),K(null,u,C)}catch(e){d=e.message||"",K(d,u,C)}return s},reviewerInfoText:d,reviewerLocationInfoText:c,locationInfoText:m,reviewNoteTags:u,shouldEnableOptionalRating:y,shouldEnableRatings:f,shouldEnableTags:w,shouldEnableCommentsImageUpload:g,shouldEnableLocationDropdown:p,showMessageBannerHandler:v,showSavedRecipeNotes:C,signInURL:R,siteUserName:E,siteUserLocation:L,userId:T,usernameSignInDek:S,isSubscribed:k,subscriptionUrl:$,subscriptionLockActionText:N,userStoryRating:U,shouldEnableMultipleRatings:h,shouldTruncateComments:A})};uo.propTypes={commentingUrl:r().string,contentId:r().string,contentTitle:r().string,handleLocationUpdate:r().func,handleUsernameChange:r().func.isRequired,hed:r().string,isSubscribed:r().bool,locationInfoText:r().string,organizationId:r().string,ratingScale:r().number,reviewerInfoText:r().string,reviewerLocationInfoText:r().string,reviewNoteTags:r().array,shouldEnableCommentsImageUpload:r().bool,shouldEnableLocationDropdown:r().bool,shouldEnableMultipleComments:r().bool,shouldEnableMultipleRatings:r().bool,shouldEnableOptionalRating:r().bool,shouldEnableRatings:r().bool,shouldEnableTags:r().bool,shouldTruncateComments:r().bool,shouldUseFullOpacity:r().bool,showMessageBannerHandler:r().func,showSavedRecipeNotes:r().func.isRequired,signInURL:r().string,siteUserLocation:r().string,siteUserName:r().string,subscriptionUrl:r().string,subscriptionLockActionText:r().string,tenantID:r().string,userId:r().string,usernameSignInDek:r().string,userStoryRating:r().number};const go=uo,po=(0,E.defineMessages)({hed:{id:"UserNameModal.Hed",defaultMessage:"Create username",description:"UserNameModal component hed text"},dek:{id:"UserNameModal.Dek",defaultMessage:"Your username will appear next to any comments and replies you add.",description:"UserNameModal component description text"},submitButtonLabel:{id:"UserNameModal.SubmitButtonLabel",defaultMessage:"Save Username",description:"UserNameModal component submit button label"},submitButtonLabelComment:{id:"UserNameModal.SubmitButtonLabelComment",defaultMessage:"Save and add comment",description:"UserNameModal component submit button label for comment"},submitButtonLabelReply:{id:"UserNameModal.SubmitButtonLabelReply",defaultMessage:"Save and add reply",description:"UserNameModal component submit button label for reply"},closeButtonLabel:{id:"UserNameModal.CloseButtonLabel",defaultMessage:"Close User Name",description:"UserNameModal component close button label"},lengthError:{id:"UserNameModal.lengthError",defaultMessage:"Usernames must be between 2 and 23 characters.",description:"UserNameModal component length error"},specialCharError:{id:"UserNameModal.specialCharError",defaultMessage:"Usernames can only include letters, numbers and underscores (_).",description:"UserNameModal component special chars validation error"},alreadyTakenError:{id:"UserNameModal.alreadyTakenError",defaultMessage:"This username is already taken",description:"UserName already taken error"},userNameModalAssistiveText:{id:"UserNameModal.UserNameModalAssistiveText",defaultMessage:"Usernames must be between 2 and 23 characters and can only include letters, numbers and underscores (_).",description:"UserNameModal Assistive Text"},errorMessage:{id:"UserNameModal.ErrorMessage",defaultMessage:"Unable to save username. Please try again.",description:"UserNameModal default error message"},successMessage:{id:"UserNameModal.SuccessMessage",defaultMessage:"Username saved",description:"UserNameModal success message"}}),bo=(0,T.Ay)(k.vm).withConfig({displayName:"UserNameModalHed"})`
padding-top: ${(0,S.Kq)(2.5)};
padding-bottom: ${(0,S.Kq)(2.5)};
text-align: center;
`;bo.defaultProps={as:"div",colorToken:"colors.discover.body.white.heading",topSpacing:1,typeIdentity:"typography.definitions.consumptionEditorial.display-small"};const ho=T.Ay.p.withConfig({displayName:"UserNameModalDek"})`
${(0,S.Gg)("typography.definitions.consumptionEditorial.body-core")}
margin: 0;
text-align: center;
color: ${(0,S.HK)("colors.consumption.body.standard.body")};
`,yo=(0,T.Ay)(x.A.Utility).withConfig({displayName:"UserNameModalCloseButton"})`
position: absolute;
top: ${(0,S.Kq)(1)};
right: ${(0,S.Kq)(1)};
padding: 0;
fill: ${(0,S.HK)("colors.discovery.body.light.context-tertiary")};
.icon-close {
padding: 8px;
}
&,
&:focus,
&:hover {
border: 0;
background-color: transparent;
}
`,fo=(0,T.Ay)(x.A.Primary).withConfig({displayName:"UserNameModalSubmit"})`
margin-top: 0;
padding: 0;
`,wo=T.Ay.div.withConfig({displayName:"UserNameModalButtons"})`
display: flex;
justify-content: center;
margin-top: ${(0,S.Kq)(4)};
@media (max-width: ${$.LO.md}) {
margin-top: ${(0,S.Kq)(3)};
}
width: 100%;
${fo} {
padding: 0;
width: 100%;
}
`;function vo({className:e,...t}){const o=`${e}__content`,i=`${e}__overlay`;return s.createElement(z(),{portalClassName:e,className:o,overlayClassName:i,...t})}vo.propTypes={className:r().string};const Co=(0,T.Ay)(vo).withConfig({displayName:"UserNameModalBaseWrapper"})`
&__overlay {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: ${$.KV.interstitialLayer};
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0
);
&.ReactModal__Overlay--after-open {
transition: background-color 750ms;
opacity: 1;
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0.4
);
}
&.ReactModal__Overlay--after-close {
transition: background-color 750ms;
background-color: rgba(
${(0,S.HK)("colors.background.black",{rgbOnly:!0})},
0
);
}
}
&__content {
position: relative;
top: 50%;
left: 50%;
transform: translateY(-50%) translateX(-50%);
border-radius: 8px;
background-color: ${(0,S.HK)("colors.background.white")};
padding-top: ${(0,S.Kq)(12)};
padding-right: ${(0,S.Kq)(6)};
padding-bottom: ${(0,S.Kq)(7)};
padding-left: ${(0,S.Kq)(6)};
width: ${(0,S.Kq)(57)};
min-height: ${(0,S.Kq)(62)};
overflow-y: auto;
@media (max-width: ${$.LO.md}) {
width: 90%;
}
}
`,Ro=(0,T.Ay)(N.default.SingleLine).withConfig({displayName:"UserNameModalTextFieldWrapper"})`
${Et.tw} {
margin-top: ${(0,S.Kq)(6)};
${(0,S.Gg)("typography.definitions.globalEditorial.accreditation-feature")};
${(0,S._o)("color","colors.interactive.base.body")};
@media (max-width: ${$.LO.md}) {
margin-top: ${(0,S.Kq)(4)};
}
}
`,Eo=({className:e,dangerousDek:t,dangerousHed:o,isVisible:i=!1,maxLength:n=23,minLength:a=2,organizationId:r,showMessageBannerHandler:c,submitButtonLabel:m,successCallback:u,userApiUrl:g,userId:p,source:h,isFeatured:y,usernameModalConf:f})=>{s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"UserNameModal"})},[]);const{formatMessage:w}=(0,l.A)(),[v,C]=(0,s.useState)(""),[R,E]=(0,s.useState)(""),L={lengthError:w(po.lengthError),specialCharError:w(po.specialCharError)};return s.createElement(Co,{className:e,isOpen:i},s.createElement(yo,{isIconButton:!0,ariaLabel:w(po.closeButtonLabel),label:w(po.closeButtonLabel),role:"button",onClickHandler:()=>{(0,Ie.hY)(),(0,he.lV)({type:"exit",subject:"username_modal",source_type:h,...(0,I.i3)(y)}),C(null)},ButtonIcon:V.A}),s.createElement(bo,null,o||w(po.hed)),s.createElement(ho,{dangerouslySetInnerHTML:{__html:t||w(po.dek)}}),s.createElement(Ro,{className:"user-name-modal",hasAutoFocus:!0,shouldUseUppercase:!0,name:"username",placeholder:"YOUR_USERNAME",type:"text",onInputChange:e=>{let{value:t}=e.target;t.length>n&&(t=t.slice(0,n),e.target.value=t),E(t)},errorText:v,isInvalid:!!v,formName:"username",errorPosition:"belowTextField",hideLabel:!0,label:w(po.hed),assistiveSubtext:w(po.userNameModalAssistiveText)}),s.createElement(wo,null,s.createElement(fo,{label:m||("community_comment"===h?f?.submitButtonLabel?f.submitButtonLabel:w(po.submitButtonLabelComment):w("community_reply"===h?po.submitButtonLabelReply:po.submitButtonLabel)),inputKind:"submit","data-testid":"UserNameModalSubmit",onClickHandler:async()=>{let e;const t=(0,d.tf)(R,{minLength:a,maxLength:n});if(t){return void C(L[t]??"")}let o;try{o=await(0,d.Zc)({name:R,organizationId:r,userId:p,url:g},console),E(o),C(null),c&&c(w(po.successMessage)),(0,Ie.hY)(),u&&u(o)}catch(t){"already_taken"===t?.message?(C(w(po.alreadyTakenError)),e=t?.message):(c&&c(w(po.errorMessage)),(0,Ie.hY)(),e=po.errorMessage.defaultMessage)}const i={type:"submit",label:"SAVE USERNAME",subject:"username_modal",source_type:h,error:e,...(0,I.i3)(y)};(0,he.lV)(i)}})))};Eo.propTypes={className:r().string,dangerousDek:r().string,dangerousHed:r().string,isFeatured:r().bool,isVisible:r().bool,maxLength:r().number,minLength:r().number,organizationId:r().string.isRequired,showMessageBannerHandler:r().func,source:r().string,submitButtonLabel:r().string,successCallback:r().func,userApiUrl:r().string.isRequired,userId:r().string.isRequired,usernameModalConf:r().object};const Lo=(0,i.y)(Eo,"UserNameModal"),Mo=(0,v.Ng)(e=>{const{userNameModalConfig:t}=e;return{...t}})(Lo);var Io=o(78372);const To=({dek:e,hed:t,isBookmarkingEnabled:o,subContentDek:i,showCommentSavedMessage:n,showSignInButton:a,signInURL:r,commentMessageBannerIcon:d,hideDivider:c,shouldUseSeparateCTAs:m=!1,subscriptionUrl:u="/subscribe"})=>{const{formatMessage:g}=(0,l.A)(),p=(e,t)=>{const o={type:"login",label:t,subject:"community",placement:"interstitial",state:"focused",paywall_source:e};(0,he.ZL)(o)};return(0,h.ol)(`.${Le.i7.SUBSCRIBE_BUTTON}`,void 0,(e,t)=>{a&&m&&e&&((0,I.cj)({source:(0,I.el)(u),subject:"community_subscribe",label:g(ct.A.subscribeButtonLabel)},"impression"),t())},[u,a,m]),s.createElement(ut.M1,{hasSideBorder:n,hideDivider:c},d&&s.createElement(ut.Jq,{className:"comment-message-banner-icon",dangerouslySetInnerHTML:{__html:d}}),s.createElement(ut.vw,null,t),e&&s.createElement(ut.yt,{dangerouslySetInnerHTML:{__html:e}}),n&&s.createElement(ut.yt,{dangerouslySetInnerHTML:{__html:i}}),a&&m&&s.createElement(ut.WN,null,s.createElement(x.A.Primary,{href:u,inputKind:"link",label:g(ct.A.subscribeButtonLabel),target:"_blank",rel:"nofollow noreferrer",onClickHandler:e=>{(0,I.cj)({label:e.target.innerText,subject:"community_subscribe",source:(0,I.el)(u)},"click")},className:Le.i7.SUBSCRIBE_BUTTON}),s.createElement(ut.VV,{href:r,onClick:e=>{p("COMMUNITY_LOGIN",e.target.innerText)}},g(ct.A.orSignInLabel))),a&&!m&&s.createElement(x.A.Primary,{href:r,inputKind:"link",label:g(ct.A.signInButtonLabel),target:"_self",rel:"nofollow noreferrer",onClickHandler:e=>{p("COMMUNITY_LOGIN",e.target.innerText)}}),n&&o&&s.createElement(ut.N,{"data-testid":"message-banner-bookmark-wrapper"},s.createElement(Io.c,{link:{label:g(ct.A.saveStory),url:"#",network:"bookmark",behavior:"bookmark"},theme:"standard",type:"standard",isUrlBookmark:!0,isBookmarkButton:!0})))};To.propTypes={commentMessageBannerIcon:r().string,dek:r().string,hed:r().string,hideDivider:r().bool,isBookmarkingEnabled:r().bool,shouldUseSeparateCTAs:r().bool,showCommentSavedMessage:r().bool,showSignInButton:r().bool,signInURL:r().string,subContentDek:r().string,subscriptionUrl:r().string},To.displayName="CommentingMessageBanner";const So=To;var xo=o(26048);const ko=({listenerRating:e,musicRating:t,totalRatings:o=0,minRatingThreshold:i=5,isSubscribed:n=!0,scoreSubscriptionUrl:a=""})=>{const{formatMessage:r}=(0,l.A)(),{rating:d,message:c}=(()=>{const t=Number(o)||0;return n?0===t?{rating:"-",message:r(Re.noListenerScoreYet)}:t{s.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(b.G.RENDER,{name:"Commenting"})},[]);const[Qe,Je]=(0,s.useState)(),[Ze,et]=(0,s.useState)(),[tt,ot]=(0,s.useState)(!1),[it,nt]=(0,s.useState)(null),[at,rt]=(0,s.useState)(!1),[st,lt]=(0,s.useState)(!0),[dt,mt]=(0,s.useState)(Fe),[ut,gt]=(0,s.useState)(Fe);(0,Le.xf)($.h2);const{header:pt,description:bt,showSignInButton:yt,subContent:ft,commentMessageBannerIcon:wt,isNoCommentsScenario:vt}=(0,Le.eK)({noCommentsMsgConf:W,disableCommentStream:f,closeCommentStreamMessage:t,showCommentSavedMessage:at,communityUrl:K,isCommentLoading:j,commentCount:o,user:Ue,signUpMessageBannerHed:Me,brandName:e,savedCommentConf:le,noCommentsYetIcon:N,joinCommunityIcon:U,commentSubmittedIcon:A,commentsClosedIcon:B}),{userRating:Ct}=(0,Le.Xp)({shouldShowUserScore:ce,commentingUrl:n,user:Ue,storyID:O}),Rt=Ue.isAuthenticated&&Ue.amguuid&&z,Et=(0,Le.bS)(i),Lt=(0,Le.vD)({enableRepliesRestriction:_}),Mt=E&&!Lt;(0,s.useEffect)(()=>{Rt&&async function(){try{const e=await(0,d.J$)(Ue.amguuid,z,n);Je(e?.username),et(e?.location)}catch(e){throw e}}()},[Rt,n,Ue.amguuid,z]),(0,h.ol)(`.${Uo}`,void 0,e=>{e&&o&&(0,I.AS)(o,"community")},[o]);const{formatMessage:It}=(0,l.A)(),{subscribeUrl:Tt="",interactionSubscribeUrl:St=""}=(0,No.P)("listener.review.gated"),xt=!!Tt;if((0,s.useEffect)(()=>{xt&&(lt(!1),Tt&&mt(Tt),St&>(St))},[xt,Tt,St]),k)return null;if(!Et)return null;const kt=e=>{Je(e)},$t=e=>{nt(e),ot(!0),setTimeout(()=>{ot(!1)},3e3)};return s.createElement(q,null,s.createElement("div",{className:$.h2,id:$.h2,"data-journey-hook":"page-footer"},s.createElement(g.op,{hasSubtext:!!je},s.createElement(g.FM,{className:Uo},(0,Le.YL)(o,re,"",Oe)),s.createElement(g.hh,{href:"#main-content"},It(ct.A.utilityLabel),s.createElement(g.sh,null))),je&&s.createElement(g.qJ,null,je," ",s.createElement(g.Mc,{href:Ge},It(ct.A.guidelinesLinkText))),_e&&!ze&&s.createElement($o,{listenerRating:qe,musicRating:Ke,totalRatings:He,minRatingThreshold:De,scoreSubscriptionUrl:Xe}),Ue.isAuthenticated&&s.createElement(Mo,{organizationId:z,userId:Ue.amguuid,userApiUrl:n,showMessageBannerHandler:$t,usernameModalConf:Ae}),(pt||bt)&&s.createElement(So,{hed:pt,dek:bt,showSignInButton:yt,signInURL:ne,isBookmarkingEnabled:se,subContentDek:ft,showCommentSavedMessage:at,commentMessageBannerIcon:wt,hideDivider:F&&vt,shouldUseSeparateCTAs:Pe,subscriptionUrl:dt}),!f&&s.createElement(go,{commentingUrl:n,contentId:O,handleUsernameChange:kt,handleLocationUpdate:e=>{et(e)},hed:D,organizationId:z,ratingScale:X,reviewerInfoText:Z,reviewerLocationInfoText:ee,locationInfoText:te,reviewNoteTags:ae,shouldEnableMultipleComments:w,shouldEnableMultipleRatings:v,shouldEnableOptionalRating:C,shouldEnableRatings:R,shouldEnableTags:L,shouldEnableCommentsImageUpload:M,shouldEnableLocationDropdown:de,showMessageBannerHandler:$t,showSavedRecipeNotes:e=>{rt(e)},signInURL:ne,siteUserName:Qe,siteUserLocation:Ze,tenantID:Te,userId:Ue.isAuthenticated?Ue.amguuid:null,usernameSignInDek:Ae?.dek,contentTitle:D,shouldUseFullOpacity:pe,isSubscribed:st,subscriptionUrl:dt,subscriptionLockActionText:We,userStoryRating:Ct,shouldTruncateComments:Ve}),s.createElement(ht,{shouldUseAlternateColorToken:me,shouldUsePrimaryColorForBadges:ue,shouldUseTagsInvertedTheme:ge,shouldUseFullOpacity:pe,shouldShowCircularRatings:be,ratingPlacement:he,shouldUseDarkPinnedTheme:ye,shouldUseSoftRoundedEdges:fe,commentingUrl:n,defaultReplyLimit:H,entityId:O,handleUsernameChange:kt,id:"reviews",initialReviewLimit:G,likeActionErrorMessage:V,replyLimit:Q,commentsOrderBy:a,repliesOrderBy:r,reviewerBadges:J,reviewLimit:oe,shouldEnableRatings:R,shouldEnableReply:Mt,communityLogo:Y,useVoteLabels:Ne,shouldEnableTags:L,shouldEnableUpvotes:S,upvoteIcon:xe,upvoteIconFilled:ke,showUpvoteLabel:$e,showMessageBannerHandler:$t,showMoreButtonLabel:we,repliesMarketRestrictedTooltip:ve,signInHed:Ce||It(ct.A.signInModalHed),signInHedSpanTag:Re||It(ct.A.signInModalHedSpanTag,{brandName:e}),signInMessage:Ee||It(ct.A.signInModalMessage),reviewModalProps:ie||{hed:It(ct.A.replyDiscardModalHed)},reviewNoteTags:ae,siteUserName:Qe,unlikeActionErrorMessage:Se,user:Ue,usernameSignInDek:Ae?.dek,organizationId:z,contentTitle:D,shouldEnableCommentsImageUpload:M,shouldEnableRepliesImageUpload:T,shouldShowLocation:de,spectraUrl:P,shouldShowQaSection:Be,enableRepliesMarketRestriction:Lt,shouldTruncateComments:Ve,truncateLines:Ye,isSubscribed:st,subscriptionUrl:ut,subscriptionModalProps:Ie})),s.createElement(p.A,null,s.createElement("aside",{"data-testid":"ReviewFeedbackAside"},s.createElement(u.Z,{group:"ads"},s.createElement(c.A,{position:"rail"})))),tt&&s.createElement(m.A,{contentAlign:"center",isFixed:!0,position:"top-centre",shouldShowCloseButton:!0,isDisclaimer:!0,delayDuration:3e3},s.createElement("p",null,it)))};Bo.propTypes={brandName:r().string,closeCommentStreamMessage:r().string,commentCount:r().number,commentingRestrictedTo:r().arrayOf(r().string),commentingUrl:r().string.isRequired,communityExperience:r().shape({commentsOrderBy:r().string,repliesOrderBy:r().string,disableCommentStream:r().bool,enableMultipleComments:r().bool,enableMultipleRatings:r().bool,enableOptionalRatings:r().bool,enableRatings:r().bool,enableReplies:r().bool,enableTags:r().bool,enableCommentsImageUpload:r().bool,enableRepliesImageUpload:r().bool,enableUpvotes:r().bool,enableLocationDropdown:r().bool,hasHideCommunityFunctionalTag:r().bool,noCommentsYetIcon:r().string,joinCommunityIcon:r().string,commentSubmittedIcon:r().string,commentsClosedIcon:r().string,enableRepliesRestriction:r().bool}),communityLogo:r().object,communityUrl:r().string,ContentWrapper:r().elementType,defaultReplyLimit:r().number,hideMessageBannerDivider:r().bool,hed:r().string.isRequired,id:r().string.isRequired,imageUpload:r().shape({spectraUrl:r().string}),initialReviewLimit:r().number,isBookmarkingEnabled:r().bool,isCommentLoading:r().bool,isMultiReview:r().bool,shouldUseSeparateCTAs:r().bool,likeActionErrorMessage:r().string,locationInfoText:r().string,minListenerScoreThreshold:r().number,musicRating:r().object,noCommentsMsgConf:r().object,organizationId:r().string.isRequired,rating:r().number,ratingPlacement:r().oneOf(["ReviewMetaGrid","ReviewListMetaInfo"]),ratingScale:r().number,replyLimit:r().number,reviewerBadges:r().arrayOf(r().shape({role:r().string,badge:r().string})),reviewerInfoText:r().string,reviewerLocationInfoText:r().string,reviewLimit:r().number,reviewModalProps:r().object,reviewNotesFormSignInURL:r().string,reviewNoteTags:r().arrayOf(r().shape({active:r().bool,description:r().string,label:r().string,slug:r().string})),reviewsCount:r().number,reviewsSectionTitle:r().string,savedCommentConf:r().object,shouldEnableLocationDropdown:r().bool,shouldShowCircularRatings:r().bool,shouldShowUserScore:r().bool,shouldUseAlternateColorToken:r().bool,shouldUsePrimaryColorForBadges:r().bool,shouldUseTagsInvertedTheme:r().bool,shouldUseDarkPinnedTheme:r().bool,shouldUseSoftRoundedEdges:r().bool,shouldUseFullOpacity:r().bool,shouldUseTwoDigitCommentCount:r().bool,showMoreButtonLabel:r().string,repliesMarketRestrictedTooltip:r().string,shouldShowQaSection:r().bool,showScoreComparison:r().bool,shouldTruncateComments:r().bool,scoreSubscriptionUrl:r().string,subscriptionModalProps:r().object,subscriptionUrl:r().string,subscriptionLockActionText:r().string,showUpvoteLabel:r().bool,signInHed:r().string,signInHedSpanTag:r().string,signInMessage:r().string,signUpMessageBannerHed:r().string,tenantID:r().string.isRequired,truncateLines:r().number,unlikeActionErrorMessage:r().string,upvoteIcon:r().string,upvoteIconFilled:r().string,useVoteLabels:r().bool,user:r().shape({isAuthenticated:r().bool.isRequired,amguuid:r().string}).isRequired,usernameModalConf:r().object,reviewSectionSubtext:r().string,reviewSectionSubtextUrl:r().string};const _o=(0,n.M3)(Bo,{keysToPluck:["communityExperience","brandName","user","communityLogo","imageUpload"],keysToSpread:["commentAttributes","comments","recaptcha"]}),Ko=(0,i.y)(_o,"Commenting")},61057:(e,t,o)=>{let i;o.d(t,{Rf:()=>r,f1:()=>n,hY:()=>s});const n=e=>{i=e},a=(e,t={})=>{i&&i({type:"MERGE_KEY",key:"userNameModalConfig",value:{...t,isVisible:e}})},r=e=>{a(!0,e)},s=()=>{a(!1)}},69741:(e,t,o)=>{o.d(t,{dX:()=>y,tZ:()=>h});var i=o(38267),n=o(26865),a=o(96472),r=o(18730);const{timingButtonDefault:s}=a.L6,l=(0,n.Kq)(3),d=({selectionControlBackgroundColor:e,selectionControlBorderColor:t,selectionControlSize:o})=>i.AH`
transition-property: background, border;
transition-duration: ${s};
transition-timing-function: ease-in;
position: relative;
border-width: 1px;
border-style: solid;
${({theme:e})=>(0,n._o)(e,"border-color",t)};
${({theme:t})=>(0,n._o)(t,"background-color",e)};
width: ${o};
height: ${o};
pointer-events: none;
&::before {
display: block;
position: absolute;
top: 50%;
left: 50%;
transition-property: background, border;
transition-duration: ${s};
transition-timing-function: ease-in;
opacity: 0;
content: '';
}
`,c=i.Ay.div.withConfig({displayName:"DiscoverySelectionControlStyledCheckbox"})`
${d({selectionControlBackgroundColor:"colors.interactive.base.white",selectionControlBorderColor:"colors.interactive.base.black",selectionControlSize:l})}
&::before {
${(({checkboxIconBorderWidth:e,checkboxIconColor:t})=>i.AH`
transform: translate(-50%, -60%) rotate(45deg);
border-width: 0 ${e} ${e} 0;
border-style: solid;
${({theme:e})=>(0,n._o)(e,"border-color",t)};
width: 25%;
height: 75%;
`)({checkboxIconBorderWidth:"2px",checkboxIconColor:"colors.interactive.base.white"})}
}
`,m=i.Ay.div.withConfig({displayName:"DiscoverySelectionControlStyledRadio"})`
${d({selectionControlBackgroundColor:"colors.interactive.base.white",selectionControlBorderColor:"colors.interactive.base.black",selectionControlSize:l})}
border-radius: 100%;
&::before {
${({theme:e})=>(({radioIconColor:e,theme:t})=>`\n border-radius: 100%;\n transform: translate(-50%, -50%);\n border-radius: 100%;\n ${(0,n._o)(t,"border-color",e)};\n width: 50%;\n height: 50%;\n `)({radioIconColor:"colors.interactive.base.black",theme:e})}
}
`,u=({theme:e})=>i.AH`
${(({selectionControlBackgroundColor:e,theme:t})=>`\n &:checked,\n &:active {\n + ${m}::before {\n opacity: 1;\n }\n + ${c} {\n &::before {\n opacity: 1;\n }\n ${(0,n._o)(t,"border-color","colors.interactive.base.brand-primary")};\n ${(0,n._o)(t,"background-color",e)};\n }\n }\n\n &:disabled {\n + ${m},\n + ${c} {\n ${(0,n._o)(t,"border-color","colors.interactive.base.light")};\n }\n }\n\n &:disabled:checked {\n + ${c} {\n ${(0,n._o)(t,"background-color","colors.interactive.base.light")};\n\n + ${m}::before {\n ${(0,n._o)(t,"background-color","colors.interactive.base.light")};\n }\n }\n `)({selectionControlBackgroundColor:"colors.interactive.base.brand-primary",theme:e})}
`,g=({theme:e})=>i.AH`
cursor: default;
pointer-events: none;
${(0,n._o)(e,"color","colors.interactive.base.light")};
`,p=i.Ay.input.withConfig({displayName:"DiscoverySelectionControlNativeRadio"})`
${({theme:e})=>u({theme:e})}
`,b=i.Ay.input.withConfig({displayName:"DiscoverySelectionControlNativeCheckbox"})`
${({theme:e})=>u({theme:e})}
`,h=i.Ay.label.withConfig({displayName:"DiscoverySelectionControlLabelWrapper"})`
display: grid;
position: relative;
grid-column-gap: ${(0,n.Kq)(2)};
grid-template-columns: ${l} auto;
grid-row-gap: ${(0,n.Kq)(.5)};
@media (min-width: ${a.LO.md}) {
grid-column-gap: ${(0,n.Kq)(2)};
grid-row-gap: ${(0,n.Kq)(1)};
}
&:hover {
${c} {
${({theme:e})=>(0,n._o)(e,"border-color","colors.interactive.base.brand-primary")};
}
${m} {
${({theme:e})=>(0,n._o)(e,"border-color","colors.interactive.base.brand-primary")};
}
${b}:checked + ${c} {
${({theme:e})=>(0,n._o)(e,"background","colors.interactive.base.black")};
${({theme:e})=>(0,n._o)(e,"border-color","colors.interactive.base.black")};
}
${p}:checked + ${m} {
${({theme:e})=>(0,n._o)(e,"background","colors.interactive.base.white")};
}
}
${({isDisabled:e,theme:t})=>e&&g({theme:t})};
`;(0,i.Ay)(r.v).withConfig({displayName:"DiscoverySelectionControlContext"})`
${({theme:e,typeIdentity:t})=>(0,n.Gg)(e,t)}
grid-column-start: 2;
margin-bottom: ${(0,n.Kq)(.5)};
${({theme:e,colorToken:t})=>(0,n._o)(e,"color",t)};
${({isDisabled:e,theme:t})=>e&&g({theme:t})};
@media (min-width: ${a.LO.md}) {
margin-bottom: 0;
}
`.defaultProps={as:"div",colorToken:"colors.discovery.body.white.description",typeIdentity:"typography.definitions.globalEditorial.context-primary"};const y=(0,i.Ay)(r.v).withConfig({displayName:"DiscoverySelectionControlHed"})`
${({theme:e,typeIdentity:t})=>(0,n.Gg)(e,t)}
${({theme:e,colorToken:t})=>(0,n._o)(e,"color",t)};
${({isDisabled:e,theme:t})=>e&&g({theme:t})};
`;y.defaultProps={as:"span",colorToken:"colors.discovery.body.white.heading",typeIdentity:"typography.definitions.discovery.hed-core-secondary"};(0,i.Ay)(r.v).withConfig({displayName:"DiscoverySelectionControlDek"})`
${({theme:e,typeIdentity:t})=>(0,n.Gg)(e,t)}
${({theme:e,colorToken:t})=>(0,n._o)(e,"color",t)};
grid-column-start: 2;
${({isDisabled:e,theme:t})=>e&&g({theme:t})};
`.defaultProps={as:"span",colorToken:"colors.discovery.body.white.description",typeIdentity:"typography.definitions.discovery.description-core"}},70462:(e,t,o)=>{o.d(t,{qk:()=>d});var i=o(38267),n=o(1123),a=o(26865),r=o(96472),s=o(76955);const l=(e={})=>"grid"===e.display&&(0,n.aU)(),d=i.Ay.div.withConfig({displayName:"SlotContainer"})`
${({stylesConfig:e={}})=>{const{mobile:t={},tablet:o={},desktop:n={}}=e;return i.AH`
${t}
${l(t)}
// childStylesConfig are required in here to
// put up styles for direct slot component
& > :first-child {
${t.childStylesConfig??{}}
}
${(0,a.H4)(r.LO.md)} {
${o}
${l(o)}
& > :first-child {
${o.childStylesConfig??{}}
}
}
${(0,a.H4)(r.LO.lg)} {
${n}
${l(n)}
& > :first-child {
${n.childStylesConfig??{}}
}
}
`}};
`;(0,i.Ay)(s.c7).withConfig({displayName:"FallbackWrapper"})`
display: flex;
align-items: center;
justify-content: center;
border-bottom: 0.5px dotted;
padding: 0.5rem;
height: 100vh;
`,(0,i.Ay)(s.vm).withConfig({displayName:"MessageText"})``,i.Ay.div.withConfig({displayName:"Slot"})``},75454:(e,t,o)=>{o.d(t,{AS:()=>n,An:()=>r,cj:()=>s,el:()=>l,i3:()=>a});var i=o(14307);const n=(e,t,o)=>{const n={type:"impression",label:"Comments",subject:t,features_list:[{name:"comments",total_index:e}]};o&&(n.placement=o),(0,i.Uw)(n)},a=e=>e?{placement:"pinned_comments"}:{},r=e=>e?"true":"false",s=(e,t="click")=>{const o={type:t,label:e.label,subject:e.subject,paywall_source:e.source,placement:e.placement,state:e.state,is_exceeded:e.is_exceeded};(0,i.ZL)(o)},l=e=>{try{return new URL(e,window.location.origin).searchParams.get("source")}catch(e){return null}}},85554:(e,t,o)=>{o.d(t,{$D:()=>L,AI:()=>N,HX:()=>v,M$:()=>w,P$:()=>S,QO:()=>g,TS:()=>I,Xp:()=>p,Xq:()=>U,YL:()=>u,a8:()=>k,bS:()=>y,eK:()=>b,i7:()=>A,iz:()=>T,vD:()=>f,xf:()=>M});var i=o(6765),n=o(96540),a=o(6442),r=o(53788),s=o(60711),l=o(56892),d=o(67198),c=o(92867),m=o(24494);const u=(e,t,o="",i=!1)=>{const n=t||"Comments";if(!e&&!o)return n;return`${n}${e&&e>0?` (${a=e,i&&a<10?`0${a}`:a})`:` ${o}`}`;var a},g=({commentingUrl:e,defaultReplyLimit:t,entityId:o,initialReviewLimit:i,setCommentCount:a,setIsCommentLoading:r,commentsOrderBy:l,repliesOrderBy:d})=>{const[c,m]=(0,n.useState)(!0),[u,g]=(0,n.useState)([]),[p,b]=(0,n.useState)([]),[h,y]=(0,n.useState)([]),[f,w]=(0,n.useState)(null),[v,C]=(0,n.useState)({hasNextPage:!1,endCursor:""});return(0,n.useEffect)(()=>{e&&async function(){try{const n=(0,s.Pb)(o,e,console),r=(0,s.SW)({entityId:o,commentingUrl:e,commentsOrderBy:l,repliesOrderBy:d,reviewLimit:i,replyLimit:t}),c=(0,s.$u)({entityId:o,commentingUrl:e,repliesOrderBy:d}),[m,u,p]=await Promise.all([n,r,c]);if(u?.reviews&&u.page&&(g(u.reviews),C(u.page)),m?.commentsCount&&a(m.commentsCount),m?.commentTagLabel&&w(m.commentTagLabel),p?.reviews){const e=p.reviews;b(e.filter(e=>e?.commentTags?.includes("FEATURED"))),y(e.filter(e=>e?.commentTags?.includes("QA")))}}catch(e){}m(!1),r(!1)}()},[e,l,d,o,t,i,a,r,m,C,g]),{isLoading:c,reviews:u,page:v,setPage:C,featuredReviews:p,qaReviews:h,commentTagLabel:f}},p=({shouldShowUserScore:e,commentingUrl:t,user:o,storyID:i})=>{const a=o.isAuthenticated&&o.amguuid,[r,l]=(0,n.useState)(null);return(0,n.useEffect)(()=>{!async function(){if(!e)return;if(!a)return;const o=await(0,s.O_)(i,t,console);o&&l(o.userStoryRating?.rating)}()},[a,i,t,e]),{userRating:r}},b=({noCommentsMsgConf:e={},disableCommentStream:t,closeCommentStreamMessage:o,showCommentSavedMessage:i,communityUrl:n,isCommentLoading:r,commentCount:s,user:l,signUpMessageBannerHed:d,brandName:m,savedCommentConf:u={},noCommentsYetIcon:g,joinCommunityIcon:p,commentSubmittedIcon:b,commentsClosedIcon:h})=>{const{formatMessage:y}=(0,a.A)(),f=!(l.isAuthenticated&&l.amguuid);if(t)return{header:o||y(c.A.closeCommentStreamMessage),description:"",showSignInButton:!1,subContent:"",commentMessageBannerIcon:h};if(i){const{title:e=y(c.A.SavedCommentMsgTitle),dek:t=y(c.A.SavedCommentDek),dekTrail:o=y(c.A.SavedCommentDekTrail),subContent:i=y(c.A.SavedCommentSubContent)}=u;return{header:e,description:`${t}
${``} ${o}`,subContent:i,showSignInButton:!1,commentMessageBannerIcon:b}}if(!r&&!s){const{hed:t=y(c.A.emptyCommentMsgHed),dek:o=y(c.A.emptyCommentMsgDek),signOutDek:i=y(c.A.signOutEmptyCommentMsgDek)}=e;return{header:t,description:f?i:o,showSignInButton:f,subContent:"",commentMessageBannerIcon:g,isNoCommentsScenario:!0}}return!r&&f?{header:d||y(c.A.signUpMessageBannerHed,{brandName:m}),showSignInButton:!0,description:"",subContent:"",commentMessageBannerIcon:p}:{header:"",description:"",showSignInButton:!1,subContent:""}},h=(e,t)=>{if(!t)return!1;const o=(e=>{const t=(0,i.A)(e),o=t?.fct||{};return Object.values(o).flat()})(t);if(!o?.length)return!1;return o.some(t=>e.includes(t))},y=e=>{if(!e?.length)return!0;const t=(0,l.getCookie)(r.A.accessCookie);if(!t)return!1;return h(e,t)},f=({enableRepliesRestriction:e})=>{const t=((0,l.getCookie)("CN_geo_country_code")||"").toLowerCase();return e&&m.A.includes(t)},w={LEAVE_RATING:"leave-a-rating",LEAVE_REPLY:"leave-a-reply",LIKE_COMMENT:"like-a-comment",LIKE_REPLY:"like-a-reply",REPLY_TO_REPLY:"reply-to-reply"},v={[w.LIKE_COMMENT]:"community_like",[w.LIKE_REPLY]:"community_like",[w.LEAVE_REPLY]:"community_reply",[w.REPLY_TO_REPLY]:"community_reply",[w.LEAVE_RATING]:"community_rating"},C=({pathname:e,search:t,hash:o})=>`${e}${t}${o}`,R=({href:e,hashValue:t})=>{const o=new URL(e);return t&&(o.hash=t),o},E=({href:e,queryParams:t})=>{const o=new URL(e),i=new URLSearchParams(t);for(const[e,t]of i)o.searchParams.set(e,t);return o},L=({href:e,hashValue:t,queryParams:o})=>{const i=R({href:e,hashValue:t}),n=E({href:i.href,queryParams:o});return C(n)},M=e=>{const[t,o]=(0,n.useState)({height:0,isStable:!1}),[i,a]=(0,n.useState)(null),r=()=>{const e=window.document.body.scrollHeight;o(t=>({height:e,isStable:t.height===e}))};(0,n.useEffect)(()=>{if(e&&(({hash:e})=>!!e&&Object.values(w).some(t=>e.includes(t)))(window.location))return!i&&a(window.setInterval(r,750)),t.isStable&&((0,d.A)(`.${e}`),window.clearInterval(i),window.history.replaceState(null,"",(({url:e})=>e.split("#")[0])({url:L(window.location)}))),()=>{window.clearInterval(i)}},[e,t.isStable,i])},I=({searchParams:e})=>Object.fromEntries(new URLSearchParams(e)),T=({href:e,paramsToRemove:t})=>{const o=new URL(e);return t.forEach(e=>o.searchParams.delete(e)),C(o)},S=({reactions:e,id:t})=>{const o=e[t]||{},{viewerActionPresence:i=!1,reactionCount:n=0}=o;return{...e,[t]:{reactionCount:i?n-1:n+1,viewerActionPresence:!i}}},x=({reactions:e,id:t,reactionCount:o,viewerActionPresence:i})=>(e[t]||(e[t]={reactionCount:o,viewerActionPresence:i}),e),k=(e,{id:t,actionCounts:o,viewerActionPresence:i})=>(x({reactions:e,id:t,reactionCount:o?.reaction?.total||0,viewerActionPresence:i?.reaction}),e),$=(e,{commentId:t,reactionCount:o,viewerActionPresence:i,replies:n})=>(x({reactions:e,id:t,reactionCount:o,viewerActionPresence:i}),n?.length>0&&n.forEach(t=>{k(e,t)}),e),N=(e,t)=>{(0,n.useEffect)(()=>{e.length&&t(t=>e.reduce($,{...t}))},[e,t])},U=e=>{if(null==e)return 0;const t=Number(e);return isNaN(t)?e:10===t?"10":t.toFixed(1)},A={COMMENTING_SECTION:"CommentingMainContent",PINNED_COMMENT:"pinned-comment",SUBSCRIBE_BUTTON:"SubscribeButton",SUBSCRIBE_TO_SEE_BUTTON:"SubscribeToSeeButton",SUBSCRIBE_MODAL:"SubscribeModal",SUBSCRIPTION_LOCK:"SubscriptionLock"}},92867:(e,t,o)=>{o.d(t,{A:()=>i});const i=(0,o(72267).defineMessages)({utilityLabel:{id:"ReviewListContainer.UtilityLabel",defaultMessage:"Back to top",description:"Utility label for review list container"},SavedCommentMsgTitle:{id:"Commenting.SavedCommentMsgTitle",defaultMessage:"Comment submitted",description:"Text for the MessageBanner title",isConfigurable:!0},SavedCommentDek:{id:"Commenting.SavedCommentDek",defaultMessage:"Comments are moderated in line with our",description:"Text for the MessageBanner body",isConfigurable:!0},CommunityGuidelines:{id:"Commenting.CommunityGuidelines",defaultMessage:"Community Guidelines",description:"Text for the community guidelines link",isConfigurable:!0},SavedCommentDekTrail:{id:"Commenting.SavedCommentDekTrail",defaultMessage:"before being added.",description:"Text for the MessageBanner body",isConfigurable:!0},SavedCommentSubContent:{id:"Commenting.SavedCommentSubContent",defaultMessage:"Thank you for contributing your thoughts.",description:"Text for the MessageBanner sub content",isConfigurable:!0},likeActionErrorMessage:{id:"Commenting.LikeActionErrorMessage",defaultMessage:"Unable to like this comment. Please try again.",description:"Error message to display while like action fails"},unlikeActionErrorMessage:{id:"Commenting.UnlikeActionErrorMessage",defaultMessage:"Unable to unlike this comment. Please try again.",description:"Error message to display while unlike action fails"},signInModalHed:{id:"Commenting.signInModalHed",defaultMessage:"Sign in to join the",description:"Hed for commenting sign in modal"},signInModalHedSpanTag:{id:"Commenting.signInModalHedSpanTag",defaultMessage:"{brandName} community",description:"Hed span for commenting sign in modal"},signInModalMessage:{id:"Commenting.signInModalMessage",defaultMessage:"Once you're signed in, add your comments and like or reply to others.",description:"Message for commenting sign in modal"},replyDiscardModalHed:{id:"Commenting.replyDiscardModalHed",defaultMessage:"Discard this reply?",description:"Hed for discard reply modal"},closeCommentStreamMessage:{id:"Commenting.closeCommentStreamMessage",defaultMessage:"Comments are closed on this story but you can still browse or upvote them.",description:"Hed for discard reply modal"},emptyCommentMsgHed:{id:"Commenting.emptyCommentMsgHed",defaultMessage:"There aren’t any comments yet.",description:"Hed for empty comments"},emptyCommentMsgDek:{id:"Commenting.emptyCommentMsgDek",defaultMessage:"Add the first to start the conversation.",description:"Dek for empty comments"},signInButtonLabel:{id:"Commenting.signInButtonLabel",defaultMessage:"Sign in or create account",description:"Text for the sign in or create account button"},subscribeButtonLabel:{id:"Commenting.subscribeButtonLabel",defaultMessage:"Subscribe",description:"Text for the subscribe button in dual CTA layout"},orSignInLabel:{id:"Commenting.orSignInLabel",defaultMessage:"Or sign in",description:"Text for the secondary sign in link (will be underlined)"},signOutEmptyCommentMsgDek:{id:"Commenting.signOutEmptyCommentMsgDek",defaultMessage:"Be the first to start the conversation!
You need an account to add or like comments.",description:"Dek for empty comments for signed out users"},signUpMessageBannerHed:{id:"Commenting.signUpMessageBannerHed",defaultMessage:"Join the {brandName} community to add comments.",description:"Text for signout heading"},saveStory:{id:"Commenting.saveStory",defaultMessage:"Save story",description:"Label for the bookmark icon in commenting section"},pinnedReviewLabel:{id:"ReviewList.pinnedReviewLabel",defaultMessage:"Featured by",description:"Featured by label"},qaReviewLabel:{id:"ReviewList.qaReviewLabel",defaultMessage:"Q&A with",description:"Q&A label"},qaBannerTitle:{id:"Commenting.qaBannerTitle",defaultMessage:"Have a question we missed asking?",description:"Title for QA banner"},qaBannerDek:{id:"Commenting.qaBannerDescription",defaultMessage:"Join the live Q&A",description:"Description for QA banner"},guidelinesLinkText:{id:"Commenting.guidelinesLinkText",defaultMessage:"guidelines.",description:"Text for the guidelines link"}})},92945:(e,t,o)=>{o.d(t,{P:()=>n});var i=o(96540);const n=e=>{const[t,o]=(0,i.useState)({});return(0,i.useEffect)(()=>{window.jBus&&window.jBus.whenAnEventOccurs({id:e,callback:({payload:e})=>{o({...e})}})},[e]),{...t}}}}]);