PageSourceSearch

https://vidbox.wtf/_next/static/chunks/app/watch/anime/page.6c2181ec.js

js vidbox.wtf collected 2026-10-10 02:45:46 UTC 11,471 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7509],{36999:(e,t,r)=>{"use strict";r.d(t,{default:()=>y});var a=r(95155),l=r(3298),n=r(85998),s=r(65229),o=r(86121),i=r(60235),c=r(39867),d=r(12115),m=r(77258),u=r(52619),h=r.n(u),p=r(26549),x=r(95058),g=r(11131),f=r(28076),v=r(29978),w=r(66377),b=r(8640),j=r(31332);let{useSession:N}=(0,g.M)(),y=e=>{var t,r,u,g;let{animeId:y,anilistId:k,malId:S,animeInfo:I,totalEpisodes:C,animeEpisodes:A,initialEpisode:D}=e,[E,P]=(0,d.useState)(!1),[O,_]=(0,d.useState)(!0),[T,z,M]=(0,l.y)("currentAnimeProvider",p.dr),{orderedProviders:L,draggedName:R,startDragging:W,moveOver:F,stopDragging:U,dropOn:X,hasCustomOrder:H,resetOrder:V}=(0,j.JK)(p.an,"vidbox:server-order:anime",p.o_),[B,Y]=(0,d.useState)(D||1),[G,J]=(0,d.useState)(!0),K=(0,d.useRef)(null),Z=(0,d.useRef)(!1),{data:q}=N(),Q=!!q,{onOpen:$}=(0,v.X)(),[ee,et]=(0,d.useState)(!1);(0,d.useEffect)(()=>{et("true"===window.localStorage.getItem("watchHistoryPaused"))},[]);let{addItem:er}=(0,x.C)("history",ee),{addItem:ea,removeItem:el,isInList:en}=(0,x.C)("watchlist",!1),[es,eo]=(0,d.useState)(!1);(0,d.useEffect)(()=>{let e=setTimeout(()=>{(0,w.Ms)({type:"anime",id:y,episode:B}).catch(()=>{})},150);return()=>clearTimeout(e)},[y,B]),(0,d.useEffect)(()=>{_(!0)},[B]),(0,d.useEffect)(()=>
1{if(ee||!y||!I||!B)return;let e=setTimeout(()=>{er({mediaId:y,mediaType:"anime",title:I.title.userPreferred||I.title.romaji,backdrop_path:I.bannerImage||I.coverImage.extraLarge,episode:B,addedAt:new Date().toISOString(),watchedAt:new Date().toISOString(),createdAt:new Date().toISOString()})},1e3);return()=>clearTimeout(e)},[y,I,B,ee,er]);let ei=e=>{z(e),P(!1),_(!0)},ec=(e,t)=>{if(M||!e)return"";let r="anilist"===e.idType?k:S;if(!r)return"";try{let a=e.url;if(e.urlFormat?a+=e.urlFormat.replace(/id/g,r.toString()).replace(/episode/g,t.toString()):a+="".concat(r,"/").concat(t),e.extraParams){let t=a.includes("?")?"&":"?";a+=t+e.extraParams.replace(/^\?/,"")}return a}catch(e){return console.error("Error generating provider URL:",e),""}},ed=(0,d.useMemo)(()=>{if(M)return[];try{return p.an.map(e=>({name:e.name,src:ec(e,B)})).filter(e=>!!e.src)}catch(e){return[]}},[M,B,k,S]);return(0,d.useEffect)(()=>{let e=setTimeout(()=>{let e=[];return ed.slice(0,8).forEach(t=>{let{src:r}=t;try{let t=new URL(r),a=document.createElement("link");a.rel="preconnect",a.href=t.origin,a.crossOrigin="",document.head.appendChild(a),e.push(a);let l=document.createElement("link");l.rel="dns-prefetch",l.href=t.origin,document.head.appendChild(l),e.push(l)}catch(e){}}),()=>e.forEach(e=>e.remove())},0);return()=>clearTimeout(e)},[ed]),(0,d.useEffect)(()=>{if(!O||M||(null==T?void 0:T.name)!=="Max")return;let e=window.setTimeout(()=>{_(!1)},3500);return()=>window.clearTimeout(e)},[null==T?void 0:T.name,O,M]),Array.from({length:C},(e,t)=>({id:"".concat(t+1),number:t+1,title:"Episode ".concat(t+1),description:I.description||"",image:I.image||I.cover})),(0,a.jsx)("div",{className:"min-h-screen pt-16",children:(0,a.jsxs)("div",{className:"mx-auto max-w-screen-xl px-4",children:[(0,a.jsxs)("h1",{className:"truncate pb-5 text-center text-xl font-semibold",children:["Now Watching:"," ",(0,a.jsx)("span",{className:"font-bold",children:I.title.userPreferred||I.title.romaji})]}),(0,a.jsxs)("div",{className:(0,m.cn)("mx-auto mb-2 flex w-full items-center rounded-lg text-white shadow-lg backdrop-blur-sm lg:w-3/4 lg:pl-6",G?"":"hidden"),style:{background:"linear-gradient(90deg, #ff0000 0%, #ff4444 50%, #ff6666 100%)"},children:[(0,a.jsxs)("div",{className:"flex w-full items-center justify-center gap-x-2 p-2 text-sm",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 fill-white"}),(0,a.jsx)("span",{className:"text-[7px] xs:text-[12px] sm:text-[12px] md:text-sm lg:text-base",children:"Please switch to other servers if default server doesnt work."})]}),(0,a.jsx)(s.A,{className:"h-8 w-8 cursor-pointer justify-end pr-2",onClick:()=>J(!1)})]}),(0,a.jsxs)("div",{className:"relative mx-auto h-[400px] w-full overflow-hidden rounded-lg bg-black shadow-lg md:aspect-video md:h-full lg:w-3/4",children:[(0,a.jsxs)("button",{onClick:()=>P(!E),className:"absolute left-0 right-0 top-0 z-20 mx-auto flex h-10 w-40 items-center justify-center gap-x-2 rounded-b-[12px] bg-gradient-to-r from-blue-600 to-purple-600 text-white transition-all hover:from-blue-700 hover:to-purple-700 shadow-lg hover:shadow-xl backdrop-blur-sm border border-white/20",children:[E?(0,a.jsx)(s.A,{}):(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 md:h-7 md:w-7",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{fill:"currentColor",d:"M20 3H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-5 5h-2V6h2zm4 0h-2V6h2zm1 5H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2zm-5 5h-2v-2h2zm4 0h-2v-2h2z"})}),E?"Close":"Select a server"]}),!M&&(0,a.jsx)("div",{className:"absolute left-0 right-0 top-12 z-30 mx-auto w-fit max-w-[95vw] rounded-xl sm:rounded-2xl bg-black/95 backdrop-blur-xl border border-white/10 p-3 sm:p-4 md:p-6 text-white transition-all duration-300 shadow-2xl ".concat(E?"scale-100 opacity-100":"pointer-events-none scale-95 opacity-0"),children:(0,a.jsxs)("div",{className:"max-h-[250px] sm:max-h-[300px] lg:max-h-none overflow-auto px-3 py-2 scrollbar-thin lg:scrollbar-none",onTouchStart:e=>{let t=e.touches&&e.touches[0];t&&(K.current={x:t.clientX,y:t.clientY},Z.current=!1)},onTouchMove:e=>{if(!K.current)return;let t=e.touches&&e.touches[0];if(!t)return;let r=Math.abs(t.clientX-K.current.x),a=Math.abs(t.clientY-K.current.y);(r>8||a>8)&&(Z.current=!0)},onTouchEnd:()=>{K.current=null},style:{scrollbarWidth:"thin",scrollbarColor:"#6b7280 transparent",touchAction:"pan-y"},children:[(0,a.jsx)(j.PZ,{enabled:p.o_,visible:H,onReset:V}),(0,a.jsx)("div",{className:(0,m.cn)("grid grid-cols-3 gap-2 sm:grid-cols-4 md:grid-cols-5 lg:grid-cols-6",R&&"[&_*]:!transition-none"),children:L.map(e=>(0,a.jsxs)("div",{"data-server-name":e.name,onDragOver:e=>{p.o_&&e.preventDefault()},onDragEnter:()=>{p.o_&&F(e.name)},onDrop:t=>{t.preventDefault(),X(e.name)},className:(0,m.cn)("relative",R===e.name&&"opacity-0"),children:[(0,a.jsxs)("button",{onClick:t=>{t.preventDefault(),t.stopPropagation(),ei(e)},onTouchEnd:t=>{Z.current||(t.preventDefault(),t.stopPropagation(),ei(e))},className:"group relative w-full rounded-lg sm:rounded-xl px-2 py-2 sm:px-3 sm:py-3 text-xs sm:text-sm font-medium transition-all duration-200 hover:scale-105 active:scale-95 touch-manipulation select-none ".concat(p.o_?"pl-6 sm:pl-7":""," ").concat((null==T?void 0:T.name)===e.name?"bg-gradient-to-r from-blue-600 to-purple-600 shadow-lg shadow-blue-500/25 ring-1 sm:ring-2 ring-blue-400/50":"bg-white/5 border border-white/10 hover:bg-white/10 hover:border-white/20 hover:shadow-lg hover:shadow-white/5"),children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 sm:gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("img",{src:e.countryUrl,alt:"Country",className:"w-4 h-3 sm:w-5 sm:h-4 md:w-6 md:h-4 roun
1ded-sm object-cover shadow-sm"}),(null==T?void 0:T.name)===e.name&&(0,a.jsx)("div",{className:"absolute -top-0.5 -right-0.5 sm:-top-1 sm:-right-1 w-3 h-3 sm:w-4 sm:h-4 bg-green-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-2 h-2 sm:w-2.5 sm:h-2.5 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),(0,a.jsx)("span",{className:"text-[10px] sm:text-xs font-semibold text-center leading-tight",children:e.name})]}),(null==T?void 0:T.name)===e.name&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-lg sm:rounded-xl bg-gradient-to-r from-red-600/20 to-red-700/20 animate-pulse"})]}),(0,a.jsx)(j.aX,{providerName:e.name,enabled:p.o_,startDragging:W,moveOver:F,stopDragging:U,dropOn:X})]},e.name))})]})}),O&&!M&&I&&(0,a.jsx)(b.G,{posterUrl:I.bannerImage||(null==(t=I.coverImage)?void 0:t.extraLarge)||(null==(r=I.coverImage)?void 0:r.large)||"/placeholder.png",title:(null==(u=I.title)?void 0:u.userPreferred)||(null==(g=I.title)?void 0:g.romaji)}),!M&&(0,a.jsxs)("div",{className:"absolute left-0 top-0 h-full w-full bg-black",children:[ed.slice(0,12).map(e=>{let{name:t,src:r}=e,l=(null==T?void 0:T.name)===t;return(0,a.jsx)("iframe",{src:l?r:"about:blank",onLoad:()=>{l&&_(!1)},className:"absolute left-0 top-0 h-full w-full bg-black transition-opacity duration-200 ".concat(l?"opacity-100 z-10":"opacity-0 pointer-events-none"," ").concat(E?"pointer-events-none":""),allowFullScreen:!0,allow:l?"autoplay; encrypted-media; picture-in-picture":"",referrerPolicy:"origin","data-provider-name":t},"preload-".concat(t,"-").concat(l?String(B):"inactive"))}),T&&!ed.slice(0,12).some(e=>e.name===T.name)&&(0,a.jsx)("iframe",{src:ec(T,B),onLoad:()=>_(!1),className:"absolute left-0 top-0 h-full w-full bg-black z-10 ".concat(E?"pointer-events-none":"pointer-events-auto"),allowFullScreen:!0,allow:"autoplay; encrypted-media; picture-in-picture",referrerPolicy:"origin"},"active-fallback-".concat(T.name,"-").concat(String(B)))]})]}),(0,a.jsxs)("div",{className:"relative z-10 mx-auto -mt-[5px] flex w-full items-center justify-center gap-x-4 rounded-b-lg bg-gray-900 py-1 text-sm text-white lg:w-3/4",children:[B>1&&(0,a.jsxs)("button",{type:"button",onClick:()=>Y(e=>Math.max(1,e-1)),className:"flex cursor-pointer items-center gap-x-1 rounded-md transition-all",children:[(0,a.jsx)(o.A,{className:"h-4 w-4 rotate-180 fill-white"}),(0,a.jsx)("span",{className:"hidden lg:block",children:"Previous"})]}),B<C&&(0,a.jsxs)("button",{type:"button",onClick:()=>Y(e=>Math.min(C||e+1,e+1)),className:"flex cursor-pointer items-center gap-x-1 rounded-md transition-all",children:[(0,a.jsx)(o.A,{className:"h-4 w-4 fill-white"}),(0,a.jsx)("span",{className:"hidden lg:block",children:"Next"})]}),Q?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-x-1 rounded-md transition-all",onClick:()=>{Q&&(es?(el(y,"anime"),eo(!1)):(ea({mediaId:y,mediaType:"anime",title:I.title.userPreferred||I.title.romaji,backdrop_path:I.image||I.cover,_id:"",addedAt:new Date().toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),eo(!0)))},children:[(0,a.jsx)(i.A,{className:(0,m.cn)("h-4 w-4 rounded",es&&"fill-white")}),(0,a.jsx)("span",{className:"hidden lg:block",children:es?"Remove from Watchlist":"Add to Watchlist"})]}):(0,a.jsxs)("button",{onClick:$,className:"flex cursor-pointer items-center gap-x-1 rounded-md transition-all",children:[(0,a.jsx)(i.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden lg:block",children:"Add to Watchlist"})]}),(0,a.jsx)(h(),{href:"https://dl.vidsrc.vip/anime/".concat(y,"/").concat(B),children:(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-x-1 rounded-md transition-all",children:[(0,a.jsx)(c.A,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"hidden lg:block",children:"Download"})]})})]}),(0,a.jsx)("div",{className:"mx-auto mt-8 w-full lg:w-3/4",children:(0,a.jsx)(f.t,{episodes:A,animeId:y,description:I.description||"",coverImage:I.bannerImage||I.coverImage.extraLarge,image:I.bannerImage||I.coverImage.extraLarge,watch:{episode:B,onChange:e=>Y(e)}})})]})})}},90295:(e,t,r)=>{Promise.resolve().then(r.bind(r,36999))}},e=>{e.O(0,[7405,2076,8096,7358],()=>e(e.s=90295)),_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.