"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8773],{11955:(e,l,a)=>{a.d(l,{GF:()=>n,UE:()=>s,nl:()=>i});var t=a(56436);let n=(0,t.eU)(void 0),i=(0,t.eU)(void 0),s=(0,t.eU)(void 0);(0,t.eU)(void 0)},13196:(e,l,a)=>{a.d(l,{a:()=>s});var t=a(20108),n=a(11955),i=a(97839);let s=()=>{let[e,l]=(0,t.fp)(n.nl),a=(0,t.Xr)(n.UE);return(0,i.useCallback)(function(t,n,i){let s=!(arguments.length>3)||void 0===arguments[3]||arguments[3];if(e){var r,d;let o=null==(d=window)||null==(r=d.jwplayer)?void 0:r.call(d);n!==e&&t&&(l(n),o.load(t));let c=t.findIndex(e=>e.mediaid===i);if(c>=0){let e=t[c];s&&(null==e?void 0:e.link)&&window.history.pushState({playlistId:n,videoId:i},"",e.link),a(e),o.playlistItem(c)}}},[e,l,a])}},15471:(e,l,a)=>{a.d(l,{A:()=>S});var t=a(66695),n=a(97839),i=a(81449),s=a(60400),r=a(20108),d=a(87189),o=a(33319),c=a(27274),u=a(11737),m=a(4901),v=a(24765),p=a(73237),h=a(11955),x=a(37238),f=a(42662),g=a(88504),b=a(72460),y=a(42302),w=a(36697),j=a(64070);let N={timeAgo:!0,daysFromNow:5,showFullTime:!1,locale:"en-US",timeZone:"America/New_York"},k=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N;if(!e)return null;let{timeAgo:a,daysFromNow:t,showFullTime:n,locale:i,timeZone:s}={...N,...l},r=new Date(e),d=new Date;if(a){let e=d.getTime()-r.getTime(),l=Math.ceil(e/36e5),a=Math.ceil(e/864e5);if(l{let{authors:l,externalAuthors:a,updateDate:i,variant:s}=e;if(!(0,y.J)(l)&&!a&&!i)return null;let r=k(i),d=(0,y.J)(l)?l.map(e=>{var l;let a=null==(l=e.authorData)?void 0:l.profilePicture;if((0,b.bt)(a))return a}).filter(e=>void 0!==e):[],o=32+(d.length-1)*16,c=d.length>0&&"noAuthorImages"!==s;return(0,t.jsxs)("div",{className:"flex items-center pb-4 pt-2","data-testid":"authors-container",children:[c&&(0,t.jsx)("div",{className:(0,j.cn)("mr-2 flex -space-x-4"),style:{minWidth:"".concat(o,"px")},"data-testid":"author-images-container",children:d.map((e,a)=>{var n,i,s,r;return(null==e?void 0:e.url)?(0,t.jsx)(w.A,{width:32,height:32,src:e.url,alt:"".concat((null==l||null==(i=l[a])||null==(n=i.authorData)?void 0:n.firstName)||""," ").concat((null==l||null==(r=l[a])||null==(s=r.authorData)?void 0:s.lastName)||""),className:"flatplan_authorImage my-0 h-8 w-8 rounded-full border-2 border-white object-cover",style:{zIndex:d.length-a},"data-flatplan-id":"flatplan_authorImage","data-testid":"author-image-".concat(a),objectFit:"cover"},a):null})}),(0,t.jsxs)("div",{className:"inline","data-testid":"author-text-container",children:[((0,y.J)(l)||a)&&(0,t.jsx)(p.Ay,{variant:"Body.S",className:"mr-1 inline leading-[1rem]","data-testid":"by-text",elementType:"span",children:"By"}),(0,y.J)(l)&&l.map((e,a)=>{if((0,b.QY)(e)){var i,s,r;let d="".concat(null==(i=e.authorData)?void 0:i.firstName," ").concat(null==(s=e.authorData)?void 0:s.lastName),o=a===l.length-1,c=a===l.length-2;return(0,t.jsxs)(n.Fragment,{children:[(null==e||null==(r=e.authorData)?void 0:r.bioUrl)?(0,t.jsx)(g.default,{href:e.authorData.bioUrl,"data-testid":"author-link-".concat(a),children:(0,t.jsx)(p.Ay,{className:"flatplan_authorName inline leading-[1rem] underline",variant:"Body.S",elementType:"span","data-flatplan-id":"flatplan_authorName","data-testid":"author-name-linked-".concat(a),children:d})}):(0,t.jsx)(p.Ay,{className:"flatplan_authorName inline leading-[1rem]",variant:"Body.S",elementType:"span","data-flatplan-id":"flatplan_authorName","data-testid":"author-name-".concat(a),children:d}),!o&&(0,t.jsx)(p.Ay,{variant:"Body.S",elementType:"span",className:"inline leading-[1rem] ".concat(c?"mx-1":"mr-1"),"data-testid":"author-separator-".concat(a),children:c?"and":","})]},e.id)}return null}),a&&(0,t.jsx)(p.Ay,{variant:"Body.S",elementType:"span",className:"inline leading-[1rem] ".concat((0,y.J)(l)?"ml-1":""),"data-testid":"external-authors",children:(0,y.J)(l)?", ".concat(a):a}),r&&(0,t.jsxs)("span",{className:"whitespace-nowrap",children:[((0,y.J)(l)||a)&&(0,t.jsx)(p.Ay,{variant:"Body.S",elementType:"span",color:"secondary",className:"mx-1 inline leading-[1rem]","data-testid":"date-separator",children:"•"}),(0,t.jsx)(p.Ay,{variant:"Body.S",elementType:"span",color:"secondary",className:"inline whitespace-nowrap leading-[1rem]","data-testid":"update-date",children:r})]})]})]})};var _=a(60061);let S=e=>{var l,a,g,b,y,w,j;let{videos:N,className:k,autoplay:S=!1,showControls:C=!0,showTitle:T=!0,showDescription:I=!0,aspectRatio:F="16:9",playerId:U="QidSYgAw"}=e,[B,D]=(0,r.fp)(h.UE),E=(0,r.md)(h.GF),L=(0,f.z)(),M="video-player-".concat((0,n.useId)()),P=(0,n.useRef)(!0),z=(null==(l=(0,m.J)())?void 0:l.user)||{},W=(0,u.c)(),[J,H]=(0,n.useState)(!1),G=(0,n.useRef)(null==B?void 0:B.mediaid);(0,n.useEffect)(()=>{G.current=null==B?void 0:B.mediaid},[B]);let R=(0,n.useCallback)(e=>{let{event:l,player:a}=e,t=l.item;G.current!==(null==t?void 0:t.mediaid)&&(D(t),window.history.pushState({playlistId:E,videoId:t.mediaid},"",t.link||""))},[E,D]),O=(0,n.useCallback)(e=>{var l,a,t;let{player:n}=e,i=null==(t=window)||null==(a=t.ns_)||null==(l=a.StreamingAnalytics)?void 0:l.JWPlayer;i&&i(n,{publisherId:"9576127"})},[]);if(!B)return null;let V=[...o.v,...c.yW,{eventName:"playlistItem",callback:R},{eventName:"ready",callback:O}].map(e=>{let{eventName:l,callback:a}=e;return{eventName:l,callback:e=>{let{event:l,player:t}=e;return a({event:l,player:t,isFirstPlayRef:P,user:z,trackVideoEvent:W,isMobile:L})}}});return(0,t.jsxs)("div",{className:k,children:[(0,t.jsx)("div",{className:"mb-4 overflow-hidden md:rounded-lg",children:(0,t.jsx)(d.h,{playlist:N,events:V,options:{aspectratio:F,autostart:S,controls:C,displaytitle:!1,displaydescription:!1,width:"100%"},setupParams:{playerId:U}},M)}),(0,t.jsxs)("div",{className:"mx-4 my-4 md:mx-0",children:[T&&(null==B?void 0:B.title)&&(0,t.jsx)(p.Ay,{variant:"Title.XL",className:"mb-2",children:null==B?void 0:B.title}),(null==B||null==(a=B.custom)?void 0:a.publishDate)&&(0,t.jsx)(A,{authors:null==B||null==(g=B.custom)?void 0:g.authors,externalAuthors:null==B||null==(b=B.custom)?void 0:b.externalAuthors,updateDate:null==B||null==(y=B.custom)?void 0:y.publishDate}),I&&(null==B?void 0:B.description)&&(0,t.jsx)(p.Ay,{variant:"Body.M",className:"mb-4",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:null==B?void 0:B.description}})}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(null==B||null==(w=B.custom)?void 0:w.transcript)&&(0,t.jsxs)(v.$n,{className:"flex items-center text-sm font-medium",variant:"outline",onClick:()=>H(!J),children:["Transcript"," ",J?(0,t.jsx)(i.A,{className:"ml-1 h-4 w-4"}):(0,t.jsx)(s.A,{className:"ml-1 h-4 w-4"})]}),(0,t.jsx)(_.ViewCommentsButton,{articleId:(null==B?void 0:B.mediaid)||"",isMobile:L}),(0,t.jsx)(x.Share,{type:"video",title:B.title||"",imageUrl:B.image})]}),J&&(null==B||null==(j=B.custom)?void 0:j.transcript)&&(0,t.jsx)("div",{className:"mt-4 rounded-lg bg-[#F4F4F4] p-4",children:(0,t.jsx)("p",{className:"text-sm text-gray-700",children:null==B?void 0:B.custom.transcript})})]})]})}},30184:(e,l,a)=>{l.V=s;let t=a(91236),n=a(54435),i=a(71744);async function s(e,l){let a=l?l.split("-").join("_"):"en_US",s=(0,n.urlFrom)((0,t.getCMSCollectionsUrlConfig)({collectionId:e,locale:a})),r=await fetch(s,{headers:{"Accept-Encoding":"gzip"},next:{revalidate:300,tags:[e]}});return(0,i.handleFetchResponse)(r)}},30275:(e,l,a)=>{a.d(l,{O:()=>d});var t=a(66695),n=a(64070),i=a(73237),s=a(42662),r=a(86028);let d=e=>{let{id:l,title:a,thumbnail:d,duration:o,onClick:c,className:u,isCurrent:m,isNext:v}=e,p=(0,s.z)();return(0,t.jsx)(r.S,{className:(0,n.cn)("group cursor-pointer gap-2","flex flex-col","md:flex-row",u),onClick:()=>{c&&!m&&c(l)},imageUrl:d,imageWrapClassName:"md:w-[50%] md:max-w-[145px] md:flex-shrink-0",imageClassName:"object-cover transition-transform duration-300 group-hover:scale-105",altText:a,contentClassName:"mt-2 min-w-0 flex-1 md:mt-0",badge:o,overlayClassName:"bg-black/20 opacity-0 transition-opacity duration-300 group-hover:opacity-100",showIcon:!0,content:(0,t.jsxs)(i.Ay,{elementType:"h2",variant:p?"Title.S":"Body.S.Bold",className:"line-clamp-3",children:[m&&(0,t.jsx)(i.Ay,{elementType:"span",variant:"Body.S.Bold",color:"brandLight",className:"mb-2 block md:mb-0",children:"Now Playing"}),v&&(0,t.jsx)(i.Ay,{elementType:"span",variant:"Body.S.Bold",color:"brandLight",className:"mb-2 block md:mb-0",children:"Next Up"}),a]})})}},40298:(e,l,a)=>{a.d(l,{x:()=>i});var t=a(66695);a(97839);var n=a(64070);let i=e=>{let{className:l}=e;return(0,t.jsxs)("div",{className:(0,n.cn)("animate-pulse",l),children:[(0,t.jsx)("div",{className:"mb-2 aspect-video rounded-lg bg-gray-200"}),(0,t.jsx)("div",{className:"mb-2 h-4 w-3/4 rounded bg-gray-200"}),(0,t.jsx)("div",{className:"h-3 w-1/2 rounded bg-gray-200"})]})}},55716:(e,l,a)=>{a.d(l,{L0:()=>i,Wk:()=>s});let t=e=>{var l;let a=e.split(/\s+/);return(null==(l=a[0])?void 0:l.toLowerCase())==="by"?{firstName:a[1]||"",lastName:a.slice(2).join(" ")||""}:n(e)},n=e=>{let l=e.split(/\s+/);return{firstName:l[0]||"",lastName:l.slice(1).join(" ")||""}},i=(e,l)=>e.map(e=>((e,l)=>{var a,i,s,r,d,o,c,u,m,v,p,h,x,f,g,b,y,w,j,N,k;let A,_,S=null!=(f=null==e||null==(a=e.variants)?void 0:a[0])?f:"",C=null!=(g=(null==e?void 0:e.teaserTitle)||(null==e?void 0:e.title))?g:"",T={jwplayer:"",pcollid:(null==e?void 0:e.pcollid)||"",adzone:(null==e||null==(i=e.adsmetrics)?void 0:i.adzone)||"",assetName:null==e?void 0:e.assetName,description:null!=(b=null==e?void 0:e.description)?b:"",title:C,teaserTitle:C,playlists:null!=(y=null==e?void 0:e.playlists)?y:[],entitlements:null!=(w=null==e||null==(s=e.tags)?void 0:s.entitlements)?w:[],premium:null!=(j=null==e?void 0:e.premium)&&j,iab:(null==e||null==(r=e.tags)?void 0:r.iab)||{},tagsGeo:(null==e||null==(d=e.tags)?void 0:d.geo)||[],tagsKeyword:null==e||null==(o=e.tags)?void 0:o.keyword,tagsStorm:null==e||null==(c=e.tags)?void 0:c.storm,providername:(null==e?void 0:e.providername)||"no-provider-data",publishdate:null!=(N=null==e?void 0:e.publishdate)?N:"",lastmodifieddate:null!=(k=null==e?void 0:e.lastmodifieddate)?k:"",duration:(null==e?void 0:e.duration)||"",id:(null==e?void 0:e.id)||"",videoIndex:-1,collectionId:(null==e?void 0:e.pcollid)||"",videoId:(null==e?void 0:e.id)||"",collectionAdZone:(null==e||null==(u=e.adsmetrics)?void 0:u.adzone)||""};(null==(m=e.author_data)?void 0:m.length)?A=e.author_data.map(e=>{var l,a,i;let s=null==e||null==(l=e.authorImage)?void 0:l[0],{firstName:r,lastName:d}=(e=>{var l,a,i;let s=null==(l=e.name)?void 0:l.trim(),r=null==(a=e.byline)?void 0:a.trim(),d=null==(i=e.fullName)?void 0:i.trim();return s?n(s):r?t(r):d?n(d):{firstName:"",lastName:""}})(e);return{id:"__wxnext_".concat(r,"_").concat(d),role:["authenticated"],isAuthor:!0,username:e.email,updatedAt:"",createdAt:"",authorData:{firstName:r,lastName:d,bio:e.byline,bioUrl:e.bioUrl,profilePicture:{id:"__wxnext_".concat(e.fullName),createdAt:"",updatedAt:"",url:null==s||null==(a=s.variants)?void 0:a[0],caption:"",seo:{altText:null!=(i=null==s?void 0:s.alt_text)?i:""}}}}}):e.author&&(A=[],_=e.author.join(", "));let I={mweb:null==e||null==(v=e.variants)?void 0:v.mweb,mwebFallback:null==e||null==(p=e.variants)?void 0:p.fallback_mweb,web:null==e||null==(h=e.variants)?void 0:h.web,webFallback:null==e||null==(x=e.variants)?void 0:x.fallback_web};return{file:"desktop"===l?I.web:I.mweb,sources:[{file:"desktop"===l?I.web:I.mweb},{file:"desktop"===l?I.webFallback:I.mwebFallback}],image:S?"".concat(S,"?crop=16:9&format=pjpg&auto=webp&quality=60&width=640"):"",title:e.title,description:e.description,mediaid:e.id,link:e.assetName,tracks:(null==e?void 0:e.cc_url)?[{file:e.cc_url,label:"On",kind:"captions",default:!1}]:void 0,custom:{url:e.url,transcript:e.transcript,duration:function(e){if(!e)return"00:00";let l=e.split(":");if(l&&3===l.length){let[a,t,n]=l;return a&&+a?e:"".concat(t,":").concat(n)}return"00:00"}(e.duration),authors:A,externalAuthors:_||"",publishDate:e.lastmodifieddate,ctx:T}}})(e,l)),s=e=>{switch(e){case 1:return"MW_Position_ContentFeedAd1";case 2:return"WX_ContentFeed1";case 3:return"MW_Position_ContentFeedAd11";default:return}}},65977:(e,l,a)=>{a.d(l,{r:()=>y});var t=a(66695),n=a(97839),i=a(38051),s=a(20108),r=a(96743),d=a(64070);function o(e){let{className:l,...a}=e;return(0,t.jsx)(r.bL,{"data-slot":"tabs",className:(0,d.cn)("flex flex-col gap-x-2",l),...a})}function c(e){let{className:l,...a}=e;return(0,t.jsx)(r.B8,{"data-slot":"tabs-list",className:(0,d.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",l),...a})}function u(e){let{className:l,...a}=e;return(0,t.jsx)(r.l9,{"data-slot":"tabs-trigger",className:(0,d.cn)("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",l),...a})}function m(e){let{className:l,...a}=e;return(0,t.jsx)(r.UC,{"data-slot":"tabs-content",className:(0,d.cn)("flex-1 outline-none",l),...a})}var v=a(89010);let p=(0,n.forwardRef)((e,l)=>{let{title:a,titleId:n,desc:i,descId:s,...r}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:l,"aria-labelledby":n,"aria-describedby":s,...r,children:[i?(0,t.jsx)("desc",{id:s,children:i}):null,void 0===a?(0,t.jsx)("title",{id:n,children:"Settings Adjust"}):a?(0,t.jsx)("title",{id:n,children:a}):null,(0,t.jsx)("g",{fill:"currentColor",children:(0,t.jsx)("path",{d:"M15 4h-2.05c-.25-1.15-1.25-2-2.45-2s-2.2.85-2.45 2H1v1h7.05C8.3 6.15 9.3 7 10.5 7s2.2-.85 2.45-2H15zm-4.5 2C9.65 6 9 5.35 9 4.5S9.65 3 10.5 3s1.5.65 1.5 1.5S11.35 6 10.5 6M1 12h2.05c.25 1.15 1.25 2 2.45 2s2.2-.85 2.45-2H15v-1H7.95C7.7 9.85 6.7 9 5.5 9s-2.2.85-2.45 2H1zm4.5-2c.85 0 1.5.65 1.5 1.5S6.35 13 5.5 13 4 12.35 4 11.5 4.65 10 5.5 10"})})]})}),h=n.forwardRef((e,l)=>(0,t.jsx)(v.h,{ref:l,icon:p,...e}));h.displayName="SettingsAdjust";let x=e=>{var l;let{tabs:a,defaultActiveTab:i,onTabChange:s,size:r="small",showFilterIcon:v,className:p,innerTabsClass:x}=e,[f,g]=(0,n.useState)(i||(null==a||null==(l=a[0])?void 0:l.id)||""),b={"h-10":"small"===r,"h-12":"large"===r};return(0,t.jsxs)(o,{value:f,onValueChange:e=>{g(e),s&&s(e)},className:(0,d.cn)("w-full",p),children:[(0,t.jsxs)("div",{className:(0,d.cn)("flex items-center gap-2","small"===r?"h-10":"h-14"),children:[v&&(0,t.jsx)("div",{className:(0,d.cn)("flex aspect-square shrink-0 items-center justify-center rounded-lg bg-gray-100",b),children:(0,t.jsx)(h,{className:(0,d.cn)("text-gray-600",{"h-4 w-4":"small"===r,"h-5 w-5":"large"===r})})}),(0,t.jsx)("div",{className:"scrollbar-hide overflow-x-scroll",children:(0,t.jsx)(c,{className:(0,d.cn)("flex w-fit gap-2 bg-transparent p-0",b,x),children:a.map(e=>(0,t.jsx)(u,{value:e.id,className:(0,d.cn)("flex-shrink-0 cursor-pointer whitespace-nowrap rounded-lg py-3","data-[state=active]:bg-brand-400 data-[state=active]:text-white","data-[state=inactive]:bg-gray-100 data-[state=inactive]:text-gray-600",{"px-3 text-sm":"small"===r,"px-4 text-base":"large"===r}),children:e.label},e.id))})})]}),(0,t.jsx)("div",{children:a.map(e=>(0,t.jsx)(m,{value:e.id,children:e.content},e.id))})]})};var f=a(30184),g=a(11955),b=a(92071);let y=e=>{let{playlistIds:l,className:a,innerTabsClass:n}=e,r=(0,b.useParams)(),d=null==r?void 0:r.locale,[o,c]=(0,s.fp)(g.GF),{data:u}=(0,i.Ay)(["playlist-titles",d,l.join(",")],async()=>{let e=l.map(async e=>{try{let l=await (0,f.V)(e,d);return{id:e,label:(null==l?void 0:l.title)||e}}catch(l){return console.error("Error fetching title for playlist ".concat(e,":"),l),{id:e,label:e}}});return await Promise.all(e)},{revalidateOnFocus:!1});return(0,t.jsx)(x,{tabs:u||[],defaultActiveTab:o,onTabChange:c,className:a,innerTabsClass:n})}},88773:(e,l,a)=>{a.a(e,async(e,t)=>{try{a.d(l,{VideosWithPlaylistsClient:()=>m});var n=a(66695),i=a(15471),s=a(58346),r=a(11955),d=a(65977),o=a(90763),c=a(64070),u=e([o]);o=(u.then?(await u)():u)[0];let m=e=>{let{videos:l,playlistIds:a,className:t,playerId:u,deviceClass:m,showOpenWebComments:v=!1}=e;return(0,s.RH)([[r.UE,l[0]],[r.GF,a[0]],[r.nl,a[0]]]),(0,n.jsxs)("div",{className:(0,c.cn)("bg-white md:p-4",v?"md:rounded-t-xl":"md:rounded-xl",t),children:[(0,n.jsx)("div",{className:"hidden md:block",children:(0,n.jsx)(d.r,{playlistIds:a,className:"mb-4"})}),(0,n.jsxs)("div",{className:"flex flex-col md:grid md:grid-cols-4 md:gap-4 md:divide-x md:divide-gray-200",children:[(0,n.jsx)("div",{className:"border-b border-gray-200 md:col-span-3 md:border-b-0",children:(0,n.jsx)(i.A,{videos:l,className:"md:pr-4",showTitle:!0,showDescription:!0,playerId:u})}),(0,n.jsx)("div",{className:"md:hidden",children:(0,n.jsx)(d.r,{playlistIds:a,className:"my-4",innerTabsClass:"mx-4"})}),(0,n.jsx)("div",{className:"w-full md:relative md:overflow-hidden",children:(0,n.jsx)(o.A,{deviceClass:m,videos:l,initialPlaylistId:a[0]||"",className:"mx-4 md:absolute md:mx-0 md:-ml-4 md:overflow-auto"})})]})]})};t()}catch(e){t(e)}})},90763:(e,l,a)=>{a.a(e,async(e,t)=>{try{a.d(l,{A:()=>e});var n=a(66695),i=a(97839),s=a(38051),r=a(20108),d=a(30275),o=a(40298),c=a(64070),u=a(13196),m=a(72711),v=a(55716),p=a(11955),h=a(99805),x=a(23610);let e=e=>{let{deviceClass:l,videos:a,initialPlaylistId:t,className:f}=e,g=(0,r.md)(m.X),[b,y]=(0,r.fp)(p.GF),w=(0,r.md)(p.UE),j=(0,r.md)(p.nl),N=(0,u.a)(),[k,A]=(0,i.useState)(),{data:_,isLoading:S}=(0,s.Ay)(b?["playlist-content",g,b]:null,async e=>{let[...n]=e;if(n[2]===t)return a;let i=await (0,h.vd)(n[2],g);return i?(0,v.L0)(i,l):null},{revalidateOnFocus:!1,dedupingInterval:6e4});(0,i.useEffect)(()=>{if(null!=_){k&&b&&(N(_,b,k,!1),A(null));let e=e=>{let{playlistId:l,videoId:a}=e.state;b!==l?(y(l),A(a)):N(_,l,a,!1)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}}},[_,N,k,b,y]);let[C,T]=(0,i.useState)(null),[I,F]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!_||!w){T(null),F(null);return}let e=w.mediaid||"";if(T(e),j===b){let l=_.findIndex(l=>(l.mediaid||l.file||"")===e);if(-1!==l&&l+1<_.length e='_[l+1];e?F(e.mediaid||e.file||""):F(null)}else' f u="e=">{_&&b&&N(_,b,e)},B=(0,c.cn)("grid gap-4","grid-cols-1","max-sm:pb-6 max-h-full",f);return S?(0,n.jsx)("div",{className:B,children:[,,,,].fill(0).map((e,l)=>(0,n.jsx)(o.x,{},l))}):_?(0,n.jsx)("div",{className:B,children:_.map((e,l)=>{var a;let t=e.mediaid||e.file||"",i=t===C,s=t===I,r=(0,v.Wk)(l);return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(d.O,{id:t,title:e.title||"",thumbnail:e.image||"",duration:(null==(a=e.custom)?void 0:a.duration)||"",onClick:U,isCurrent:i,isNext:s,className:"md:pl-4"}),r&&(0,n.jsx)(x.AdBlock,{adId:r})]},t)})}):(0,n.jsx)("div",{className:"flex items-center justify-center p-8 text-gray-500",children:"No videos available"})};t()}catch(e){t(e)}})}}]);