(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4430],{97125:function(e,n,t){e.exports=t(59385)},68324:function(e,n,t){"use strict";var o=t(17279),r=t(25199),a=t(16147),i=t(61391);t(19796);var l=t(68079),c=t.n(l),d=t(49561),u=t.n(d),s=t(37984),m=t.n(s),v=t(93341),g=t.n(v),p=t(85143),f=t(54505),b=t.n(f),h=["quote","hero","expandableTextSection","video","twoColumnContainer","links","timeline","discoverProductCollection","customComponent","textSection","countdown","quizEvent","flexibleCarousel","flexibleContainer","contentList","fullWidthPromo","userIdentityChecklist"],_={contentSlots:c().array.isRequired,theme:c().string,isModal:c().bool,patronusData:c().array,pageData:c().object},renderContent=function(e,n,o,l,c){switch(e.contentTypeId){case"quote":var d=u()(Promise.all([t.e(4986),t.e(7361)]).then(t.bind(t,24986)),{loadableGenerated:{webpack:function(){return[24986]}}});return(0,i.jsx)(d,{quote:e});case"hero":if("with-cta"===e.heroDepth){var s=u()(Promise.all([t.e(4027),t.e(7354),t.e(8824),t.e(5246)]).then(t.bind(t,66670)),{loadableGenerated:{webpack:function(){return[66670]}}});return(0,i.jsx)(s,(0,r._)({},e))}if("discover"===e.heroDepth){var v=u()(t.e(2169).then(t.bind(t,82169)),{loadableGenerated:{webpack:function(){return[82169]}}});return(0,i.jsx)(v,(0,r._)({},e))}if("discover-product"===e.heroDepth){var p=u()(Promise.all([t.e(7354),t.e(7553)]).then(t.bind(t,87553)),{loadableGenerated:{webpack:function(){return[87553]}}});return(0,i.jsx)(p,(0,r._)({},e))}var f=u()(Promise.all([t.e(4027),t.e(235)]).then(t.bind(t,10235)),{loadableGenerated:{webpack:function(){return[10235]}}});return(0,i.jsx)(f,(0,a._)((0,r._)({},e),{image:e.backgroundImage?"".concat(e.backgroundImage.file.url,"?w=1920"):null,image2x:e.backgroundImage?"".concat(e.backgroundImage.file.url,"?w=3840"):null,mobileImage:e.mobileBackgroundImage?"".concat(e.mobileBackgroundImage.image.file.url):null,title:e.displayTitle,scrollIndicator:!0,modalHero:o}));case"expandableTextSection":var h=u()(t.e(6331).then(t.bind(t,6331)),{loadableGenerated:{webpack:function(){return[6331]}}});return(0,i.jsx)(h,{section:e});case"textSection":var _,x=u()(t.e(5607).then(t.bind(t,85607)),{loadableGenerated:{webpack:function(){return[85607]}}});return e.text=(_=null==e?void 0:e.text,new(m())({html:!0,linkify:!1}).render(_)),(0,i.jsx)(x,{className:g()(b().hundredPercent,b().textSection),section:e},"".concat(e.contentfulId));case"video":var P,w,k,C=u()(Promise.all([t.e(2748),t.e(6839),t.e(7384)]).then(t.bind(t,6839)),{loadableGenerated:{webpack:function(){return[6839]}},ssr:!1});return(0,i.jsx)(C,{videoUrl:e.videoFileSource,title:e.displayTitle,image:null===(k=e.mainImage)||void 0===k?void 0:null===(w=k.image)||void 0===w?void 0:null===(P=w.file)||void 0===P?void 0:P.url,videoContent:e,containerContent:{contentId:null==c?void 0:c.contentfulId,contentType:null==c?void 0:c.contentTypeId,contentName:null==c?void 0:c.entryTitle,contentTags:(null==c?void 0:c.tags)||[],activationDate:null==c?void 0:c.activationDate},showContentOverlay:!0});case"twoColumnContainer":var y=u()(t.e(2152).then(t.bind(t,62152)),{loadableGenerated:{webpack:function(){return[62152]}},ssr:!1});return(0,i.jsx)(y,{contentSlots:e.contentSlots});case"links":if("fan-club"===n){var j,G,T,I=u()(t.e(8541).then(t.bind(t,48541)),{loadableGenerated:{webpack:function(){return[48541]}}});return(0,i.jsx)(I,(0,a._)((0,r._)({},e),{image:null==e?void 0:null===(T=e.mainImage)||void 0===T?void 0:null===(G=T.image)||void 0===G?void 0:null===(j=G.file)||void 0===j?void 0:j.url}))}var S=u()(t.e(7048).then(t.bind(t,37048)),{loadableGenerated:{webpack:function(){return[37048]}}});return(0,i.jsx)(S,(0,r._)({},e));case"timeline":var D=u()(Promise.all([t.e(3737),t.e(809),t.e(7354),t.e(3727)]).then(t.bind(t,43727)),{loadableGenerated:{webpack:function(){return[43727]}}});return(0,i.jsx)(D,(0,r._)({},e));case"discoverProductCollection":var E=u()(Promise.all([t.e(7354),t.e(2620)]).then(t.bind(t,55637)),{loadableGenerated:{webpack:function(){return[55637]}}});return(0,i.jsx)(E,(0,r._)({},e));case"countdown":var z=u()(t.e(6682).then(t.bind(t,86682)),{loadableGenerated:{webpack:function(){return[86682]}}});return(0,i.jsx)(z,(0,r._)({},e));case"quizEvent":var H=e.quizzes;H.forEach(function(n,t){var o="".concat((null==e?void 0:e.quizNumberLabel)||"week-"," ").concat(t+1),r="challenge-".concat(null==e?void 0:e.eventId),a=null==n?void 0:n.displayTag.filter(function(e){return!(null==e?void 0:e.name.includes("week-"))&&!(null==e?void 0:e.name.includes("challenge-"))});n.tags||(n.tags=[]),n.displayTag=a,n.displayTag.unshift({name:o}),n.tags.push({name:r})});var N=u()(Promise.all([t.e(7354),t.e(6248),t.e(4713),t.e(1734),t.e(1728)]).then(t.bind(t,81728)),{loadableGenerated:{webpack:function(){return[81728]}}}),q=u()(Promise.all([t.e(3737),t.e(809),t.e(7354),t.e(212),t.e(3975),t.e(9741)]).then(t.bind(t,29741)),{loadableGenerated:{webpack:function(){return[29741]}}});return(0,i.jsxs)("div",{className:b().quizEvent,children:[(0,i.jsx)(N,(0,r._)({eyebrow:null==e?void 0:e.leaderboardEyebrow,header:null==e?void 0:e.leaderboardHeader,subheader:null==e?void 0:e.leaderboardSubheader,customField1:{text:null==e?void 0:e.eventId},customField2:{image:null==e?void 0:e.leaderboardNoHouseBackground},customField3:{image:null==e?void 0:e.leaderboardGryffindorBackground},customField4:{image:null==e?void 0:e.leaderboardRavenclawBackground},customField5:{image:null==e?void 0:e.leaderboardHufflepuffBackground},customField6:{image:null==e?void 0:e.leaderboardSlytherinBackground},customField7:{text:null==e?void 0:e.winnerStateActivated.toString()}},e)),!e.winnerStateActivated&&(0,i.jsx)(q,{contentSlots:H,customField1:{text:e.allQuizzesCompletedText,contentType:"textsection"}})]});case"flexibleCarousel":var F=u()(Promise.all([t.e(809),t.e(3765)]).then(t.bind(t,43765)),{loadableGenerated:{webpack:function(){return[43765]}}});return(0,i.jsx)(F,(0,r._)({},e));case"flexibleContainer":var B=u()(Promise.all([t.e(7543),t.e(6020)]).then(t.bind(t,67543)),{loadableGenerated:{webpack:function(){return[67543]}}});return(0,i.jsx)(B,(0,r._)({},e));case"contentList":var O=u()(t.e(7264).then(t.bind(t,17264)),{loadableGenerated:{webpack:function(){return[17264]}}});return(0,i.jsx)(O,(0,r._)({},e));case"fullWidthPromo":var W=u()(t.e(260).then(t.bind(t,70260)),{loadableGenerated:{webpack:function(){return[70260]}}});return(0,i.jsx)(W,(0,r._)({},e));case"userIdentityChecklist":var A=u()(Promise.all([t.e(8476),t.e(5635)]).then(t.bind(t,53426)),{loadableGenerated:{webpack:function(){return[53426]}}});return(0,i.jsx)(A,{patronusData:l,analyticsParams:e,header:null==e?void 0:e.header,housePercentages:{gryffindor:(null==e?void 0:e.gryffindorPercentage)||32,hufflepuff:(null==e?void 0:e.hufflepuffPercentage)||40,ravenclaw:(null==e?void 0:e.ravenclawPercentage)||12,slytherin:(null==e?void 0:e.slytherinPercentage)||16}});case"customComponent":var R=u()(t.e(186).then(t.bind(t,186)),{loadableGenerated:{webpack:function(){return[186]}}});return(0,i.jsx)(R,(0,r._)({},e));default:return null}},indexPromoSlots=function(e){var n=0;e.forEach(function(e,t){e.promoIndex=t,"links"===e.contentTypeId&&(e.leftAligned=n%2!=0,n+=1)})},GenericPageComponents=function(e){var n=e.contentSlots,t=e.isModal,l=void 0!==t&&t,c=e.theme,d=void 0===c?"":c,u=e.patronusData,s=void 0===u?[]:u,m=e.pageData,v=void 0===m?{}:m;return indexPromoSlots(n),(0,i.jsx)("div",{className:[b().genericPageContainer,l?b().genericPageModal:null].join(" "),"data-themed":"true",children:n.map(function(e,t){if(!h.includes(e.contentTypeId))return null;var c,u,m=(0,o._)({},p.g,e.contentfulId);return(0,i.jsx)("div",(0,a._)((0,r._)({className:g()(b().section,(u={hero:0===t},(0,o._)(u,b().hero,0===t),(0,o._)(u,b().shiftUp,(null==n?void 0:null===(c=n[0])||void 0===c?void 0:c.heroDepth)==="shallow"&&1===t),(0,o._)(u,b().bottomOverlap,"QuizLeaderboard"===e.componentName),(0,o._)(u,b().fullWidth,["hero","timeline","discoverProductCollection","quizEvent"].includes(e.contentTypeId)||["SocialCarousel","QuizLeaderboard","PromoRow","Spotlight"].includes(e.componentName)),(0,o._)(u,b().canBeHidden,["HouseSortingStats"].includes(e.componentName)),u))},m),{children:renderContent(e,d,l,s,v)}),e.contentfulId)})})};GenericPageComponents.propTypes=_,n.Z=GenericPageComponents},90392:function(e,n,t){"use strict";var o=t(61391);t(19796);var r=t(68079),a=t.n(r),i=t(97125),l=t.n(i),c=t(77792),d=t(76185),u={title:a().string,description:a().string,omitTitlePrefix:a().bool,dynamicLinkTags:a().arrayOf(a().shape({rel:a().string,href:a().string})),ogTitle:a().string,ogDescription:a().string,ogImage:a().string,twitterImage:a().string,canonicalUrl:a().string,robots:a().string},s="Harry Potter | Official home of Harry Potter and the Wizarding World",m="Harry Potter | ",v="Official home of Harry Potter & Fantastic Beasts. Discover your Hogwarts house, wand and Patronus, play quizzes, read features, and keep up to speed on the latest Wizarding World news.",correctTitleAndDescription=function(e,n,t){var o=e||s,r=n||v;return t||o.startsWith(m)||(o="".concat(m).concat(o)),{cTitle:o,cDescription:r}},HeadMeta=function(e){var n=e.title,t=void 0===n?s:n,r=e.description,a=void 0===r?v:r,i=e.omitTitlePrefix,u=e.dynamicLinkTags,m=e.ogTitle,g=void 0===m?"":m,p=e.ogDescription,f=void 0===p?"":p,b=e.ogImage,h=e.twitterImage,_=e.canonicalUrl,x=void 0===_?"":_,P=e.robots,w=void 0===P?"":P,k=correctTitleAndDescription(t,a,void 0!==i&&i),C=k.cTitle,y=k.cDescription,j=(0,c.$G)(y,200),G=function(){if(0===x.indexOf("http://")||0===x.indexOf("https://"))return"".concat(x);var e=d.env.REACT_APP_SSR_URI_OVERRIDE||"https://www.harrypotter.com";return"".concat(e).concat(x)}();return(0,o.jsxs)(l(),{children:[(0,o.jsx)("title",{children:C}),(0,o.jsx)("meta",{name:"description",content:j},"description"),(void 0===u?[]:u).map(function(e){var n=e.rel,t=e.href;return(0,o.jsx)("link",{rel:n,href:t},t)}),(0,o.jsx)("meta",{property:"og:title",content:g||C},"og:title"),(0,o.jsx)("meta",{property:"og:description",content:f||y},"og:description"),(0,o.jsx)("meta",{property:"og:image",content:void 0===b?"":b}),(0,o.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,o.jsx)("meta",{name:"twitter:title",content:g||C}),(0,o.jsx)("meta",{name:"twitter:description",content:f||y}),(0,o.jsx)("meta",{name:"twitter:image",content:void 0===h?"":h}),x&&(0,o.jsx)("link",{rel:"canonical",href:G}),w&&(0,o.jsx)("meta",{name:"robots",content:w})]})};HeadMeta.propTypes=u,n.Z=HeadMeta},15610:function(e,n,t){"use strict";t.d(n,{ZP:function(){return __WEBPACK_DEFAULT_EXPORT__},lO:function(){return usePageContext}});var o=t(17636),r=t(61391),a=t(19796),i=(0,a.createContext)(),usePageContext=function(){return(0,a.useContext)(i)};function __WEBPACK_DEFAULT_EXPORT__(e){var n=e.children,t=e.initialPageName,l=(0,o._)((0,a.useState)(t),2),c=l[0],d=l[1];return(0,r.jsx)(i.Provider,{value:{pageName:c,setPageName:d},children:n})}},54505:function(e){e.exports={genericPageContainer:"GenericPageComponents_genericPageContainer__gdHle",textSection:"GenericPageComponents_textSection__2gqss",genericPageModal:"GenericPageComponents_genericPageModal__agK88",hundredPercent:"GenericPageComponents_hundredPercent__kYMgW",quizEvent:"GenericPageComponents_quizEvent__8_2kF",section:"GenericPageComponents_section__Z8XTF",hero:"GenericPageComponents_hero__pTJ9s",fullWidth:"GenericPageComponents_fullWidth__9XXjG",bottomOverlap:"GenericPageComponents_bottomOverlap__ZNTvu",shiftUpSm:"GenericPageComponents_shiftUpSm__cARsq",canBeHidden:"GenericPageComponents_canBeHidden__91kbj"}}}]); //# sourceMappingURL=4430-671f2aeab46a0572.js.map