1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8026],{33894:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wwf/create",function(){return t(95950)}])},80199:function(e,n,t){"use strict";var s=t(4637),r=t(65555),i=t(31824),a=t(2204),o=t(82187),l=t.n(o),c=t(21604),u=t.n(c),d=t(31505),f=t(59496),m=t(7744),v=function(e){var n,t=e.data,o=e.className,c=e.imageEndSlot,v=e.redirectUrl,g=void 0===v?(0,i.hv)(t):v,h=e.watchList,x=(0,d.useRouter)(),p=(0,f.useMemo)(function(){var e,n;return(null==t?void 0:null===(e=t.coverImage)||void 0===e?void 0:e.color)&&(0,i.qj)(t.coverImage.color,"#3a3939")?null===(n=t.coverImage)||void 0===n?void 0:n.color:"white"},[t]),N=(0,f.useMemo)(function(){return(0,a.YQ)(t,x.locale)},[t,null==x?void 0:x.locale]),j=(0,f.useState)(!1);return j[0],j[1],(0,s.jsxs)(f.Fragment,{children:[(0,s.jsxs)("div",{className:l()("relative aspect-w-2 aspect-h-3",o),children:[(0,s.jsx)("div",{className:"h-6 rounded-tl-md rounded-tr-md",style:{color:p},children:h?"":(0,s.jsxs)("div",{className:" z-10 absolute bottom bg-neutral-900 w-full px-2 py-0.5 flex flex-row [font-size:var(--step--1)]",style:{color:p},children:[(0,s.jsx)("div",{className:"flex flex-row",children:(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(m.kRm,{className:"mt-0.5"})," \xa0",(null==t?void 0:t.averageScore)!=null&&0!=t.averageScore?(t.averageScore/10).toFixed(1):"."]})}),(0,s.jsxs)("div",{className:"flex flex-row mx-auto md:pl-0.5",children:[(null==t?void 0:t.episodes)!=null&&0!=t.episodes&&"MOVIE"!==t.format?(0,s.jsxs)("div",{className:"flex",children:["EP \xa0",t.episodes]}):"",(0,s.jsx)("div",{className:"absolute right-0 pr-2",children:(null==t?void 0:t.format)!=null?t.format:"."})]})]})}),(0,s.jsx)(u(),{href:g,children:(0,s.jsxs)("a",{children:[(0,s.jsx)(r.Z,{src:(null==t?void 0:null===(n=t.coverImage)||void 0===n?void 0:n.extraLarge)||"icons/icon-512.jpg",layout:"fill",objectFit:"cover",className:"rounded-tl-md rounded-tr-md",alt:N}),c]})})]}),(0,s.jsx)("p",{className:"mt-2 font-semibold [font-size:var(--step--1)] md:[font-size:var(--step-0)] line-clamp-2",style:{color:p},children:N})]})};n.Z=f.memo(v)},33920:function(e,n,t){"use strict";var s=t(72006),r=t(4405),i=t(77637),a=t(4637),o=t(25761),l=t(59496),c=function(e){var n=e.onInView,t=e.onOutOfView,c=e.children,u=(0,i.Z)(e,["onInView","onOutOfView","children"]),d=(0,l.useRef)(null),f=(0,o.Z)(d,{rootMargin:"0px 0px 100px 0px"}),m=!!(null==f?void 0:f.isIntersecting);return(0,l.useEffect)(function(){m?null==n||n():null==t||t()},[m,n,t]),(0,a.jsx)("div",(0,r.Z)((0,s.Z)({ref:d},u),{children:c}))};n.Z=c},26639:function(e,n,t){"use strict";var s=t(72006),r=t(77637),i=t(4637),a=t(82187),o=t.n(a),l=t(59496),c=l.forwardRef(function(e,n){var t=e.label,a=e.containerClassName,l=e.containerInputClassName,c=e.labelClassName,u=e.LeftIcon,d=e.RightIcon,f=e.className,m=e.isSettingsOpen,v=e.setSettingsOpen,g=(0,r.Z)(e,["label","containerClassName","containerInputClassName","labelClassName","LeftIcon","RightIcon","className","isSettingsOpen","setSettingsOpen"]),h=function(){return v(function(e){return!e})};return(0,i.jsxs)("div",{className:a,children:[t&&(0,i.jsx)("p",{className:o()("mb-2 font-semibold",c),children:t}),(0,i.jsxs)("div",{className:o()("shadow flex items-center space-x-2 bg-background-800 focus:ring focus:ring-primary-500 focus:shadow-outline rounded",u||d?"px-3 py-2":"py-1",l),children:[u&&(0,i.jsx)(u,{className:"w-6 h-6"}),(0,i.jsx)("input",(0,s.Z)({ref:n,className:o()("bg-transparent appearance-none w-full text-gray-300 focus:outline-none leading-tight [font-size:var(--step-2)]",f)},g)),(0,i.jsx)("div",{onClick:h,className:m?"text-sky-500 font-bold rounded m-auto cursor-pointer":"text-neutral-300 font-bold rounded m-auto cursor-pointer",children:d&&(0,i.jsx)(d,{className:"w-6 h-6"})})]})]})});c.displayName="Input",n.Z=l.memo(c)},48294:function(e,n,t){"use strict";var s=t(72006),r=t(4405),i=t(77637),a=t(4637),o=t(82187),l=t.n(o),c=t(59496),u=function(e){var n=e.data,t=e.children,o=e.className,u=void 0===o?"":o,d=e.noListMessage,f=(0,i.Z)(e,["data","children","className","noListMessage"]),m=(0,c.useMemo)(function(){return u.includes("grid-cols")?u:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7"},[u]);return(0,a.jsx)("div",(0,r.Z)((0,s.Z)({className:l()(n&&n.length?"grid gap-4":"text-center",m)},f),{children:n&&n.length?n.filter(function(e){return e}).map(function(e,n){return(0,a.jsx)("div",{className:"col-span-1",children:t(e)},n)}):(0,a.jsx)("p",{className:"text-2xl",children:void 0===d?"No data found.":d})}))};n.Z=c.memo(u)},68527:function(e,n,t){"use strict";t.d(n,{j:function(){return u}});var s=t(72006),r=t(4405),i=t(77637),a=t(4637),o=t(82187),l=t.n(o),c=t(59496).forwardRef(function(e,n){var t=e.className,o=(0,i.Z)(e,["className"]);return(0,a.jsx)("div",(0,r.Z)((0,s.Z)({ref:n,className:l()(t)},o),{children:o.children}))});c.displayName="Skeleton";var u=function(e){var n=e.container,t=e.className,r=(0,i.Z)(e,["container","className"]);return(0,a.jsx)("div",(0,s.Z)({className:l()(!n&&"animate-pulse bg-white/20",t)},r))};n.Z=c},55800:function(e,n,t){"use strict";var s=t(4637);t(59496);var r=t(68527),i=function(){return(0,s.jsx)(r.Z,{children:(0,s.jsx)(r.j,{className:"aspect-w-9 aspect-h-16"})})};n.Z=i},161:function(e,n,t){"use strict";var s=t(4637),r=t(68527),i=t(55800),a=t(82187),o=t.n(a),l=t(59496),c=function(e){var n=e.className,t=void 0===n?"":n,a=e.children,c=(0,l.useMemo)(function(){return t.includes("grid-cols")?t:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 2xl:grid-cols-7"},[t]);return(0,s.jsx)(r.Z,{className:o()("grid gap-4",c),children:Array(15).fill(null).map(function(e,n){return(0,s.jsx)(r.j,{container:!0,className:"col-span-1",children:a?a():(0,s.jsx)(i.Z,{})},n)})})};n.Z=l.memo(c)},5792:function(e,n,t){"use strict";var s=t(57135),r=t(72006),i=t(4405),a=t(15767),o=t(75533),l=t(80938),c=t(76717),u=t(9102),d=function(e){var n,t=e.format,d=void 0===t?void 0:t,f=e.genres,m=void 0===f?[]:f,v=e.keyword,g=void 0===v?"":v,h=e.season,x=void 0===h?void 0:h,p=e.seasonYear,N=void 0===p?void 0:p,j=e.sort,w=void 0===j?l.Bg.Trending_desc:j,Z=e.limit,b=void 0===Z?30:Z,y=e.tags,I=void 0===y?[]:y,_=e.country,O=void 0===_?void 0:_,C=e.status,S=void 0===C?void 0:C,k=e.isAdult,E=void 0!==k&&k;return(0,u.useInfiniteQuery)(["browse",e],(n=(0,s.Z)(function(e){var n,t,s,u,f,v;return(0,a.__generator)(this,function(a){switch(a.label){case 0:if(t=void 0===(n=e.pageParam)?1:n,s=[],!g)return[3,2];return[4,c.supabaseClient.from("kaguya_translations").select("mediaId").eq("mediaType",l.DD.Anime).textSearch("title",g,{type:"plain"})];case 1:(null==(f=a.sent().data)?void 0:f.length)&&(s=f.map(function(e){return e.mediaId})),a.label=2;case 2:return[4,(0,o.X2)((0,i.Z)((0,r.Z)({format:d,season:x,seasonYear:N,perPage:b,countryOfOrigin:O,sort:[w],status:S,page:t,type:l.DD.Anime},(null==s?void 0:s.length)&&{id_in:s},(null==I?void 0:I.length)&&{tag_in:I},(null==m?void 0:m.length)&&{genre_in:m},g&&!(null==s?void 0:s.length)&&{search:g}),{isAdult:E||m.includes("Hentai")||m.includes("Ecchi")}))];case 3:return[2,a.sent()]}})}),function(e){return n.apply(this,arguments)}),{getNextPageParam:function(e){return e.pageInfo.hasNextPage?e.pageInfo.currentPage+1:null}})};n.Z=d},25761:function(e,n,t){"use strict";var s=t(59072),r=t(59496);n.Z=function(e,n){var t=n.threshold,i=void 0===t?0:t,a=n.root,o=void 0===a?null:a,l=n.rootMargin,c=void 0===l?"0%":l,u=n.freezeOnceVisible,d=(0,r.useState)(),f=d[0],m=d[1],v=(null==f?void 0:f.isIntersecting)&&void 0!==u&&u,g=function(e){m((0,s.Z)(e,1)[0])};return(0,r.useEffect)(function(){var n=null==e?void 0:e.current;if(window.IntersectionObserver&&!v&&n){var t=new IntersectionObserver(g,{threshold:i,root:o,rootMargin:c});return t.observe(n),function(){return t.disconnect()}}},[e,JSON.stringify(i),o,c,v]),f}},95950:function(e,n,t){"use strict";t.r(n);var s=t(4637),r=t(80199),i=t(35944),a=t(26639),o=t(33920),l=t(48294),c=t(49192),u=t(161),d=t(5792),f=t(80938),m=t(31824),v=t(28708),g=t(59496),h=t(77129),x=function(){var e=(0,g.useState)(""),n=e[0],t=e[1],x=(0,v.$G)("wwf").t,p=(0,d.Z)({keyword:n,sort:f.Bg.Trending_desc}),N=p.data,j=p.isLoading,w=p.fetchNextPage,Z=p.isFetchingNextPage,b=p.hasNextPage,y=p.isError,I=(0,g.useCallback)(function(){!Z&&b&&w()},[w,b,Z]),_=(0,m.Ds)(function(e){return t(e.target.value)},500),O=(0,g.useMemo)(function(){return null==N?void 0:N.pages.flatMap(function(e){return e.media})},[null==N?void 0:N.pages]);return(0,s.jsxs)(c.Z,{className:"py-20",children:[(0,s.jsx)(i.Z,{title:x("choose_page_title"),description:x("cho
1ose_page_description")}),(0,s.jsx)("h1",{className:"text-4xl font-semibold mb-8",children:x("choose_page_heading")}),(0,s.jsx)(a.Z,{containerInputClassName:"border border-white/80",LeftIcon:h.RB5,onChange:_,defaultValue:n,label:x("common:search"),containerClassName:"w-full md:w-1/3 mb-8"}),j?(0,s.jsx)(u.Z,{}):(0,s.jsxs)(g.Fragment,{children:[(0,s.jsx)(l.Z,{data:O,children:function(e){return(0,s.jsx)(r.Z,{data:e,redirectUrl:"/wwf/create/".concat(e.id)})}}),Z&&!y&&(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(u.Z,{})}),(O.length&&!Z||b)&&(0,s.jsx)(o.Z,{onInView:I}),!b&&!!O.length&&(0,s.jsx)("p",{className:"mt-8 text-2xl text-center",children:"Hết rá»i..."})]})]})};n.default=x},32461:function(e,n,t){e.exports=t(12729)},66091:function(e,n,t){"use strict";function s(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}t.d(n,{Z:function(){return s}})}},function(e){e.O(0,[6052,9774,2888,179],function(){return e(e.s=33894)}),_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.