"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2258],{13931:function(e,t,a){a.d(t,{Z:function(){return Q}});var r=a(52322),i=a(2784),n=a(54588),s=a(86958),o=a(82453),d=a(51250);let l="ad-oo",u={setConsentToCookie:(e,t,a)=>{let r=(0,d.rZ)(l,a),i=0;if(void 0!==r&&(("number"==typeof r||"string"==typeof r)&&(i=parseInt(r)),i&t&&!e||!(i&t)&&e))return;e||(i|=t);let n=new Date;n.setHours(n.getHours()+36),(0,d.Ys)(l,i.toString(),n,"shared")}};var c=a(16189),f=a(54073),p=a.n(f),h=a(45455),w=a.n(h),g=a(91754),m=a(22431),v=a(64461),y=a(56044),A=a(113),b=a(95707),S=a(78056),_=a(67246),E=a(30382),I=a.n(E);I()` query WebAdsConfig($input: Experimental_WebAdsInput!) { experimental_webAdsConfig(input: $input) { headerMarkup slots { name creativeInfo { size { height width } slotMarkup isPremium isEligibleFor3pAd aaxAdType adProductType { name symbol grade } creativeId } adFeedbackUrl } responsiveSlotSizes { slotName breakpoints { breakpoint slotSize { height width } } } plaidOverrides { key value } apsSlotInfoMap { slotName apsSlotId apsSlotName apsSlotParams { key value } } slotsEnabled hasPremiumAd adRefreshEnabled } } `;let k=I()` query WebAds($input: Experimental_WebAdsInput!) { experimental_webAds(input: $input) { slots { name creativeInfo { size { width height } slotMarkup isPremium isEligibleFor3pAd aaxAdType adProductType { name symbol grade } creativeId } adFeedbackUrl } hasPremiumAd responsiveResizingDisabledSlots { name breakpoints { breakpoint disabled } } } } `,R=async(e,t,a)=>t.queryWithContext(k,e.params,{personalized:!0,serverSideCacheable:!1}).toPromise().catch(e=>(a.error("Failure in calling ads graphlet for WebAds query",e.message),null)),P=async(e,t,a)=>{if(!window.ad_utils?.adsGraphletUtils||!e.adFetchingInfo||!e.adFetchingInfo.params.input.adTargetingParameters)return;let r=Object.keys(e.slots??{}).join(","),i=window.ad_utils.adsGraphletUtils.transformSlotSizeMap(r,e.slotSizeMap??{}),n=structuredClone(e.adFetchingInfo);n.params.input.adTargetingParameters.slotSizeMap=i;let s=await R(n,t,a);if(!s?.data)return;let o=window.ad_utils.adsGraphletUtils.transformWebAdsOutput(s.data.experimental_webAds),d=e.apsSlotInfoMap??{},l=_.k.getPreviousWindowWidth(),u=(0,S.QH)(r,i,window.innerWidth,l);_.k.handleAdsGraphletResponse(o,d,u)};var M=a(22873);let L=(e,t)=>{window?.mediaOrchestrator?.publish(e,t)};var x=a(47401),C=a(98537),O=a.n(C);let N={init:()=>{try{window?.imdb_ad_debug||(window.imdb_ad_debug=N)}catch{}},override:e=>{try{N.init(),O()(N,e)}catch{}},adRefresh:{isPaused:!1,pause:()=>{N.override({adRefresh:{isPaused:!0}})},resume:()=>{N.override({adRefresh:{isPaused:!1}})}},auction:{default:()=>{window.ad_utils?.apsAuctionManager?.forceDefaultRender()},preferAaxAds:()=>{window.ad_utils?.apsAuctionManager?.forceAaxRender()},prefer3pAds:()=>{window.ad_utils?.apsAuctionManager?.forceApsRender()},view3pAdAuditLog:()=>{window.ad_utils?.apsAuctionManager?.viewAuditLog()}}};var W=a(503),F=a(59938);let T={isReady:!1,hasSetInterval:!1},j=e=>{e.adRefreshInfo&&(e.adRefreshInfo.slotRefreshEligibility=Object.entries(e.adRefreshInfo.slotRefreshEligibility).reduce((e,t)=>{let[a]=t;return{...e,[a]:z(a)}},{}),$(e.adRefreshInfo))&&(document.addEventListener("visibilitychange",D),window.addEventListener("updateAdRefreshStateForSlot",t=>{if(t.detail){let{slotName:a,shouldSlotRefresh:r}=t.detail;H(a,r,e)}}),T.isReady=!0,window.setInterval(G,1e3*e.adRefreshInfo.intervalInSeconds,e),T.hasSetInterval=!0,N.override({adRefresh:{tryRefresh:()=>{G(e,!0)}}}))},D=()=>{"visible"===document.visibilityState?(T.isReady=!0,T.postResponseCallback=void 0):T.postResponseCallback=()=>{T.isReady=!1}},$=e=>!(0,W.Wl)()&&!!(!T.hasSetInterval&&e.isEnabled&&e.intervalInSeconds),z=e=>q(e)&&(0,F.Gr)(e)&&!J(e)&&!U(e),q=e=>!!window?.AdSlots?.[e],U=e=>{let t=window.ad_utils?.get_slot_iframe(e);return!!t?.hasAttribute("data-first-party-creative-template")},J=e=>window.AdSlots?.[e]?.creativeMetadata?.adProductType?.grade===x.rP.PREMIUM,G=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];N.adRefresh?.isPaused&&!t||!T.isReady||(0,M.rm)()||Y(e).then(T.postResponseCallback)},Y=e=>{let t=e.clientSideUrl||"",a=e.apsSlotInfoMap||{},r=Object.keys(e.adRefreshInfo?.slotRefreshEligibility||{}).filter(t=>e.adRefreshInfo?.slotRefreshEligibility[t])||[],i=Object.keys(e.slotSizeMap||{}).filter(e=>r.includes(e)).map(t=>({[t]:(e.slotSizeMap||{})[t]})).reduce(V,{}),n=Object.keys(i=B(i)).join(",");if(!(Object.keys(a).length>0))return(0,b._J)(t,n,i,0,{},void 0,void 0);{let e=_.k.getPreviousWindowWidth(),r=(0,S.QH)(n,i,e);return(0,b._J)(t,n,i,0,{},void 0,void 0,a,r)}},B=e=>Object.keys(e||{}).map(t=>({[t+"_refresh"]:(e||{})[t]})).reduce(V,{}),H=(e,t,a)=>{a&&a.adRefreshInfo&&a.adRefreshInfo.slotRefreshEligibility&&e&&Object.keys(a.adRefreshInfo.slotRefreshEligibility).includes(e)&&(a.adRefreshInfo.slotRefreshEligibility[e]=t)},V=(e,t)=>({...e,...t});var X=a(22862),K=a(54172);let Z=e=>{let{adSlotsInfo:t}=e;(0,A.WJ)();let a=(0,g.x)(),n=(0,c.createLogger)()("AdPageData"),s=()=>{(0,M.rm)()||(t.adFetchingInfo?P(t,a,n).finally(()=>_.k.setPreviousWindowWidth()):(0,b.cU)(t).finally(()=>_.k.setPreviousWindowWidth()))},{slotsEnabled:o,clientSideUrlBase:d,adSlots:l,slotSizeMap:u,apsSlotInfoMap:f}=(0,A.OF)(t),h=!!t.adFetchingInfo;i.useEffect(()=>{let e,a;if(o&&!w()(u)&&(_.k.setPreviousWindowWidth(),e=p()(s,750),window.addEventListener("resize",e),t?.adRefreshInfo?.isEnabled&&!h&&("complete"===document.readyState?j(t):window.addEventListener("load",()=>j(t)))),!o||!d||!l.includes(m.A.INLINE20)){let e={type:v.X.NO_AUTOPLAY_VIDEO_DETECTED_EVENT_TYPE,slotName:m.A.INLINE20,timestamp:Date.now()},t={type:v.X.EMPTY,slotName:"",timestamp:Date.now()};L(y.x.MEDIA_PLAYBACK_EVENT_NAME,e),L(y.x.NO_PRIMARY_ADS_TO_LOAD_EVENT_NAME,t)}return()=>{e&&window.removeEventListener("resize",e),a&&window.removeEventListener("load",a)}},[]);let S=t.adFetchingInfo?(0,A.f8)(t.adFetchingInfo,l,JSON.stringify(u),JSON.stringify(f)):(0,A.sd)(o,d,l,u,f),E=(0,X.Cq)(t);return(0,r.jsxs)(r.Fragment,{children:[E?(0,r.jsx)(K.j,{sisSlotMarkup:E}):null,(0,r.jsx)("script",{async:!0,dangerouslySetInnerHTML:{__html:S}})]})};function Q(){let e=(0,s.B)(),{adSlotsInfo:t}=(0,o.Ok)();return e?.context?.sidecar?.ads?.adsCcbaConsent!==void 0&&u.setConsentToCookie(e.context.sidecar?.ads?.adsCcbaConsent,16,e.context?.headers),(0,r.jsx)(n.Z,{name:"IMDbNextAdPageData",children:(0,r.jsx)(Z,{adSlotsInfo:t})})}},54172:function(e,t,a){a.d(t,{j:function(){return y}});var r,i,n=a(52322),s=a(2784),o=a(23906),d=a(59938);let l=(0,a(16189).createLogger)()("util_sisPixel_rws");(r=i||(i={})).GRANTED="granted",r.PROMPT="prompt",r.DENIED="denied";let u=new Set().add("fake_treatment_1.1").add("fake_treatment_1.2").add("fake_treatment_1.3").add("fake_control_2"),c=["mousedown","scroll","keydown"],f="https://amazon-adsystem.com",p=async()=>{let e="cookieDeprecationLabel"in navigator,t="requestStorageAccessFor"in document;if(!e||!t)return l.log("Browser not compatible with Related Website Sets",{hasCookieDeprecationLabel:e,hasRequestStorageAccessFor:t}),!1;try{let e=await navigator.cookieDeprecationLabel.getValue();return l.log(`Received cookieDeprecationLabel: ${e}`),u.has(e)}catch(e){return l.error("Issue fetching cookieDeprecationLabel",e),!1}},h=async()=>{let e=await g();switch(l.log(`Received storageAccessPermissionStatus: ${e}`),e){case"granted":return m();case"prompt":return w()}l.log(`'top-level-storage-access' permissions for ${f}: denied`)},w=async()=>{let e;if(!navigator.userActivation)return;let t=new Promise(t=>{e=e=>t(e)}),a=async()=>{navigator.userActivation.isActive&&(c.forEach(e=>{document.removeEventListener(e,a)}),await m(),e(!0))};return c.forEach(e=>{document.addEventListener(e,a)}),t},g=async()=>{try{return(await navigator.permissions.query({name:"top-level-storage-access",requestedOrigin:f})).state}catch(e){l.error("Error querying Storage Access permissions",e);return}},m=async()=>{if("requestStorageAccessFor"in document)try{return await document.requestStorageAccessFor(f),!0}catch(e){l.error("Error requesting storage access",e)}};var v=a(22862);let y=s.memo(e=>{let{sisSlotMarkup:t}=e,[a,r]=(0,s.useState)(!1),i=(0,o.wL)("util_sisSlotMarkup");return(0,s.useEffect)(()=>{(async()=>{if(!await p())return r(!0);await h();let e=(0,v.ri)(t,i);e&&await (0,v.Lg)(e,i)})()},[]),a?(0,n.jsx)("div",{ref:d.SK.bind(null,t)}):null})},113:function(e,t,a){a.d(t,{OF:function(){return d},WJ:function(){return n},Wd:function(){return u},a5:function(){return l},f8:function(){return s},sd:function(){return o}});var r=a(83473),i=a(47401);let n=()=>{void 0===window.hasAdAJAXCallFired&&(window.hasAdAJAXCallFired=!1)},s=(e,t,a,i)=>{let n=e.endpoint,s=(0,r.S)(e.query),o=JSON.stringify(e.params);return` if (window && window.ad_utils && window.ad_utils.makeAdsGraphletCall) { window.ad_utils.makeAdsGraphletCall( '${n}', \`${s}\`, ${o}, '${t}', ${a}, ${i??{}} ); }`},o=(e,t,a,r,i)=>` if (window && window.ad_utils && window.ad_utils.makeAdSlotsCall) { window.ad_utils.makeAdSlotsCall( ${e}, '${t}', '${a}', ${JSON.stringify(r)}, ${i?JSON.stringify(i):"{}"}); }`,d=e=>({slotsEnabled:!e||e.slotsEnabled,clientSideUrlBase:e?e.clientSideUrl:"",adSlots:e&&e.slots?Object.keys(e.slots).join(","):"",slotSizeMap:e?e.slotSizeMap:{},apsSlotInfoMap:e&&e.apsSlotInfoMap||{}}),l=()=>{window?.lastActualAdMarkup||(window.lastActualAdMarkup={})},u=e=>!e||e?.creativeMetadata?.creativeWidth===0||e?.creativeMetadata?.adProductType?.name===i.A7.BLANK},22862:function(e,t,a){a.d(t,{Cq:function(){return i},Lg:function(){return s},ri:function(){return n}});var r=a(22431);let i=e=>{let t=e?.slots;return t&&t[r.A.SIS_PIXEL]?.slotMarkup},n=(e,t)=>{let a=e.match(/el\.src="(.*)";/),r=a?a[1]:void 0;return r||t.error("Failed to retrieve SIS Pixel URL"),r},s=async(e,t)=>{try{return await fetch(e,{method:"GET",credentials:"include"}),!0}catch(e){t.error("Error fetching SIS Pixel",e)}}},73286:function(e,t,a){a.d(t,{W:function(){return i}});var r=a(52322);function i(e){return e&&0!==e.length?(0,r.jsx)(r.Fragment,{children:e.map(e=>(0,r.jsx)("link",{rel:"alternate",href:e.url,hrefLang:e.language},`href_lang_${e.language}`))}):null}a(2784)}}]);