PageSourceSearch

https://brasilmineral.com.br/_next/static/chunks/app/videos/page-c1f29b4d4aadabec.js

js brasilmineral.com.br collected 2026-10-02 05:21:12 UTC 24,111 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[62227],{927:(e,t,r)=>{"use strict";r.d(t,{Accordion:()=>n,AccordionContent:()=>u,AccordionItem:()=>d,AccordionTrigger:()=>c});var a=r(95155),s=r(12115),o=r(89372),i=r(66088),l=r(40980);let n=o.bL,d=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.q7,{ref:r,className:(0,l.cn)("border-b",e),...t}));d.displayName="AccordionItem";let c=s.forwardRef(({className:e,children:t,...r},s)=>(0,a.jsx)(o.Y9,{className:"flex",children:(0,a.jsxs)(o.l9,{ref:s,className:(0,l.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,(0,a.jsx)(i.A,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));c.displayName=o.l9.displayName;let u=s.forwardRef(({className:e,children:t,...r},s)=>(0,a.jsx)(o.UC,{ref:s,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:(0,a.jsx)("div",{className:(0,l.cn)("pb-4 pt-0",e),children:t})}));u.displayName=o.UC.displayName},1977:(e,t,r)=>{"use strict";r.d(t,{O:()=>u});var a=r(95155),s=r(12115),o=r(20232),i=r(84980),l=r(7810),n=r(57420),d=r(45160),c=r(81477);function u({video:e,collection:t,onClick:r,showCollection:m=!0}){var f,x;let p,g,h,[b,v]=(0,s.useState)(!1),y=new Date(e.publishedAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"short",year:"numeric"}),N=e.description&&e.description.length>120?e.description.substring(0,120)+"...":e.description||"";return(0,a.jsxs)(c.Zp,{className:"group cursor-pointer overflow-hidden transition-all duration-300 hover:shadow-lg",onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),onClick:r,children:[(0,a.jsxs)("div",{className:"relative aspect-video overflow-hidden bg-muted",children:[(0,a.jsx)("img",{src:e.thumbnailUrl,alt:e.title,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105"}),(0,a.jsx)("div",{className:`absolute inset-0 flex items-center justify-center bg-black/40 transition-opacity duration-300 ${b?"opacity-100":"opacity-0"}`,children:(0,a.jsx)("div",{className:"rounded-full bg-white/90 p-4 transition-transform duration-300 hover:scale-110",children:(0,a.jsx)(o.A,{className:"h-8 w-8 fill-primary text-primary"})})}),e.duration&&(0,a.jsxs)("div",{className:"absolute bottom-2 right-2 rounded bg-black/80 px-2 py-1 text-xs font-semibold text-white backdrop-blur-sm",children:[(0,a.jsx)(i.A,{className:"mb-0.5 mr-1 inline h-3 w-3"}),(p=Math.floor((f=e.duration)/3600),g=Math.floor(f%3600/60),h=Math.floor(f%60),p>0?`${p}:${g.toString().padStart(2,"0")}:${h.toString().padStart(2,"0")}`:`${g}:${h.toString().padStart(2,"0")}`)]}),e.isLiveStream&&(0,a.jsxs)("div",{className:"absolute left-2 top-2 rounded bg-red-600 px-2 py-1 text-xs font-bold text-white",children:[(0,a.jsx)(l.A,{className:"mb-0.5 mr-1 inline h-3 w-3"}),"AO VIVO"]})]}),(0,a.jsxs)(c.Wu,{className:"p-4",children:[m&&t&&(0,a.jsxs)(d.E,{variant:"secondary",className:"mb-2 text-xs",children:[t.name,t.year&&` ${t.year}`]}),(0,a.jsx)("h3",{className:"mb-2 line-clamp-2 font-semibold leading-tight transition-colors group-hover:text-primary",style:{textWrap:"balance"},children:e.title}),(0,a.jsx)("p",{className:"mb-3 line-clamp-2 text-sm text-muted-foreground",children:N}),(0,a.jsxs)("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(n.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:y})]}),e.viewCount&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(l.A,{className:"h-3 w-3"}),(0,a.jsxs)("span",{children:[(x=e.viewCount)>=1e6?(x/1e6).toFixed(1)+"M":x>=1e3?(x/1e3).toFixed(1)+"K":x.toString()," visualiza\xe7\xf5es"]})]})]}),e.tags&&e.tags.length>0&&(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-1",children:e.tags.slice(0,3).map(e=>(0,a.jsx)(d.E,{variant:"outline",className:"text-xs",children:e},e))}),e.chapters&&e.chapters.length>0&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-xs text-primary",children:[(0,a.jsx)(o.A,{className:"h-3 w-3"}),(0,a.jsxs)("span",{children:[e.chapters.length," cap\xedtulos"]})]})]})]})}},23754:(e,t,r)=>{"use strict";r.d(t,{VideosTabsClient:()=>c});var a=r(95155),s=r(12115),o=r(1977),i=r(98096),l=r(47687),n=r(60529),d=r(61878);function c({initialVideos:e,collections:t}
1){let[r,u]=(0,s.useState)(null),[m,f]=(0,s.useState)(""),[x,p]=(0,s.useState)("uncategorized"),[g]=(0,s.useState)(()=>Date.now()),h=e.filter(e=>!e.collectionIds||0===e.collectionIds.length||e.destaqueAte&&new Date(e.destaqueAte).getTime()>g),b=t=>e.filter(e=>e.collectionIds?.includes(t)).sort((e,t)=>void 0!==e.orderInCollection&&void 0!==t.orderInCollection?e.orderInCollection-t.orderInCollection:new Date(t.publishedAt).getTime()-new Date(e.publishedAt).getTime()),v=e=>{if(!m)return e;let t=m.toLowerCase();return e.filter(e=>e.title.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.tags?.some(e=>e.toLowerCase().includes(t)))};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsxs)("div",{className:"relative max-w-md",children:[(0,a.jsx)(d.A,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,a.jsx)(n.p,{type:"search",placeholder:"Buscar v\xeddeos...",value:m,onChange:e=>f(e.target.value),className:"pl-10"})]})}),(0,a.jsxs)(l.Tabs,{value:x,onValueChange:p,className:"w-full",children:[(0,a.jsxs)(l.TabsList,{className:"w-full justify-start overflow-x-auto flex-wrap h-auto gap-1 bg-transparent p-0 mb-0 border-b",children:[(0,a.jsxs)(l.TabsTrigger,{value:"uncategorized",className:"relative rounded-t-lg rounded-b-none border-x border-t bg-muted/50 px-4 py-3 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary data-[state=inactive]:border-border data-[state=active]:z-10 data-[state=active]:shadow-sm transition-all",children:["Todos os V\xeddeos (",h.length,")"]}),t.sort((e,t)=>e.order-t.order).map(e=>{let t,r,s,o=b(e.id).length,i=e.backgroundColor||"#3b82f6",n=x===e.id,d=(r=parseInt((t=i.replace("#","")).substr(0,2),16),s=parseInt(t.substr(2,2),16),(299*r+587*s+114*parseInt(t.substr(4,2),16))/1e3<128)?"#ffffff":"#000000",c=i+"4D";return(0,a.jsxs)(l.TabsTrigger,{value:e.id,className:"relative rounded-t-lg rounded-b-none border-x border-t px-4 py-3 data-[state=active]:z-10 data-[state=active]:shadow-sm transition-all",style:{backgroundColor:n?i:c,color:n?d:void 0,borderColor:i},children:[e.name," (",o,")"]},e.id)})]}),(0,a.jsx)(l.TabsContent,{value:"uncategorized",className:"mt-0 border rounded-b-lg rounded-tr-lg p-6 bg-card",children:v(h).length>0?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:v(h).map(e=>(0,a.jsx)(o.O,{video:e,onClick:()=>{u(e),p("uncategorized")}},e.id))}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border-2 border-dashed py-16 text-center",children:[(0,a.jsx)(d.A,{className:"mb-4 h-12 w-12 text-muted-foreground"}),(0,a.jsx)("h3",{className:"mb-2 text-lg font-semibold",children:"Nenhum v\xeddeo encontrado"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:m?"Tente ajustar sua busca":"N\xe3o h\xe1 v\xeddeos sem cole\xe7\xe3o"})]})}),t.map(e=>{let t=v(b(e.id)),r=e.backgroundColor||"#f3f4f6";return(0,a.jsxs)(l.TabsContent,{value:e.id,className:"mt-0 border rounded-b-lg rounded-tr-lg p-6",style:{backgroundColor:r+"10",borderColor:r,borderTopColor:"transparent"},children:[e.description&&(0,a.jsx)("div",{className:"mb-6 rounded-lg bg-card/80 backdrop-blur-sm p-4 border",children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description})}),t.length>0?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:t.map(t=>(0,a.jsx)(o.O,{video:t,onClick:()=>{u(t),p(e.id)},showCollection:!1},t.id))}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-lg border-2 border-dashed py-16 text-center",children:[(0,a.jsx)(d.A,{className:"mb-4 h-12 w-12 text-muted-foreground"}),(0,a.jsx)("h3",{className:"mb-2 text-lg font-semibold",children:"Nenhum v\xeddeo encontrado"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:m?"Tente ajustar sua busca":"Esta cole\xe7\xe3o ainda n\xe3o tem v\xeddeos"})]})]},e.id)})]}),r&&(0,a.jsx)(i.VideoPlayerWithNavigation,{video:r,allVideos:"uncategorized"===x?v(h):v(b(x)),onClose:()=>u(null),onVideoChange:e=>{u(e)}})]})}},35942:(e,t,r)=>{"use strict";r.d(t,{F:()=>l});var a=r(95155),s=r(12115),o=r(89349),i=r(40980);let l=s.forwardRef(({className:e,children:t,...r},s)=>(0,a.jsxs)(o.bL,{ref:s,className:(0,i.cn)("relative overflow-hidden",e),...r,children:[(0,a.jsx)(o.LM,{className:"h-full w-full rounded-[inherit]",children:t}),(0,a.jsx)(n,{}),(0,a.jsx)(o.OK,{})]}));l.displayName=o.bL.displayName;let n=s.forwardRef(({className:e,orientation:t="vertical",...r},s)=>(0,a.jsx)(o.VM,{ref:s,orientation:t,className:(0,i.cn)("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,a.jsx)(o.lr,{className:"relative flex-1 rounded-full bg-border"})}));n.displayName=o.VM.displayName},40980:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i,cn:()=>o,o:()=>l});var a=r(29722),s=r(622);function o(...e){return(0,s.QP)((0,a.$)(e))}function i(e){return e?e.toString().toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[\s_]+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""):`artigo-sem-titulo-${Date.now()}`}function l(e){return e&&"string"==typeof e?e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]/g,""):""}},42763:(e,t,r)=>{"use strict";r.d(t,{Cf:()=>f,Es:()=>p,HM:()=>u,L3:()=>g,c7:()=>x,lG:()=>n,rr:()=>h,zM:()=>d});var a=r(95155),s=r(12115),o=r(43146),i=r(33210),l=r(40980);let n=o.bL,d=o.l9,c=o.ZL,u=o.bm,m=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.hJ,{ref:r,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));m.displayName=o.hJ.displayName;let f=s.forwardRef(({className:e,children:t,hideCloseButton:r,...s},n)=>(0,a.jsxs)(c,{children:[(0,a.jsx)(m,{}),(0,a.jsxs)(o.UC,{ref:n,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
1nded-lg",e),...s,children:[t,!r&&(0,a.jsxs)(o.bm,{className:"absolute right-4 top-4 z-10 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(i.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Fechar"})]})]})]}));f.displayName=o.UC.displayName;let x=({className:e,...t})=>(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});x.displayName="DialogHeader";let p=({className:e,...t})=>(0,a.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});p.displayName="DialogFooter";let g=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.hE,{ref:r,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",e),...t}));g.displayName=o.hE.displayName;let h=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.VY,{ref:r,className:(0,l.cn)("text-sm text-muted-foreground",e),...t}));h.displayName=o.VY.displayName},45160:(e,t,r)=>{"use strict";r.d(t,{E:()=>l});var a=r(95155);r(12115);var s=r(18460),o=r(40980);let i=(0,s.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l({className:e,variant:t,...r}){return(0,a.jsx)("span",{className:(0,o.cn)(i({variant:t}),e),...r})}},47687:(e,t,r)=>{"use strict";r.d(t,{Tabs:()=>l,TabsContent:()=>c,TabsList:()=>n,TabsTrigger:()=>d});var a=r(95155),s=r(12115),o=r(57518),i=r(40980);let l=o.bL,n=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.B8,{ref:r,className:(0,i.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));n.displayName=o.B8.displayName;let d=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.l9,{ref:r,className:(0,i.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));d.displayName=o.l9.displayName;let c=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)(o.UC,{ref:r,className:(0,i.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));c.displayName=o.UC.displayName},58253:(e,t,r)=>{Promise.resolve().then(r.bind(r,23754))},60529:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var a=r(95155),s=r(12115),o=r(40980);let i=s.forwardRef(({className:e,type:t,...r},s)=>(0,a.jsx)("input",{type:t,className:(0,o.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...r}));i.displayName="Input"},81477:(e,t,r)=>{"use strict";r.d(t,{BT:()=>d,Wu:()=>c,ZB:()=>n,Zp:()=>i,aR:()=>l});var a=r(95155),s=r(12115),o=r(40980);let i=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));i.displayName="Card";let l=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",e),...t}));
1l.displayName="CardHeader";let n=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("text-2xl font-semibold leading-none tracking-tight",e),...t}));n.displayName="CardTitle";let d=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("text-sm text-muted-foreground",e),...t}));d.displayName="CardDescription";let c=s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("p-6 pt-0",e),...t}));c.displayName="CardContent",s.forwardRef(({className:e,...t},r)=>(0,a.jsx)("div",{ref:r,className:(0,o.cn)("flex items-center p-6 pt-0",e),...t})).displayName="CardFooter"},89239:(e,t,r)=>{"use strict";r.d(t,{$:()=>d,r:()=>n});var a=r(95155),s=r(12115),o=r(42442),i=r(18460),l=r(40980);let n=(0,i.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=s.forwardRef(({className:e,variant:t,size:r,asChild:s=!1,...i},d)=>{let c=s?o.DX:"button";return(0,a.jsx)(c,{className:(0,l.cn)(n({variant:t,size:r,className:e})),ref:d,...i})});d.displayName="Button"},98096:(e,t,r)=>{"use strict";r.d(t,{VideoPlayerWithNavigation:()=>y});var a=r(95155),s=r(12115),o=r(42763),i=r(89239),l=r(35942),n=r(45160),d=r(927),c=r(41641),u=r(21362),m=r(57420),f=r(7915),x=r(84980),p=r(20232),g=r(33210),h=r(35871),b=r(47296),v=r(88428);function y({video:e,allVideos:t=[],onClose:r,onVideoChange:N,startSeconds:j}){let w=(0,s.useRef)(null),C=(0,s.useRef)(null),[k,A]=(0,s.useState)(!1),[T,V]=(0,s.useState)(0),P=(0,s.useRef)(!1),I=(0,s.useRef)(!0),R=t.findIndex(t=>t.id===e.id),z=R>0,S=R<t.length-1;(0,s.useEffect)(()=>{console.log("[VideoPlayer] Component mounted, video:",e.youtubeVideoId);let t=setTimeout(()=>{if(window.YT&&window.YT.Player){console.log("[VideoPlayer] YT API already loaded"),L();return}if(document.querySelector('script[src="https://www.youtube.com/iframe_api"]')){console.log("[VideoPlayer] YT API script already in DOM, waiting for load..."),window.onYouTubeIframeAPIReady=()=>{console.log("[VideoPlayer] YT API ready callback"),setTimeout(()=>L(),100)};return}console.log("[VideoPlayer] Loading YT API script");let e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";let t=document.getElementsByTagName("script")[0];t.parentNode?.insertBefore(e,t),window.onYouTubeIframeAPIReady=()=>{console.log("[VideoPlayer] YT API ready callback"),setTimeout(()=>L(),100)}},100);return()=>{if(clearTimeout(t),console.log("[VideoPlayer] Component unmounting, destroying player"),w.current){try{w.current.destroy()}catch(e){console.error("[VideoPlayer] Error destroying player:",e)}w.current=null}A(!1),P.current=!1}},[]),(0,s.useEffect)(()=>{if(w.current&&k){if(I.current){I.current=!1;return}console.log("[VideoPlayer] Video changed:",e.youtubeVideoId,"startSeconds:",j),w.current.loadVideoById({videoId:e.youtubeVideoId,startSeconds:j||0}),j&&j>0&&setTimeout(()=>{w.current&&w.current.seekTo(j,!0)},500),V(0)}},[e.youtubeVideoId,j,k]);let L=()=>{if(P.current)return void console.log("[VideoPlayer] Already initializing, skipping");if(!C.current)return void console.log("[VideoPlayer] No container ref, skipping");if(w.current)return void console.log("[VideoPlayer] Player already exists, skipping");console.log("[VideoPlayer] Creating new YT.Player for video:",e.youtubeVideoId,"with startSeconds:",j),P.current=!0;
1try{w.current=new window.YT.Player(C.current,{height:"100%",width:"100%",videoId:e.youtubeVideoId,playerVars:{autoplay:1,modestbranding:1,rel:0,start:j||0,origin:window.location.origin},events:{onReady:e=>{console.log("[VideoPlayer] Player ready, starting playback at startSeconds:",j),P.current=!1,A(!0),j&&j>0?setTimeout(()=>{e.target.seekTo(j,!0),e.target.playVideo()},500):e.target.playVideo()},onError:e=>{console.error("[VideoPlayer] Player error:",e.data),P.current=!1}}})}catch(e){console.error("[VideoPlayer] Error creating player:",e),P.current=!1}},E=e.chapters&&e.chapters.length>0?"chapters":"description";return(0,a.jsx)(o.lG,{open:!0,onOpenChange:r,children:(0,a.jsxs)(o.Cf,{hideCloseButton:!0,className:"max-w-7xl h-[95vh] md:h-[90vh] p-0 gap-0 overflow-hidden",children:[(0,a.jsxs)(v.s6,{children:[(0,a.jsx)(o.L3,{children:e.title}),(0,a.jsx)(o.rr,{children:"Player de v\xeddeo com navega\xe7\xe3o entre v\xeddeos relacionados"})]}),(0,a.jsxs)("div",{className:"flex h-full min-h-0 flex-col md:flex-row",children:[(0,a.jsxs)("div",{className:"relative w-full aspect-video md:aspect-auto md:w-[70%] bg-black md:min-h-0 flex-shrink-0",children:[(0,a.jsx)("div",{ref:C,className:"absolute inset-0 [&_iframe]:!absolute [&_iframe]:!inset-0 [&_iframe]:!w-full [&_iframe]:!h-full"}),(0,a.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 z-10",children:[(0,a.jsxs)(i.$,{variant:"secondary",size:"sm",onClick:()=>{z&&N(t[R-1])},disabled:!z,className:"bg-black/70 hover:bg-black/90 text-white",children:[(0,a.jsx)(c.A,{className:"h-4 w-4 mr-1"}),"Anterior"]}),(0,a.jsxs)(i.$,{variant:"secondary",size:"sm",onClick:()=>{S&&N(t[R+1])},disabled:!S,className:"bg-black/70 hover:bg-black/90 text-white",children:["Pr\xf3ximo",(0,a.jsx)(u.A,{className:"h-4 w-4 ml-1"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 min-h-0 flex-col overflow-hidden md:flex-none md:w-[30%] md:border-l",children:[(0,a.jsxs)("div",{className:"border-b p-4 space-y-3 flex-shrink-0",children:[(0,a.jsx)("h2",{className:"text-base font-semibold leading-tight pr-6",children:e.title}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[e.publishedAt&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(m.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:(e=>{try{let t=new Date(e);return(0,h.GP)(t,"dd 'de' MMMM 'de' yyyy",{locale:b.F})}catch{return e}})(e.publishedAt)})]}),void 0!==e.viewCount&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(f.A,{className:"h-3 w-3"}),(0,a.jsxs)("span",{children:[e.viewCount.toLocaleString("pt-BR")," visualiza\xe7\xf5es"]})]}),e.durationFormatted&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(x.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:e.durationFormatted})]})]}),e.tags&&e.tags.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.tags.slice(0,5).map((e,t)=>(0,a.jsx)(n.E,{variant:"secondary",className:"text-xs",children:e},t))})]}),(0,a.jsx)(l.F,{className:"flex-1 min-h-0",children:(0,a.jsxs)(d.Accordion,{type:"single",collapsible:!0,defaultValue:E,className:"px-4",children:[(0,a.jsxs)(d.AccordionItem,{value:"description",children:[(0,a.jsx)(d.AccordionTrigger,{className:"text-sm font-medium",children:"Descri\xe7\xe3o"}),(0,a.jsx)(d.AccordionContent,{children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:e.description||"Sem descri\xe7\xe3o dispon\xedvel."})})]}),e.chapters&&e.chapters.length>0&&(0,a.jsxs)(d.AccordionItem,{value:"chapters",children:[(0,a.jsxs)(d.AccordionTrigger,{className:"text-sm font-medium",children:["Cap\xedtulos (",e.chapters.length,")"]}),(0,a.jsx)(d.AccordionContent,{children:(0,a.jsx)("div",{className:"space-y-1",children:e.chapters.map((e,t)=>(0,a.jsx)("button",{onClick:()=>{var t;return t=e.timestamp,void(w.current&&k&&(w.current.seekTo(t,!0),w.current.playVideo()))},className:"w-full text-left p-2 rounded hover:bg-accent transition-colors group",children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(p.A,{className:"h-3 w-3 mt-0.5 flex-shrink-0 text-muted-foreground group-hover:text-primary"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-xs font-medium group-hover:text-primary",children:e.timeFormatted}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground line-clamp-2",children:e.title})]})]})},t))})})]})]})})]})]}),(0,a.jsx)(i.$,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 z-50 bg-black/50 hover:bg-black/70 text-white",onClick:r,children:(0,a.jsx)(g.A,{className:"h-4 w-4"})})]})})}}},e=>{e.O(0,[18409,91798,99854,58495,53626,35871,89349,51509,10832,28441,93794,77358],()=>e(e.s=58253)),_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.