1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{644:()=>{},967:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(75891),n=s(12115);s(644);var o=s(6655),i=s(14440);function l(){let{isLoading:e}=(0,a.M)(),[t,s]=(0,n.useState)(!0),[l,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),[h,m]=(0,n.useState)(!1),[x,p]=(0,n.useState)(0),f=(0,n.useRef)(null),g=(0,n.useRef)(null),v=(0,n.useCallback)(()=>{if(!f.current||!g.current)return;let e=f.current.offsetWidth||f.current.getBoundingClientRect().width,t=g.current.scrollWidth||g.current.offsetWidth||g.current.getBoundingClientRect().width;t>0&&e>0&&p(Math.round(Math.max(0,(t-e)/2)+8))},[]);return((0,n.useEffect)(()=>{let e=(0,o.AO)(),t="halloween"===e;m(t),"winter"===e&&i.R.playWinterChimes(.3);let s=setTimeout(()=>{u(!0)},t?3500:2700);return()=>{clearTimeout(s)}},[]),(0,n.useEffect)(()=>{if(!h)return;v(),"u">typeof document&&document.fonts&&document.fonts.ready.then(v).catch(()=>{});let e=null;return"u">typeof ResizeObserver&&(e=new ResizeObserver(v),f.current&&e.observe(f.current),g.current&&e.observe(g.current)),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v),e&&e.disconnect()}},[h,v]),(0,n.useEffect)(()=>{if(!e&&c&&!l){d(!0);let e=setTimeout(()=>{s(!1)},700);return()=>clearTimeout(e)}},[e,c,l]),t)?(0,r.jsxs)("div",{className:`fixed inset-0 z-[9999] flex select-none flex-col items-center justify-center overflow-hidden bg-[#020202] ${l?"hx-exit pointer-events-none":""}`,children:[(0,r.jsx)("div",{className:"hx-grid pointer-events-none absolute inset-0"}),(0,r.jsx)("div",{className:"hx-ambient pointer-events-none absolute left-1/2 top-1/2 h-[60vw] w-[60vw] -translate-x-1/2 -translate-y-1/2 rounded-full"}),(0,r.jsxs)("div",{className:"relative z-10 flex origin-center scale-[0.60] flex-col items-center transition-transform sm:scale-[0.75] md:scale-[0.90]",children:[(0,r.jsxs)("div",{className:"hx-cluster relative h-[220px] w-[220px]",children:[(0,r.jsx)("svg",{className:"hx-ring absolute -inset-[58px] overflow-visible",viewBox:"0 0 336 336",children:(0,r.jsx)("polygon",{className:"hx-ring-shape",points:"168,30 288,99 288,237 168,306 48,237 48,99"})}),(0,r.jsx)("div",{className:"hx-hex hx-h0"}),(0,r.jsx)("div",{className:"hx-hex hx-h1"}),(0,r.jsx)("div",{className:"hx-hex hx-h2"}),(0,r.jsx)("div",{className:"hx-hex hx-h3"}),(0,r.jsx)("div",{className:"hx-hex hx-h4"}),(0,r.jsx)("div",{className:"hx-hex hx-h5"}),(0,r.jsx)("div",{className:"hx-hex hx-h6"})]}),(0,r.jsxs)("div",{className:"hx-text mt-14 flex items-center justify-center gap-2",children:[(0,r.jsxs)("div",{className:"relative inline-flex items-center justify-center",children:[(0,r.jsx)("span",{ref:f,className:`whitespace-nowrap text-5xl font-semibold leading-none tracking-[0.05em] md:text-6xl ${h?"hx-hive-struck text-white":"text-white"}`,children:"HIVE"}),h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"hx-blood-slash pointer-events-none absolute -left-3 top-1/2 h-10 w-[calc(100%+24px)] -translate-y-1/2 overflow-visible",viewBox:"0 0 160 38",fill:"none",preserveAspectRatio:"none",children:[(0,r.jsx)("path",{d:"M 5,6 C 40,14 78,20 115,28 C 132,31 145,33 155,34",className:"hx-blood-path hx-blood-slash-1",stroke:"#dc2626",strokeWidth:"5",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M 12,8 C 45,15 80,21 115,28 C 132,31 145,33 150,33",className:"hx-blood-core hx-blood-slash-1",stroke:"#7f1d1d",strokeWidth:"2.5",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M 5,32 C 40,24 78,18 115,10 C 132,7 145,5 155,4",className:"hx-blood-path hx-blood-slash-2",stroke:"#dc2626",strokeWidth:"5",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M 12,30 C 45,23 80,17 115,10 C 132,7 145,5 150,5",className:"hx-blood-core hx-blood-slash-2",stroke:"#7f1d1d",strokeWidth:"2.5",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M 80,19 Q 82,29 80,31",className:"hx-blood-drip",stroke:"#b91c1c",strokeWidth:"3",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M 125,27 Q 127,35 125,37",className:"hx-blood-drip",stroke:"#991b1b",strokeWidth:"2.5",strokeLinecap:"round"})]}),(0,r.jsx)("span",{ref:g,className:"hx-halloween-text pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap text-4xl font-bold tracking-[0.03em] sm:text-5xl md:text-[52px]",children:"Halloween"})]})]}),(0,r.jsx)("span",{style:h&&x>0?{"--x-shift":`${x}px`}:void 0,className:`whitespace-nowrap text-5xl font-semibold leading-none tracking-[0.05em] text-primary md:text-6xl ${h&&x>0?"hx-x-halloween":""}`,children:"X"})]}),(0,r.jsx)("div",{className:"hx-loader-track absolute top-full mt-7 h-[2px] w-28 overflow-hidden rounded-full bg-white/10",children:(0,r.jsx)("div",{className:"hx-loader-fill h-full rounded-full"})})]})]}):null}},6482:(e,t,s)=>{"use strict";s.d(t,{e:()=>a});var r=s(95522);let a=({query:e})=>{let t=async e=>{let t=await fetch(e);if(!t.ok)throw Error("An error occurred while fetching the data");return t.json()},{data:s,error:a,isLoading:n,size:o,setSize:i}=(0,r.Ay)((t,s)=>0===e.length||s&&!s.hasNextPage?null:`/api/movies/search?query=${e}&page=${t+1}`,t),l=!s&&!a||o>0&&s&&void 0===s[o-1],d=s?.[0]?.results.length===0||s&&!s[s.length-1]?.hasNextPage;return{data:s?s.flatMap(e=>e.results):[],error:a,isLoading:n,isLoadingMore:l,isReachingEnd:d,loadM
1ore:()=>i(o+1)}}},7745:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>eg});var r=s(95155),a=s(29722),n=s(98500),o=s.n(n),i=s(73321),l=s(12115),d=s(38042),c=s(5772),u=s(84269),h=s(66614),m=s(34530),x=s(33591),p=s(86901),f=s(95057),g=s(61878),v=s(89363),b=s(31069),w=s(4474),y=s(17243);let j=()=>(0,r.jsx)(o(),{href:"/customize",passHref:!0,children:(0,r.jsx)(w.$,{variant:"ghost",size:"icon",className:"relative",title:"Customize background",children:(0,r.jsx)(y.A,{className:"h-5 w-5"})})});var N=s(27452),k=s(33210),E=s(22812),S=s(6296),C=s(9921),A=s(66088),P=s(20232),L=s(68822),F=s(6482),$=s(2574),z=s(60927),I=s(83279),M=s(26518);function _({open:e,onOpenChange:t}){let[s,a]=l.useState(""),[n,i]=l.useState("all"),[d,u]=l.useState([]),[h,m]=l.useState(null),[x,p]=l.useState(e),[f,v]=l.useState(e),[b]=(0,N.d7)(s,450),y=s.trim(),j=b.trim(),O=y.length>0,R=y.length>0&&y!==j,{data:D,isLoading:W,error:T}=(0,F.e)({query:b}),H=l.useRef(null),B=l.useRef(null),V=l.useCallback(()=>{t(!1)},[t]),X=l.useCallback(e=>{m(t=>t===e?null:e)},[]),G=l.useMemo(()=>"all"===n?D:D.filter(e=>{let t=e.type===z.f.TV||e.id.startsWith("tv/");return"tv"===n?t:!t}),[D,n]);return(l.useEffect(()=>(u((0,I.oj)()),(0,I.kL)(u)),[]),l.useEffect(()=>{e&&u((0,I.oj)())},[e]),l.useEffect(()=>{let t=null;return e?(p(!0),t=window.setTimeout(()=>{v(!0)},10)):(v(!1),t=window.setTimeout(()=>{p(!1)},220)),()=>{null!==t&&window.clearTimeout(t)}},[e]),l.useEffect(()=>{if(!x)return;let e=document.body,t=e.style.position,s=e.style.top,r=e.style.width,a=e.style.left,n=e.style.right,o=e.style.overflow,i=e.style.overflowY,l=e.style.overflowX,d=window.scrollY;e.style.position="fixed",e.style.top=`-${d}px`,e.style.left="0",e.style.right="0",e.style.width="100%",e.style.overflowY="scroll",e.style.overflowX="hidden";let c=window.setTimeout(()=>{H.current?.focus()},20);return()=>{e.style.position=t,e.style.top=s,e.style.width=r,e.style.left=a,e.style.right=n,e.style.overflow=o,e.style.overflowY=i,e.style.overflowX=l,window.scrollTo({top:d,behavior:"auto"}),window.clearTimeout(c)}},[x]),l.useEffect(()=>{if(!x)return;let e=e=>{"Escape"===e.key&&V()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[V,x]),l.useEffect(()=>{m(null)},[b]),l.useEffect(()=>{0===j.length||W||R||T||B.current!==j&&((0,I.nG)(j),B.current=j)},[T,W,R,j]),x)?(0,r.jsx)("div",{className:`fixed inset-0 z-[120] flex items-center justify-center p-4 transition-all duration-300 sm:p-6 ${f?"bg-black/60 opacity-100 backdrop-blur-sm":"pointer-events-none bg-black/0 opacity-0"}`,onClick:V,role:"presentation",children:(0,r.jsxs)($.P.div,{layout:!0,transition:{layout:{type:"spring",stiffness:350,damping:30,mass:.8},opacity:{duration:.2},scale:{duration:.2}},initial:{scale:.95,opacity:0},animate:{scale:f?1:.95,opacity:+!!f},className:"relative flex max-h-[85vh] w-full max-w-2xl flex-col overflow-hidden rounded-2xl border border-foreground
1/10 bg-background/20 p-3.5 shadow-2xl backdrop-blur-md sm:p-6",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 sm:gap-3",children:[(0,r.jsx)("h2",{className:"text-lg font-bold tracking-tight text-foreground sm:text-xl",children:"Search"}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[(0,r.jsxs)(M.l6,{value:n,onValueChange:e=>i(e),children:[(0,r.jsx)(M.bq,{className:"h-9 w-[130px] border-foreground/15 bg-foreground/5 text-xs text-foreground backdrop-blur-md hover:bg-foreground/10 sm:w-[190px] sm:text-sm",children:(0,r.jsx)(M.yv,{placeholder:"Movies & TV Shows"})}),(0,r.jsxs)(M.gC,{className:"border-foreground/15 bg-background/95 backdrop-blur-xl",children:[(0,r.jsx)(M.eb,{value:"all",children:"Movies & TV Shows"}),(0,r.jsx)(M.eb,{value:"movie",children:"Movies"}),(0,r.jsx)(M.eb,{value:"tv",children:"TV Shows"})]})]}),(0,r.jsx)(w.$,{type:"button",size:"icon",variant:"outline",onClick:V,className:"h-9 w-9 shrink-0 rounded-lg border-foreground
1/15 bg-foreground/5 text-foreground/70 hover:bg-foreground/15 hover:text-foreground","aria-label":"Close search",children:(0,r.jsx)(k.A,{className:"h-4 w-4"})})]})]}),(0,r.jsxs)("div",{className:"relative mt-3.5 flex shrink-0 items-center sm:mt-4",children:[(0,r.jsx)(g.A,{className:"pointer-events-none absolute left-3.5 z-10 h-5 w-5 text-foreground/70 sm:left-4"}),(0,r.jsx)("input",{ref:H,type:"text",value:s,onChange:e=>a(e.target.value),onKeyDown:e=>{"Enter"===e.key&&y&&(0,I.nG)(y)},placeholder:"Type here to search...",className:"flex h-11 w-full rounded-md border border-foreground/15 bg-foreground/5 pl-11 pr-10 text-base text-foreground outline-none backdrop-blur-md placeholder:text-foreground/40 focus:border-foreground/30 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 sm:h-12 sm:pl-12 sm:text-base"}),s.length>0&&(0,r.jsx)("button",{type:"button",onClick:()=>a(""),className:"absolute right-3 z-10 p-1 text-foreground/50 hover:text-foreground","aria-label":"Clear search",children:(0,r.jsx)(k.A,{className:"h-4 w-4"})})]}),!O&&d.length>0&&(0,r.jsxs)($.P.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15}
1,className:"mt-3.5 shrink-0 rounded-xl border border-foreground/10 bg-foreground/5 p-3.5 backdrop-blur-md sm:mt-4 sm:p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between pb-2.5 sm:pb-3",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"RECENT"}),(0,r.jsx)("button",{type:"button",onClick:()=>{(0,I.V6)()},className:"text-xs text-muted-foreground transition-colors hover:text-foreground",children:"Clear"})]}),(0,r.jsx)("div",{className:"space-y-1",children:d.slice(0,5).map(e=>(0,r.jsxs)("div",{onClick:()=>{a(e),(0,I.nG)(e)},className:"group flex cursor-pointer items-center justify-between rounded-lg px-2.5 py-2 text-sm text-foreground/90 transition-colors hover:bg-foreground/10 hover:text-foreground",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(E.A,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,r.jsx)("span",{className:"truncate font-medium",children:e})]}),(0,r.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),(0,I.uL)(e)},className:"p-1 text-muted-foreground opacity-0 transition-all group-hover:opacity-100 hover:text-destructive","aria-label":`Remove ${e}`,children:(0,r.jsx)(k.A,{className:"h-3.5 w-3.5"})})]},e))})]}),O&&(0,r.jsx)($.P.div,{layout:!0,initial:{opacity:0}
1,animate:{opacity:1},transition:{duration:.2},className:"mt-3.5 min-h-0 flex-1 overflow-hidden sm:mt-4",children:(0,r.jsx)("div",{className:"scrollbar-hide h-[48vh] max-h-[500px] w-full overflow-y-auto sm:h-[55vh]",children:(0,r.jsx)("div",{className:"space-y-2 py-1 pr-1 sm:space-y-2.5",children:W||R?(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2.5 py-16 text-muted-foreground",children:[(0,r.jsx)(S.A,{className:"h-5 w-5 animate-spin text-primary"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:"Searching..."})]}):T?(0,r.jsx)("div",{className:"py-12 text-center text-sm font-medium text-destructive",children:"Failed to load search results."}):0===G.length?(0,r.jsxs)("div",{className:"py-16 text-center text-sm text-muted-foreground",children:["No results found for â",j,"â"]}):G.map(e=>{let s=h===e.id,a=e.type===z.f.TV||e.id.startsWith("tv/"),n=e.release_date?e.release_date.slice(0,4):"",i=e.rating,d=[a?"TV Show":"Movie",n,i?`â
${"number"==typeof i?i.toFixed(1):i}`:""].filter(Boolean);return(0,r.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>X(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),X(e.id))},className:`group w-full cursor-pointer rounded-xl border p-2.5 backdrop-blur-md transition-all duration-200 sm:p-3 ${s?"border-foreground
1/25 bg-foreground/10":"border-foreground/10 bg-foreground/5 hover:border-foreground/20 hover:bg-foreground/10"}`,children:[(0,r.jsxs)("div",{className:"flex w-full items-center gap-3",children:[(0,r.jsx)("div",{className:"h-15 relative w-11 shrink-0 overflow-hidden rounded-md bg-black/40 shadow sm:h-16 sm:w-12",children:(0,r.jsx)(c.default,{src:e.image,alt:e.title,width:80,height:110,className:"h-full w-full object-cover",onError:e=>e.target.src="/assets/hivex-logo.png"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5 sm:space-y-1",children:[(0,r.jsx)("p",{className:"truncate text-sm font-semibold text-foreground transition-colors group-hover:text-primary sm:text-base",children:e.title}),(0,r.jsx)("p",{className:"truncate text-xs text-muted-foreground sm:text-sm",children:d.map((e,t)=>(0,r.jsxs)(l.Fragment,{children:[t>0&&(0,r.jsx)("span",{className:"mx-1 opacity-40 sm:mx-1.5",children:"|"}),(0,r.jsx)("span",{className:e.startsWith("â
")?"font-medium text-amber-400":"",children:e})]},t))})]}),(0,r.jsx)("span",{className:"grid h-7 w-7 shrink-0 place-content-center text-muted-foreground transition-colors group-hover:text-foreground","aria-hidden":"true",children:s?(0,r.jsx)(C.A,{className:"h-4 w-4"}):(0,r.jsx)(A.A,{className:"h-4 w-4"})})]}),(0,r.jsx)("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${s?"mt-2.5 grid-rows-[1fr] opacity-100 sm:mt-3":"mt-0 grid-rows-[0fr] opacity-0"}`,children:(0,r.jsx)("div",{className:"min-h-0 overflow-hidden",children:(0,r.jsxs)("div",{className:"space-y-2.5 border-t border-foreground
1/10 pt-2.5 sm:space-y-3 sm:pt-3",children:[(0,r.jsx)("p",{className:"line-clamp-3 text-xs leading-relaxed text-foreground/80 sm:text-sm",children:e.description||"No description available."}),(0,r.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,r.jsx)(w.$,{asChild:!0,size:"sm",className:"h-8 rounded-lg bg-primary px-3 text-xs font-semibold text-primary-foreground hover:bg-primary/90 sm:px-4",children:(0,r.jsxs)(o(),{href:e.id.startsWith("movie/")||e.id.startsWith("tv/")?`/watch/${e.id}`:e.type===z.f.Movie?`/watch/movie/${e.id}`:`/watch/tv/${e.id}`,prefetch:!1,onClick:e=>{e.stopPropagation(),t(!1)},children:[(0,r.jsx)(P.A,{className:"mr-1.5 h-3.5 w-3.5 fill-current"}),"Play"]})}),(0,r.jsx)(w.$,{asChild:!0,size:"sm",variant:"outline",className:"h-8 rounded-lg border-foreground/20 bg-foreground/5 px-2.5 text-xs text-foreground hover:bg-foreground/15 sm:px-3",children:(0,r.jsxs)(o(),{href:e.id.startsWith("movie/")||e.id.startsWith("tv/")?`/details/${e.id}`:e.type===z.f.Movie?`/details/movie/${e.id}`:`/details/tv/${e.id}`,prefetch:!1,onClick:e=>{e.stopPropagation(),t(!1)},children:[(0,r.jsx)(L.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Details"]})})]})]})})})]},e.id)})})})})]})}):null}var O=s(32986),R=s(92048),D=s(47906),W=s(39449),T=s(87389);let H=[{url:"/",title:"Home",icon:h.A},{url:"/discover",title:"Discover",icon:m.A},{url:"/collection",title:"Library",icon:T.A},{url:"/settings",title:"Settings",icon:v.A}];function B(){let e=(0,i.usePathname)(),[t,s]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let t=H.findIndex(t=>"/"===t.url?"/"===e:e?.startsWith(t.url));s(-1!==t?t:0)},[e]),(0,r.jsx)(D.o,{id:"mobile-nav-dynamic-island",children:(0,r.jsx)("nav",{"aria-label":"Mobile Navigation",className:"pointer-events-none fixed inset-x-0 z-50 flex items-center justify-center px-4",style:{bottom:"max(12px, env(safe-area-inset-bottom, 12px))"},children:(0,r.jsx)("div",{className:"pointer-events-auto relative flex w-full max-w-[380px] select-none items-center justify-between rounded-full p-1.5 backdrop-blur-2xl transition-all duration-300",style:{background:"linear-gradient(180deg, rgba(20, 20, 24, 0.88) 0%, rgba(10, 10, 12, 0.96) 100%)",boxShadow:"0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15)"},children:H.map((e,s)=>{let a=s===t,n=e.icon;return(0,r.jsx)(o(),{href:e.url,prefetch:!1,"aria-label":e.title,className:"relative flex flex-1 items-center justify-center focus:outline-none",children:(0,r.jsxs)($.P.div,{layout:!0,whileTap:{scale:.92},transition:{type:"spring",stiffness:450,damping:32},className:`relative z-10 flex h-11 items-center justify-center rounded-full transition-colors duration-200 ${a?"px-4 text-white":"w-11 text-zinc-400 hover:text-zinc-200"}`,children:[a&&(0,r.jsx)($.P.div,{layoutId:"island-active-pill",className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(180deg, hsl(var(--primary) / 0.28) 0%, hsl(var(--primary) / 0.12) 100%)",boxShadow:"inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 14px hsl(var(--primary) / 0.3)",border:"1px solid hsl(var(--primary) / 0.4)"},transition:{type:"spring",stiffness:420,damping:32}}),(0,r.jsx)($.P.div,{layout:"position",transition:{type:"spring",stiffness:450,damping:32},className:"relative z-20 flex items-center justify-center",children:(0,r.jsx)(n,{size:19,strokeWidth:a?2.4:1.8,className:`transition-all duration-200 ${a?"text-white drop-shadow-[0_0_8px_hsl(var(--primary)/0.9)]":"text-zinc-400"}`})}),(0,r.jsx)(W.N,{mode:"popLayout",initial:!1,children:a&&(0,r.jsx)($.P.span,{initial:{opacity:0,x:-6,scale:.9},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-6,scale:.9},transition:{duration:.18,ease:[.25,1,.5,1]},className:"relative z-20 ml-2 overflow-hidden whitespace-nowrap text-xs font-semibold tracking-wide text-white",children:e.title})})]})},e.url)})})})})}var V=s(37595),X=s(50770),G=s(22368),q=s(31885),J=s(8195),U=s(997),Y=s(85753),Z=s(22164),K=s(57793),Q=s(55638),ee=s(91337);let et=K.bL,es=K.l9;K.YJ,K.ZL,K.Pb,K.z6,l.forwardRef(({className:e,inset:t,children:s,...a},n)=>(0,r.jsxs)(K.ZP,{ref:n,className:(0,ee.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...a,children:[s,(0,r.jsx)(Q.vKP,{className:"ml-auto h-4 w-4"})]})).displayName=K.ZP.displayName,l.forwardRef(({className:e,...t},s)=>(0,r.jsx)(K.G5,{ref:s,className:(0,ee.cn)("firefox-nav-fix z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=K.G5.displayName;let er=l.forwardRef(({className:e,sideOffset:t=4,...s},a)=>(0,r.jsx)(K.ZL,{children:(0,r.jsx)(K.UC,{ref:a,sideOffset:t,className:(0,ee.cn)("firefox-nav-fix z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));function ea({open:e,onOpenChange:t}){return(0,r.jsxs)(et,{open:e,onOpenChange:t,children:[(0,r.jsx)(es,{asChild:!0,children:(0,r.jsxs)("button",{type:"button","aria-label":"Extras",title:"Extras",className:(0,a.$)("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium outline-none transition-all duration-200",e?"bg-white/15 text-white":"text-white/60 hover:bg-white/10 hover:text-white/90"),children:[(0,r.jsx)(V.A,{className:"h-3.5 w-3.5"}),"Extras"]})}),(0,r.jsx)(er,{align:"end",alignOffset:-145,sideOffset:14,className:"w-[512px] border-white/15 bg-black/40 p-3 shadow-2xl backdrop-blur-2xl",children:(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{href:"/watchlist",label:"Watchlist",description:"Your saved movies and tv shows",icon:X.A,external:!1},{href:"/collection",label:"Collections",description:"Curated set of movie collections",icon:T.A,external:!1},{href:"/person",label:"People & Cast",description:"Find cast and crew members",icon:G.A,external:!1},{href:"/recommendations",label:"Recommendations",description:"Based on watch history",icon:q.A,external:!1},{href:"/ai",label:"AI Recommendations",description:"AI based content",icon:J.A,external:!1},{href:"/status",label:"Status",description:"Check server status",icon:x.A,external:!1},{href:"/changelog",label:"Changelog",description:"See what's new",icon:U.A,external:!1},{href:"/disclaimer",label:"Disclaimer",description:"Legal Disclaimer",icon:Y.A,external:!1}].map(({href:e,label:s,description:a,icon:n,external:i})=>(0,r.jsxs)(o(),{href:e,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,prefetch:!1,onClick:()=>t(!1),className:"group flex items-center gap-2.5 rounded-xl border border-white/[0.07] bg-white/[0.04] px-3 py-2.5 transition-all duration-200 hover:border-white/15 hover:bg-white/[0.08]",children:[(0,r.jsx)("div",{className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg bg-white/[0.06] transition-colors group-hover:bg-primary/20",children:(0,r.jsx)(n,{className:"h-3.5 w-3.5 text-white/60 transition-colors group-hover:text-primary"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-white/90",children:s}),(0,r.jsx)("p",{className:"text-xs text-white/40",children:a})]}),i&&(0,r.jsx)(Z.A,{className:"h-3 w-3 flex-shrink-0 text-white/30 transition-colors group-hover:text-white/60"})]},e))})})]})}er.displayName=K.UC.displayName,l.forwardRef(({className:e,inset:t,...s},a)=>(0,r.jsx)(K.q7,{ref:a,className:(0,ee.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...s})).displayName=K.q7.displayName,l.forwardRef(({className:e,children:t,checked:s,...a},n)=>(0,r.jsxs)(K.H_,{ref:n,className:(0,ee.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:s,...a,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(K.VF,{children:(0,r.jsx)(Q.Srz,{className:"h-4 w-4"})})}),t]})).displayName=K.H_.displayName,l.forwardRef(({className:e,children:t,...s},a)=>(0,r.jsxs)(K.hN,{ref:a,className:(0,ee.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...s,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(K.VF,{children:(0,r.jsx)(Q.RiX,{className:"h-4 w-4 fill-current"})})}),t]})).displayName=K.hN.displayName,l.forwardRef(({className:e,inset:t,...s},a)=>(0,r.jsx)(K.JU,{ref:a,className:(0,ee.cn)("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...s})).displayName=K.JU.displayName,l.forwardRef(({className:e,...t},s)=>(0,r.jsx)(K.wv,{ref:s,className:(0,ee.cn)("-mx-1 my-1 h-px bg-muted",e),...t})).displayName=K.wv.displayName;var en=s(29857),eo=s(93219),ei=s(7810),el=s(49619),ed=s(37618),ec=s(38923);function eu(){let[e,t]=(0,l.useState)(!1),s=()=>t(!1);return(0,r.jsxs)(ec.cj,{open:e,onOpenChange:t,children:[(0,r.jsx)(ec.CG,{className:"group rounded-full p-2 transition-colors hover:bg-white/10",children:(0,r.jsx)(en.A,{className:"h-5 w-5 text-white/70 transition-colors group-hover:text-white"})}),(0,r.jsxs)(ec.h,{side:"right",className:"border-l border-foreground
1/10 bg-background/95 backdrop-blur-xl",children:[(0,r.jsxs)(ec.Fm,{children:[(0,r.jsx)(ec.qp,{children:"Quick Actions"}),(0,r.jsx)(ec.Qs,{children:"Quickly access other features and settings."})]}),(0,r.jsx)("div",{className:"mt-8 space-y-2",children:[{href:"/",label:"Home",icon:h.A},{href:"/watchlist",label:"Watchlist",icon:X.A},{href:"https://vidhive.lol",label:"Embed API",icon:x.A,external:!0},{href:"/status",label:"Status",icon:eo.A},{href:"/person",label:"People",icon:ei.A},{href:"/ai",label:"AI recommendations",icon:el.A},{href:"/changelog",label:"Changelog",icon:ed.A}].map(({href:e,label:t,icon:a})=>(0,r.jsxs)(o(),{href:e,prefetch:!1,onClick:s,className:"flex items-center gap-3 rounded-lg border border-foreground/10 bg-foreground/5 px-3 py-2 transition-colors hover:border-foreground/20 hover:bg-foreground/10",children:[(0,r.jsx)(a,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"text-sm",children:t})]},e))})]})]})}var eh=s(78914);function em(e,t,s){e=(e%360+360)%360,t=Math.max(0,Math.min(100,t))/100;let r=(1-Math.abs(2*(s=Math.max(0,Math.min(100,s))/100)-1))*t,a=r*(1-Math.abs(e/60%2-1)),n=s-r/2,o=0,i=0,l=0;return 0<=e&&e<60?(o=r,i=a,l=0):60<=e&&e<120?(o=a,i=r,l=0):120<=e&&e<180?(o=0,i=r,l=a):180<=e&&e<240?(o=0,i=a,l=r):240<=e&&e<300?(o=a,i=0,l=r):300<=e&&e<360&&(o=r,i=0,l=a),o=Math.round((o+n)*255),i=Math.round((i+n)*255),l=Math.round((l+n)*255),`#${o.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}`}let ex=(0,l.memo)(({children:e,className:t="",colors:s,speed:a=1})=>{let[n,o]=(0,l.useState)(s||["#FF0080","#7928CA","#0070F3","#38bdf8"]),i=(0,l.useId)(),d=`aurora-grad-${i.replace(/:/g,"")}`;(0,l.useEffect)(()=>{if(!s){let e=()=>{let e=getComputedStyle(document.documentElement).getPropertyValue("--primary").trim();e&&o(function(e){let t,{h:s,s:r,l:a}=(t=e.match(/((?:\d*\.)?\d+)/g))&&!(t.length<3)?{h:parseFloat(t[0]),s:parseFloat(t[1]),l:parseFloat(t[2])}:{h:243.4,s:75.36,l:58.63};return[em(s,r,a),em((s+20)%360,r,Math.min(a+10,90)),em((s-20+360)%360,Math.min(r+10,
1100),a),em((s+10)%360,r,Math.max(a-15,20))]}(e))};e();let t=new MutationObserver(t=>{t.forEach(t=>{"attributes"===t.type&&"style"===t.attributeName&&e()})});return t.observe(document.documentElement,{attributes:!0}),()=>t.disconnect()}},[s]);let c={backgroundImage:`linear-gradient(135deg, ${n.join(", ")}, ${n[0]})`,animationDuration:`${10/a}s`};return(0,r.jsxs)("span",{className:`relative inline-flex items-center justify-center ${t}`,children:[(0,r.jsx)("svg",{className:"pointer-events-none absolute h-0 w-0","aria-hidden":"true",children:(0,r.jsx)("defs",{children:(0,r.jsx)("linearGradient",{id:d,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:n.map((e,t)=>(0,r.jsx)("stop",{offset:`${t/(n.length-1)*100}%`,stopColor:e},`${e}-${t}`))})})}),(0,r.jsx)("div",{className:"absolute inset-0 -z-10 transition-transform duration-300 group-hover:scale-110",children:(0,r.jsx)("div",{className:"absolute inset-0.5 animate-aurora rounded-full bg-[length:200%_auto] opacity-50 blur-[5px] transition-all duration-300 group-hover:opacity-85 group-hover:blur-[8px]",style:c})}),l.Children.map(e,e=>{if(l.isValidElement(e)){let t=e.props;return l.cloneElement(e,{style:{...t.style,stroke:`url(#${d})`},className:`${t.className||""} relative z-10`})}return e})]})});ex.displayName="Aurora";var ep=s(80162);let ef=[{label:"Home",href:"/",icon:h.A},{label:"Discover",href:"/discover",icon:m.A}];function eg(){let[e,t]=(0,l.useState)(!1),[s,n]=(0,l.useState)(!1),[h,m]=(0,l.useState)(!1),[w,y]=(0,l.useState)(!1),{user:N,loading:k}=(0,u.A)(),E=(0,d.U)((0,d.mq)("md"),{initializeWithValue:!1}),{handleClick:S}=((e=4,t=500)=>{let[s,r]=(0,l.useState)(0),a=(0,i.useRouter)();return(0,l.useEffect)(()=>{let n;return s>0&&(n=setTimeout(()=>r(0),t)),s>=e&&(a.push("/nexora"),r(0)),()=>clearTimeout(n)},[s,e,t,a]),{handleClick:()=>{r(s+1)}}})(),{view:C,toggleView:A}=(0,O.A)(),P=(0,i.usePathname)(),L=(0,i.useRouter)(),F=(0,eh.u)(e=>e.isWatchNoticeActive),$=P?.startsWith("/watch/")&&!F,z=N?.user_metadata?.vip,I=w?C:"poster";(0,l.useEffect)(()=>{y(!0)},[]),(0,l.useEffect)(()=>{let e=()=>{t(e=>{let t=window.scrollY>10;return e===t?e:t})};return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]);let M=()=>{A(),"/"!==P&&L.push("/"),"poster"===C&&window.dispatchEvent(new Event("hivex:homeHeroSearchFocus"))},D=()=>{m(!0)};return((0,l.useEffect)(()=>{m(!1),n(!1)},[P]),$)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("nav",{className:"pointer-events-none fixed inset-x-0 top-0 z-50 flex items-center justify-between px-4 py-4 md:px-6 md:py-5",style:{top:"var(--banner-height, 0px)",transition:"top 0.3s ease"},children:[(0,r.jsxs)(o(),{href:"/",prefetch:!1,className:"group pointer-events-auto flex items-center gap-2",children:[(0,r.jsx)("div",{className:"relative transition-transform duration-200 group-hover:scale-110",children:(0,r.jsx)(R.A,{size:40})}),(0,r.jsxs)("span",{className:"hidden items-center gap-1 text-base font-semibold tracking-widest opacity-80 transition-opacity duration-200 group-hover:opacity-100 sm:inline-flex",onClick:S,children:["Hive",(0,r.jsx)("span",{className:"text-base font-semibold tracking-widest text-primary opacity-80 transition-opacity duration-200 group-hover:opacity-100",children:"X"})]})]}),E?(0,r.jsxs)("div",{className:(0,a.A)("pointer-events-auto flex items-center gap-0.5 rounded-full border px-2 py-1.5 transition-all duration-300",e?"border-white/5 bg-black/25 shadow-2xl backdrop-blur-2xl":"border-white/5 bg-black/20 shadow-xl backdrop-blur-xl"),children:[ef.map(({label:e,href:t,icon:s})=>{let n="/"===t?"/"===P:P?.startsWith(t);return(0,r.jsxs)(o(),{href:t,prefetch:!1,className:(0,a.A)("flex items-center gap-1.5 rounded-full px-3 py-1.5 text-sm font-medium transition-all duration-200",n?"bg-primary/15 text-white shadow-inner":"text-white/60 hover:bg-primary/10 hover:text-white/90"),children:[(0,r.jsx)(s,{className:(0,a.A)("h-3.5 w-3.5",n?"opacity-100":"opacity-70")}),e]},t)}),(0,r.jsx)(ea,{open:s,onOpenChange:n}),(0,r.jsxs)(o(),{href:"https://vidhive.lol",target:"_blank",rel:"noopener noreferrer","aria-label":"Embed API",title:"Embed API",className:"group relative flex h-8 items-center rounded-full p-2 transition-colors duration-300 hover:bg-white/10",children:[(0,r.jsx)(ex,{className:"flex-shrink-0",children:(0,r.jsx)(x.A,{className:"h-4 w-4"})}),(0,r.jsx)("span",{className:"pl-1.5 text-xs font-semibold",children:(0,r.jsx)(ep.e,{children:"API"})})]}),(0,r.jsx)("div",{className:"mx-1.5 h-4 w-px bg-white/15"}),(0,r.jsx)("button",{type:"button",onClick:M,"aria-label":"search"===I?"Switch homepage to poster view":"Switch homepage to search view",title:"search"===I?"Switch to Poster View":"Switch to Legacy View",className:"flex items-center justify-center rounded-full p-2 text-white/60 transition-all duration-200 hover:bg-white/10 hover:text-white",children:"search"===I?(0,r.jsx)(p.A,{className:"h-4 w-4"}):(0,r.jsx)(f.A,{className:"h-4 w-4"})}),(0,r.jsx)("button",{type:"button",onClick:D,"aria-label":"Search",title:"Search",className:"flex items-center justify-center rounded-full p-2 text-white/60 transition-all duration-200 hover:bg-white/10 hover:text-white",children:(0,r.jsx)(g.A,{className:"h-4 w-4"})}),(0,r.jsx)("div",{className:(0,a.A)("[&>a>button>svg]:h-4 [&>a>button>svg]:w-4 [&>a>button]:rounded-full [&>a>button]:p-2 [&>a>button]:transition-all [&>a>button]:duration-200","/customize"===P?"[&>a>button]:bg-white/15 [&>a>button]:text-white":"[&>a>button:hover]:bg-white/10 [&>a>button:hover]:text-white [&>a>button]:text-white/60"),children:(0,r.jsx)(j,{})}),k?(0,r.jsx)("div",{className:"h-7 w-7 animate-spin rounded-full border-2 border-white/20 border-t-white/60"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{href:"/settings","aria-label":"Settings",className:(0,a.A)("flex items-center justify-center rounded-full p-2 transition-all duration-200","/settings"===P?"bg-white/15 text-white":"text-white/60 hover:bg-white/10 hover:text-white"),children:(0,r.jsx)(v.A,{className:"h-4 w-4"})}),N&&(0,r.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,r.jsx)(o(),{href:"/profile",prefetch:!1,"aria-label":"Profile",className:(0,a.A)("flex items-center justify-center rounded-full p-1 transition-all duration-200 hover:bg-white/10","/profile"===P&&"bg-white/15"),children:(0,r.jsx)(c.default,{src:N.user_metadata?.avatar_url||"/assets/user_icon.png",width:28,height:28,alt:"profile",className:"rounded-full ring-1 ring-white/20",onError:e=>{e.target.src="/assets/user_icon.png"}})}),z&&(0,r.jsx)("div",{className:"pointer-events-none absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-gradient-to-br from-amber-400 via-yellow-500 to-orange-500 shadow-lg",children:(0,r.jsx)(b.A,{size:9,className:"text-white"})})]})]})]}):(0,r.jsxs)("div",{className:"pointer-events-auto flex items-center gap-1",children:[(0,r.jsx)("div",{className:"text-white/70",children:(0,r.jsx)(j,{})}),(0,r.jsx)("button",{type:"button",onClick:M,"aria-label":"search"===I?"Switch homepage to poster view":"Switch homepage to legacy view",title:"search"===I?"Switch to Poster View":"Switch to Legacy View",className:"group rounded-full p-2 text-white/70 transition-colors hover:bg-white/10 hover:text-white",children:"search"===I?(0,r.jsx)(p.A,{className:"h-5 w-5 transition-colors"}):(0,r.jsx)(f.A,{className:"h-5 w-5 transition-colors"})}),(0,r.jsx)("button",{type:"button",onClick:D,"aria-label":"Search",title:"Search",className:"group rounded-full p-2 text-white/70 transition-colors hover:bg-white/10 hover:text-white",children:(0,r.jsx)(g.A,{className:"h-5 w-5 transition-colors"})}),(0,r.jsx)(eu,{})]})]}),!E&&(0,r.jsx)(B,{}),(0,r.jsx)(_,{open:h,onOpenChange:m})]})}},12007:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(34361);let n=({children:e})=>
1(0,r.jsx)(a.V,{height:"5px",color:"hsl(var(--primary))",options:{showSpinner:!1},shallowRouting:!0,children:e})},12140:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(23511);function n(){return(0,r.jsxs)("nav",{className:"pointer-events-none fixed inset-x-0 top-0 z-50 flex items-center justify-between px-4 py-4 md:px-6 md:py-5",children:[(0,r.jsxs)("div",{className:"pointer-events-auto flex items-center gap-2",children:[(0,r.jsx)(a.E,{className:"h-[30px] w-[30px] rounded"}),(0,r.jsx)(a.E,{className:"hidden h-4 w-16 sm:block"})]}),(0,r.jsxs)("div",{className:"pointer-events-auto hidden items-center gap-1 rounded-full border border-white/10 bg-black/50 px-2 py-1.5 backdrop-blur-xl md:flex",children:[(0,r.jsx)(a.E,{className:"h-7 w-14 rounded-full"}),(0,r.jsx)(a.E,{className:"w-18 h-7 rounded-full"}),(0,r.jsx)(a.E,{className:"w-18 h-7 rounded-full"}),(0,r.jsx)("div",{className:"mx-1.5 h-4 w-px bg-white/15"}),(0,r.jsx)(a.E,{className:"h-8 w-8 rounded-full"}),(0,r.jsx)(a.E,{className:"h-8 w-8 rounded-full"})]}),(0,r.jsxs)("div",{className:"pointer-events-auto flex items-center gap-1 md:hidden",children:[(0,r.jsx)(a.E,{className:"h-9 w-9 rounded-full"}),(0,r.jsx)(a.E,{className:"h-9 w-9 rounded-full"})]})]})}},17129:(e,t,s)=>{"use strict";s.d(t,{default:()=>f});var r=s(95155),a=s(12115),n=s(37206),o=s(73321),i=s(91337),l=s(38042),d=s(6655);let c="hivex:homeHeroView",u="hivex:posterHeroImage",h=(0,n.default)(()=>Promise.all([s.e(7131),s.e(5246)]).then(s.bind(s,15246)),{loadableGenerated:{webpack:()=>[15246]},ssr:!1}),m=(0,n.default)(()=>Promise.all([s.e(7131),s.e(3767)]).then(s.bind(s,3767)),{loadableGenerated:{webpack:()=>[3767]},ssr:!1}),x=(0,n.default)(()=>s.e(8914).then(s.bind(s,56533)),{loadableGenerated:{webpack:()=>[56533]},ssr:!1}),p=e=>{switch(e){case"halloween":return["#FF7518","#FFA500","#7B2CBF"];case"winter":return["#7ED6DF","#B8E994","#0F4C81"];case"default":default:{let e=(0,d.AO)();if("halloween"===e)return["#FF7518","#FFA500","#7B2CBF"];if("winter"===e)return["#7ED6DF","#B8E994","#0F4C81"];return["#1D7A3C","#5CD684","#0A4520"]}case"blue":return["#1B6CFC","#6FA9FF","#0D43A6"];case"green":return["#00B4D8","#90E0EF","#03045E"];case"purple":return["#8B2CFC","#C28EFF","#4C109C"];case"pink":return["#FC479C","#FF9ECB","#A6155C"];case"darkpurple":return["#5227FF","#FF9FFC","#B497CF"];case"amber":return["#D68000","#FFC163","#8F5300"];case"jade":return["#208A54","#66DCA2","#0F5331"];case"orchid":return["#A63CA3","#E08FE3","#621A60"];case"sky":return["#228BB8","#78CEE3","#0E5270"];case"cocoa":return["#523425","#8C604B","#2A150C"];case"slate":return["#4A5568","#718096","#2D3748"];case"coral":return["#FF451A","#FF937D","#B32000"];case"berry":return["#B31548","#F26D97","#6C0524"];case"mint":return["#148A60","#6BE5B8","#085237"];case"gold":return["#C69214","#FFD36B","#7D5804"]}};function f(){let e=(0,l.U)((0,l.mq)("md"),{defaultValue:!0}),t=(0,o.usePathname)(),[s,n]=(0,a.useState)("default"),[f,g]=(0,a.useState)("hexagon-hive"),[v,b]=(0,a.useState)(null),[w,y]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!0),[k,E]=(0,a.useState)("poster"),[S,C]=(0,a.useState)({bg1:{url:"",opacity:0},bg2:{url:"",opacity:0},activeLayer:2}),[A,P]=(0,a.useState)({url:"",opacity:0}),[L,F]=(0,a.useState)({url:"",opacity:0});if((0,a.useEffect)(()=>{N((0,i.hF)()),y(!0);let e=sessionStorage.getItem("hivex.home.heroView");("search"===e||"poster"===e)&&E(e),window.__HIVEX_POSTER_HERO_IMAGE__&&C({bg1:{url:window.__HIVEX_POSTER_HERO_IMAGE__,opacity:1},bg2:{url:"",opacity:0},activeLayer:1});let t=(0,d.AO)(),s=localStorage.getItem("theme-color");t&&(!s||"default"===s)?n(t):s&&n(s);let r=localStorage.getItem("theme-background-style");r&&"light-rays"!==r?g(r):(g("hexagon-hive"),localStorage.setItem("theme-background-style","hexagon-hive"));let a=localStorage.getItem("theme-background-settings");if(a)try{b(JSON.parse(a))}catch(e){console.error("Failed to parse background settings",e)}let o=e=>{let t=e.detail;("search"===t||"poster"===t)&&E(t)},l=e=>{let{imageUrl:t}=e.detail;t?C(e=>1===e.activeLayer&&e.bg1.url===t&&1===e.bg1.opacity||2===e.activeLayer&&e.bg2.url===t&&1===e.bg2.opacity?e:1===e.activeLayer?{bg1:{...e.bg1,opacity:0}
1,bg2:{url:t,opacity:1},activeLayer:2}:{bg1:{url:t,opacity:1},bg2:{...e.bg2,opacity:0},activeLayer:1}):C({bg1:{url:"",opacity:0},bg2:{url:"",opacity:0},activeLayer:2})},h=e=>{e.detail&&n(e.detail)},m=()=>{let e=localStorage.getItem("theme-background-settings");if(e)try{b(JSON.parse(e))}catch(e){b(null)}else b(null)},x=e=>{e.detail&&g(e.detail)};return window.addEventListener(c,o),window.addEventListener(u,l),window.addEventListener("theme-change",h),window.addEventListener("background-change",m),window.addEventListener("background-style-change",x),()=>{window.removeEventListener(c,o),window.removeEventListener(u,l),window.removeEventListener("theme-change",h),window.removeEventListener("background-change",m),window.removeEventListener("background-style-change",x)}},[]),(0,a.useEffect)(()=>{if(w)if(v){document.documentElement.style.setProperty("--bg-blur",`${v.blur}px`),document.documentElement.style.setProperty("--bg-darkness",`${v.darkness}`),document.documentElement.style.setProperty("--bg-saturation",`${v.saturation??1}`),document.documentElement.style.setProperty("--bg-contrast",`${v.contrast??1}`),document.documentElement.style.setProperty("--bg-hue-rotate",`${v.hueRotate??0}deg`),document.documentElement.style.setProperty("--bg-position",v.position??"center"),document.documentElement.style.setProperty("--bg-scale",`${v.scale??1}`),document.documentElement.style.setProperty("--page-background",`url(${v.url})`);let e=v.url;if(A.url===e&&1===A.opacity||L.url===e&&1===L.opacity)return;0===A.opacity&&0===L.opacity?(P({url:e,opacity:1}),F({url:"",opacity:0})):1===A.opacity?(F({url:e,opacity:1}),P(e=>({...e,opacity:0}))):(P({url:e,opacity:1}),F(e=>({...e,opacity:0})))}else P({url:"",opacity:0}),F({url:"",opacity:0}),document.documentElement.style.setProperty("--page-background","var(--background)"),document.documentElement.style.setProperty("--bg-blur","0px"),document.documentElement.style.setProperty("--bg-darkness","0.5"),document.documentElement.style.setProperty("--bg-saturation","1"),document.documentElement.style.setProperty("--bg-contrast","1"),document.documentElement.style.setProperty("--bg-hue-rotate","0deg"),document.documentElement.style.setProperty("--bg-position","center"),document.documentElement.style.setProperty("--bg-scale","1.0")},[v,f,w]),!w)return(0,r.jsx)("div",{className:"fixed-bg-wrapper no-custom-bg"});if("/"===t&&"poster"===k){let e=!!(S.bg1.url||S.bg2.url);return(0,r.jsxs)("div",{className:"fixed-bg-wrapper",style:{background:e?"none":void 0},children:[S.bg1.url&&(0,r.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ease-in-out",style:{opacity:S.bg1.opacity,pointerEvents:"none"},children:(0,r.jsx)("div",{className:"absolute inset-0 scale-[1.06]",style:{backgroundImage:`url(${S.bg1.url})`,backgroundSize:"cover",backgroundPosition:"center center",filter:"blur(56px) saturate(1.2)",transformOrigin:"center"}})}),S.bg2.url&&(0,r.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ease-in-out",style:{opacity:S.bg2.opacity,pointerEvents:"none"},children:(0,r.jsx)("div",{className:"absolute inset-0 scale-[1.06]",style:{backgroundImage:`url(${S.bg2.url})`,backgroundSize:"cover",backgroundPosition:"center center",filter:"blur(56px) saturate(1.2)",transformOrigin:"center"}})}),e&&(0,r.jsx)("div",{className:"absolute inset-0 bg-black/70"})]})}let $=!!v,z="classic"===f||!j&&("light-rays"===f||"ferro-fluid"===f||"liquid-aether"===f);return(0,r.jsxs)("div",{className:(0,i.cn)("fixed-bg-wrapper",!$&&z&&"no-custom-bg"),style:$?{background:"none"}:void 0,children:[A.url&&(0,r.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ease-in-out",style:{backgroundImage:`url(${A.url})`,opacity:A.opacity,backgroundSize:"cover",backgroundPosition:v?.position??"center",transform:`scale(${v?.scale??1})`,transformOrigin:"center",filter:`blur(${v?.blur??0}px) saturate(${v?.saturation??1}) contrast(${v?.contrast??1}) hue-rotate(${v?.hueRotate??0}deg)`,pointerEvents:"none"}}),L.url&&(0,r.jsx)("div",{className:"absolute inset-0 transition-opacity duration-700 ease-in-out",style:{backgroundImage:`url(${L.url})`,opacity:L.opacity,backgroundSize:"cover",backgroundPosition:v?.position??"center",transform:`scale(${v?.scale??1})`,transformOrigin:"center",filter:`blur(${v?.blur??0}px) saturate(${v?.saturation??1}) contrast(${v?.contrast??1}) hue-rotate(${v?.hueRotate??0}deg)`,pointerEvents:"none"}}),$&&v?.tintColor&&(0,r.jsx)("div",{className:"absolute inset-0 transition-all duration-700 ease-in-out",style:{backgroundColor:v.tintColor,mixBlendMode:v.blendMode??"normal",opacity:v.tintOpacity??.3,pointerEvents:"none"}}),$&&(0,r.jsx)("div",{className:"absolute inset-0 bg-black transition-opacity duration-700 ease-in-out",style:{opacity:v?.darkness??.5,pointerEvents:"none"}}),!$&&"light-rays"===f&&j&&(0,r.jsx)(m,{raysColor:p(s)[0],className:(0,i.cn)("absolute inset-0 z-0",e?"opacity-80":"opacity-95"),raysSpeed:.8,lightSpread:e?3:2.4,rayLength:e?2:3,pulsating:!1,fadeDistance:e?3:3.5,saturation:e?1:1.25,followMouse:!1,noiseAmount:e?.05:.03,distortion:.05,resolutionScale:e?.5:.65}),!$&&"ferro-fluid"===f&&j&&(0,r.jsx)(h,{colors:p(s),className:"absolute inset-0 z-0 opacity-80",speed:.4,scale:1.5,turbulence:1,fluidity:.1,rimWidth:.2,sharpness:2.5,shimmer:1.5,glow:1.8,flowDirection:"down",opacity:.8,mouseInteraction:!0,mouseStrength:1.2,mouseRadius:.35,mouseDampening:.15}),!$&&"hexagon-hive"===f&&(0,r.jsx)(x,{className:"absolute inset-0 z-0",themeColor:p(s)[0],hexSize:e?52:40,ambientOpacity:.32,gridOpacity:.24})]})}},22597:(e,t,s)=>{"use strict";s.d(t,{FZ:()=>u,iq:()=>d,jQ:()=>h,kY:()=>l,yf:()=>c});var r=s(95155),a=s(12115),n=s(66609),o=s(6655);function i(){let e=(0,o.AO)();return"halloween"===e?{name:"Halloween",value:o.wy.halloween.primaryHsl}:"winter"===e?{name:"Christmas",value:o.wy.winter.primaryHsl}:{name:"HiveX",value:"142 71% 30%"}}let l=new Proxy({default:{name:"HiveX",value:"142 71% 30%"},blue:{name:"Blue",value:"221 83% 53%"},green:{name:"Cyan",value:"185 85% 45%"},purple:{name:"Royal",value:"270 76% 53%"},pink:{name:"Flamingo",value:"330 81% 60%"},darkpurple:{name:"Dark Purple",value:"243.4 75.36% 58.63%"},amber:{name:"Amber",value:"38 100% 40%"},jade:{name:"Jade",value:"160 60% 35%"},orchid:{name:"Orchid",value:"288 60% 45%"},sky:{name:"Sky",value:"197 71% 40%"},cocoa:{name:"Cocoa",value:"25 35% 25%"},slate:{name:"Slate",value:"210 13% 35%"},coral:{name:"Coral",value:"16 100% 50%"},berry:{name:"Berry",value:"340 70% 40%"},mint:{name:"Mint",value:"168 80% 35%"},gold:{name:"Gold",value:"48 89% 45%"}},{get:(e,t)=>"default"===t?i():e[t],ownKeys:e=>Reflect.ownKeys(e),getOwnPropertyDescriptor:(e,t)=>
1"default"===t?{value:i(),writable:!0,enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(e,t)});function d(e){if(!e)return"#16833e";if("halloween"===e)return"#ff7518";if("winter"===e)return"#7ed6df";let t=l[e];return t?function(e){let t=e.replace(/%/g,"").trim().split(/\s+/);if(t.length>=3){var s,r,a;let e,n,o,i,l,d,c,u,h,m=parseFloat(t[0]),x=parseFloat(t[1]),p=parseFloat(t[2]);return s=m,r=x,a=p,s=(s%360+360)%360,r=Math.max(0,Math.min(100,r))/100,n=(e=(1-Math.abs(2*(a=Math.max(0,Math.min(100,a))/100)-1))*r)*(1-Math.abs(s/60%2-1)),o=a-e/2,i=0,l=0,d=0,0<=s&&s<60?(i=e,l=n,d=0):60<=s&&s<120?(i=n,l=e,d=0):120<=s&&s<180?(i=0,l=e,d=n):180<=s&&s<240?(i=0,l=n,d=e):240<=s&&s<300?(i=n,l=0,d=e):300<=s&&s<360&&(i=e,l=0,d=n),c=Math.round((i+o)*255),u=Math.round((l+o)*255),h=Math.round((d+o)*255),`#${c.toString(16).padStart(2,"0")}${u.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}return"#16833e"}(t.value):"#16833e"}function c(){try{let e=document.documentElement;if(e.classList.contains("festive-halloween-active"))return"#ff7518";if(e.classList.contains("festive-winter-active"))return"#7ed6df";let t=localStorage.getItem("theme-color")||"default";return d(t)}catch{return"#16833e"}}function u(e){let t=(0,o.AO)(),s=l[e];return!!s&&(document.documentElement.style.setProperty("--primary",s.value),localStorage.setItem("theme-color",e),window.dispatchEvent(new CustomEvent("theme-change",{detail:"default"===e&&t?t:e})),!0)}function h({onSelect:e}){let[t,s]=(0,a.useState)("default");(0,a.useEffect)(()=>{let e=localStorage.getItem("theme-color"),t=(0,o.AO)();e&&l[e]&&(s(e),t&&"default"===e||u(e))},[]);let i=(t,r)=>{t.stopPropagation(),u(r)&&(s(r),n.oR.success(`Theme changed to ${l[r].name}`),setTimeout(()=>{e&&e()},300))},d=Object.entries(l),c=d.slice(0,4),m=d.slice(4);return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,r.jsx)("div",{className:"grid grid-cols-4 gap-3",children:c.map(([e,s])=>(0,r.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,r.jsx)("button",{className:`h-7 w-7 rounded-full ${t===e?"ring-2 ring-white ring-offset-2 ring-offset-background":"border border-gray-700"}`,style:{backgroundColor:`hsl(${s.value})`},onClick:t=>i(t,e),title:s.name}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:s.name})]},e))}),(0,r.jsx)("div",{className:"grid grid-cols-4 gap-3",children:m.map(([e,s])=>(0,r.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,r.jsx)("button",{className:`h-7 w-7 rounded-full ${t===e?"ring-2 ring-white ring-offset-2 ring-offset-background":"border border-gray-700"}`,style:{backgroundColor:`hsl(${s.value})`},onClick:t=>i(t,e),title:s.name}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:s.name})]},e))})]})}},23511:(e,t,s)=>{"use strict";s.d(t,{E:()=>n});var r=s(95155),a=s(91337);function n({className:e,...t}){return(0,r.jsx)("div",{className:(0,a.cn)("animate-pulse rounded-md bg-primary/10",e),...t})}},32986:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(12115);let a="hivex.home.heroView",n="hivex:homeHeroView",o=e=>"search"===e||"poster"===e,i="poster",l=null,d=()=>l??i;function c(){let[e,t]=r.useState(d),s=r.useRef(e);r.useEffect(()=>{s.current=e,l=e},[e]),r.useEffect(()=>{let e=window.sessionStorage.getItem(a);if(o(e)){l=e,s.current!==e&&(s.current=e,t(e));return}l=i,s.current!==i&&(s.current=i,t(i)),window.sessionStorage.setItem(a,i)},[]),r.useEffect(()=>{let e=e=>{let r=e.detail;if(o(r)){if(l=r,s.current===r)return;s.current=r,t(r)}},r=e=>{if(e.key!==a)return;let r=e.newValue;o(r)&&(l=r,s.current!==r&&(s.current=r,t(r)))};return window.addEventListener(n,e),window.addEventListener("storage",r),()=>{window.removeEventListener(n,e),window.removeEventListener("storage",r)}},[]);let c=r.useCallback(e=>{let r=s.current,o="function"==typeof e?e(r):e;r!==o&&(l=o,s.current=o,t(o),window.sessionStorage.setItem(a,o),window.dispatchEvent(new CustomEvent(n,{detail:o})))},[]),u=r.useCallback(()=>{c(e=>"search"===e?"poster":"search")},[c]);return{view:e,setView:c,toggleView:u}}},38923:(e,t,s)=>{"use strict";s.d(t,{CG:()=>
1m,Fm:()=>y,Qs:()=>N,cj:()=>h,h:()=>w,qp:()=>j});var r=s(95155),a=s(12115),n=s(43146),o=s(2574),i=s(39449),l=s(18460),d=s(33210),c=s(91337);let u=a.createContext(void 0);function h({children:e,...t}){let[s,o]=a.useState(t?.open??t?.defaultOpen??!1);a.useEffect(()=>{t?.open!==void 0&&o(t.open)},[t?.open]);let{onOpenChange:i}=t,l=a.useCallback(e=>{o(e),i?.(e)},[i]);return(0,r.jsx)(u.Provider,{value:{isOpen:s},children:(0,r.jsx)(n.bL,{"data-slot":"sheet",...t,onOpenChange:l,children:e})})}function m(e){return(0,r.jsx)(n.l9,{"data-slot":"sheet-trigger",...e})}function x(e){return(0,r.jsx)(n.ZL,{"data-slot":"sheet-portal",...e})}function p({className:e,...t}){return(0,r.jsx)(n.hJ,{"data-slot":"sheet-overlay",className:(0,c.cn)("fixed inset-0 z-50 bg-black/80",e),...t})}let f=(0,l.F)("fixed z-50 gap-4 bg-background p-6 shadow-lg",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),g={right:{x:"100%"},left:{x:"-100%"},top:{y:"-100%"},bottom:{y:"100%"}},v={x:0,y:0},b=a.forwardRef(({initial:e,animate:t,exit:s,transition:a,...n},i)=>(0,r.jsx)(o.P.div,{ref:i,initial:e,animate:t,exit:s,transition:a,...n}));function w({side:e="right",className:t,transition:s={type:"tween",duration:.22,ease:[.25,.46,.45,.94]},children:l,onOpenAutoFocus:h,onCloseAutoFocus:m,onEscapeKeyDown:y,onPointerDownOutside:j,onInteractOutside:N,forceMount:k,id:E,...S}){let{isOpen:C}=(()=>{let e=a.useContext(u);if(!e)throw Error("useSheet must be used within a Sheet");return e})(),A=e??"right";return(0,r.jsx)(i.N,{children:C&&(0,r.jsxs)(x,{forceMount:!0,"data-slot":"sheet-portal",children:[(0,r.jsx)(p,{asChild:!0,forceMount:!0,children:(0,r.jsx)(o.P.div,{"data-slot":"sheet-overlay",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.18,ease:"easeOut"},style:{willChange:"opacity"}},"sheet-overlay")}),(0,r.jsx)(n.UC,{asChild:!0,forceMount:!0,...{onOpenAutoFocus:h,onCloseAutoFocus:m,onEscapeKeyDown:y,onPointerDownOutside:j,onInteractOutside:N,forceMount:k,id:E},children:(0,r.jsxs)(b,{"data-slot":"sheet-content",initial:g[A],animate:v,exit:g[A],transition:s,className:(0,c.cn)(f({side:e}),t),style:{willChange:"transform"},...S,children:[l,(0,r.jsxs)(n.bm,{"data-slot":"sheet-close",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,r.jsx)(d.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]},"sheet-content")})]})})}function y({className:e,...t}){return(0,r.jsx)("div",{"data-slot":"sheet-header",className:(0,c.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t})}function j({className:e,...t}){return(0,r.jsx)(n.hE,{"data-slot":"sheet-title",className:(0,c.cn)("text-lg font-semibold text-foreground",e),...t})}function N({className:e,...t}){return(0,r.jsx)(n.VY,{"data-slot":"sheet-description",className:(0,c.cn)("text-sm text-muted-foreground",e),...t})}b.displayName="MotionDiv"},43323:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),a=s(33210),n=s(12115),o=s(4474),i=s(5772),l=s(80162);function d(){let[e,t]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(()=>{try{let e=localStorage.getItem("discord-splash-dismissed");if(!e)return void t(!0);let s=parseInt(e,10);Date.now()-s>=12096e5&&t(!0)}catch(e){console.warn("Error checking discord splash timestamp:",e),t(!0)}})()},[]),(0,n.useEffect)(()=>(document.body.style.overflow=e?"hidden":"auto",()=>{document.body.style.overflow="auto"}),[e]);let s=()=>{try{localStorage.setItem("discord-splash-dismissed",Date.now().toString())}catch(e){console.warn("Error saving discord splash timestamp:",e)}t(!1)};return e?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm animate-in fade-in",children:(0,r.jsx)("div",{className:"relative w-[95%] max-w-lg rounded-xl border border-border bg-card shadow-lg sm:max-w-3xl",children:(0,r.jsxs)("div",{className:"p-4 md:p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-card-foreground md:text-3xl",children:(0,r.jsx)(l.e,{children:"HiveX Discord"})}),(0,r.jsxs)("p",{className:"text-muted-foreground",children:["Join"," ",(0,r.jsx)("span",{className:"font-bold text-teal-400",children:(0,r.jsx)(l.e,{children:"HiveX"})})," ","discord server to stay upto date with the latest updates."]})]}),(0,r.jsx)(o.$,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full",onClick:s,children:(0,r.jsx)(a.A,{className:"h-4 w-4"})})]}),(0,r.jsx)("div",{className:"mt-6 flex justify-center",children:(0,r.jsxs)("div",{className:"w-full max-w-md rounded-lg border border-[#5865f2]/20 bg-[#2f3136] p-4",children:[(0,r.jsx)("div",{className:"mb-3 text-center",children:(0,r.jsx)("h3",{className:"text-lg font-semibold text-[#b9bbbe]",children:"Join Our Discord Server"})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-xl bg-[#000000]",children:(0,r.jsx)(i.default,{src:"/assets/android-chrome-192x192.png",alt:"logo-image",width:32,height:32})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h4",{className:"truncate text-base font-bold text-white",children:"HiveX"}),(0,r.jsx)("span",{className:"text-base",children:"\uD83C\uDF7F"})]}),(0,r.jsx)("div",{className:"mt-1",children:(0,r.jsx)("div",{className:"text-xs text-[#b9bbbe]",children:(0,r.jsx)("span",{children:"Bug reports & suggestions"})})})]}),(0,r.jsx)(o.$,{onClick:()=>window.open("https://discord.gg/4BU2XbAPdu","_blank"),className:"h-8 flex-shrink-0 bg-[#3ba55d] px-4 text-xs font-medium text-white hover:bg-[#2d7d32] focus:ring-2 focus:ring-[#3ba55d] focus:ring-offset-2 focus:ring-offset-[#2f3136]",children:"Join"})]})]})}),(0,r.jsx)("div",{className:"mt-6 flex justify-end border-t border-border pt-4",children:(0,r.jsx)(o.$,{size:"lg",onClick:s,className:"w-full px-6 md:w-auto",children:"Got it, thanks!"})})]})})}):null}},60342:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(12115);function a(){return(0,r.useEffect)(()=>
1{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{0!==e.length&&Promise.all(e.map(e=>e.unregister().then(t=>!!t&&(console.log("Service Worker unregistered:",e),!0)))).then(e=>{e.some(Boolean)&&window.location.reload()})})},[]),null}},61549:(e,t,s)=>{"use strict";s.d(t,{Toaster:()=>o});var r=s(95155),a=s(70460),n=s(66609);let o=({...e})=>{let{theme:t="system"}=(0,a.D)();return(0,r.jsx)(n.l$,{theme:t,className:"toaster group !z-[999999]",style:{zIndex:999999,"--z-index":"999999"},toastOptions:{style:{zIndex:999999},classNames:{toast:"group toast group-[.toaster]:bg-neutral-900 group-[.toaster]:text-white group-[.toaster]:border-white/10 group-[.toaster]:shadow-2xl !z-[999999]",description:"group-[.toast]:text-neutral-300",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})}},65279:(e,t,s)=>{"use strict";s.d(t,{S:()=>r,X:()=>a});let r=!0;function a(){if("u"<typeof navigator)return!1;let e=navigator.userAgent.toLowerCase();return/playstation|xbox|nintendo|wiiu|wii|silk|aftt|kftt|kfot|smarttv|smart-tv|tizen|webos|netcast|roku|googletv|crkey|vieracast|hbbtv|cecb|appletv|atvos|android tv/.test(e)}},66385:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var r=s(95155),a=s(12115),n=s(73321),o=s(33210),i=s(39449),l=s(2574);let d="hivex_announcement_dismissed";function c(){let e=(0,n.usePathname)(),[t,s]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),[h,m]=(0,a.useState)(!1),x=e?.startsWith("/watch/"),p=(0,a.useRef)(null),f=(0,a.useRef)(null),g=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await fetch("/api/announcements");if(!e.ok)return;let t=await e.json();if(!t.message||sessionStorage.getItem(d)===t.message)return;s(t.message),u(!0)}catch{}}()},[]),(0,a.useEffect)(()=>{let e=p.current;if(!e)return;let t=new ResizeObserver(()=>{document.documentElement.style.setProperty("--banner-height",`${e.getBoundingClientRect().height}px`)});return t.observe(e),()=>t.disconnect()},[c]),(0,a.useEffect)(()=>{if(!t||!c)return;let e=f.current,s=g.current;if(!e||!s)return;let r=()=>{m(e.offsetWidth>s.clientWidth-48)},a=requestAnimationFrame(r),n=new ResizeObserver(r);return n.observe(s),()=>{cancelAnimationFrame(a),n.disconnect()}},[t,c]);let v=t?Math.max(8,.12*t.length):8;return x?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{children:` 2 @keyframes banner-marquee { 3 0% { transform: translateX(0); } 4 100% { transform: translateX(-50%); } 5 } 6 `}),(0,r.jsx)(i.N,{onExitComplete:()=>{document.documentElement.style.setProperty("--banner-height","0px")},children:c&&t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.P.div,{ref:p,initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"fixed inset-x-0 top-0 z-[9999] overflow-hidden",children:(0,r.jsxs)("div",{ref:g,className:"relative w-full bg-primary/30 py-2 text-sm text-white backdrop-blur-sm",children:[(0,r.jsx)("span",{ref:f,"aria-hidden":!0,className:"pointer-events-none invisible absolute whitespace-nowrap",dangerouslySetInnerHTML:{__html:t}}),h?(0,r.jsx)("div",{className:"overflow-hidden pr-8",children:(0,r.jsxs)("div",{className:"inline-flex whitespace-nowrap",style:{animation:`banner-marquee ${v}s linear infinite`},children:[(0,r.jsx)("span",{className:"pr-24",dangerouslySetInnerHTML:{__html:t}}),(0,r.jsx)("span",{className:"pr-24",dangerouslySetInnerHTML:{__html:t}})]})}):(0,r.jsx)("span",{className:"block px-10 text-center",dangerouslySetInnerHTML:{__html:t}}),(0,r.jsx)("button",{onClick:function(){t&&sessionStorage.setItem(d,t),u(!1)},"aria-label":"Dismiss announcement",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded p-0.5 opacity-80 transition hover:opacity-100 focus:outline-none",children:(0,r.jsx)(o.A,{className:"h-4 w-4"})})]})},"announcement-fixed"),(0,r.jsx)("div",{style:{height:"var(--banner-height, 0px)",transition:"height 0.3s ease"}},"announcement-spacer")]})})]})}},66872:()=>{},69029:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(12115),n=s(65596);let o="hivex:disable-devtool";function i(){let[e,t]=(0,a.useState)(()=>{try{return"true"===sessionStorage.getItem(o)}catch(e){return!1}});return((0,a.useEffect)(()=>{let e=()=>{try{t("true"===sessionStorage.getItem(o))}catch(e){}};return window.addEventListener("hivex:devtoolsToggle",e),()=>window.removeEventListener("hivex:devtoolsToggle",e)},[]),e)?null:(0,r.jsx)(n.default,{defer:!0,src:"https://cdn.jsdelivr.net/npm/disable-devtool","disable-devtool-auto":!0})}},75891:(e,t,s)=>{"use strict";s.d(t,{LoadingProvider:()=>i,M:()=>o});var r=s(95155),a=s(12115);let n=(0,a.createContext)(void 0),o=()=>{let e=(0,a.useContext)(n);
6if(void 0===e)throw Error("useLoading must be used within a LoadingProvider");return e},i=({children:e})=>{let[t,s]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{let e=()=>{s(!1),setTimeout(()=>{i(!1)},500)};"complete"===document.readyState||"interactive"===document.readyState?e():(window.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e));let t=setTimeout(()=>{e()},2500);return()=>{clearTimeout(t),window.removeEventListener("DOMContentLoaded",e),window.removeEventListener("load",e)}},[]),(0,r.jsx)(n.Provider,{value:{isLoading:t,setIsLoading:s,isInitialLoad:o},children:e})}},77602:(e,t,s)=>{"use strict";s.d(t,{default:()=>u});var r=s(95155),a=s(12115),n=s(4474),o=s(72055),i=s(29722),l=s(38042),d=s(73321),c=s(6655);function u(){let[e,t]=a.useState(!1),s=(0,l.U)((0,l.mq)("md")),u=(0,l.U)((0,l.mq)("lg")),[h,m]=a.useState(!1),x=(0,d.usePathname)(),p="/watch"===x||x?.startsWith("/watch/"),f="/customize"===x;if(a.useEffect(()=>{if(m(!0),p)return void t(!1);let e=()=>{window.scrollY>300?t(!0):t(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[p]),p)return null;if(!h)return(0,r.jsx)("div",{className:"fixed bottom-20 right-5 scale-0"});let g=h&&"halloween"===(0,c.AO)();return(0,r.jsx)("div",{className:(0,i.A)("group fixed right-3 z-50 transition-all duration-300 ease-in-out sm:right-5",f&&!u?"bottom-40":g?s?"bottom-24":"bottom-[
6126px]":s?"bottom-8":"bottom-24",e?"scale-100":"scale-0"),children:(0,r.jsx)(n.$,{size:"icon",variant:"secondary",className:"h-12 w-12 rounded-full border border-foreground/20 bg-foreground/5 shadow-lg backdrop-blur-md transition-all duration-300 ease-in-out hover:bg-primary/40 hover:text-primary-foreground",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},children:(0,r.jsx)(o.A,{className:"transition-transform ease-in-out group-hover:-translate-y-2"})})})}},78914:(e,t,s)=>{"use strict";s.d(t,{u:()=>n});var r=s(11498),a=s(31692);let n=(0,r.vt)()((0,a.Zr)((0,a.eh)(e=>({id:null,setId:t=>e(e=>e.id===t?e:{id:t,season:null,episode:null}),season:null,episode:null,setSeasonEpisode:(t,s)=>e({season:t,episode:s}),setMedia:(t,s=null,r=null)=>e({id:t,season:s,episode:r}),isWatchNoticeActive:!1,setIsWatchNoticeActive:t=>e({isWatchNoticeActive:t}),reset:()=>{e({id:null,season:null,episode:null}),sessionStorage.removeItem("player-storage")}})),{name:"player-storage",storage:(0,a.KU)(()=>sessionStorage),partialize:e=>({id:e.id,season:e.season,episode:e.episode})}))},82831:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(65596),n=s(84269),o=s(12115),i=s(65279);function l(){let{loading:e,isPremium:t}=(0,n.A)(),[s,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1),u=()=>{try{let e=localStorage.getItem("hivex.adsDisabledAt");if(!e)return!1;let t=parseInt(e,10);if(!Number.isFinite(t))return!1;if(Date.now()-t<36e5)return!0;return localStorage.removeItem("hivex.adsDisabledAt"),!1}catch{return!1}},h=()=>{try{return"enabled"===sessionStorage.getItem("hivex.adsOverride")}catch{return!1}};return((0,o.useEffect)(()=>
6{l(u()),c(h())},[]),(0,o.useEffect)(()=>{let e=()=>{l(u()),c(h())};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),e||t||!d&&s||i.S&&(0,i.X)())?null:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(a.default,{id:"profit-script",src:"/scripts/profit.js","data-cfasync":"false",strategy:"afterInteractive"})})}},83279:(e,t,s)=>{"use strict";s.d(t,{V6:()=>l,kL:()=>c,nG:()=>i,oj:()=>o,uL:()=>d});let r="hivex.recentSearches",a="hivex:recentSearches",n=e=>{window.dispatchEvent(new CustomEvent(a,{detail:e}))},o=()=>{try{let e=window.localStorage.getItem(r);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e)}catch{return[]}},i=e=>{let t=e.trim();if(!t)return o();let s=[t,...o().filter(e=>e.toLowerCase()!==t.toLowerCase())].slice(0,8);return window.localStorage.setItem(r,JSON.stringify(s)),n(s),s},l=()=>{window.localStorage.removeItem(r),n([])},d=e=>{let t=o().filter(t=>t.toLowerCase()!==e.toLowerCase());return window.localStorage.setItem(r,JSON.stringify(t)),n(t),t},c=e=>{let t=t=>{let s=t.detail;Array.isArray(s)?e(s):e(o())},s=t=>{t.key===r&&e(o())};return window.addEventListener(a,t),window.addEventListener("storage",s),()=>{window.removeEventListener(a,t),window.removeEventListener("storage",s)}}},90678:(e,t,s)=>{"use strict";s.d(t,{ThemeInitializer:()=>o});var r=s(12115),a=s(22597),n=s(6655);function o(){return(0,r.useEffect)(()=>{let e=(0,n.AO)(),t=localStorage.getItem("theme-color");(!e||t&&"default"!==t)&&t&&a.kY[t]&&(0,a.FZ)(t)},[]),null}},92048:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(95155),a=s(12115),n=s(91337);let o=function({className:e,size:t=36}){let s=(0,a.useId)().replace(/:/g,""),o=`hive-hex-grad-${s}`;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 336 336",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,n.cn)("drop-shadow-[0_0_8px_hsl(var(--primary)/0.65)] transition-all duration-300",e),children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{id:o,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"hsl(var(--primary))",stopOpacity:"0.85"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"hsl(var(--primary))",stopOpacity:"0.45"})]})}),(0,r.jsx)("polygon",{points:"168,30 288,99 288,237 168,306 48,237 48,99",fill:"none",stroke:"hsl(var(--primary))",strokeWidth:"14",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-colors duration-300"}),(0,r.jsxs)("g",{fill:`url(#${o})`,stroke:"hsl(var(--primary))",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-colors duration-300",children:[(0,r.jsx)("polygon",{points:"152.5,141 183.5,141 199,168 183.5,195 152.5,195 137,168"}),(0,r.jsx)("polygon",{points:"152.5,71 183.5,71 199,98 183.5,125 152.5,125 137,98"}),(0,r.jsx)("polygon",{points:"213.5,106 244.5,106 260,133 244.5,160 213.5,160 198,133"}),(0,r.jsx)("polygon",{points:"213.5,176 244.5,176 260,203 244.5,230 213.5,230 198,203"}),(0,r.jsx)("polygon",{points:"152.5,211 183.5,211 199,238 183.5,265 152.5,265 137,238"}),(0,r.jsx)("polygon",{points:"91.5,176 122.5,176 138,203 122.5,230 91.5,230 76,203"}),(0,r.jsx)("polygon",{points:"91.5,106 122.5,106 138,133 122.5,160 91.5,160 76,133"})]})]})}},94496:(e,t,s)=>{"use strict";s.d(t,{WatchHistoryStoreProvider:()=>u,M:()=>h});var r=s(95155),a=s(12115),n=s(11498),o=s(60927),i=s(35867),l=s(31692);let d={histories:[]},c=(0,a.createContext)(void 0),u=({children:e})=>{let t=(0,a.useRef)(null);return t.current||(t.current=((e=d)=>(0,i.y)()((0,l.Zr)((t,s)=>({...e,addOrUpdateHistory:(e,s,r,a,n,i)=>t(t=>{let l=Date.now(),d=t.histories.findIndex(t=>t.id===e.id&&t.media_type===a),c=a===o.f.Movie?{...e,last_watched_at:l,runtime:r,current_time:s,media_type:o.f.Movie}:{...e,last_watched_at:l,runtime:r,current_time:s,media_type:o.f.TV,season_number:Number(n),episode_number:Number(i)};if(!(d>-1))return{histories:[c,...t.histories.slice(0,99)]};{let e=[...t.histories];return e[d]=c,e.unshift(e.splice(d,1)[0]),{histories:e}}}),getHistory:e=>s().histories.find(t=>t.id===e),removeHistory:e=>t(t=>({histories:t.histories.filter(t=>t.id!==e)})),clearHistories:()=>t({histories:[]})}),{name:"watch-history-storage",storage:(0,l.KU)(()=>localStorage)})))({histories:[]})),(0,r.jsx)(c.Provider,{value:t.current,children:e})}
6,h=e=>{let t=(0,a.useContext)(c);if(!t)throw Error("useWatchHistoryStore must be used within WatchHistoryStoreProvider");return(0,n.Pj)(t,e)}},95348:(e,t,s)=>{Promise.resolve().then(s.bind(s,84269)),Promise.resolve().then(s.t.bind(s,66872,23)),Promise.resolve().then(s.bind(s,82831)),Promise.resolve().then(s.bind(s,17129)),Promise.resolve().then(s.bind(s,97744)),Promise.resolve().then(s.bind(s,94525)),Promise.resolve().then(s.bind(s,28231)),Promise.resolve().then(s.bind(s,66385)),Promise.resolve().then(s.bind(s,967)),Promise.resolve().then(s.bind(s,69029)),Promise.resolve().then(s.bind(s,43323)),Promise.resolve().then(s.bind(s,94496)),Promise.resolve().then(s.bind(s,7745)),Promise.resolve().then(s.bind(s,12140)),Promise.resolve().then(s.bind(s,77602)),Promise.resolve().then(s.bind(s,75891)),Promise.resolve().then(s.bind(s,12007)),Promise.resolve().then(s.bind(s,60342)),Promise.resolve().then(s.bind(s,90678)),Promise.resolve().then(s.bind(s,61549)),Promise.resolve().then(s.t.bind(s,42593,23)),Promise.resolve().then(s.bind(s,41112)),Promise.resolve().then(s.bind(s,21957)),Promise.resolve().then(s.t.bind(s,58398,23))}},e=>{e.O(0,[7072,7513,9477,5730,5105,8721,8500,1967,6609,3953,2574,7411,766,8660,6765,9281,4525,324,9213,6655,1086,8441,3794,7358],()=>e(e.s=95348)),_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.