(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4613],{23670:(e,t,r)=>{Promise.resolve().then(r.bind(r,27904)),Promise.resolve().then(r.bind(r,74229)),Promise.resolve().then(r.bind(r,28172)),Promise.resolve().then(r.bind(r,66964)),Promise.resolve().then(r.bind(r,44582)),Promise.resolve().then(r.bind(r,60567)),Promise.resolve().then(r.bind(r,98572)),Promise.resolve().then(r.bind(r,69348)),Promise.resolve().then(r.bind(r,69538)),Promise.resolve().then(r.bind(r,23350)),Promise.resolve().then(r.bind(r,60988)),Promise.resolve().then(r.bind(r,40992)),Promise.resolve().then(r.bind(r,89556)),Promise.resolve().then(r.t.bind(r,89143,23)),Promise.resolve().then(r.t.bind(r,46064,23))},27904:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(72560),n=r(32957),i=r(39674),s=r(87715),l=r(44731),c=r(24624);function o(e){let{name:t}=e,r=(0,n.wR)(),[o,d]=(0,i.Ay)("chapter:margin","5"),[u,h]=(0,i.Ay)("chapter:lazy","1");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.r9,{children:"\n          :root {\n            --chapter-margin: ".concat(o,"px;\n          }\n        ")},o),(0,a.jsxs)("div",{className:"py-1",children:[(0,a.jsx)("h1",{className:"text-[22px] text-tertiary-300",children:t}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsxs)("form",{className:(0,c.cn)("space-y-1.5","*:multi-[flex;gap-1;items-center;justify-center]","[&_label]:multi-[text-white;font-bold;text-sm]"),children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:"LOAD ALL IMAGES AT ONCE:"}),r?(0,a.jsx)("span",{className:"h-5 w-10 animate-pulse rounded-full bg-white/30"}):(0,a.jsx)(s.dO,{type:"submit",value:"1"===u,onChange:e=>h(String(+e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:"IMAGES MARGIN:"}),r?(0,a.jsx)("select",{className:"min-w-[38px]",children:(0,a.jsx)("option",{})}):(0,a.jsx)("select",{className:"rounded-sm",value:o,onChange:e=>{let t=parseInt(e.target.value);d("".concat(t))},children:Array.from({length:11}).map((e,t)=>(0,a.jsx)("option",{children:t},t))})]},o)]})})]})]})}},74229:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var a=r(72560),n=r(15282),i=r(2415),s=r(98199),l=r(24624);function c(e){let{chapter:t}=e;return(0,a.jsx)("div",{className:"bg-tertiary-600 px-3 py-2",children:(0,a.jsxs)(s.BI,{color:"tertiary-2",children:[(0,a.jsxs)(n.Qp,{children:[(0,a.jsx)(i.N,{href:"/".concat(t.comic.slug),children:t.comic.name}),(0,a.jsx)("span",{className:(0,l.cn)("i-lucide-chevrons-right translate-y-0.5 inline-block px-2")})]}),(0,a.jsx)(n.Qp,{children:(0,a.jsx)(i.N,{children:t.name})})]})})}},28172:(e,t,r)=>{"use strict";r.d(t,{ChapterControlsSkeleton:()=>m,default:()=>h});var a=r(72560),n=r(55164),i=r(89143),s=r.n(i),l=r(70504),c=r(25152),o=r(57320),d=r(74987),u=r(24624);function h(e){let{chapter:t}=e,{data:r=[]}=(0,c.useSuspenseQuery)({queryKey:[t.comic._id,o.R.CHAPTER_LIST],queryFn:async e=>{let{queryKey:[t],signal:r}=e,{data:a}=await (0,d.Vr)({signal:r,path:{comicId:t},query:{orderDirection:"desc"}});return null==a?void 0:a.data}}),{prev:i,next:h}=(0,n.useMemo)(()=>{let e=r.findIndex(e=>{let{slug:r}=e;return r===t.slug});return{prev:r[e+1],next:r[e-1]}},[t.slug,r]);return(0,a.jsxs)("div",{className:(0,u.cn)("flex gap-1 gap-y-2 bg-black px-2 py-2.5 text-xsm","flex-row max-[712px]:multi-[`flex-col;[&>*]:w-full`]"),children:[(0,a.jsx)("form",{action:"/",className:"w-[400px]",children:(0,a.jsx)("select",{defaultValue:t.slug,className:"w-full rounded-sm py-px",onChange:e=>{(0,l.redirect)("/".concat(t.comic.slug,"/").concat(e.target.value))},children:r.map(e=>(0,a.jsx)("option",{value:e.slug,children:e.name},e.slug))})}),(0,a.jsxs)("div",{className:(0,u.cn)("flex gap-1 justify-center shrink-0","uppercase font-medium text-white","*:multi-[flex;items-center;gap-1;bg-secondary;px-2]","[&>a:hover_[aria-label]]:text-primary-200","[&>a[aria-disabled=true]]:multi-[pointer-events-none;opacity-60]"),children:[(0,a.jsxs)(s(),{href:"/".concat(t.comic.slug,"/").concat(null==i?void 0:i.slug),"aria-disabled":!i,children:[(0,a.jsx)("span",{className:"i-lucide-circle-chevron-left"}),(0,a.jsx)("span",{"aria-label":"Prev",children:"Prev Chapter"})]}),(0,a.jsxs)(s(),{href:"/".concat(t.comic.slug,"/").concat(null==h?void 0:h.slug),"aria-disabled":!h,children:[(0,a.jsx)("span",{"aria-label":"Next",children:"Next Chapter"}),(0,a.jsx)("span",{className:"i-lucide-circle-chevron-right"})]})]})]})}function m(){return(0,a.jsxs)("div",{className:"mt-1 flex h-8 max-w-full gap-1.5 overflow-hidden contain-size",children:[(0,a.jsx)("div",{className:"h-full w-[400px] animate-pulse bg-white/20"}),(0,a.jsxs)("div",{className:"flex h-full w-[300px] gap-1 *:multi-[flex-1;animate-pulse;bg-white/20]",children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]})]})}},66964:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var a=r(72560),n=r(32957),i=r(39674);function s(e){let t=(0,n.wR)(),[r]=(0,i.Ay)("chapter:lazy","1");return t?(0,a.jsx)("img",{...e,alt:e.alt,loading:"high"===e.fetchPriority?"eager":"lazy"}):(0,a.jsx)("img",{...e,alt:e.alt,loading:"1"===r?void 0:"high"===e.fetchPriority?"eager":"lazy"})}},60567:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var a=r(72560),n=r(55164);function i(){let e=(0,n.useRef)(null),[t,r]=(0,n.useState)("desktop"),i=()=>{switch(t){case"mobile":return{width:300,height:250};case"tablet":return{width:468,height:60};default:return{width:728,height:90}}},s={key:"54023d4e743c4c626795da312196937d",format:"iframe",...i(),params:{}};return(0,n.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 767px)"),t=window.matchMedia("(min-width: 768px) and (max-width: 1023px)");e.matches?r("mobile"):t.matches?r("tablet"):r("desktop")};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,n.useEffect)(()=>{if(e.current&&!e.current.firstChild){let t=document.createElement("script"),r=document.createElement("script");r.type="text/javascript",r.src="//www.highperformanceformat.com/".concat(s.key,"/invoke.js"),t.innerHTML="atOptions = ".concat(JSON.stringify(s)),e.current.append(t),e.current.append(r)}},[s]),(0,a.jsx)("div",{ref:e,className:"mx-auto my-4",style:{width:"100%",maxWidth:"".concat(i().width,"px"),height:"".concat(i().height,"px")}})}},98572:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(55164);let n=e=>{let{adId:t="2381407"}=e,[r,n]=(0,a.useState)("desktop");return(0,a.useEffect)(()=>{let e=()=>{let e=window.matchMedia("(max-width: 767px)"),t=window.matchMedia("(min-width: 768px) and (max-width: 1023px)");e.matches?n("mobile"):t.matches?n("tablet"):n("desktop")};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),null}},44731:(e,t,r)=>{"use strict";r.d(t,{pd:()=>a.default,e$:()=>l,r9:()=>c.default,eq:()=>o.default});var a=r(69348),n=r(72560),i=r(24624),s=r(89556);function l(e){let{emblaApi:t}=e,{prevBtnDisabled:r,nextBtnDisabled:a,onNextButtonClick:l,onPrevButtonClick:c}=(0,s.usePrevNextButtons)(t);return(0,n.jsxs)("div",{className:(0,i.cn)("contents","text-white text-3xl leading-none","*:multi-[absolute;top-[40%];-translate-y-1/2;bg-black/50;py-4;transition]","[&>*:hover]:bg-black/60","[&>*:disabled]:multi-[opacity-60;pointer-events-none]"),children:[(0,n.jsx)("button",{className:"left-0",onClick:c,disabled:r,children:(0,n.jsx)("span",{className:"i-lucide-chevron-left"})}),(0,n.jsx)("button",{className:"right-0",onClick:l,disabled:a,children:(0,n.jsx)("span",{className:"i-lucide-chevron-right"})})]})}var c=r(69538);r(23350);var o=r(60988);r(40992)},55257:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(72560),n=r(15282),i=r(2415),s=r(24624);function l(e){let{children:t,title:r,color:l}=e;return(0,a.jsxs)(n.BI,{className:(0,s.cn)("flex text-sm font-medium overflow-hidden contain-inline-size",{"text-tertiary":"tertiary-1"===l,"bg-tertiary-600 text-white":"tertiary-2"===l},"[&_.react-aria-Breadcrumb]:whitespace-nowrap","[&_.react-aria-Breadcrumb:last-child]:truncate","[&_.react-aria-Breadcrumb:hover]:text-primary-200"),children:[(0,a.jsxs)(n.Qp,{children:[(0,a.jsx)(i.N,{href:"/",children:r||"Read Manga Online"}),(0,a.jsx)("span",{className:(0,s.cn)("i-lucide-chevrons-right translate-y-0.5 inline-block px-2",{"text-slate-600":"tertiary-1"===l})})]}),t]})}},98199:(e,t,r)=>{"use strict";r.d(t,{BI:()=>a.default});var a=r(55257);r(2100),r(35949)},2100:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var a=r(72560),n=r(55164),i=r(24624);function s(e){let{children:t,maxHeight:r=100}=e,s=(0,n.useId)();return(0,a.jsxs)("div",{children:[(0,a.jsx)("input",{id:s,type:"checkbox",className:"peer/more hidden"}),(0,a.jsx)("div",{"aria-label":"content",style:{maxHeight:r},className:(0,i.cn)("overflow-hidden relative","peer-checked/more:!max-h-none","after:multi-[absolute;w-full;h-[40px];left-0;bottom-0;bg-[linear-gradient(to_top,_white_,transparent)]]","peer-checked/more:after:hidden"),children:t}),(0,a.jsx)("div",{className:(0,i.cn)("mx-auto flex max-w-[50%] justify-center mt-2","border-t border-dashed border-red-500","peer-checked/more:multi-[`[&_[aria-label=more]]:hidden;[&_[aria-label=less]]:block`]"),children:(0,a.jsxs)("label",{htmlFor:s,className:(0,i.cn)("cursor-pointer font-medium uppercase","text-red-500 hover:text-primary-200","select-none"),children:[(0,a.jsx)("span",{"aria-label":"more",children:"Show More ⇩"}),(0,a.jsx)("span",{"aria-label":"less",className:"hidden",children:"Show Less ⇧"})]})})]})}},35949:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var a=r(72560),n=r(55164),i=r(70504),s=r(15243),l=r(24624);function c(e){let{page:t,total:r=0,totalPage:c=0,path:o}=e,d=(0,i.useSearchParams)(),u=(0,n.useCallback)(e=>{let t=new URLSearchParams(d.toString());e>1?t.set("page",String(e)):t.delete("page");let r=t.toString()?"?".concat(t.toString()):"";return"".concat(o).concat(r)},[o,d]),h=(0,n.useMemo)(()=>(function(e,t){let r=[];if(t<=5){for(let e=1;e<=t;e++)r.push(e);return r}let a=e-Math.floor(2.5),n=e+Math.floor(2.5);a<1&&(a=1,n=5),n>t&&(n=t,a=t-5+1);for(let e=a;e<=n;e++)r.push(e);return r})(t,c),[t,c]);return(0,a.jsxs)("div",{className:(0,l.cn)("flex flex-wrap gap-1 items-center justify-between font-bold text-[11px] leading-none uppercase"),children:[(0,a.jsx)("span",{className:"hidden items-center justify-center bg-tertiary-600 px-2 py-2.5 text-white min-[410px]:flex",children:(0,a.jsxs)("span",{children:["Total:"," ",(0,s.A)(r).format({thousandSeparated:!0})]})}),(0,a.jsxs)("div",{className:(0,l.cn)("space-x-1","*:multi-[inline-block;text-center;px-3;py-2.5;h-full;uppercase]","[&>*:hover]:shadow-[inset_0_0_0_4px_#dca2a2]"),children:[(0,a.jsx)("a",{href:u(1),"aria-disabled":1===t,className:"bg-tertiary-600 text-white aria-disabled:cursor-default",children:"First(1)"}),h.map(e=>(0,a.jsx)("a",{href:u(e),"aria-current":t===e,className:"min-w-[32px] bg-white aria-[current=true]:multi-[text-white;bg-tertiary-600;cursor-default]",children:(0,s.A)(e).format({thousandSeparated:!0})},e)),(0,a.jsxs)("a",{href:u(c),"aria-disabled":t===c,className:"bg-tertiary-600 text-white aria-disabled:cursor-default",children:["Last(",(0,s.A)(c).format({thousandSeparated:!0}),")"]})]})]})}},57320:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});let a={GENRE_LIST:["genre-list"],CHAPTER_LIST:"chapter-list"}},39674:(e,t,r)=>{"use strict";t.Ay=function(e,t){var r,i=function(e){if(Array.isArray(e))return e}(r=(0,a.useState)(function(){return c(e,t)}))||function(e,t){var r,a,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],s=!0,l=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),2!==i.length);s=!0);}catch(e){l=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(l)throw a}}return i}}(r,2)||function(e,t){if(e){if("string"==typeof e)return n(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,2)}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=i[0],d=i[1],u=(0,a.useCallback)(function(){d(void 0),o(e)},[e]);return[s,(0,a.useCallback)(function(t,r){d(t),l(e,t,r)},[e]),u]};var a=r(55164);function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}var s="undefined"!=typeof window,l=function(e,t,r){if(s){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var a;a=r[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({days:7,path:"/"},r),n=new Date(Date.now()+864e5*a.days).toUTCString();document.cookie=e+"="+encodeURIComponent(t)+"; expires="+n+Object.keys(a).reduce(function(e,t){return"days"===t?e:!1===a[t]?e:!0===a[t]?"".concat(e,"; ").concat(t):"".concat(e,"; ").concat(t,"=").concat(a[t])},"")}},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return s&&document.cookie.split("; ").reduce(function(t,r){var a=r.split("=");return a[0]===e?decodeURIComponent(a[1]):t},"")||t},o=function(e){document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}},44582:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>a});let a={src:"/_next/static/media/go-home.279bfe9d.png",height:200,width:200,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAOVBMVEWGjYCDiH1eYltKS0hscWidn5shIiARERAAAACSlJCtrqzCxcEzNTFRUk95fnSNkYg/Qj1qamkEBATbAd7vAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAO0lEQVR4nBXBiRHAIAgAwUMBA75J/8Vm3GUWRQQYNWwH4MOyd6D5KUV1UeOtumQzwyKzG+3ycXiur/kPOPIBz15XOzgAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}}},e=>{var t=t=>e(e.s=t);e.O(0,[5666,4248,5738,3764,5637,7867,9143,3571,5282,5152,4987,7315,1611,9088,7358],()=>t(23670)),_N_E=e.O()}]);