1"use strict";(globalThis.webpackChunkverso=globalThis.webpackChunkverso||[]).push([[4602],{75454(e,t,n){n.d(t,{cj:()=>o,el:()=>s,i3:()=>a});var r=n(14307);const a=e=>e?{placement:"pinned_comments"}:{},o=(e,t="click")=>{const n={type:t,label:e.label,subject:e.subject,paywall_source:e.source,placement:e.placement,state:e.state,is_exceeded:e.is_exceeded};(0,r.ZL)(n)},s=e=>{try{return new URL(e,window.location.origin).searchParams.get("source")}catch{return null}}},85554(e,t,n){n.d(t,{HX:()=>s,TS:()=>i,Xq:()=>c,i7:()=>l,zx:()=>u});n(6765);var r=n(96540),a=(n(53788),n(60711));n(56892),n(92867),n(26022);const o={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"},s={[o.LIKE_COMMENT]:"community_like",[o.LIKE_REPLY]:"community_like",[o.LEAVE_REPLY]:"community_reply",[o.REPLY_TO_REPLY]:"community_reply",[o.LEAVE_RATING]:"community_rating"},i=({searchParams:e})=>Object.fromEntries(new URLSearchParams(e)),c=e=>{if(null==e)return 0;const t=Number(e);return isNaN(t)?e:10===t?"10":t.toFixed(1)},l={COMMENTING_SECTION:"CommentingMainContent",PINNED_COMMENT:"pinned-comment",SUBSCRIBE_BUTTON:"SubscribeButton",SUBSCRIBE_TO_SEE_BUTTON:"SubscribeToSeeButton",SUBSCRIBE_MODAL:"SubscribeModal",SUBSCRIPTION_LOCK:"SubscriptionLock"},u=({shouldShowActivityLabel:e,commentAttributes:t={},user:n={},storyID:o,contentType:s,reviewType:i})=>{const c=n?.isAuthenticated&&n?.amguuid,[l,u]=(0,r.useState)(null),[m,d]=(0,r.useState)(!1),{commentingUrl:y,organizationId:g}=t,E="review"===s&&["albums","tracks"].includes(i)||"article"===s;return(0,r.useEffect)(()=>{if(!(e&&c&&E&&y&&g&&o))return u(null),void d(!1);!async function(){d(!0);try{const e=await(0,a.M3)({storyID:o,userID:n.amguuid,siteID:g,commentingUrl:y,contentType:s});u(e?.activityType??null)}catch(e){u(null)}finally{d(!1)}}()},[e,c,E,o,n?.amguuid,g,y,s]),{activityType:l,isLoading:m}}},61057(e,t,n){let r;n.d(t,{f1:()=>a});const a=e=>{r=e}},26576(e,t,n){n.d(t,{BM:()=>o,D4:()=>a,a0:()=>r});n(91470);const r=(e,t=null)=>{let n=0;let r=null;const a=()=>{if(!window.jBus)return n++,void(n<=10&&(r=setTimeout(a,1e3)));r&&(clearTimeout(r),r=null),window.jBus.whenAnEventOccurs({id:"listener.score.unblurred",callback:n=>{e(!1),t&&t(!1)}}),window.jBus.whenAnEventOccurs({id:"listener.score.gated",callback:e=>{t&&t(!0)}})};return a(),()=>{r&&(clearTimeout(r),r=null)}},a=({role:e,coralBadges:t=[],reviewerCreatedAt:n,reviewerBadges:r=[]})=>{const{badge:a}=r?.find(t=>t.role===e)||{};if(!(("COMMENTER"===e||"MEMBER"===e)&&!!t?.length))return{badgeValue:a,dateBadges:[],userSpecificBadges:[],showCoralBadges:!1};const o=t.filter(e=>!0===e?.isUserSpecific);return{badgeValue:o.length>0?o[0].badge:a,dateBadges:0===o.length&&"COMMENTER"===e?t.filter(e=>{if(!0===e?.isUserSpecific)return!1;const{startDate:t,endDate:r}=e||{};if(!t||!r||!n)return!1;const a=new Date(n),o=new Date(t),s=new Date(r);return a>=o&&a<=s}):[],userSpecificBadges:o,showCoralBadges:!0}},o=e=>e?.badge||""},70251(e,t,n){n.d(t,{w:()=>s});var r=n(38221),a=n.n(r),o=n(84279);const s=(e,t=300)=>(0,o.G)("resize",e,a(),t)},39311(e,t,n){n.d(t,{BD:()=>a});var r=n(46017);const a=(e,t)=>{const n=new Date(e);return(a=n)instanceof Date&&!isNaN(a)?(0,r.e)({date:n,formatMessage:t,includeHourAndMin:!1}):e;var a}},60711(e,t,n){n.d(t,{M3:()=>u,Pb:()=>l});var r=n(22914),a=n(4046),o=n(56892),s=(n(86456),n(53788));const{oidcCookies:i}=s.A,c=(e,t,n="")=>{const r=(0,o.getCookie)(i.access)||n,s=new a.l4(e),{query:c,variables:l}=t,u={"Access-Control-Request-Method":"POST","Access-Control-Request-Headers":"Content-Type","Content-Type":"application/json","User-Agent":"verso-client",Authorization:`Bearer ${r}`};return s.request(c,l,u)},l=async(e,t,n,s=5e3)=>{const c={operationName:"Story",query:r.Vl,variables:{id:e}};let l=null,u=null;const m="function"==typeof AbortController?new AbortController:null,d=m&&s>0?setTimeout(()=>m.abort(),s):null;try{const e=new a.l4(t,{signal:m?.signal}),{query:n,variables:r}=c,s=await e.request(n,r,{"Access-Control-Request-Method":"POST","Access-Control-Request-Headers":"Content-Type","Content-Type":"application/json","User-Agent":"verso-client",Authorization:`Bearer ${(0,o.getCookie)(i.access)||""}`}),{totalPrimaryCommentsCount:d=null,commentTagLabel:y=null}=s?.story||{};l=d,u=y}catch(e){n.warn(`Error making GQL request in storyCommentsCount: ${e.message}`)}finally{clearTimeout(d)}return{commentsCount:l,commentTagLabel:u}},u=async({storyID:e,userID:t,siteID:n,commentingUrl:a,contentType:o,logger:s=console})=>
1{const i={operationName:"coralreviews",query:r.KF,variables:{storyID:e,userID:t,siteID:n}};try{const e=await c(a,i),t=e?.coralreviews??[];if(0===t.length)return{hasRating:!1,hasComment:!1,activityType:null};const n=t.some(e=>null!=e?.rating?.rating),r=t.some(e=>{const t=e?.comment?.body;return Boolean(t)&&"__RATING_ONLY_COMMENT_PLACEHOLDER__"!==t});let s=null;return"article"===o?r&&(s="comment"):(n||r)&&(s="review"),{hasRating:n,hasComment:r,activityType:s}}catch(e){return s.warn(`Error making GQL request in getUserStoryActivity: ${e.message}`),{hasRating:!1,hasComment:!1,activityType:null}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.