PageSourceSearch

https://vidbox.wtf/_next/static/chunks/app/watchlist/page.0e445cab.js

js vidbox.wtf collected 2026-10-10 02:45:53 UTC 6,160 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6478],{43714:(e,a,t)=>{Promise.resolve().then(t.bind(t,90791))},90791:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>f});var s=t(95155),l=t(12115),r=t(52619),i=t.n(r),c=t(28913),d=t(93698),n=t(80003),o=t(57828),h=t(33162),m=t(69152),x=t(20017),p=t(17181),g=t(37135),u=t(6092),w=t(95058),j=t(53400),v=t(13125),N=t(65142);function f(){let[e,a]=(0,l.useState)(""),[t,r]=(0,l.useState)("all"),[f,k]=(0,l.useState)(!1),[y,b]=(0,l.useState)(()=>"true"===localStorage.getItem("watchHistoryPaused")),{items:C,removeItem:A,removeAllItems:_,loading:T}=(0,w.C)("watchlist",y),S=async()=>{if(!f){k(!0);try{await _()}finally{k(!1)}}},$=C.filter(e=>null==e?void 0:e.title).filter(e=>"all"===t||e.watchlistType===t).sort((e,a)=>{let t=new Date(e.addedAt||e.createdAt);return new Date(a.addedAt||a.createdAt).getTime()-t.getTime()}).filter(a=>{var t;return null==(t=a.title)?void 0:t.toLowerCase().includes(e.toLowerCase())}),D=$.reduce((e,a)=>{let t=new Date(a.addedAt);if(!isNaN(t.getTime())){let s=(0,c.GP)(t,"dd MMMM, yyyy");e[s]||(e[s]=[]),e[s].push(a)}return e},{});return(0,s.jsx)("div",{className:"mx-auto max-w-[1440px] bg-white px-4 md:px-6 lg:px-8 pt-20 pb-8 dark:bg-transparent",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-[1fr,400px]",children:[(0,s.jsxs)("div",{className:"order-2 lg:order-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 pb-4",children:[(0,s.jsxs)(v.$,{onClick:()=>r("all"),variant:"all"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)(n.A,{className:"h-4 w-4"}),"All"]}),(0,s.jsxs)(v.$,{onClick:()=>r("plan"),variant:"plan"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)(u.in_,{className:"h-4 w-4"}),"Plan to Watch"]}),(0,s.jsxs)(v.$,{onClick:()=>r("watching"),variant:"watching"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)(o.A,{className:"h-4 w-4"}),"Watching"]}),(0,s.jsxs)(v.$,{onClick:()=>r("hold"),variant:"hold"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)("svg",{stroke:"currentColor",fill:"none",strokeWidth:"1.5",viewBox:"0 0 24 24","aria-hidden":"true",height:"16",width:"16",xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.05 4.575a1.575 1.575 0 10-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 013.15 0v1.5m-3.15 0l.075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 013.15 0V15M6.9 7.575a1.575 1.575 0 10-3.15 0v8.175a6.75 6.75 0 006.75 6.75h2.018a5.25 5.25 0 003.712-1.538l1.732-1.732a5.25 5.25 0 001.538-3.712l.003-2.024a.668.668 0 01.198-.471 1.575 1.575 0 10-2.228-2.228 3.818 3.818 0 00-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0116.35 15m.002 0h-.002"})}),"On Hold"]}),(0,s.jsxs)(v.$,{onClick:()=>r("dropped"),variant:"dropped"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)(h.A,{className:"h-4 w-4"}),"Dropped"]}),(0,s.jsxs)(v.$,{onClick:()=>r("finished"),variant:"finished"===t?"default":"outline",size:"sm",className:"flex items-center gap-2",children:[(0,s.jsx)(m.A,{className:"h-4 w-4"}),"Finished"]})]}),Object.entries(D).sort((e,a)=>new Date(a[0]).getTime()-new Date(e[0]).getTime()).map((e,a)=>{let[t,l]=e;return(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"py-5 text-xl font-semibold text-gray-800 dark:text-gray-200",children:t}),(0,s.jsx)("ul",{className:"space-y-4",children:l.map(e=>{var a,t;let l=new Date(e.addedAt),r="Added ".concat((0,d.m)(l)," ago");return(0,s.jsxs)("li",{className:"relative",children:[(0,s.jsxs)(i(),{href:"/".concat(e.mediaType,"/").concat(e.mediaId),className:"group flex w-full items-center space-x-4 rounded-md bg-gray-100 transition-all hover:bg-gray-200 dark:bg-[#2a2a30] dark:hover:bg-gray-700",children:[(null==e||null==(a=e.backdrop_path)?void 0:a.startsWith("/"))?(0,s.jsx)("img",{src:(null==e?void 0:e.backdrop_path)?"https://image.tmdb.org/t/p/w500".concat(null==e?void 0:e.backdrop_path):"/placeholder.png",alt:e.title,className:"h-[80px] w-[120px] rounded-md object-cover lg:h-[100px] lg:w-[150px]"}):(0,s.jsx)("img",{src:null!=(t=e.backdrop_path)?t:"/placeholder.png",alt:e.title,className:"h-[80px] w-[120px] rounded-md object-cover lg:h-[100px] lg:w-[150px]"}),(0,s.jsxs)("div",{className:"flex-1 pr-12",children:[(0,s.jsx)("h3",{className:"line-clamp-2 text-lg font-semibold text-gray-800 dark:text-white",children:e.title}),(0,s.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e.mediaType.toUpperCase()}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:r})]})]}),(0,s.jsx)("div",{className:"absolute right-2 top-2",children:(0,s.jsxs)(j.rI,{children:[(0,s.jsx)(j.ty,{asChild:!0,children:(0,s.jsx)(v.$,{variant:"ghost",className:"h-8 w-8 p-0",children:(0,s.jsx)(x.A,{className:"h-4 w-4"})})}),(0,s.jsxs)(j.SQ,{align:"end",children:[(0,s.jsxs)(j._2,{onClick:()=>{navigator.share&&navigator.share({title:e.title,text:"Check out ".concat(e.title),url:"".concat(window.location.origin,"/").concat(e.mediaType,"/").concat(e.mediaId)})},children:[(0,s.jsx)(p.A,{className:"mr-2 h-4 w-4"}),"Share"]}),(0,s.jsxs)(j._2,{onClick:()=>A(e.mediaId,e.mediaType),className:"text-red-600 focus:text-red-600",children:[(0,s.jsx)(g.A,{className:"mr-2 h-4 w-4"}),"Remove"]})]})]})})]},e._id)})})]},a)}),0===$.length&&(0,s.jsx)("div",{className:"mt-10 h-screen text-center",children:(0,s.jsx)("p",{className:"text-gray-500 dark:text-gray-400",children:"Your watchlist is empty."})})]}
1),(0,s.jsxs)("div",{className:"order-1 h-full space-y-4 lg:order-2 lg:pt-8",children:[(0,s.jsx)(N.p,{type:"text",placeholder:"Search watchlist",value:e,onChange:e=>a(e.target.value),className:"w-full"}),(0,s.jsxs)(v.$,{onClick:S,disabled:f||T,className:"w-full border bg-transparent text-black hover:bg-transparent dark:text-white hover:dark:bg-transparent",children:[(0,s.jsx)(g.A,{className:"mr-2 h-5 w-5"}),f?"Clearing...":"Clear All Watchlist"]})]})]})})}}},e=>{e.O(0,[7405,2076,8096,7358],()=>e(e.s=43714)),_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.