1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{64397:(e,t,s)=>{"use strict";s.d(t,{default:()=>ev});var r=s(54568),l=s(7620),n=s(62942),i=s(67933),a=s(28933),o=s.n(a),c=s(96838),d=s(83594),m=s(87606),u=s(34033);let x={SHELVES:"shelves",SHELVES_DEFAULT:"shelves_default",SPOTLIGHT:"spotlight",HERO_VIDEO:"hero_video",HERO_VIDEO_DEFAULT:"hero_video_default",HERO_UNIT:"hero_unit",HERO_UNIT_CAROUSEL:"heroUnitCarousel",CUSTOM_SHELF:"custom_shelf",RECENTLY_WATCHED_SHELF:"recently_watched_shelf",FAVORITES_SHELF:"favorites_shelf"};var p=s(5633),g=s.n(p),f=s(40326),h=s(58648),j=s.n(h),N=s(14499),y=s(84230);function v(){var e;let{resolver:t,params:s={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(e=(0,d.A)(),{[x.SHELVES]:t=>{let{id:s}=t;return e.getShelf(s)},[x.SHELVES_DEFAULT]:t=>{let{position:s}=t;return e.getDefaultShelf(s)},[x.SPOTLIGHT]:t=>{let{spotlightId:s}=t;return e.spotlight(s)},[x.HERO_VIDEO]:t=>{let{videoId:s}=t;return e.getHeroVideo(s)},[x.HERO_VIDEO_DEFAULT]:()=>e.getDefaultHeroVideo(),[x.HERO_UNIT]:t=>{let{heroUnitId:s}=t;return e.getHeroUnit(s)},[x.HERO_UNIT_CAROUSEL]:t=>{let{id:s}=t;return e.getHeroUnitCarousel(s)},[x.CUSTOM_SHELF]:t=>{let{id:s}=t;return e.getCustomShelf(s)},[x.RECENTLY_WATCHED_SHELF]:t=>{let{id:s}=t;return e.getRecentlyWatchedShelf(s)},[x.FAVORITES_SHELF]:t=>{let{id:s}=t;return e.getFavoritesShelf(s)}}),{data:l,isLoading:n}=(0,i.useQuery)({queryKey:[t,...Object.values(s)],queryFn:()=>r[t](s),enabled:!!t,staleTime:144e5});return{data:l,isLoading:n}}var w=s(46524),T=s.n(w),C=s(29228),b=s(75299),I=s(81959),E=s(41167);function O(e){var t,s;let{id:n,title:i,type:a,variant:o="icon"}=e,{user:c}=(0,I.Jd)(),{profile:d}=(0,b.xc)(),m=f.Fc.useAlert(),{favorite:u,isFavoriteLoading:x,favoriteError:p}=(0,b.IR)({slug:n,type:a}),{logEvent:g}=(0,E._B)({event:"Add to Favorites",properties:{contentType:a,id:n,title:i,gradeId:null==d||null==(t=d.grade)?void 0:t.id},options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}}),{logEvent:h}=(0,E._B)({event:"Remove from Favorites",properties:{contentType:a,id:n,title:i,gradeId:null==d||null==(s=d.grade)?void 0:s.id},options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}}),{toggleFavoriteState:j}=(0,b.L8)(n,a,{onSuccess:()=>{u?h():g()},onError:()=>{m.publish("Something went wrong, please try again")}});return c.isLoggedIn?"icon"===o&&p?(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"sr-only",children:"something went wrong. Please refresh page."}),(0,r.jsx)(f.jF,{className:"h-md text-gray-500"})]}):"button"===o&&p?(0,r.jsxs)("div",{className:"flex h-button-md px-sm rounded items-center gap-xs justify-center border border-white",children:[(0,r.jsx)("span",{className:"sr-only",children:"something went wrong. Please refresh page."}),(0,r.jsx)(f.jF,{className:"h-md text-white"})]}):(0,r.jsx)(f.Xb,{elementType:"button",disabled:x,className:(0,y.Q)("cursor-pointer z-10 relative",x&&"opacity-50"),onPress:j,children:"icon"===o?(0,r.jsxs)(l.Fragment,{children:[(0,r.jsx)("span",{className:"sr-only",children:u?"Unfavorite":"Favorite"}),u?(0,r.jsx)(f.C3,{className:"h-md text-white"}):(0,r.jsx)(f.fW,{className:"h-md text-gray-500"})]}):(0,r.jsxs)("div",{className:(0,y.Q)("flex h-button-md px-sm rounded items-center gap-xs justify-center",u?"bg-white":"border border-white"),children:[(0,r.jsx)("span",{className:(0,y.Q)("text-sm font-bold",u?"text-gray-900":"text-white"),children:u?"Favorited":"Favorite"}),u?(0,r.jsx)(f.C3,{className:"h-md text-gray-900"}):(0,r.jsx)(f.fW,{className:"h-md text-white"})]})}):null}O.propTypes={id:T().string.isRequired,title:T().string.isRequired,type:T().oneOf([N.yw.VIDEO,N.yw.ACTIVITY]).isRequired,variant:T().oneOf(["button","icon"])};var _=s(84178);function S(e){let{id:t,slug:s,duration:l,sponsor:n,subtitle:i,title:a,description:o,images:d,referrer:m,impressionsProps:u,testId:x}=e,p=(0,b.$V)({properties:{...u,impressionType:c.gs.VIDEO_TILE,adProductType:c.Xk.VIDEO_THUMBNAIL,title:a},enabled:!!u});return(0,r.jsx)(f.O1,{ref:p,duration:l,sponsorExpDate:n&&n.expiration,subtitle:i,testId:x,title:(0,r.jsx)(_.A,{href:"/".concat(c.Zt.VIDEOS,"/").concat(t,"/").concat(s),className:"before:block before:absolute before:inset-0 before:cursor-pointer",referrer:m,events:[{event:"Link Clicked",properties:{title:a||s,sourceName:null==m?void 0:m.sourceName,sourceElement:null==m?void 0:m.sourceElement}}],children:a}),description:o,images:d,actions:(0,r.jsx)(O,{type:N.yw.VIDEO,id:t,title:a})})}function L(e){let{id:t,slug:s,mode:l,sources:n,title:i,description:a,format:o,referrer:d}=e,m=e=>{let{children:l}=e;return(0,r.jsx)(_.A,{href:"/".concat(c.Zt.ACTIVITIES,"/").concat(t,"/").concat(s),referrer:d,events:[{event:"Link Clicked",properties:{title:i}}],children:l})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{children:(0,r.jsx)(f.S9.Cover,{mode:l,format:o,children:(0,r.jsx)(f.S9.Content,{sources:n})})}),(0,r.jsxs)("div",{className:"flex flex-row mt-xs space-x-sm justify-between items-start",children:[(0,r.jsx)(m,{children:(0,r.jsx)(f.S9.Info,{mode:l,title:i,description:"landscape"===o?a:void 0,className:"before:block before:absolute before:inset-0 before:cursor-pointer"})}),(0,r.jsx)(O,{type:N.yw.ACTIVITY,title:i,id:t})]})]})}S.propTypes={id:T().string.isRequired,slug:T().string.isRequired,title:T().string.isRequired,description:T().string.isRequired,duration:T().number.isRequired,sponsor:T().shape({expiration:T().string,type:T().oneOf([c.nU.LONG_TERM_SPONSOR,c.nU.PROMOTIONAL_ACTIVITY,"channel"]).isRequired}),subtitle:T().string,images:T().shape({tile:C.k}).isRequired,impressionsProps:T().shape({}),linkParams:T().shape({}),testId:T().string,referrer:T().object},f.S9.propTypes={id:T().string.isRequired,slug:T().string.isRequired,mode:T().oneOf(["dark","light"]),sources:C.k.isRequired,title:T().string.isRequired,format:T().oneOf(["landscape","square"]),referrer:T().object};let R=l.forwardRef(function(e,t){let{id:s,slug:l,name:n,description:i,tile:a,title:o,format:d,referrer:m}=e,u="",x="";return"landscape"===d&&(u=o,x=i),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.A,{href:"/".concat(c.Zt.TAGS,"/").concat(s,"/").concat(l),referrer:m,events:[{event:"Link Clicked",properties:{title:n,sourceName:null==m?void 0:m.sourceName,sourceElement:null==m?void 0:m.sourceElement}}],children:(0,r.jsx)(f.wU,{ref:t,alt:n,name:n,title:u,sources:a,format:d,description:x})}),(0,r.jsx)("span",{className:"sr-only absolute left-1/4 uppercase text-white bottom-0",children:n})]})});R.propTypes={id:T().string.isRequired,slug:T().string.isRequired,name:T().string.isRequired,tile:C.k,referrer:T().object};var A=s(92846);function k(e){return!!e&&A.L.some(t=>e.includes(t))}function P(e,t){return t&&k(e)?"/".concat(c.Zt.CURRICULUMS,"/").concat(t.id):e}function U(e){let{sources:t,title:s="",description:l,format:n="landscape",customLinkTitle:i,destinationUrl:a,referrer:o}=e,d=(0,b.rd)(),{userDefaultCurriculum:m}=(0,b.Fw)(),{logEvent:u}=(0,E._B)({event:"Link Clicked",options:{includeReferrer:!0,includeSourcePage:!0,includeSourcePageType:!0,referrer:o}}),x=P(a,m),p=!m&&k(a),g=x||a;return p?(0,r.jsx)(f.Ow,{className:"text-left",onPress:()=>(u({title:s}),d.push(c.tl.SUPERNOODLE_URL)),children:(0,r.jsx)(f.wU,{alt:s,title:i,format:n,description:l,sources:t})}):(0,r.jsx)(_.A,{href:g,referrer:o,events:[{event:"Link Clicked",properties:{title:s,url:g}}],children:(0,r.jsx)(f.wU,{alt:s,title:i,format:n,description:l,sources:t})})}function V(e){let{title:t,name:s,description:l,slug:n,imageUrl:i,referrer:a}=e;return(0,r.jsxs)(_.A,{href:"/".concat(c.Zt.COMPANY,"/post/").concat(n),referrer:a,events:[{event:"Link Clicked",properties:{title:t,sourceName:null==a?void 0:a.sourceName,sourceElement:null==a?void 0:a.sourceElement}}],children:[(0,r.jsx)("div",{className:"overflow-hidden rounded aspect-w-16 aspect-h-9",children:(0,r.jsx)("img",{className:"object-cover transform transition-transform group-hover:scale-110 filter drop-shadow rounded",src:i,alt:s})}),(0,r.jsx)("h3",{className:"gn-text-sm mt-sm text-white line-clamp-3",children:s}),(0,r.jsx)("p",{className:"gn-text-xs mt-xs text-gray-500 line-clamp-4",children:l})]})}
1U.propTypes={title:T().string,sources:C.k.isRequired,description:T().string.isRequired,format:T().oneOf(["landscape","square","portrait"]),customLinkTitle:T().string.isRequired,destinationUrl:T().string.isRequired,referrer:T().object},V.propTypes={title:T().string.isRequired,name:T().string.isRequired,description:T().string,slug:T().string.isRequired,imageUrl:T().string.isRequired,referrer:T().object};var F=s(92110);let H={PROMPT_ADD_TO_FAVORITES:"promptAddToFavorites",PROMPT_START_WATCHING:"promptStartWatching",PROMPT_SIGNUP_OR_LOGIN_TO_TRACK_HISTORY:"promptSignUpOrLogInToTrackHistory",PROMPT_SIGNUP_OR_LOGIN_TO_SAVE_FAVORITES:"promptSignUpOrLogInToSaveFavorites"};function D(e){let{templateOptions:t,fetchers:s}=e,{title:l,displayTitle:n,description:i,size:a,placeholder:o={}}=t,[c]=s,{data:d,isLoading:m}=v(c),{contentType:u,content:x=[]}=j()(d,"[0]",{}),p=3===a;return m?(0,r.jsx)("div",{className:"grid gap-x-md gap-y-md md:grid-cols-2 lg:grid-cols-4",children:(0,r.jsx)(f.aH,{cols:4,size:"short",mode:"dark"})}):[H.PROMPT_ADD_TO_FAVORITES,H.PROMPT_SIGNUP_OR_LOGIN_TO_SAVE_FAVORITES].includes(o.type)?(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col",p&&"lg:flex-row-reverse"),children:[p?(0,r.jsx)(X,{}):null,(0,r.jsx)(q,{title:n||l,description:i,size:a,cards:x})]}):[H.PROMPT_START_WATCHING,H.PROMPT_SIGNUP_OR_LOGIN_TO_TRACK_HISTORY].includes(o.type)?(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col",p&&"lg:flex-row-reverse"),children:[p?(0,r.jsx)(X,{}):null,(0,r.jsx)(Q,{title:n||l,description:i,size:a,cards:x})]}):(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col",p&&"lg:flex-row-reverse"),children:[p?(0,r.jsx)(X,{}):null,(0,r.jsx)(K,{title:n||l,description:i,contentType:u,size:a,cards:x})]})}function M(e){let{title:t,description:s}=e;return(0,r.jsxs)("span",{children:[(0,r.jsx)("h2",{className:"text-lg font-bold tracking-tight text-white capitalize",children:t}),(0,r.jsx)("p",{className:"gn-text-sm text-white",children:s})]})}function q(e){let{title:t,description:s,size:l=4,cards:n}=e,{user:i}=(0,I.Jd)(),a=l?n.slice(0,l):n;return i.isLoggedIn||0!==a.length?0===a.length?(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsxs)("div",{className:"flex flex-row justify-between items-center mb-6",children:[(0,r.jsx)(M,{title:t,description:s}),(0,r.jsx)(Y,{})]}),(0,r.jsxs)("div",{className:"bg-gray-800 w-full flex flex-col justify-center items-center space-y-10 py-16 px-1 text-center",children:[(0,r.jsx)(f.fW,{className:"w-32 h-32 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-lg text-gray-100",children:"You have no favorited videos"})]})]}):(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-row justify-between items-center mb-6",children:[(0,r.jsx)(M,{title:t,description:s}),(0,r.jsx)(Y,{})]}),(0,r.jsxs)("ul",{className:(0,y.Q)("grid gap-x-md gap-y-md md:grid-cols-2 lg:grid-cols-4",3===l&&"lg:grid-cols-3"),children:[a.map((e,s)=>(0,r.jsx)(W,{card:e.content||e,referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s))),a.length<l&&Array.from({length:l-a.length}).map((e,t)=>(0,r.jsx)("li",{className:"flex flex-col justify-top",children:(0,r.jsx)("div",{className:"w-full bg-gray-700 transition-shadow shadow-darkSM aspect-w-16 aspect-h-9",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center p-1",children:[(0,r.jsx)(f.fW,{className:"w-28 h-28 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"gn-text-sm mt-xs text-gray-100 capitalize",children:"favorite more videos"})]})})},t))]})]}):(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsx)("div",{className:"flex flex-row items-center mb-6",children:(0,r.jsx)(M,{title:t,description:s})}),(0,r.jsxs)("div",{className:"bg-gray-800 w-full flex flex-col justify-center items-center space-y-10 py-16 px-1 text-center",children:[(0,r.jsx)(f.fW,{className:"w-32 h-32 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-lg text-gray-100",children:"Create a Free Account to start favoriting videos and see them here!"}),(0,r.jsx)(F.A,{className:"font-regular lg:whitespace-nowrap",referrer:{sourceElement:N.$u.FAVORITES_SHELF,sourceName:N.bP.CREATE_ACCOUNT_BUTTON}})]})]})}function Q(e){let{title:t,description:s,size:l=4,cards:n}=e,{user:i}=(0,I.Jd)(),a=l?n.slice(0,l):n;return i.isLoggedIn||0!==a.length?0===a.length?(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsx)("div",{className:"flex flex-row items-center mb-6",children:(0,r.jsx)(M,{title:t,description:s})}),(0,r.jsxs)("div",{className:"bg-gray-800 w-full flex flex-col justify-center items-center space-y-10 py-16 px-1 text-center",children:[(0,r.jsx)(f.uY,{className:"w-32 h-32 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-lg text-gray-100",children:"Watch some videos"})]})]}):(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"flex flex-row justify-between items-center mb-6",children:(0,r.jsx)(M,{title:t,description:s})}),(0,r.jsxs)("ul",{className:(0,y.Q)("grid gap-x-md gap-y-md md:grid-cols-2 lg:grid-cols-4",3===l&&"lg:grid-cols-3"),children:[a.map((e,s)=>(0,r.jsx)(W,{card:e.content||e,title:t,referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s))),a.length<l&&Array.from({length:l-a.length}).map((e,t)=>(0,r.jsx)("li",{className:"flex flex-col justify-top",children:(0,r.jsx)("div",{className:"w-full bg-gray-700 transition-shadow shadow-darkSM aspect-w-16 aspect-h-9",children:(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center p-1",children:[(0,r.jsx)(f.uY,{className:"w-28 h-28 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"gn-text-sm mt-xs text-gray-100 capitalize",children:"Watch More Videos"})]})})},t))]})]}):(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsx)("div",{className:"flex flex-row items-center mb-6",children:(0,r.jsx)(M,{title:t,description:s})}),(0,r.jsxs)("div",{className:"bg-gray-800 w-full flex flex-col justify-center items-center space-y-10 py-16 px-1 text-center",children:[(0,r.jsx)(f.uY,{className:"w-32 h-32 text-gray-100","aria-hidden":"true"}),(0,r.jsx)("span",{className:"text-lg text-gray-100",children:"Create a free account to start seeing your recently watched videos here!"}),(0,r.jsx)(F.A,{className:"font-regular lg:whitespace-nowrap",referrer:{sourceElement:N.$u.RECENTLY_WATCHED_SHELF,sourceName:N.bP.CREATE_ACCOUNT_BUTTON}})]})]})}function K(e){let{title:t,description:s,contentType:l,size:n,cards:i}=e,a=n?i.slice(0,n):i;return(0,r.jsxs)("div",{className:"flex flex-col w-full",children:[(0,r.jsx)("div",{className:"flex flex-row items-center mb-6",children:(0,r.jsx)(M,{title:t,description:s})}),(0,r.jsx)("ul",{className:(0,y.Q)("grid gap-x-md gap-y-md grid-cols-1 md:grid-cols-2 lg:grid-cols-4",3===a.length&&"lg:grid-cols-3",5===a.length&&"grid-cols-2 lg:grid-cols-3 xl:grid-cols-5"),children:a.map((e,s)=>l===c.yw.TAGS||[c.yw.TOPIC,c.yw.CHANNEL,c.yw.TAG].includes(e.contentType)?(0,r.jsx)(B,{card:e.content?e.content:e,format:e.content?"landscape":"square",referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s)):l===c.yw.VIDEOS||e.contentType===c.yw.VIDEO?(0,r.jsx)(W,{card:e.content||e,title:t,referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s)):l===c.yw.ACTIVITIES||e.contentType===c.yw.ACTIVITY?(0,r.jsx)($,{card:e.content||e,format:e.content?"landscape":"portrait",referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s)):e.contentType===c.yw.CUSTOM_LINK?(0,r.jsx)(Z,{card:e.content,referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s)):e.contentType===c.yw.BLOG_POST?(0,r.jsx)(z,{card:e.content,title:t,referrer:{sourceElement:N.$u.SHELF,sourceName:t}},"".concat(e.id,"_").concat(s)):null)})]})}function Y(){let e=(0,b.rd)();return(0,r.jsxs)(f.$n,{size:f.GO.sm,variant:f.Ck.lightOutline,className:"capitalize space-x-2 whitespace-nowrap",onPress:()=>e.push("/".concat(c.Zt.FAVORITES)),children:[(0,r.jsx)(f.fW,{className:"h-5"}),(0,r.jsx)("span",{children:"view favorites"})]})}let G=(e,t)=>{var s,r,l,n;if(e.image)return e.image;if("landscape"===t){if(null==(l=e.images)?void 0:l.spotlightImage)return e.images.spotlightImage;if(null==(n=e.images)?void 0:n.tileImage)return e.images.tileImage}return(null==(s=e.images)?void 0:s.tileImage)?e.images.tileImage:(null==(r=e.images)?void 0:r.spotlightImage)?e.images.spotlightImage:null};function B(e){let{card:t,format:s,referrer:l}=e,n=G(t,s);return(0,r.jsx)("li",{className:"flex flex-col justify-top relative",children:(0,r.jsx)(R,{id:t.id,slug:t.slug,name:t.name,title:t.name,description:t.description,tile:n,format:s,referrer:l})})}function W(e){var t,s,l;let{card:n,referrer:i={}}=e;return(0,r.jsx)("li",{className:"flex flex-col justify-top relative group",children:(0,r.jsx)(S,{id:n.id,slug:n.slug,title:n.title,de
1scription:n.description,images:n.images,duration:n.duration,sponsor:{expiration:null==(t=n.attribution)?void 0:t.expiration,type:null==(s=n.attribution)?void 0:s.type},referrer:i,impressionsProps:(null==n||null==(l=n.partner)?void 0:l.partnerId)?{partnerName:n.partner.partnerName,partnerId:n.partner.partnerId,...i}:null})})}function $(e){let{card:t,format:s,referrer:l}=e,n="landscape"!==s||g()(t.heroImage)?t.image:{"regular@1x":t.heroImage["thumb@1x"],"regular@2x":t.heroImage["thumb@2x"],"regular@3x":t.heroImage["thumb@3x"]};return(0,r.jsx)("li",{className:"flex flex-col justify-top relative group",children:(0,r.jsx)(L,{id:t.id,slug:t.slug,mode:"dark",sources:n,title:t.title,description:t.description,format:s,referrer:l})})}function Z(e){let{card:t,referrer:s}=e,{id:l,slug:n,name:i,description:a,image:o,images:c,title:d,destinationUrl:m}=t;return(0,r.jsx)("li",{className:"flex flex-col justify-top relative group",children:(0,r.jsx)(U,{id:l,slug:n,sources:(null==c?void 0:c.spotlightImage)||o,title:i,name:i,customLinkTitle:d,destinationUrl:m,description:a,format:"landscape",referrer:s})})}function z(e){let{card:t,title:s,referrer:l}=e,{slug:n,title:i,description:a,images:o}=t;return(0,r.jsx)("li",{className:"flex flex-col justify-top relative group",children:(0,r.jsx)(V,{slug:n,title:s,name:i,description:a,imageUrl:o.tile,referrer:l})})}function X(){let e=(0,b.wK)(),{profile:t}=(0,b.xc)();return t?(0,r.jsxs)("div",{className:"flex flex-col my-2 md:mt-8 md:mb-0 lg:mt-0 lg:flex-row-reverse lg:items-center",children:[(0,r.jsxs)("div",{className:"flex flex-row flex-nowrap lg:flex-col",children:[(0,r.jsx)("div",{className:"flex flex-1 justify-start lg:basis-auto lg:grow-0 lg:shrink-0",children:(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-1 md:flex-row md:space-x-4 md:space-y-0 lg:flex-col lg:space-x-0 lg:space-y-3 lg:w-full lg:justify-center",children:[(0,r.jsx)("div",{className:"w-[45px] md:w-[65px] lg:w-[110px] flex-shrink-0",children:(0,r.jsx)(f._V,{className:"w-full h-full object-contain",sources:{"regular@1x":e.images.full["1x"],"regular@2x":e.images.full["2x"],"regular@3x":e.images.full["3x"]},alt:""})}),(0,r.jsx)("span",{className:"text-xs text-white line-clamp-2 md:text-sm lg:text-md lg:text-center lg:line-clamp-1 px-1",style:{fontStyle:"italic"},children:e.name})]})}),(0,r.jsx)("span",{className:"hidden md:block bg-white min-h-full w-[1px] opacity-30 mx-1 lg:hidden"}),(0,r.jsx)("div",{className:"flex flex-1 justify-center lg:basis-auto lg:grow-0 lg:shrink-0",children:(0,r.jsxs)("div",{className:"flex flex-col items-center justify-around px-2 py-1 space-y-1 rounded md:flex-row md:rounded-lg md:px-3 md:space-y-0 lg:p-3 lg:items-start lg:mt-[18px]",style:{background:"linear-gradient(94deg, #F0C30F 51.36%, #F4A934 100%)"},children:[(0,r.jsxs)("div",{className:"flex flex-row items-center space-x-2 md:space-x-3 lg:hidden",children:[(0,r.jsx)("span",{className:"w-[22px] h-[22px] md:w-[32px] md:h-[32px] flex justify-center items-center rounded-full bg-white",children:(0,r.jsx)(J,{})}),(0,r.jsx)("span",{className:"font-display text-[24px] leading-[14px] text-gray-900 font-extrabold",children:t.classroomType===c.KU.CLASSROOM?t.weekStreak:t.dayStreak})]}),(0,r.jsx)("div",{className:"text-gray-900 text-xs leading-[18px] font-semibold font-display md:ml-3 md:text-md md:leading-6 lg:hidden",children:t.classroomType===c.KU.CLASSROOM?"week streak":"day streak"}),(0,r.jsx)("div",{className:"hidden flex-1 lg:block",children:(0,r.jsx)("span",{className:"w-[35px] h-[35px] flex justify-center items-center rounded-full bg-white",children:(0,r.jsx)(J,{})})}),(0,r.jsx)("div",{className:"hidden flex-1 ml-16 lg:block",children:(0,r.jsxs)("div",{className:"flex flex-col items-end",children:[(0,r.jsx)("div",{className:"font-display text-[36px] leading-[36px] text-gray-900 font-extrabold",children:t.classroomType===c.KU.CLASSROOM?t.weekStreak:t.dayStreak}),(0,r.jsx)("div",{className:"text-gray-900 text-md whitespace-nowrap font-semibold font-display",children:t.classroomType===c.KU.CLASSROOM?"week streak":"day streak"})]})})]})}),(0,r.jsx)("span",{className:"hidden md:block bg-white min-h-full w-[1px] opacity-30 mx-1 lg:hidden"}),(0,r.jsx)("div",{className:"hidden lg:block w-full h-[1px] bg-white opacity-30 my-[18px]"}),(0,r.jsx)("div",{className:"flex flex-1 justify-end lg:basis-auto lg:grow-0 lg:shrink-0",children:(0,r.jsxs)("div",{className:"flex flex-col justify-between space-y-1 md:flex-row md:space-y-0 md:space-x-2 md:items-center lg:flex-row-reverse lg:items-start lg:space-x-0 lg:w-full",children:[(0,r.jsx)("span",{className:"text-md font-extrabold text-center text-transparent md:text-[18px]",style:{background:"linear-gradient(94deg, #F0C30F 51.36%, #F4A934 100%)",backgroundClip:"text",WebkitBackgroun
1dClip:"text"},children:t.classroomType===c.KU.CLASSROOM?t.schoolYearWeekStreak:t.weekStreak}),(0,r.jsx)("span",{className:"text-white text-xs font-medium text-center md:text-sm lg:max-w-2/3 lg:text-start",children:t.classroomType===c.KU.CLASSROOM?"Week Streak in School Year":"Week Streak"})]})})]}),(0,r.jsx)("div",{className:"hidden md:block bg-gray-500 w-full h-[1px] my-6 lg:my-0 lg:h-full lg:w-[1px] lg:mr-12 lg:ml-14"})]}):null}function J(){return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,r.jsx)("path",{d:"M6.41305 7.64258C6.97686 7.64258 7.5426 7.64258 8.10641 7.64258C8.11413 7.64258 8.12379 7.64258 8.13151 7.64258C8.16434 7.64258 8.16627 7.64468 8.15082 7.67626C8.13151 7.72046 8.11027 7.76466 8.09096 7.80676C8.02338 7.95411 7.9558 8.10146 7.88822 8.25091C7.8805 8.26775 7.87278 8.28248 7.85154 8.27827C7.83416 8.27406 7.82837 8.2909 7.82064 8.30353C7.78782 8.36457 7.75499 8.42772 7.72217 8.48877C7.64107 8.64243 7.56191 8.79398 7.48081 8.94764C7.41709 9.06973 7.35338 9.19182 7.28966 9.31601C7.21822 9.45073 7.14871 9.58755 7.07726 9.72227C7.01161 9.84856 6.94597 9.97275 6.88032 10.0991C6.81081 10.2317 6.74129 10.3622 6.67178 10.4948C6.59841 10.6337 6.52697 10.7726 6.4536 10.9137C6.37636 11.061 6.29913 11.2084 6.22189 11.3536C6.15624 11.4778 6.09253 11.602 6.02688 11.7262C5.97281 11.8293 5.91875 11.9346 5.86469 12.0377C5.85889 12.0482 5.84924 12.0567 5.8531 12.0714C5.84731 12.0714 5.84538 12.0777 5.84345 12.0819C5.83379 12.0945 5.82414 12.1072 5.81448 12.1177C5.24681 12.7365 4.67914 13.3554 4.11147 13.9764C4.10567 13.9827 4.09795 13.9911 4.0883 13.9995C4.08444 13.9806 4.09409 13.9679 4.09795 13.9553C4.36055 13.2375 4.62508 12.5197 4.88767 11.802C5.28543 10.7158 5.68512 9.62965 6.08287 8.54349C6.18907 8.25091 6.2972 7.96043 6.40339 7.66784C6.40919 7.66152 6.41112 7.651 6.41305 7.64258Z",fill:"#18181B"}),(0,r.jsx)("path",{d:"M6.41107 0.00390625C6.42266 0.00390625 6.43425 0.00390625 6.44583 0.00390625C7.78585 0.00390625 9.12586 0.00390625 10.4639 0.00390625C10.4755 0.00390625 10.4871 0.00390625 10.5045 0.00390625C9.33632 1.70049 8.17202 3.39497 7.00192 5.09367C8.75514 5.09367 10.5006 5.09367 12.25 5.09367C12.2481 5.11051 12.2365 5.11682 12.2287 5.12524C11.3328 6.10194 10.4388 7.07863 9.54292 8.05533C8.32262 9.38565 7.10232 10.716 5.88202 12.0484C5.8743 12.0568 5.8685 12.0674 5.85692 12.0737C5.85306 12.0589 5.86271 12.0505 5.8685 12.04C5.92257 11.9368 5.97663 11.8337 6.0307 11.7285C6.09635 11.6043 6.16006 11.4801 6.22571 11.3559C6.30295 11.2085 6.38018 11.0612 6.45742 10.9159C6.53079 10.777 6.60223 10.6381 6.6756 10.4971C6.74511 10.3645 6.81462 10.2339 6.88414 10.1013C6.94978 9.97714 7.01543 9.85085 7.08108 9.72455C7.15252 9.58983 7.22204 9.45301 7.29348 9.31829C7.3572 9.19621 7.42091 9.07412 7.48463 8.94993C7.5638 8.79627 7.64489 8.64471 7.72599 8.49105C7.75881 8.4279 7.79164 8.36686 7.82446 8.30582C7.83026 8.29319 7.83798 8.27845 7.85536 8.28056C7.8766 8.28477 7.88432 8.27003 7.89204 8.25319C7.95962 8.10585 8.0272 7.9585 8.09478 7.80905C8.11409 7.76484 8.13533 7.72064 8.15464 7.67854C8.16816 7.64697 8.16622 7.64486 8.13533 7.64486C8.12761 7.64486 8.11795 7.64486 8.11023 7.64486C7.54642 7.64486 6.98068 7.64486 6.41687 7.64486C6.40335 7.64486 6.38984 7.64486 6.37632 7.64486C5.43213 7.64486 4.48794 7.64486 3.54375 7.64486C3.53024 7.64486 3.51672 7.64486 3.5032 7.64276C3.5341 7.56066 3.56499 7.47647 3.59782 7.39437C3.65574 7.24492 3.71367 7.09547 3.77159 6.94602C3.83917 6.7671 3.90675 6.58607 3.97626 6.40715C4.04771 6.21981 4.12108 6.03247 4.19252 5.84513C4.26782 5.64937 4.33927 5.45361 4.41457 5.25996C4.4918 5.05578 4.57097 4.8537 4.65013 4.64952C4.71964 4.4706 4.78529 4.28958 4.8548 4.11066C4.93783 3.89385 5.02086 3.67704 5.10388 3.46023C5.18884 3.23921 5.27187 3.02029 5.35683 2.79928C5.46109 2.52563 5.56536 2.25409 5.66963 1.98045C5.77003 1.71523 5.87237 1.45211 5.97277 1.18689C6.04614 0.99323
11 6.12145 0.799576 6.19482 0.605921C6.25661 0.441735 6.32032 0.279654 6.38211 0.115468C6.3879 0.0754744 6.40914 0.0439002 6.41107 0.00390625Z",fill:"#F0C30F"}),(0,r.jsx)("path",{d:"M6.41109 0.00420989C6.40916 0.0442039 6.38792 0.077883 6.37633 0.111562C6.31455 0.275748 6.25276 0.439934 6.18904 0.602015C6.11567 0.79567 6.04036 0.989325 5.96699 1.18298C5.86659 1.4482 5.76425 1.71132 5.66385 1.97654C5.55958 2.25019 5.45532 2.52173 5.35105 2.79537C5.26609 3.01639 5.18306 3.2353 5.09811 3.45632C5.01508 3.67313 4.93205 3.88994 4.84903 4.10675C4.78145 4.28567 4.71387 4.4667 4.64435 4.64562C4.56712 4.8498 4.48796 5.05187 4.40879 5.25605C4.33349 5.45181 4.26205 5.64757 4.18674 5.84123C4.1153 6.02857 4.04193 6.21591 3.97049 6.40325C3.90291 6.58217 3.83533 6.76319 3.76582 6.94211C3.70789 7.09157 3.64996 7.24102 3.59204 7.39047C3.56114 7.47256 3.53025 7.55676 3.49743 7.63885C3.48777 7.63885 3.47812 7.64096 3.47039 7.64096C2.90658 7.64096 2.34277 7.64096 1.77896 7.64096C1.77124 7.64096 1.76159 7.64096 1.75386 7.63885C1.75193 7.63675 1.75 7.63675 1.75 7.63464C1.78089 7.5336 1.82337 7.43888 1.86006 7.33995C2.13038 6.63058 2.4007 5.92332 2.67102 5.21395C2.93168 4.53406 3.19042 3.85416 3.45109 3.17426C3.78319 2.30702 4.1153 1.43768 4.44548 0.570441C4.51499 0.389415 4.5845 0.206285 4.65401 0.0252594C4.66173 0.00631484 4.66946 0 4.68876 0C5.25837 0 5.82797 0 6.3995 0C6.40337 0.00210495 6.40723 0.00420989 6.41109 0.00420989Z",fill:"#18181B"}),(0,r.jsx)("path",{d:"M5.84534 12.0858C5.84534 12.0789 5.84766 12.0742 5.85696 12.0742C5.85464 12.0789 5.85231 12.0835 5.84534 12.0858Z",fill:"#F0C30F"}),(0,r.jsx)("path",{d:"M1.75 7.63867C1.75195 7.64064 1.75391 7.64064 1.75391 7.6426C1.75 7.6426 1.75 7.6426 1.75 7.63867Z",fill:"#F0C30F"})]})}var ee=s(34647),et=s(35222),es=s(24313);let er=e=>{let{contentType:t,content:s}=e;return[c.yw.TAG,c.yw.CHANNEL,c.yw.TOPIC].includes(t)?s.name:s.title},el=(e,t)=>Math.abs(e)*t;function en(e){let{title:t,media:s,sponsorLogo:l,callToAction:n,impressionsProps:i}=e,a=(0,b.$V)({properties:{...i,adProductType:c.Xk.VIDEO_THUMBNAIL,impressionType:c.gs.VIDEO_TILE},enabled:!!i});return(0,r.jsxs)("div",{ref:a,className:"flex flex-col bg-purple h-full w-full p-1 rounded-lg",children:[(0,r.jsxs)("div",{className:"aspect-w-16 aspect-h-9 relative overflow-hidden",children:[(0,r.jsx)(f.Qt,{className:"w-full h-auto object-contain rounded-t-lg",source:s.loopingVideo,fallbackImage:{sources:s.backgroundImage,alt:t}}),l&&(0,r.jsx)("div",{className:"absolute w-1/5 h-fit ml-auto mt-auto pb-2 pr-2",children:(0,r.jsx)(f._V,{className:"w-full h-auto object-contain",alt:"Sponsor logo",sources:l})})]}),(0,r.jsxs)("div",{className:"bg-purple flex flex-col px-3 pt-6 pb-5 space-y-4 md:flex-row md:justify-between md:items-center md:px-7 md:space-y-0 md:space-x-4",children:[(0,r.jsx)("span",{className:"font-extrabold text-lg text-white line-clamp-2",style:{textShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"},children:t}),(0,r.jsx)(f.gl,{variant:"light",size:"md",className:"min-w-fit max-w-fit",children:n})]})]})}function ei(e){let{title:t,description:s,textTheme:l,image:n,impressionsProps:i}=e,{containerRef:a,lineClamp:o}=(0,b.H1)(),d=(0,b.$V)({properties:{...i,impressionType:c.gs.VIDEO_TILE,adProductType:c.Xk.VIDEO_THUMBNAIL},enabled:!!i});return(0,r.jsxs)("div",{ref:d,className:"flex flex-row h-full space-x-3 lg:flex-col lg:space-x-0 lg:space-y-5",children:[(0,r.jsx)("div",{className:"rounded-lg overflow-hidden w-[37%] lg:w-full",children:(0,r.jsx)("div",{className:"aspect-w-16 aspect-h-9 overflow-hidden",children:(0,r.jsx)(f._V,{className:"w-full h-auto object-contain",sources:n,alt:t})})}),(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col flex-1 pr-1","light"===l?"text-white":"text-gray-900"),children:[(0,r.jsx)("span",{className:"text-sm font-bold line-clamp-2 overflow-hidden lg:text-md",children:t}),(0,r.jsx)("div",{ref:a,className:"relative hidden text-sm lg:flex flex-1",children:(0,r.jsx)("p",{className:"absolute line-clamp-[var(--line-clamp)] md:mt-1",style:{"--line-clamp":o},children:s})})]})]})}function ea(e){var t,s,l,n,i,a;let{slides:o,currentSlideIndex:d,slideData:m,primaryItem:u,secondaryItems:x,carouselPosition:p,isDragging:g,paginate:h}=e,j=(0,b.rd)(),{userDefaultCurriculum:v}=(0,b.Fw)(),{logEvent:w}=(0,E._B)({event:"Link Clicked",options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}}),T={title:er(u),sourceElement:"".concat(N.IR.PRIMARY," - slide ").concat(p),sourceName:N.bP.CAROUSEL},C="light"===m.textTheme?"text-white":"text-gray-900",I=P(u.content.destinationUrl,v),O=(a=u.content.destinationUrl,!v&&k(a)),S=I||(u.contentType===c.yw.CUSTOM_LINK?u.content.destinationUrl:"".concat((0,es.U)(u.contentType),"/").concat(u.content.id,"/").concat(u.content.slug)),L=(0,b.$V)({properties:{impression_type:c.gs.LOGO,ad_product_type:N.bP.CAROUSEL,partner_name:null==m||null==(t=m.partner)?void 0:t.partnerName,partner_id:null==m||null==(s=m.partner)?void 0:s.partnerId,ad_product_partner_id:null==m?void 0:m.title}}
1);return(0,r.jsxs)("div",{className:(0,y.Q)("grid min-w-full gap-y-6 p-5 md:rounded-lg lg:grid-rows-[auto_1fr_auto] lg:grid-cols-[43.5%_1fr] lg:gap-x-14 lg:px-10",0===x.length?"grid-rows-[auto_auto_1fr]":"grid-rows-[auto_auto_auto_1fr]"),style:{backgroundColor:"#".concat(m.backgroundColor)},children:[(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col space-y-1 h-fit lg:order-2",C),children:[(0,r.jsx)("span",{className:"text-lg font-extrabold line-clamp-2",children:m.title}),(0,r.jsx)("span",{className:"text-sm line-clamp-2",children:m.description})]}),(0,r.jsx)("div",{className:"lg:row-span-2 lg:order-1",children:O?(0,r.jsx)(f.Ow,{className:"block h-fit text-left w-full",onPress:()=>(w(T),j.push(c.tl.SUPERNOODLE_URL)),children:(0,r.jsx)(en,{className:(0,y.Q)(g&&"pointer-events-none"),title:u.title,sponsorLogo:u.sponsorLogo,media:{loopingVideo:u.loopingVideo,backgroundImage:u.backgroundImage},callToAction:(0,r.jsxs)("div",{className:"flex flex-row justify-center items-center text-center",children:[u.ctaText,c.yw.VIDEO===u.contentType&&(0,r.jsx)(f.s,{className:"h-input-icon ml-xs shrink-0"}),c.yw.ACTIVITY===u.contentType&&(0,r.jsx)(f.Km,{className:"h-input-icon ml-xs shrink-0"})]})})}):(0,r.jsx)(_.A,{href:S,className:"block h-fit",referrer:{sourceElement:N.IR.PRIMARY,sourceName:N.bP.HERO_UNIT},events:[{event:"Link Clicked",properties:{...T,url:u.contentType===c.yw.CUSTOM_LINK?u.content.destinationUrl:void 0}}],children:(0,r.jsx)(en,{className:(0,y.Q)(g&&"pointer-events-none"),title:u.title,sponsorLogo:u.sponsorLogo,media:{loopingVideo:u.loopingVideo,backgroundImage:u.backgroundImage},callToAction:(0,r.jsxs)("div",{className:"flex flex-row justify-center items-center text-center",children:[u.ctaText,c.yw.VIDEO===u.contentType&&(0,r.jsx)(f.s,{className:"h-input-icon ml-xs shrink-0"}),c.yw.ACTIVITY===u.contentType&&(0,r.jsx)(f.Km,{className:"h-input-icon ml-xs shrink-0"})]}),impressionsProps:(null==u||null==(n=u.content)||null==(l=n.partner)?void 0:l.partnerId)?{...T,partnerId:u.content.partner.partnerId,partnerName:u.content.partner.partnerName}:null})})}),(0,r.jsx)("div",{className:"grid gap-y-5 md:grid-cols-2 md:gap-x-5 lg:grid-rows-1 lg:grid-cols-3 lg:order-3",children:x.map((e,t)=>{var s,l,n,i,a;let o=P(e.content.destinationUrl,v),d=(a=e.content.destinationUrl,!v&&k(a)),u=o||(e.contentType===c.yw.CUSTOM_LINK?e.content.destinationUrl:"".concat((0,es.U)(e.contentType),"/").concat(e.content.id,"/").concat(e.content.slug));return d?(0,r.jsx)(f.Ow,{onPress:()=>(w({title:er(e)}),j.push(c.tl.SUPERNOODLE_URL)),className:"text-left",children:(0,r.jsx)(ei,{title:e.title,description:e.description,image:e.image,textTheme:m.textTheme,className:(0,y.Q)(g&&"pointer-events-none"),impressionsProps:(null==e||null==(l=e.content)||null==(s=l.partner)?void 0:s.partnerId)?{title:er(e),partnerId:e.content.partner.partnerId,partnerName:e.content.partner.partnerName}:null})},"".concat(e.content.id,"_").concat(t)):(0,r.jsx)(_.A,{href:u,className:"block self-stretch",referrer:{sourceElement:"".concat(N.IR.SECONDARY," - slide ").concat(p),sourceName:N.bP.CAROUSEL},events:[{event:"Link Clicked",properties:{...T,title:er(e),url:e.contentType===c.yw.CUSTOM_LINK?e.content.destinationUrl:void 0}}],children:(0,r.jsx)(ei,{title:e.title,description:e.description,image:e.image,textTheme:m.textTheme,className:(0,y.Q)(g&&"pointer-events-none"),impressionsProps:(null==e||null==(i=e.content)||null==(n=i.partner)?void 0:n.partnerId)?{title:er(e),partnerId:e.content.partner.partnerId,partnerName:e.content.partner.partnerName}:null})},"".concat(e.content.id,"_").concat(t))})}),(0,r.jsxs)("div",{className:"relative self-end h-7 flex flex-col md:flex-row items-center justify-center lg:col-span-2 lg:order-4",children:[m.sponsorLogo&&(0,r.jsxs)("div",{ref:(null==(i=m.partner)?void 0:i.partnerId)?L:null,className:"flex flex-row items-center gap-x-4 md:mr-auto mb-0",children:[(0,r.jsx)("p",{className:(0,y.Q)("font-bold text-xs",C),children:"Powered By"}),(0,r.jsx)(f._V,{className:"w-auto h-auto max-w-12 max-h-6 lg:max-w-28 lg:max-h-14 object-fill",sources:m.sponsorLogo,alt:""})]}),o.length>1&&(0,r.jsxs)("div",{className:"flex items-center space-y-4 md:space-y-0 space-x-2 md:absolute",children:[(0,r.jsx)(f.Xb,{disabled:0===d,onPress:()=>h(d-1),className:"hidden lg:block",children:(0,r.jsx)(f._n,{className:(0,y.Q)("w-5 h-5 mr-2 text-gray-600",0===d&&"hidden")})}),o.map((e,t)=>(0,r.jsx)(f.Xb,{onPress:()=>h(t),className:(0,y.Q)("w-[10px] h-[10px] rounded-full",t===d?"bg-purple-500":"bg-gray-400")},t)),(0,r.jsx)(f.Xb,{disabled:d===o.length-1,onPress:()=>h(d+1),className:"hidden lg:block",children:(0,r.jsx)(f.Zd,{className:(0,y.Q)("ml-2 w-5 h-5 text-gray-600",d===o.length-1&&"hidden")})})]})]})]})}function eo(e){let{fetchers:t}=e,[s]=t,[n,i]=l.useState(0),[a,o]=l.useState(!1),{data:c,isLoading:d}=v(s),[m,u]=(0,et.A)(),x=Array.isArray(c)?c[0]:c,{logEvent:p}=(0,E._B)({event:"Carousel Slide Changed",properties:{},options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}}),g=e=>{p({title:"".concat(x[n].slideData.title).concat(e),sourceName:"".concat(N.bP.CAROUSEL).concat(e),sourceElement:"".concat(N.bP.CAROUSEL_NAVIGATION).concat(e)}),i(e)};return d?(0,r.jsx)(f.EA,{className:"rounded-lg bg-gray-500 h-[465px]"}):x?(0,r.jsx)("div",{className:"relative overflow-hidden -mx-6 md:mx-0",children:(0,r.jsx)(ee.P.div,{className:"flex",initial:!1,ref:m,animate:{x:"-".concat(100*n,"%")},transition:{duration:.7,ease:[.32,.72,0,1]},drag:x.length>1&&"x",dragConstraints:{left:-u.width*(x.length-1),right:0},dragElastic:1,onDragStart:()=>o(!0),onDragEnd:(e,t)=>{let{offset:s,velocity:r}=t,l=el(s.x,r.x);l<-7e3&&n+1<x.length?g(n+1):l>7e3&&n-1>-1&&g(n-1),o(!1)},children:x.map((e,t)=>{let{slideData:s,primaryItem:l,secondaryItems:i}=e;return(0,r.jsx)(ea,{carouselPosition:t+1,currentSlideIndex:n,slides:x,slideData:s,primaryItem:l,secondaryItems:i,isDragging:a,paginate:g},t)})})}):null}let ec=e=>{let{contentType:t,content:s}=e;return[c.yw.TAG,c.yw.CHANNEL,c.yw.TOPIC].includes(t)?s.name:s.title};function ed(e){let{title:t,media:s,sponsorLogo:l,callToAction:n,impressionsProps:i}=e,a=(0,b.$V)({properties:{...i,impressionType:c.gs.VIDEO_TILE,adProductType:c.Xk.VIDEO_THUMBNAIL},enabled:!!i});return(0,r.jsxs)("div",{ref:a,className:"flex flex-col bg-purple h-full w-full p-1 rounded-lg",children:[(0,r.jsxs)("div",{className:"aspect-w-16 aspect-h-9 relative overflow-hidden",children:[(0,r.jsx)(f.Qt,{className:"w-full h-auto object-contain rounded-t-lg",source:s.loopingVideo,fallbackImage:{sources:s.backgroundImage,alt:t}}),l&&(0,r.jsx)("div",{className:"absolute w-1/5 h-fit ml-auto mt-auto pb-2 pr-2",children:(0,r.jsx)(f._V,{className:"w-full h-auto object-contain",alt:"Sponsor logo",sources:l})})]}),(0,r.jsxs)("div",{className:"bg-purple flex flex-col px-3 pt-6 pb-5 space-y-4 md:flex-row md:justify-between md:items-center md:px-7 md:space-y-0 md:space-x-4",children:[(0,r.jsx)("span",{className:"font-extrabold text-lg text-white line-clamp-2",style:{textShadow:"0px 4px 4px rgba(0, 0, 0, 0.25)"},children:t}),(0,r.jsx)(f.gl,{variant:"light",size:"md",className:"min-w-fit max-w-fit",children:n})]})]})}function em(e){let{title:t,description:s,textTheme:l,image:n,impressionsProps:i}=e,{containerRef:a,lineClamp:o}=(0,b.H1)(),d=(0,b.$V)({properties:{...i,impressionType:c.gs.VIDEO_TILE,adProductType:c.Xk.VIDEO_THUMBNAIL},enabled:!!i});return(0,r.jsxs)("div",{ref:d,className:"flex flex-row h-full space-x-3 lg:flex-col lg:space-x-0 lg:space-y-5",children:[(0,r.jsx)("div",{className:"rounded-lg overflow-hidden w-[37%] lg:w-full",children:(0,r.jsx)("div",{className:"aspect-w-16 aspect-h-9",children:(0,r.jsx)(f._V,{className:"w-full h-auto object-contain",sources:n,alt:t})})}),(0,r.jsxs)("div",{className:(0,y.Q)("flex flex-col flex-1 pr-1","light"===l?"text-white":"text-gray-900"),children:[(0,r.jsx)("span",{className:"text-sm font-bold line-clamp-2 overflow-hidden lg:text-md",children:t}),(0,r.jsx)("div",{ref:a,className:"relative hidden text-sm lg:flex flex-1",children:(0,r.jsx)("p",{className:"absolute line-clamp-[var(--line-clamp)] md:mt-1",style:{"--l
1ine-clamp":o},children:s})})]})]})}function eu(e){var t,s,l,n,i;let{fetchers:a}=e,o=(0,b.rd)(),{userDefaultCurriculum:d}=(0,b.Fw)(),{logEvent:m}=(0,E._B)({event:"Link Clicked",options:{includeReferrer:!0,includeSourcePage:!0,includeSourcePageType:!0,referrer:{sourceElement:N.IR.PRIMARY,sourceName:N.bP.HERO_UNIT}}}),[u]=a,{data:x,isLoading:p}=v(u),g=Array.isArray(x)?x[0]:x;if(p)return(0,r.jsx)(f.EA,{className:"rounded-lg bg-gray-500 h-[465px]"});if(!g)return null;let{primaryItem:h,secondaryItems:j}=g,w=j.length>0,T=P(h.content.destinationUrl,d),C=(i=h.content.destinationUrl,!d&&k(i)),I=T||(h.contentType===c.yw.CUSTOM_LINK?h.content.destinationUrl:"".concat((0,es.U)(h.contentType),"/").concat(h.content.id,"/").concat(h.content.slug));return(0,r.jsxs)("div",{className:(0,y.Q)("grid min-w-full bg-white p-5 gap-y-6 -mx-6 md:mx-0 md:rounded-lg lg:grid-cols-[43.5%_1fr] lg:gap-x-14 lg:px-10 lg:gap-y-0",!w&&"gap-y-0"),children:[C?(0,r.jsx)(f.Ow,{className:(0,y.Q)("block h-fit text-left w-full",!w&&"col-span-2 md:place-self-center w-full lg:w-[40%]"),onPress:()=>{m({title:ec(h)}),o.push(c.tl.SUPERNOODLE_URL)},children:(0,r.jsx)(ed,{title:h.title,sponsorLogo:h.sponsorLogo,media:{loopingVideo:h.loopingVideo,backgroundImage:h.backgroundImage},callToAction:(0,r.jsxs)("div",{className:"flex flex-row justify-center items-center text-center",children:[h.ctaText,c.yw.VIDEO===h.contentType&&(0,r.jsx)(f.s,{className:"h-input-icon ml-xs shrink-0"}),c.yw.ACTIVITY===h.contentType&&(0,r.jsx)(f.Km,{className:"h-input-icon ml-xs shrink-0"})]}),impressionsProps:(null==h||null==(s=h.content)||null==(t=s.partner)?void 0:t.partnerId)?{title:ec(h),partnerId:h.content.partner.partnerId,partnerName:h.content.partner.partnerName}:null})}):(0,r.jsx)(_.A,{href:I,className:(0,y.Q)("block h-fit",!w&&"col-span-2 md:place-self-center w-full lg:w-[40%]"),referrer:{sourceElement:N.IR.PRIMARY,sourceName:N.bP.HERO_UNIT},events:[{event:"Link Clicked",properties:{title:ec(h),url:h.contentType===c.yw.CUSTOM_LINK?h.content.destinationUrl:void 0}}],children:(0,r.jsx)(ed,{title:h.title,sponsorLogo:h.sponsorLogo,media:{loopingVideo:h.loopingVideo,backgroundImage:h.backgroundImage},callToAction:(0,r.jsxs)("div",{className:"flex flex-row justify-center items-center text-center",children:[h.ctaText,c.yw.VIDEO===h.contentType&&(0,r.jsx)(f.s,{className:"h-input-icon ml-xs shrink-0"}),c.yw.ACTIVITY===h.contentType&&(0,r.jsx)(f.Km,{className:"h-input-icon ml-xs shrink-0"})]}),impressionsProps:(null==h||null==(n=h.content)||null==(l=n.partner)?void 0:l.partnerId)?{title:ec(h),partnerId:h.content.partner.partnerId,partnerName:h.content.partner.partnerName}:null})}),(0,r.jsx)("div",{className:"grid gap-y-5 md:grid-cols-2 md:gap-x-5 lg:grid-rows-1 lg:grid-cols-4",children:j.map((e,t)=>{var s,l,n,i,a;let u=P(e.content.destinationUrl,d),x=(a=e.content.destinationUrl,!d&&k(a)),p=u||(e.contentType===c.yw.CUSTOM_LINK?e.content.destinationUrl:"".concat((0,es.U)(e.contentType),"/").concat(e.content.id,"/").concat(e.content.slug));return x?(0,r.jsx)(f.Ow,{className:"text-left",onPress:()=>{m({title:ec(e)}),o.push(c.tl.SUPERNOODLE_URL)},children:(0,r.jsx)(em,{title:e.title,description:e.description,image:e.image,impressionsProps:(null==e||null==(l=e.content)||null==(s=l.partner)?void 0:s.partnerId)?{title:ec(e),partnerId:e.content.partner.partnerId,partnerName:e.content.partner.partnerName}:null})},"".concat(e.content.id,"_").concat(t)):(0,r.jsx)(_.A,{href:p,className:"block self-stretch",referrer:{sourceElement:N.IR.SECONDARY,sourceName:N.bP.HERO_UNIT},events:[{event:"Link Clicked",properties:{title:ec(e),url:e.contentType===c.yw.CUSTOM_LINK?e.content.destinationUrl:void 0}}],children:(0,r.jsx)(em,{title:e.title,description:e.description,image:e.image,impressionsProps:(null==e||null==(i=e.content)||null==(n=i.partner)?void 0:n.partnerId)?{title:ec(e),partnerId:e.content.partner.partnerId,partnerName:e.content.partner.partnerName}:null})},"".concat(e.content.id,"_").concat(t))})})]})}let ex=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?{"regular@1x":e,"regular@2x":e,"regular@3x":e}:t};function ep(e){let{templateOptions:t,fetchers:s}=e,[l]=s,{title:n,description:i}=t,{data:a,isLoading:o}=v(l),d=Array.isArray(a)?a[0]:a;return o||!d?(0,r.jsx)(f.EA,{className:"rounded-lg bg-gray-500 h-[375px] md:h-[405px] lg:h-[675px]"}):(0,r.jsx)(_.A,{href:"/".concat(c.Zt.VIDEOS,"/").concat(d.id,"/").concat(d.slug),referrer:{sourceElement:N.$u.HERO,sourceName:"rotation"===d.type?N.bP.ROTATION:n},children:(0,r.jsx)(f.A1,{title:n,description:i,source:d.loopingVideo,fallbackImageSource:ex(d.images.heroImage),heroLogo:ex(d.images.logo),buttonText:d.buttonText,mode:d.textTheme})})}function eg(e){let{templateOptions:t,fetchers:s}=e,l=(0,b.rd)(),{title:n,description:i,label:a,theme:o}=t,[d]=s,{data:m,isLoading:u}=v(d),x=m?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[t]=e,{destinationType:s=c.li.TAG,description:r,content:l,loopingVideo:n,image:i}=t,a=s===c.li.EXTERNAL;return{url:a?t.url:(0,es.g)(s,{id:l.id,slug:l.slug}),description:r,image:i,loopingVideo:n,isExternal:a,destinationType:s}}(m):{},{logEvent:p}=(0,E._B)({event:"Link Clicked",properties:{title:n,url:x.url,sourceElement:N.$u.SPOTLIGHT,sourceName:n},options:{includeReferrer:!1,includeSourcePage:!0,includeSourcePageType:!0}});return u?(0,r.jsx)(f.EA,{className:"bg-gray-500 rounded-lg h-[500px] md:h-[720px] lg:h-[420px]"}):(0,r.jsx)(f.Li,{source:x.loopingVideo,fallbackImageSource:x.image,title:n,description:i,onClick:()=>{p(),x.isExternal?l.push("/".concat(c.Zt.EXTERNAL_LINK_DISCLAIMER,"?href=").concat(x.url),void 0,{sourceElement:N.$u.SPOTLIGHT,sourceName:n}):l.push(x.url,void 0,{sourceElement:N.$u.SPOTLIGHT,sourceName:n})},buttonLabel:a,bgColor:o.background,textTheme:o.color})}function ef(e){let{layout:t=[],mutationToQueryInvalidationMap:s=[]}=e,n={List:D,spotlight:eg,HeroVideo:ep,HeroUnit:eu,HeroUnitCarousel:eo,CustomShelf:D},i=(0,m.useQueryClient)(),a=l.useRef(new Set),o=Object.keys(s);return l.useEffect(()=>{let e=i.getMutationCache().subscribe(e=>{var t,r;if((null==(r=e.mutation)||null==(t=r.state)?void 0:t.status)==="success"){let{mutationId:t}=e.mutation;if(!a.current.has(t)){let r=e.mutation.options.mutationKey;r?"string"==typeof r&&(r=[r]):r=[];let l=r.find(e=>o.includes(e));
1l&&(s[l].forEach(e=>{i.invalidateQueries({queryKey:[e]})}),a.current.add(t))}}});return()=>e()},[i,s,o]),t.map(e=>{let{key:t,type:s,templateOptions:l,fetcher:i}=e;if(s in n){let e=n[s];return(0,r.jsx)(e,{templateOptions:l,fetchers:i},t)}return(0,u.V1)(!1,"LayoutRenderer: Component type ".concat(s," is not registered")),null})}var eh=s(9267);let ej=(0,d.A)();function eN(){let{data:e,isLoading:t}=(0,i.useQuery)({queryKey:[c.es.FALLBACK_LAYOUT],queryFn:ej.getFallbackLayout,retry:!1,staleTime:1/0});return t?null:(0,r.jsx)(ef,{layout:e})}class ey extends l.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){eh.A.notify(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?(0,r.jsx)(eN,{}):t}constructor(e){super(e),this.state={hasError:!1}}}function ev(){let e=(0,n.useSearchParams)().get("custom_home_page_layout_id"),{data:t}=(0,i.useQuery)({queryKey:o()([c.es.LAYOUT,e]),queryFn:()=>ej.getLayout(e)});return(0,r.jsx)(ey,{children:(0,r.jsx)(ef,{layout:t,mutationToQueryInvalidationMap:{[c.fW.UPDATE_FAVORITE]:[x.FAVORITES_SHELF]}})})}},65562:(e,t,s)=>{Promise.resolve().then(s.bind(s,45365)),Promise.resolve().then(s.bind(s,31537)),Promise.resolve().then(s.bind(s,8415)),Promise.resolve().then(s.bind(s,64397)),Promise.resolve().then(s.bind(s,34577)),Promise.resolve().then(s.bind(s,26388)),Promise.resolve().then(s.bind(s,87606)),Promise.resolve().then(s.bind(s,24199)),Promise.resolve().then(s.bind(s,99757)),Promise.resolve().then(s.bind(s,63339)),Promise.resolve().then(s.bind(s,16258)),Promise.resolve().then(s.bind(s,4049)),Promise.resolve().then(s.bind(s,84007)),Promise.resolve().then(s.bind(s,67933)),Promise.resolve().then(s.bind(s,3149)),Promise.resolve().then(s.bind(s,82613)),Promise.resolve().then(s.bind(s,38237))}},e=>{var t=t=>e(e.s=t);e.O(0,[2726,1046,6826,1773,9900,304,4451,2445,5299,6003,5365,6687,587,8315,7358],()=>t(65562)),_N_E=e.O()}]);
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.