"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4976],{61418:function(e,t,i){i.d(t,{I:function(){return eo},Z:function(){return er}});var o=i(52322),n=i(72779),r=i.n(n),a=i(2784),s=i(79855),l=i(19596),u=i(45103),d=i(91842),c=i(41412),f=i(14856),g=i(44667),p=i(27167),m=i(33274),I=i(72814),v=i(41119),w=i(90367),h=i(83082);let T=e=>{let t=(0,h.e)(e.date,{day:"numeric",month:"short",year:"numeric"}),i=r()("review-date",e.className);return(0,o.jsx)(u.InlineListItem,{className:i,children:t})};var b=i(50926);let C={id:"title_main_userReviews_signpost_topReview",defaultMessage:"Featured review"},x={id:"common_label_spoiler",defaultMessage:"Spoiler"},_={id:"common_ariaLabels_seeMore",defaultMessage:"See more"},E={id:"common_label_moreOptions",defaultMessage:"More options"},R={id:"common_label_report",defaultMessage:"Report"},V={id:"common_buttons_edit",defaultMessage:"Edit"},y={id:"common_buttons_delete",defaultMessage:"Delete"},S={id:"userReviews_shareText_subjectCheckOutUserReviewWithRating",defaultMessage:"Check out {user}'s {rating}/10 review of {titleText} on IMDb!"},L={id:"userReviews_shareText_subjectCheckOutUserReviewWithoutRating",defaultMessage:"Check out {user}'s review of {titleText} on IMDb!"},k={id:"userReviews_shareText_bodyCheckOutUserReviewWithRating",defaultMessage:"{titleText} - {rating}/10 review by {user} on IMDb"},D={id:"userReviews_shareText_bodyCheckOutUserReviewWithoutRating",defaultMessage:"{titleText} - review by {user} on IMDb"},N={id:"userReviews_permalink",defaultMessage:"Permalink"},j={id:"userReviews_author_nickname_rating",defaultMessage:"{authorName}'s rating: {value}"},$=e=>{let{author:t,date:i,permalink:n,index:r}=e,{formatMessage:a}=(0,s.Z)(),{userProfileLinkBuilder:l}=(0,m.WO)(),d=a(N),c=t.userId,f=t.nickName?t.nickName:c,g={imageProps:{imageModel:(0,b.ff)(t.avatarImage),size:50},href:l({urconst:c,refSuffix:[{t:I.Cd.USER,n:r},I.Cd.POSTER]}),ariaLabel:f};return(0,o.jsxs)(P,{"data-testid":"reviews-author",children:[t.avatarImage&&(0,o.jsx)(U,{...g}),(0,o.jsxs)(u.InlineList,{showDividers:!0,inline:!0,children:[(0,o.jsx)(u.InlineListItem,{children:(0,o.jsx)(u.TextLink,{"data-testid":"author-link",href:l({urconst:c,refSuffix:[{t:I.Cd.USER,n:r},I.Cd.TEXT]}),text:f})}),i&&(0,o.jsx)(T,{date:i}),(0,o.jsx)(u.InlineListItem,{children:(0,o.jsx)(u.TextLink,{"data-testid":"permalink-link",href:n,text:d})})]})]})},U=(0,l.default)(u.Avatar).withConfig({componentId:"sc-f6867cfd-0"})(["margin-left:",";margin-right:",";"],d.spacing.s,d.spacing.xs),P=l.default.div.withConfig({componentId:"sc-f6867cfd-1"})([""," display:flex;align-items:center;"],(0,d.setTypographyType)("bodySmall"));var A=i(87961),M=i(11586);let O={AUTHOR_REVIEW:"review-rating",CONTENT:"review-content",SPOILER_BUTTON:"review-spoiler-button",TOP_REVIEW:"review-top-review",NO_FOOTER:"review-no-footer"},F={PARENT:"review-card-parent",REVIEW_CONTENT:"review-overflow",SPOILER_CONTENT:"review-spoiler-content",SUMMARY:"review-summary",TITLE_HEADER:"review-title-header",TITLE_HEADER_PREFIX:"review-title-prefix",TITLE_SUBTITLE:"review-title-subtitle"},W=e=>{let{subtitleText:t,titleId:i,titlePoster:n,titleRatingData:r,titleText:a,titleTextPrefix:s,index:l}=e,{titleMainLinkBuilder:u}=(0,m.WO)();return(0,o.jsxs)(Y,{"data-testid":F.TITLE_HEADER,children:[(0,o.jsx)(G,{href:u({tconst:i,refSuffix:{t:I.Cd.POSTER,n:l}}),imageProps:{imageModel:n?.titleImage,imageType:n?.titleType,size:43},ariaLabel:a}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Z,{href:u({tconst:i,refSuffix:{t:I.Cd.TEXT,n:l}}),ellide:!1,children:(0,o.jsxs)(B,{children:[s&&(0,o.jsx)(q,{"data-testid":F.TITLE_HEADER_PREFIX,children:s}),(0,o.jsx)("span",{children:a})]})}),t&&(0,o.jsx)(H,{"data-testid":F.TITLE_SUBTITLE,children:t}),(0,o.jsx)(z,{canRate:!!r?.canRate,titleId:i,titleText:a,ratingsSummary:{aggregateRating:r?.aggregateRating},hideMaxIMDbRating:!0})]})]})},Y=l.default.div.withConfig({componentId:"sc-69375538-0"})(["display:flex;border-bottom:1px solid ",";padding-bottom:",";margin-bottom:",";align-items:center;","{align-items:top;}"],(0,d.getColorVarValue)("ipt-base-border-color"),d.spacing.s,d.spacing.m,d.mediaQueries.breakpoints.below.m),G=(0,l.default)(u.Poster).withConfig({componentId:"sc-69375538-1"})(["align-self:flex-start;"]),Z=(0,l.default)(u.Title).withConfig({componentId:"sc-69375538-2"})(["padding-left:",";margin-bottom:0;"],d.spacing.s),z=(0,l.default)(M.Nf).withConfig({componentId:"sc-69375538-3"})(["padding-left:",";"],d.spacing.s),H=l.default.span.withConfig({componentId:"sc-69375538-4"})([""," padding-left:",";"," ",""],(0,A.S)(2),d.spacing.s,(0,d.setPropertyToColorVar)("color","ipt-on-base-textSecondary-color"),(0,d.setTypographyType)("body")),B=l.default.span.withConfig({componentId:"sc-69375538-5"})(["",""],(0,A.S)(2)),q=l.default.span.withConfig({componentId:"sc-69375538-6"})(["&::after{content:'•';margin:0 0.25rem;}"]);var Q=i(29639),K=i(25436),X=i(28827),J=i(71548),ee=i(51442);let et=(e,t,i)=>`${(0,J.W5)()}/review/${e}/${t}/report?bus=imdb&site=www&ref_=${i}`,ei=(e,t,i,o,n,r,a,s,l,u,d)=>{let{value:c}=(0,I.Lz)(),f={titleText:t,user:o.nickName?o.nickName:o.userId,rating:a},g=(0,X.N)(a?S:L,f),p=(0,X.N)(a?k:D,f),m=!!u&&!!d,v=r({operation:Q.k.Report,subjectId:e,itemId:i,itemType:K.SubPageType.REVIEW}),w=r({operation:Q.k.Edit,subjectId:e,itemId:i,itemType:K.SubPageType.REVIEW}),h=r({operation:Q.k.Delete,subjectId:e,itemId:i,itemType:K.SubPageType.REVIEW}),T=v?()=>{n(v.workflowActionContext)}:void 0,b=w?()=>{n(w.workflowActionContext)}:void 0,C=h?()=>{n(h.workflowActionContext)}:void 0;return{emailSubject:g,shareBody:p,extraActions:m?[{label:V,iconName:"edit",...b?{onSelect:b,linkUrl:""}:{linkUrl:(0,ee.Ae)(u,c,{}),linkTarget:"_blank",isContributionAction:!0}},{label:y,iconName:"delete",...C?{onSelect:C,linkUrl:""}:{linkUrl:(0,ee.Ae)(d,c,{}),linkTarget:"_blank",isContributionAction:!0}}]:[{label:R,iconName:"flag",...T?{onSelect:T,linkUrl:""}:{linkUrl:l?(0,ee.Ae)(l,c,{}):et(e,i,c),linkTarget:"_blank",isContributionAction:!0}}],label:s,extraActionsFirst:m}},eo=e=>(0,o.jsx)(c.GA,{children:(0,o.jsx)(en,{...e})}),en=e=>{let{formatMessage:t}=(0,s.Z)(),{reviewSingleLinkBuilder:i,titleUserReviewsLinkBuilder:n}=(0,m.WO)(),l=(0,p.I)(),{value:d}=(0,I.Lz)(),{titleId:h,titleText:T,review:b,isTopReview:R,className:V,index:y,showTitleHeader:S=!1,hideAuthorFooter:L=!1}=e,k=t(C),D=t(_),N=t(E),U=t(x),P=t(f.F.EXPAND,{target:U}),A=i({rwconst:b.reviewId,refSuffix:{t:I.Cd.PERMALINK,n:y}}),M=(0,g.P)(b.authorRating,"user"),Y=t(j,{authorName:b.author.nickName||b.author.userId,value:M}),G=!!(l&&b.author&&l===b.author?.userId),{openDrawer:Z,getContributionProps:z}=(0,c.Yp)(),H=ei(h,T,b.reviewId,b.author,Z,z,M,N,e.reportUrl,e.editUrl,e.deleteUrl),[B,q]=(0,a.useState)(!1),Q=r()(V,{[O.NO_FOOTER]:L}),K=b.authorRating&&(!S||!G),X=L&&b.submissionDate,J=R||K||X;return(0,o.jsxs)("article",{className:Q,children:[(0,o.jsxs)(es,{borderType:L?"shadow":"speech",actionProps:{children:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(em,{children:(0,o.jsx)(w.ZP,{itemType:"TitleUserReview",upVotes:b.helpfulnessVotes?.upVotes??0,downVotes:b.helpfulnessVotes?.downVotes??0,pageConst:h,itemConst:b.reviewId,refTagPrefix:d})}),(0,o.jsx)(eI,{"data-testid":"item-share-menu",children:(0,o.jsx)(v.ZP,{iconButtonName:"more-vert",pageActionPrefix:`${(d??"").replace("_","-")}-share`,shareProps:H,url:n({tconst:h,refSuffix:I.Cd.EMPTY,query:{item:b.reviewId}})})})]})},"data-testid":F.PARENT,children:[S&&(0,o.jsx)(W,{...e}),J&&(0,o.jsxs)(ec,{children:[R&&(0,o.jsx)(ed,{className:O.TOP_REVIEW,text:k}),K&&(0,o.jsx)(u.RatingStar,{className:O.AUTHOR_REVIEW,formattedRating:M,type:ea(S,G),maxRating:S?void 0:10,ariaLabel:Y}),X&&b.submissionDate&&(0,o.jsx)(ev,{date:b.submissionDate})]}),(0,o.jsx)(J?ef:eg,{children:(0,o.jsx)(ep,{href:A,"data-testid":F.SUMMARY,children:b.reviewSummary})}),b.spoiler&&(0,o.jsxs)(o.Fragment,{children:[!B&&(0,o.jsx)(el,{ariaLabel:P,className:O.SPOILER_BUTTON,onColor:"error",onSelect:()=>q(!0),postIcon:"expand-more",children:U}),B&&(0,o.jsxs)("div",{"data-testid":F.SPOILER_CONTENT,children:[(0,o.jsx)(eu,{text:U,type:"spoiler"}),(0,o.jsx)(u.HTMLContent,{className:O.CONTENT,html:b.reviewText})]})]}),!b.spoiler&&(0,o.jsx)(u.OverflowText,{"data-testid":F.REVIEW_CONTENT,height:"long",bgContext:"listCard",clickAriaLabel:D,children:(0,o.jsx)(u.HTMLContent,{html:b.reviewText})})]}),!L&&(0,o.jsx)($,{author:b.author,permalink:A,date:b.submissionDate,index:y})]})};var er=eo;let ea=(e,t)=>e?"otherUser":t?"currentUser":"otherUserAlt",es=(0,l.default)(u.ListCard).withConfig({componentId:"sc-3e6f8aa9-0"})(["margin:0 0 "," 0;"],d.spacing.m),el=(0,l.default)(u.TextButton).withConfig({componentId:"sc-3e6f8aa9-1"})(["padding:0;"]),eu=(0,l.default)(u.Signpost).withConfig({componentId:"sc-3e6f8aa9-2"})(["margin-bottom:",";"],d.spacing.s),ed=(0,l.default)(u.Signpost).withConfig({componentId:"sc-3e6f8aa9-3"})(["align-self:center;"]),ec=l.default.div.withConfig({componentId:"sc-3e6f8aa9-4"})(["display:flex;justify-content:space-between;."," &{justify-content:start;& .","{margin-right:",";}}"],O.NO_FOOTER,O.AUTHOR_REVIEW,d.spacing.s),ef=l.default.div.withConfig({componentId:"sc-3e6f8aa9-5"})(["display:flex;margin-top:",";margin-bottom:",";"],d.spacing.m,d.spacing.s),eg=l.default.div.withConfig({componentId:"sc-3e6f8aa9-6"})(["display:flex;margin-bottom:",";"],d.spacing.s),ep=(0,l.default)(u.Title).withConfig({componentId:"sc-3e6f8aa9-7"})([""," margin:0;padding:0;"],(0,d.setTypographyType)("headline6")),em=l.default.div.withConfig({componentId:"sc-3e6f8aa9-8"})(["min-height:",";"],d.spacing.xxl),eI=l.default.div.withConfig({componentId:"sc-3e6f8aa9-9"})(["bottom:0;position:absolute;right:0;"]),ev=(0,l.default)(T).withConfig({componentId:"sc-3e6f8aa9-10"})(["",""],(0,d.setPropertyToColorVar)("color","ipt-on-base-textSecondary-color"))},55965:function(e,t,i){function o(e){if(e&&e.id&&e.author&&e.author.userId&&e.summary?.originalText&&e.text&&e.text?.originalText&&e.text?.originalText?.plaidHtml&&e.submissionDate)return{reviewId:e.id,authorRating:e.authorRating||void 0,author:{nickName:e.author.nickName||void 0,userId:e.author.userId},reviewSummary:e.summary.originalText,reviewText:e.text.originalText.plaidHtml,submissionDate:e.submissionDate||void 0,helpfulnessVotes:e.helpfulness?.upVotes||e.helpfulness?.downVotes?{upVotes:e.helpfulness.upVotes??0,downVotes:e.helpfulness.downVotes??0}:void 0,spoiler:!!e.spoiler}}function n(e,t,i){if(!i)return;let n=[];return i.forEach(i=>{let r=o(i.node);r&&n.push({titleId:e,titleText:t,review:r,isTopReview:!1})}),n}i.d(t,{Z:function(){return o},s:function(){return n}})},90367:function(e,t,i){var o=i(52322),n=i(2784),r=i(79855),a=i(19596),s=i(45103),l=i(91842),u=i(13433),d=i(85767),c=i(53951),f=i(40214),g=i(98046),p=i(1818),m=i(5246);let I=(0,a.default)(s.MetaDataListItem).withConfig({componentId:"sc-653fc139-0"})([""," margin-left:",";"],(0,l.setPropertyToColorVar)("color","ipt-on-base-accent3-color"),l.spacing.s),v=(0,a.default)(s.Loader).withConfig({componentId:"sc-653fc139-1"})(["padding:0.75rem;position:absolute;bottom:-0.5rem;left:0.5rem;margin-bottom:0.5rem;"]);t.ZP=e=>{let{className:t,itemType:i,upVotes:a,downVotes:l,pageConst:w,itemConst:h,refTagPrefix:T}=e,{context:{sidecar:b}}=(0,d.B)(),C=(0,r.Z)(),x=C.formatMessage(p.TY.voteLabel),_=C.formatMessage(p.TY.upVoteLabel),E=C.formatMessage(p.TY.upVoteLabelVoted),R=C.formatMessage(p.TY.downVoteLabelVoted),V=C.formatMessage(p.TY.downVoteLabel),y=C.formatMessage(p.TY.errorMessageLabel),[S,L]=(0,n.useState)(a),[k,D]=(0,n.useState)(l),[N,j]=(0,n.useState)("Loading"),{castUserVote:$}=(0,c.Z)(i),U=(0,f.q)("user-voting-helpful",g.qB.ACTION_ONLY,`${T}_user_voting_helpful`),P=(0,f.q)("user-voting-unhelpful",g.qB.ACTION_ONLY,`${T}_user_voting_unhelpful`);(0,n.useEffect)(()=>{if(b?.account.isLoggedIn){let e=(0,m.ES)(w,h);"Upvoted"===e?L(a+1):"Downvoted"===e&&D(l+1),j(e)}else(0,m.rw)(),j("Unvoted")},[]);let A="Upvoted"===N,M="Downvoted"===N;async function O(){let e=await $({pageConst:w,itemConst:h,voteValue:u.Of.Interesting});e===c.R.Success?(M&&D(l),L(a+1),(0,m.Dg)(w,h,u.Of.Interesting),j("Upvoted"),U()):e===c.R.Error&&j("Error")}async function F(){let e=await $({pageConst:w,itemConst:h,voteValue:u.Of.NotInteresting});e===c.R.Success?(A&&L(a),D(l+1),(0,m.Dg)(w,h,u.Of.NotInteresting),j("Downvoted"),P()):e===c.R.Error&&j("Error")}return"Loading"===N?(0,o.jsx)(v,{type:"circle",testId:p.z7.Loader,className:t}):"Error"===N?(0,o.jsx)(I,{listContent:[{text:y}],"data-testid":p.z7.Error,className:t}):(0,o.jsx)(s.Voting,{className:t,upCount:S,downCount:k,voteLabel:x,upAriaLabel:`${A?E:_}`,downAriaLabel:`${M?R:V}`,isUpvoted:A,isDownvoted:M,onUpvoteClicked:O,onDownvoteClicked:F,disableUpvote:A,disableDownvote:M,upIconClassName:"up-vote-btn",downIconClassName:"down-vote-btn"})}},1818:function(e,t,i){i.d(t,{TY:function(){return r},pe:function(){return n},z7:function(){return a}});var o=i(24667);let n="userVotingStorage",r=(0,o.vU)({voteLabel:{id:"feature_userVoting_label_helpful",defaultMessage:"Helpful"},upVoteLabel:{id:"feature_userVoting_ariaLabel_isHelpful",defaultMessage:"Is helpful"},downVoteLabel:{id:"feature_userVoting_ariaLabel_isNotHelpful",defaultMessage:"Is not helpful"},upVoteLabelVoted:{id:"feature_userVoting_ariaLabel_upVoted",defaultMessage:"Is helpful (You found this helpful)"},downVoteLabelVoted:{id:"feature_userVoting_ariaLabel_downVoted",defaultMessage:"Is unhelpful (You found this unhelpful)"},errorMessageLabel:{id:"feature_userVoting_error_message",defaultMessage:"Error: Please try again later"}}),a={Loader:"user-voting-loader",Error:"user-voting-error"}},5246:function(e,t,i){i.d(t,{Dg:function(){return a},ES:function(){return u},cR:function(){return d},rw:function(){return s}});var o=i(13433),n=i(72331),r=i(1818);function a(e,t,i){let o=l(),a=o[e];if(a){let e=a.find(e=>e[t]);e?e[t]=i:a.push({[t]:i})}else o[e]=[{[t]:i}];(0,n.Ps)(r.pe,o)}function s(){(0,n.VV)(r.pe)}function l(){return(0,n.PK)(r.pe)??{}}function u(e,t){let i=l()[e];if(!i)return"Unvoted";{let e=i.find(e=>e[t]);return e?e[t]===o.Of.Interesting?"Upvoted":"Downvoted":"Unvoted"}}function d(e,t){let i=l()[e];if(!i)return;let o=i.find(e=>e[t]);if(o)return o[t]}},41412:function(e,t,i){i.d(t,{GA:function(){return D},Yp:function(){return N}});var o=i(52322),n=i(2784),r=i(79855),a=i(19596),s=i(45103),l=i(91842),u=i(25436),d=i(13433),c=i(52817),f=i(72814),g=i(27261),p=i(69635),m=i(78270),I=i(25673),v=i(29639),w=i(60251);let h=e=>(0,w.Yh)(JSON.stringify({actionId:"start",target:{workflowId:`contribute__title__faq__${e.operation}_faq`},ctaContext:{titleId:e.subjectId,faqId:e.itemId}})),T=(e,t)=>(0,w.Yh)(JSON.stringify({actionId:"start",target:{workflowId:`contribute__title__parental_guide__${e.operation}_parental_guide`},ctaContext:{titleId:e.subjectId,parentalGuideId:e.itemId},additionalInput:{category:b(t)}})),b=e=>e&&e.toLowerCase(),C=e=>(0,w.Yh)(JSON.stringify({actionId:"start",target:{workflowId:`contribute__title__user_review__${e.operation}_user_review`},ctaContext:{titleId:e.subjectId,userReviewId:e.itemId}})),x=e=>{switch(e.itemType){case u.SubPageType.PARENTAL_GUIDE:return T(e,e.category);case u.SubPageType.FAQ:return h(e);case u.SubPageType.REVIEW:return C(e);default:throw Error("CreateStartWorkflowActionContext: Invalid contribute item type")}};var _=i(69851),E=i(27106),R=i(23760),V=i(40688);let y=(0,n.createContext)({openDrawer:()=>void 0,getContributionProps:()=>({workflowActionContext:"",workflowType:d.yL.Add})}),S=()=>({isParentalGuideEnabled:(0,I.hg)({weblabID:m.lh.IMDB_SDUI_PARENTAL_GUIDE_1123428,treatments:{T1:!0}}),isReviewEnabled:(0,I.hg)({weblabID:m.lh.IMDB_SDUI_REVIEWS_1121986,treatments:{T1:!0}}),isReviewReportingEnabled:(0,I.hg)({weblabID:m.lh.IMDB_SDUI_REVIEWS_REPORT_1151676,treatments:{T1:!0}})}),L={[v.k.Add]:d.yL.Add,[v.k.Edit]:d.yL.Edit,[v.k.Report]:d.yL.Report,[v.k.Delete]:d.yL.Delete},k=(e,t)=>e.itemType===u.SubPageType.PARENTAL_GUIDE?t.isParentalGuideEnabled:e.itemType!==u.SubPageType.REVIEW||(e.operation===v.k.Report?t.isReviewReportingEnabled:t.isReviewEnabled),D=e=>{let{children:t}=e,i=(0,r.Z)(),a=(0,c.n)(),[l,u]=(0,n.useState)(void 0),[d,m]=(0,n.useState)(!1),[I,v]=(0,n.useState)(!1),w=S(),h=(0,g.iI)(),{value:T}=(0,f.Lz)();return(0,o.jsxs)(y.Provider,{value:{openDrawer:e=>{h(T,"contribution-drawer-open"),a?(u(e),m(!0)):(0,p.r)("sdui_login_signup")},getContributionProps:e=>{if(k(e,w))return{workflowActionContext:x(e),workflowType:L[e.operation]}}},children:[(0,o.jsx)(j,{ariaLabel:i.formatMessage({id:"sdui_contribution_dialog_label",defaultMessage:"contribution"}),isOpen:d,onCloseClicked:()=>v(!0),side:"right",panelClassName:"panel-container",contentClassName:"panel-content",children:(0,o.jsx)(R.Xi,{children:(0,o.jsx)(s.SetPalette,{palette:"light",children:(0,o.jsx)($,{"data-testid":V.z.SDUIContributionDrawer,children:l&&(0,o.jsx)(_.kw,{actionContext:l,children:(0,o.jsx)(E.$,{shouldCancelUIWorkflow:I,onAbortUIWorkflowCancelConfirmation:()=>v(!1),onCancel:()=>{m(!1),v(!1)}})})})})})}),t]})},N=()=>{let e=(0,n.useContext)(y);if(!e)throw Error("useSDUIContribution must be used within SDUIContributionProvider");return e},j=(0,a.default)(s.Drawer).withConfig({componentId:"sc-a2e1b82c-0"})(["","{","{.panel-container{max-width:100%;}.panel-content{max-width:500px;margin-left:auto;}}}"],l.mediaQueries.devices.onTouchScreens,l.mediaQueries.breakpoints.below.xl),$=a.default.div.withConfig({componentId:"sc-a2e1b82c-1"})(["height:100%;background:",";",""],(0,l.getColorVarValue)("ipt-base-shade2-bg"),(0,l.setPropertyToColorVar)("color","ipt-baseAlt-color"))},40688:function(e,t,i){i.d(t,{z:function(){return o}});let o={SDUIContributionCTA:"sdui-workflow-cta-button",SDUIContributionCTALink:"sdui-workflow-cta-link",SDUIContributionDrawer:"sdui-workflow-dialog"}},29639:function(e,t,i){var o,n;i.d(t,{k:function(){return o}}),(n=o||(o={})).Add="add",n.Edit="edit",n.Report="report",n.Delete="delete"},83082:function(e,t,i){i.d(t,{e:function(){return r}});var o=i(79855),n=i(11793);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.Z)();return(0,n.Z)()||t.timeZone||(t.timeZone="America/Los_Angeles"),i.formatDate(e,t)}},53951:function(e,t,i){i.d(t,{R:function(){return n},Z:function(){return d}});var o,n,r=i(48574),a=i(29609),s=i(30382),l=i.n(s),u=i(2784);function d(e){let{mutation:t,transform:i}=(0,u.useMemo)(()=>{switch(e){case"CrazyCredit":return{mutation:l()` mutation TitleCrazyCreditsVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleCrazyCredits( input: { contextTitleId: $pageConst crazyCreditId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleCrazyCredits?.success??!1};case"TitleTrivia":return{mutation:l()` mutation TitleTriviaVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleTrivia( input: { contextTitleId: $pageConst triviaId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleTrivia?.success??!1};case"Goof":return{mutation:l()` mutation TitleGoofsVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleGoofs( input: { contextTitleId: $pageConst goofId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleGoofs?.success??!1};case"TitleKeyword":return{mutation:l()` mutation TitleKeywordsVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleKeywords( input: { contextTitleId: $pageConst keywordId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleKeywords?.success??!1};case"FilmingLocation":return{mutation:l()` mutation TitleLocationsVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleLocations( input: { contextTitleId: $pageConst locationId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleLocations?.success??!1};case"TitleQuote":return{mutation:l()` mutation TitleQuotesVoting( $pageConst: ID! $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingTitleQuotes( input: { contextTitleId: $pageConst quoteId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingTitleQuotes?.success??!1};case"ParentsGuideItem":return{mutation:l()` mutation TitleParentalGuideVoting( $domain: SeverityDomain! $titleId: ID! $vote: SeverityVote! ) { voteForSeverityTitleParentalGuide( input: { domain: $domain titleId: $titleId vote: $vote } ) { success } } `,transform:e=>e.voteForSeverityTitleParentalGuide?.success??!1};case"TitleUserReview":return{mutation:l()` mutation TitleUserReviewVoting( $itemConst: ID! $voteValue: InterestingVote! ) { voteForInterestingUserReview( input: { userReviewId: $itemConst vote: $voteValue } ) { success } } `,transform:e=>e.voteForInterestingUserReview?.success??!1}}},[e]),o=(0,r.wL)("util_useUserVotingMutations"),[n,s]=(0,a.Z)(t,{requireAuth:!0}),d=t=>{let{data:n,error:r}=t??{};return n?!0===i(n)?0:(o.error(`Mutation call was unsucessful for ${e}`),1):r?(o.error(`Mutation call failed for ${e}`,r.message,r.stack),1):2};return{castUserVote:async e=>d(await s(e)??{})}}(o=n||(n={}))[o.Success=0]="Success",o[o.Error=1]="Error",o[o.Redirect=2]="Redirect"}}]);