trackkun-dom 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1 +1 @@
1
- (function(B,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(B=typeof globalThis<"u"?globalThis:B||self,L(B._trackkun_={}))})(this,function(B){"use strict";function L(a){let e=!1;return new Promise((t,r)=>{Promise.all(a.map(async n=>{const s=await n;!e&&s&&(e=!0,t(s))})).then(()=>{e||t(void 0)})})}function W(a,{removeTrailingSlash:e=!0}={}){if(!a)return;const t=e&&a.endsWith("/")?a.slice(0,-1):a;try{return new URL(t)}catch{return}}function $(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?W(a)?.pathname:a.startsWith("//")?W(`https:${a}`)?.pathname:a}async function x(a,e,t){const r=await t(()=>{a=0});if(r!==void 0)return r;if(!(a<=0))return await new Promise(n=>{setTimeout(async()=>{const s=await x(a-1,e,t);n(s)},e)})}async function C(a,e,t=0){const r=e.root??document.documentElement,n=e.timeoutMs??1e4;return x(e.lazy===!0?n/50:0,50,()=>{const s=e.all===!0?Array.from(r.querySelectorAll(a)):r.querySelector(a)??void 0;return(e.all?!s?.length:!s)?void 0:s})}const Re={text:$e,attr:Se,"attr-contain":Ce,value:xe,row:De};function h(a,e={}){if(!a)return;const{root:t=document.documentElement,returnAll:r,preProcess:n}=e,s=a.split("||").map(p=>p.trim()).filter(p=>!!p&&p.includes("|"));if(s.length>1){for(let p=0;p<s.length;p+=1){const g=h(s[p],e);if(g?.length)return g}return}const[i,o]=a.split("|");if(!o)return;const l=(o?.startsWith("[")&&o.endsWith("]")?o.substring(1,o.length-1).split(","):[o]).map(p=>{const g=p.indexOf(":"),f=g!==-1;return{action:f?p.substring(0,g):p,param:f?p.substring(g+1):""}}),c=i?Array.from(t.querySelectorAll(i)):[t];if(!c.length)return r?[]:void 0;n&&n(c);const u=[];for(const p of c)for(const g of l){const f=Re[g.action],m=f(p,g.param);if(m){if(r){u.push(m);break}return m}}return r?u:void 0}function $e(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>j(e.textContent)).filter(Boolean).join(" ").trim()||j(a.textContent)}function Se(a,e){return j(a.getAttribute(e))}function Ce(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(n=>n.includes(e));r&&(t=a.getAttribute(r))}return j(t)}function xe(a){return a.value}function De(a,e){if(!e)return;const t=j(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return j(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function j(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var Te=(a=>(a[a.reading=1]="reading",a[a.paused=2]="paused",a[a.plan=3]="plan",a[a.completed=4]="completed",a[a.dropped=5]="dropped",a[a.deleted=6]="deleted",a))(Te||{}),U=(a=>(a.id="id",a.name="name",a.slug="slug",a))(U||{}),F=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(F||{}),Me=(a=>(a[a.string=1]="string",a[a.number=2]="number",a[a.bool=3]="bool",a[a.selection=4]="selection",a))(Me||{}),Pe=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Pe||{});const _e=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,Ne=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,Ie=/\d+([_-~,.]\d+)?/,Be=/[_-~,]/;function P(a){if(!a||!a)return;if(!isNaN(+a))return{chap:+a};const e=a.match(_e),t=e?.[0]?a.replace(e[0],"").trim():a,r=t.match(Ne),n=t.match(Ie),s=r?.[6]??n?.[0];if(!s)return;const i=+s.replace(Be,".");if(isNaN(i))return;const o=e?.[4];return{vol:o&&!isNaN(+o)?+o:void 0,chap:i}}function _(a){return a.sort((e,t)=>e.vol===void 0||t.vol===void 0?t.chap-e.chap:t.vol-e.vol||t.chap-e.chap),Le(a)}function Le(a){const e={};for(let t=a.length-1;t>=0;t--){const r=a[t],n=r.lang??"";r.vol!==void 0?e[n]=r.vol:e[n]!==void 0&&(r.inferVol=e[n])}return a}const je=[{regex:/(sec|giây)/,seconds:1},{regex:/(min|phút)/,seconds:60},{regex:/(hour|giờ)/,seconds:3600},{regex:/(day|ngày)/,seconds:86400},{regex:/(week|tuần)/,seconds:604800},{regex:/(month|tháng)/,seconds:2592e3},{regex:/(year|năm)/,seconds:31536e3}];function G(a){const e=a?.toLowerCase();if(!e||e.includes("now"))return Date.now();if(e.includes("yesterday"))return Date.now()-864e5;const t=new Date(e);if(t instanceof Date){const s=t.valueOf();if(!isNaN(s))return t.getHours()===0&&t.getMinutes()===0?Math.min(Date.now(),s+432e5):s}const r=je.find(s=>s.regex.test(e));if(!r)return;const n=e.split(" ").filter(Boolean);for(let s=0;s<n.length;s++){const i=n[s],o=i==="a"||i==="an"?1:+i;if(!o)continue;if(o<0)return;const l=Date.now()-o*r.seconds*1e3;return l>0?l:void 0}}function V(a,e=location.origin){if(!a)return;const t=new URL(a.startsWith("//")?`${location.protocol}${a}`:a,location.origin+location.pathname).toString();return t.startsWith(e)?t.replace(e,""):t}function Y(a,e){if(!a)return"/";const t=a.replace("{titleSlug}",e),r=t.endsWith("/")?t:t+"/";return r.startsWith("/")?r:"/"+r}function Ae(a,e){const t=[...e],r=[];let n=-1,s=-1;for(let o=0;o<a.length&&!(!t.length&&o>=10);o++){const l={...a[o]},c=t.findIndex(g=>g.slug===l.slug&&g.name===l.name),u=c===-1?void 0:t.splice(c,1)[0],p=!u||u.chapters[0]?.chap!==l.chapters[0]?.chap;c!==-1&&(s=o),p&&(n=o,l.changed=!0),r.push(l)}if(n===-1)return[];if(t.length&&t.length!==e.length){const o=Math.max(10,s+1);r.splice(o);for(let l=s+1;l<r.length;l++)r[l].changed=!1;return r}const i=Math.min(Math.max(n+1,10),Math.max(s+1,100));return r.slice(0,i)}function Oe(a,e){const t={};return a.forEach(r=>{const n=r.chapters.reduce((s,i)=>{const o=i.lang||e||"";return s[o]||(s[o]=[]),s[o].push(i),s},{});Object.entries(n).forEach(([s,i])=>{const o=`${r.slug}:${s}`;t[o]?(t[o].chapters.push(...i),_(t[o].chapters)):t[o]={...r,lang:s===""?void 0:s,chapters:i}})}),Object.values(t)}var b=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))(b||{}),ke=Object.defineProperty,ze=(a,e,t)=>e in a?ke(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,N=(a,e,t)=>(ze(a,typeof e!="symbol"?e+"":e,t),t);class z{constructor(e){N(this,"spec"),N(this,"siteMeta"),N(this,"tags"),N(this,"context"),N(this,"methodsMap",{[b.title]:()=>this.getRawTitleData(),[b.reader]:()=>this.getRawReaderData(),[b.releases]:()=>this.getRawReleasesData(),[b.search]:()=>this.getRawSearchData(),[b.chapters]:()=>this.getRawChaptersData()}),N(this,"normalizedTagsMap"),this.spec=e.spec,this.siteMeta=e.siteMeta,this.tags=e.tags,this.context=e.context}async getRawSearchData(){throw new Error("Unimplemented")}async getRawPageByType(e,t=!1){const r=await this.methodsMap[e](),n=!r&&qe(this.spec);if(t&&!r&&!n)return;const s=location.origin+location.pathname;return{type:e,is404:n,specId:this.spec.id,siteName:h(this.spec.name),url:s,data:r,spec:this.spec,context:this.context}}resolveReaderSlug(e,t,r){const n=t.endsWith("/")?t.slice(0,-1):t;return n.startsWith(e)?n.replace(e,""):n}resolveTitleSlug(e){if(typeof e!="string")return;const t=$(e)?.split("/").filter(Boolean);return!t||!t.length?e:t[t.length-1]}finalizeRawReleasesData(e){const t=this.spec.releases?.title?.lang?this.siteMeta.defaultLang:void 0,r=Oe(e.rawReleases,t);if(r.length)return{rawReleases:this.context?.oldRawReleases?Ae(r,this.context.oldRawReleases):r}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=Ee(this.tags)),r=e.map(n=>t[J(n)]).filter(Boolean);return r.length===0?void 0:Array.from(new Set(r)).sort((n,s)=>n-s)}}N(z,"specId");function Ee(a){const e={};return a.forEach(({id:t,name:r,altNames:n})=>{e[J(r)]=t,n&&n.forEach(s=>{e[J(s)]=t})}),e}function J(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}function qe(a){return a[404]&&document.querySelector(a[404])?!0:document.title.toLowerCase().includes("not found")}class R extends z{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await C(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const n=r.slice(0,100).map(i=>{const o=h(t.url,{root:i}),l=$(o),c=h(t.name,{root:i}),u=h(t.at,{root:i});if(!(!l||!c))return{titleEl:i,id:h(t.id,{root:i}),path:l,name:c,lang:h(t.lang,{root:i})?.toLowerCase(),at:u?G(u):void 0}}).filter(Boolean);if(!n.length)return;const s=[];return await Promise.all(n.map(async i=>{const{path:o,titleEl:l,lang:c,at:u,...p}=i,g=this.resolveTitleSlug(o);if(!g)return;const f=await this.getChapters(e,{root:l,titleSlug:g})??[];s.push({slug:g,chapters:c||u?f.map(m=>({...m,lang:m.lang??c,ts:m.ts??u})):f,...p})})),this.finalizeRawReleasesData({rawReleases:s})}async getRawTitleData(){const e=this.spec.title;if(!e||e.sel&&!await C(e.sel,{lazy:!!e.lazy}))return;const t=h(e.name);if(!t){await new Promise(l=>setTimeout(l,9e4));return}const r=this.resolveTitleSlug(location.pathname);if(!r)return;let n=h(e.tags,{returnAll:!0})??[];n.length===1&&(n=n[0].split(",").map(l=>l.trim()).filter(Boolean));const s=h(e.type),i=h(e.langs,{returnAll:!0})?.map(l=>l.toLowerCase()),o=await this.getChapters(e.chapter,{lazy:!0,titleSlug:r})??[];return{id:h(e.id),url:location.origin+location.pathname,slug:r,name:t,langs:i?.length?i:e.langs&&this.siteMeta.defaultLang?[this.siteMeta.defaultLang]:void 0,tags:this.getTagIdsFromNames([...n??[],...s?[s]:[]]),chapters:o,img:V(h(e.img))}}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await R.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await R.verifyImgsLocator(r)))return;const n=e.reader.title,s=document.querySelector(n.sel);if(!s)return;const i=h(n.name,{root:s}),o=h(n.url,{root:s}),l=this.resolveTitleSlug(o),c=h(n.img,{root:s});if(!i||!o||!l)return;const u=!!this.context?.disableLazyChapters,p=await this.getChapters(e.reader?.chapter,{titleSlug:l,lazy:!u,timeoutMs:12e4})??[],g=h(e.reader.label)?.toLowerCase().replace(i.toLowerCase(),"");if(!g)return;const{vol:f,chap:m=0}=P(g)||{},w=Y(t.readerBase,l),v=t.readerBase.split("/").indexOf("{lang}"),y=v!==-1?location.pathname.substring(1).split("/")[v]?.toLowerCase():void 0,d=y?w.replace("{lang}",y):w,T=y??h(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0);return this.finalizeRawReaderData({vol:f,chap:m,lang:T,slug:this.resolveReaderSlug(d,location.pathname,location.href),basePath:d,imgsLocator:e.reader.imgs,title:{id:h(n.id),url:o,slug:l,name:i,langs:T?[T]:void 0,img:V(c),chapters:p,hasMoreChapters:!p.length&&u}},{prevSlug:this.findNeighborChapter({sel:e.reader.prev,basePath:d}),nextSlug:this.findNeighborChapter({sel:e.reader.next,basePath:d})})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===F.blank)return;const t=e===F.reader?(await this.getRawReaderData())?.title:await this.getRawTitleData();if(!t)return;const r=this.context?.lang,{chapters:n}=t,s=r?n.filter(i=>!i.lang||i.lang===r):n;return{chapters:s,title:{...t,chapters:[]},hasMore:!1,asc:!1,total:s.length}}async getRawSearchData(){const e=this.spec.search?.title;if(!e)return;const{chapter:t}=e,r=[];return await Promise.all(Array.from(document.querySelectorAll(e.sel)).map(async n=>{const s=h(e.url,{root:n}),i=$(s),o=h(e.name,{root:n}),l=this.resolveTitleSlug(i);!i||!o||!l||r.push({slug:l,name:o,chapters:await this.getChapters(t,{root:n,titleSlug:l})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t=document.documentElement,titleSlug:r="",lazy:n=!0,timeoutMs:s}){if(!e)return;const i=[],o=await C(e.sel,{root:t,all:!0,lazy:n,timeoutMs:s});if(!o?.length)return i;const l=(o??[]).map(w=>({id:h(e.id,{root:w}),label:h(e.label,{root:w}),url:h(e.url,{root:w}),at:h(e.at,{root:w})})),c=l.map(({label:w})=>P(w)),u=c[1]?.chap;!c[0]&&(u===void 0||u<=1)&&(c[0]={chap:0});const{readerBase:p}=this.siteMeta,g=Y(p,r),f=p.split("/").indexOf("{lang}"),m=f!==-1;return c.forEach((w,v)=>{if(!w)return;const{id:y,url:d,at:T}=l[v],A=d?.startsWith("http")&&!d.startsWith(location.origin),O=A?d:$(d);if(!O)return;const k=!A&&m?O?.substring(1).split("/")[f]?.toLowerCase():void 0,S=A?O:this.resolveReaderSlug(k?g.replace("{lang}",k):g,O,d);i.push({...w,id:y,slug:S,lang:k,ts:G(T)||i[i.length+1]?.ts||Date.now()})}),_(i)}static async isReaderPage(e){return!!e.sel&&!!await C(e.sel,{lazy:!!e.lazy})}static async verifyImgsLocator(e){const t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>`${r} img, ${r} canvas`).join(",");return!!await C(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=h(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const n=$(r);return n?this.resolveReaderSlug(t,n,r):void 0}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const n=e.title?.chapters;if(!n?.length){const c=P(t),u=P(r);return!c&&!u?e:{...e,prev:c?{...c,slug:t}:void 0,next:u?{...u,slug:r}:void 0}}let s,i,o,l;for(let c=0;c<n.length&&!(s&&(!t||o)&&!r&&l);c++){const u=n[c];!s&&(e.slug==u.slug||e.chap===u.chap&&(e.vol===u.vol||e.vol===void 0))?(s=u,i=c):!o&&t===u.slug?o=u:!l&&r===u.slug&&(l=u)}return i!==void 0&&(o??(o=n[i+1]),l??(l=n[i-1])),{...e,inferVol:s?.inferVol,prev:o,next:l}}}var We=Object.defineProperty,Ue=(a,e,t)=>e in a?We(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Fe=(a,e,t)=>(Ue(a,typeof e!="symbol"?e+"":e,t),t);class Q extends R{resolveTitleSlug(e){return $(e)?.split("/").filter(Boolean)[1]}}Fe(Q,"specId","bato");function Ve(){return Math.random().toString(16).slice(2)}async function Je({addListener:a,removeListener:e,transform:t,filter:r,handler:n,onTimeout:s,timeout:i,once:o}){return new Promise(l=>{a(p);const c=()=>o===!0&&e(p),u=i?setTimeout(()=>{c(),l(void 0),s?.()},i):void 0;async function p(g,...f){g=t?t(g):g,g!==void 0&&(!r||r(g,...f))&&(c(),l(g),n?.(g,...f),u&&clearTimeout(u))}})}async function He(a){return(await Je({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function Xe(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:n,args:s}=a,i={reqId:Ve(),event:n,args:s};return(e||window)?.postMessage(i,r??"*"),(await He({filter:o=>o?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const D={isAny:!0};function M(a,...e){return Xe({event:"tk:fetchResult",args:{baseUrl:a,segments:e}})}function Ge(a){if(a)try{return JSON.parse(a)}catch{return}}var Ye=Object.defineProperty,Qe=(a,e,t)=>e in a?Ye(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Z=(a,e,t)=>(Qe(a,typeof e!="symbol"?e+"":e,t),t);const H=class q extends R{async getRawReleasesData(){let e=[];try{e=await(await fetch(`${q.apiBase}chapter?accept_erotic_content=true&page=1&order=new`)).json()}catch{return}const t=[];return e.forEach(r=>{const{vol:n,chap:s,hid:i,lang:o,updated_at:l,md_comics:c}=r,u=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof u=="number"&&t.push({id:c.hid,slug:c.slug,name:c.title,chapters:[{slug:i,vol:typeof n=="string"&&!isNaN(+n)?+n:void 0,chap:u,lang:o,ts:new Date(l).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await M(`https://api.${location.host}`,"comic",D,"chapters");if(!t)return e;const r=await Ke(e.slug),n=K(t),s=h("h1 ~ div.text-sm span:first-child|row:demographic"),i=s?this.getTagIdsFromNames([s])?.[0]:void 0;return i&&!e.tags?.includes(i)&&(e.tags?.push(i),e.tags?.sort((o,l)=>o-l)),{...e,img:e.img??V(h(this.spec.title?.img)),id:r,hasMoreChapters:n?.hasMore??!1,chapters:n?.chapters??[]}}async getRawReaderData(){const e=await super.getRawReaderData();if(!e)return e;const t=await M("/_next/data/",D,"comic",D),r=t?.comic?.hid,n=t?.comic?.md_comic_md_genres?.map?.(i=>i?.md_genre?.name),s=t?.comic?.md_covers?.[0]?.b2key;return{...e,lang:e.lang&&e.lang?.length<=6?e.lang:q.getLangFromReaderSlug(e.slug)||e.lang,title:{...e.title,id:r?r+"":void 0,tags:this.getTagIdsFromNames(n),img:typeof s=="string"?`https://meo.comick.pictures/${s}`:void 0}}}static getLangFromReaderSlug(e){const t=e.split("-");let r;for(let n=t.length-1;n>0;n--){const s=t[n];if(!isNaN(+s))break;r=r?`${s}-${r}`:s}return r&&r.length<=6?r:void 0}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e,lang:t="en",skip:r}=this.context,n=r?Math.floor(r/1e3)+1:void 0;try{const s=await fetch(`${q.apiBase}comic/${e}/chapters?lang=${t}&limit=1000${n&&n>1?`&page=${n}`:""}`),i=K(await s.json());return i?{...i,lang:t,asc:!1}:void 0}catch{return}}};Z(H,"specId","comick"),Z(H,"apiBase","https://api.comick.cc/");let Ze=H;function K(a){if(!Array.isArray(a?.chapters))return;const e=[];return a.chapters.forEach(t=>{const{vol:r,chap:n,hid:s,lang:i,updated_at:o}=t,l=typeof n=="string"&&!isNaN(+n)?+n:void 0;typeof l!="number"||e.some(c=>c.vol==r&&c.chap===l&&c.lang===i)||e.push({slug:s,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:l,lang:i,ts:new Date(o).valueOf()})}),{chapters:_(e),total:a.total??e.length,hasMore:a.total>a.limit}}async function Ke(a){const e=document.querySelector("script#__NEXT_DATA__")?.textContent,t=e?Ge(e):void 0;return t?.query?.slug===a?t?.props?.pageProps?.comic?.hid??void 0:(await M("/_next/data/",D,"comic",a,"covers.json"))?.pageProps?.comic?.hid??void 0}var et=Object.defineProperty,tt=(a,e,t)=>e in a?et(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,at=(a,e,t)=>(tt(a,typeof e!="symbol"?e+"":e,t),t);class ee extends R{async getRawReleasesData(){const e=await this.getVM();if(!e)return super.getRawReleasesData();const t=e.LatestJSON.slice(0,100).map(r=>{const n=+r.Chapter.substring(1)/10;return{slug:r.IndexName,name:r.SeriesName,chapters:[{chap:n,slug:`${r.IndexName}-chapter-${n}.html`,ts:new Date(r.Date).valueOf()}]}});return this.finalizeRawReleasesData({rawReleases:t})}resolveTitleSlug(e){const t=super.resolveTitleSlug(e);if(!(!t||t.includes("{")))return t}async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:te(await this.getVM(),e.slug),hasMoreChapters:!1}}resolveReaderSlug(e,t){return super.resolveReaderSlug(e,t).replace(/-page-\d{1,3}\.html\/?$/,".html")}async getRawReaderData(){const e=await this.getVM();if(!e)return;const t=document.querySelector(".ImageGallery img.img-fluid")?.getAttribute("ng-src"),r=e.IndexName,n=ae(e.CurChapter,r);return this.finalizeRawReaderData({chap:n.chap,slug:n.slug,imgs:rt(e,t??void 0),basePath:"/"+this.siteMeta.readerBase.replace("{titleSlug}",r)+"/",title:{name:e.SeriesName,slug:r,url:`/${this.siteMeta.titleBase}/${r}`,chapters:te(e,r),hasMoreChapters:!1}})}getVM(){return x(50,100,()=>window.angular?.element?.(document.documentElement)?.scope()?.vm)}}at(ee,"specId","manga4life");function te(a,e){return(a?.Chapters??a?.CHAPTERS??[]).sort((t,r)=>r.Chapter-t.Chapter).map(t=>ae(t,e))}function ae(a,e){const t=+a.Chapter.substring(1)/10;return{slug:`${e}-chapter-${t}.html`,chap:t,ts:new Date(a.Date).valueOf()}}function rt(a,e){let t=e?.split(".").slice(-1)[0]??"png";t=t.length>=3&&t.length<=4?t:"png";try{const r=a.CurChapter.Chapter.slice(1,-1),n=a.CurChapter.Chapter[a.CurChapter.Chapter.length-1],s=n!=="0"?`${r}.${n}`:r,i=`https://${a.CurPathName}/manga/${a.IndexName}/${a.CurChapter.Directory?`${a.CurChapter.Directory}/`:""}${s}-`;return a.Pages.map(o=>{const l=(o+"").padStart(3,"0");return`${i}${l}.${t}`})}catch{return}}var nt=Object.defineProperty,st=(a,e,t)=>e in a?nt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,it=(a,e,t)=>(st(a,typeof e!="symbol"?e+"":e,t),t);class re extends z{resolveTitleSlug(e){return $(e)?.split("/").filter(Boolean)[1]}async getRawReleasesData(){let e=[];try{e=(await(await fetch("https://api.mangadex.org/chapter?limit=96&offset=0&includes[]=manga&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&order[readableAt]=desc")).json()).data}catch{return}const t=[];return e.forEach(({relationships:r,attributes:n,id:s})=>{const i=r.find(({type:c})=>c==="manga"),o=typeof n.volume=="string"?+n.volume:void 0,l=typeof n.chapter=="string"?+n.chapter:void 0;l&&t.push({slug:i.id,name:Object.values(i.attributes.title)[0],chapters:[{slug:n.externalUrl||s,vol:o,chap:l,lang:n.translatedLanguage,ts:new Date(n.readableAt).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e="https://api.mangadex.org/manga/",[t,r]=await Promise.all([M(e,D),M(e,D,"feed")]);if(!t||!r)return;const n=r.data?.map?.(o=>{const{attributes:l,id:c}=o;if(typeof l!="object"||typeof c!="string"||!c)return;const{externalUrl:u,title:p,volume:g,chapter:f,translatedLanguage:m}=l;return{slug:u||c,label:p||void 0,vol:typeof g=="string"?+g:void 0,chap:typeof f=="string"?+f:void 0,lang:m||"en",ts:new Date(l.readableAt).valueOf()}}).filter(o=>o?.chap!=null)??[],{data:s}=t;if(!s)return;const i=se({data:s,getTagIdsFromNames:o=>this.getTagIdsFromNames(o)});if(i)return{...i,chapters:_(n),hasMoreChapters:(r.total||0)>(r.limit||0)}}async getRawReaderData(){const e="https://api.mangadex.org/",[t,r,n]=await Promise.all([M(e,"chapter",D),M(e,"at-home","server",D),M(e,"manga",D,"aggregate")]);if(!t||!r||!n)return;const s=t.data,{volume:i,chapter:o,externalUrl:l,translatedLanguage:c}=s.attributes||{},{baseUrl:u,chapter:{data:p,dataSaver:g,hash:f}}=r,m=s.relationships?.find?.(S=>S.type==="manga");if(!m)return;const w=se({data:m,getTagIdsFromNames:S=>this.getTagIdsFromNames(S)});if(!w||typeof n.volumes!="object")return;const v=ne(n)??[];(typeof o!="string"||o==="none")&&!v.length&&v.push({chap:0,slug:s.id});const y=v.findIndex(S=>S.slug===s.id),d=s.relationships?.find?.(S=>S.type==="scanlation_group"),T=u.endsWith("/")?u:u+"/",A=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),O=`${T}${A?"data-saver":"data"}/`,k=((A?g:p)??[]).map?.(S=>`${O}${f}/${S}`)??[];return{externalUrl:l,vol:typeof i=="string"?+i:void 0,inferVol:v[y]?.inferVol,chap:+o||0,imgs:k,lang:c,slug:s.id,prev:v[y+1],next:v[y-1],basePath:"/chapter/",groupName:d?.attributes?.name,groupUrl:d?.attributes?.website,isWebtoon:m?.attributes?.tags?.some(S=>S.attributes.name.en==="Long Strip"),title:{...w,chapters:v}}}async getRawChaptersData(){if(!this.context)return;const{titleSlug:e,lang:t="en"}=this.context;let r;try{const n=await fetch(`https://api.mangadex.org/manga/${e}/aggregate?translatedLanguage[]=${t}`);r=ne(await n.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}it(re,"specId","mangadex");function ne(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const n=t==="none"||typeof t!="string"?void 0:+t;return Object.values(r).map(({id:s,chapter:i})=>typeof i!="string"||i==="none"?void 0:{vol:n,chap:+i,slug:s})}).flat().filter(Boolean).reverse();return _(e)}function se({data:a,getTagIdsFromNames:e}){const{id:t,attributes:r,relationships:n}=a;if(!t||typeof t!="string"||typeof r!="object")return;const{title:s,availableTranslatedLanguages:i,altTitles:o,tags:l,contentRating:c}=r;if(typeof s!="object"||i&&!Array.isArray(i))return;const u=Object.values(s)[0];if(!u||typeof u!="string")return;const p=ot(),g=(i??[])?.map?.(d=>typeof d=="string"?d:void 0).filter(Boolean)??[],f=g.filter(d=>d&&(!p||p.includes(d))),m=o?.map?.(d=>{const[[,T]=[]]=Object.entries(d);return T}),w=n?.find?.(d=>d.type==="cover_art")?.attributes?.fileName,v=w?`https://mangadex.org/covers/${t}/${w}`:void 0,y=(l||[]).map(d=>d?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:m,langs:f.length>0?f:g.length>0?g:["en"],img:v,tags:e(y)}}function ot(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var lt=Object.defineProperty,ct=(a,e,t)=>e in a?lt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ut=(a,e,t)=>(ct(a,typeof e!="symbol"?e+"":e,t),t);class ie extends R{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.id?.split("?")[0]}))}}async getRawReaderData(){if((await C(".current-viewtype",{lazy:!0,all:!1}))?.textContent?.trim().toLowerCase()!=="volume")return await super.getRawReaderData()}async getRawChaptersData(){const e=this.context?.lang;if(!e)return;const t=await C(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await C(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}ut(ie,"specId","mangafire");var gt=Object.defineProperty,pt=(a,e,t)=>e in a?gt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,ht=(a,e,t)=>(pt(a,typeof e!="symbol"?e+"":e,t),t);class oe extends R{async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,imgs:await this.getImgs()}}resolveReaderSlug(e,t){const r=super.resolveReaderSlug(e,t),n=r.split("/").filter(Boolean);return n[n.length-1].startsWith("pg-")?n.slice(0,-1).join("/"):r}async getImgs(){const e=await x(100,20,()=>window.imgsrcs),t=window.CryptoJS,r=t.enc.Hex.parse("e11adc3949ba59abbe56e057f20f883e"),n={iv:t.enc.Hex.parse("1234567890abcdef1234567890abcdef"),padding:t.pad.ZeroPadding};return t.AES.decrypt(e,r,n).toString(t.enc.Utf8).split(",")}}ht(oe,"specId","mangago");var dt=Object.defineProperty,ft=(a,e,t)=>e in a?dt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,mt=(a,e,t)=>(ft(a,typeof e!="symbol"?e+"":e,t),t);class le extends z{async getRawReleasesData(){throw new Error("Unimplemented")}async getRawTitleData(){const e=await this.getPageData();if(!e)return;const t=await this.getPrefLangs()??["en"],r=e.chart_count_lang_to_serials?.find(s=>t?.includes(s?.field))?.count,n=await this.getTitleChapters();return{...this.transformRawTitleData(e),chapters:n,hasMoreChapters:r&&r>n.length}}async getRawReaderData(){const e=await this.getPageData(),t=e?.comicNode?.data,r=e?.imageSet;if(!e||!t||!r)return;const{httpLis:n,wordLis:s}=r,i=this.transformRawTitleData(t);return{slug:location.pathname.split("/").filter(Boolean)[2],lang:e.lang,vol:e.volume??void 0,chap:e.serial,imgs:n.map((o,l)=>`${o}?${s[l]}`),title:{...i,chapters:[],hasMoreChapters:!1},...await this.getReaderPrevNext(),basePath:`/title/${i.slug}/`}}async getRawChaptersData(){if(!this.context)return;const{lang:e,titleSlug:t,skip:r}=this.context;if(!e||!t)return;const n=await this.getPrefLangs()??["en"];let s;try{s=await fetch("https://mangapark.net/apo/",{method:"POST",body:JSON.stringify({query:"query get_content_comic_chapters($comicId: Int!, $isPref: Boolean) { get_content_comic_chapters(comicId: $comicId, isPref: $isPref) {serial chapters{lang cids}}}",variables:{comicId:+t,isPref:n.includes(e)},operationName:"get_content_comic_chapters"}),headers:{"Content-Type":"application/json"}})}catch{return}const i=[],o=(await s.json()).data.get_content_comic_chapters.reverse();return(r?o.slice(r):o).forEach(l=>{const c=l.chapters.find(g=>g.lang===e);if(!c)return;const u=c.cids?.[0];if(!c||!u)return;const p=l.serial;i.push({slug:`${u}-${e}-ch.${p}`,chap:p,ts:l.datePublic})}),{chapters:i,lang:e,asc:!1,hasMore:!1,total:i.length}}transformRawTitleData(e){return{url:e.urlPath,slug:e.id+"",name:e.name,langs:e.chart_count_lang_to_serials?.map?.(t=>t?.field?.toLowerCase()).filter(Boolean),img:e.urlCover300??e.urlCover600??e.urlCoverOri,tags:this.getTagIdsFromNames(e.genres)}}async getReaderPrevNext(){let e,t;return await x(20,100,async()=>{const r=await C("main a.btn",{lazy:!0,all:!0});if(r?.length)return e=r.find(n=>n.textContent?.toLowerCase().includes("prev")),t=r.find(n=>n.textContent?.toLowerCase().includes("next")),e||t?!0:void 0}),{prev:this.getChapterFromBtn(e),next:this.getChapterFromBtn(t)}}getChapterFromBtn(e){const t=e?.getAttribute("href");if(!t)return;const r=t.split("/").filter(Boolean).slice(-1)[0];if(!r)return;const n=P(r.split("-").slice(2).join("-"));if(n)return{slug:r,lang:r.split("-")[1]||void 0,...n}}async getTitleChapters(){const e=[],t=await C(".file-list-by-serial time[time]",{lazy:!0,all:!0});if(!t?.length)return e;let r;return t.forEach(n=>{const s=n.parentElement;for(let i=0;i<5;i++){const o=s?.parentElement?.querySelector('a[href*="/title/"]');if(!o)continue;const l=o.getAttribute("href")?.split("/").filter(Boolean)[2],c=o.textContent?.replace(/(\n|\t)/g," ").trim(),u=P(c);if(!u||!l||r&&r.chap==u.chap&&(r.vol??0)==(u.vol??0))break;const p=+n.getAttribute("time");r={...u,slug:l,lang:l.split("-")[1]||void 0,ts:p===p&&typeof p=="number"?p:void 0},e.push(r);break}}),_(e)}getPageData(){return x(100,50,()=>window.__NEXT_DATA__?.props?.pageProps?.dehydratedState?.queries?.[0]?.state?.data?.data)}getPrefLangs(){return x(40,50,()=>{const e=window.__NEXT_DATA__?.props?.pageProps;if(!e)return;const t=e?.extra?.sets?.general_prefLangs?.filter(Boolean);return t?.length?t:["en"]})}}mt(le,"specId","mangapark");function ce(a,e){const t=a[0]===e?a.substring(1):a;return t[t.length-1]===e?t.substring(0,t.length-1):t}var wt=Object.defineProperty,yt=(a,e,t)=>e in a?wt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,vt=(a,e,t)=>(yt(a,typeof e!="symbol"?e+"":e,t),t);class ue extends R{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,siteMeta:bt(this.spec.releases,this.siteMeta)}}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=I(location.pathname);let r;if(e.chapters?.length){const n=this.spec.title.chapter,s=document.querySelector(n.sel),i=$(h(n.url,{root:s}));i&&(r=I(i))}return{...e,siteMeta:E(this.siteMeta,{titleBase:t,readerBase:r})}}async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,siteMeta:E(this.siteMeta,{titleBase:I($(e.title.url)),readerBase:I(location.pathname),idBase:ge()}),title:{...e.title,id:await this.getReaderTitleId()}}}async getRawSearchData(){const e=await super.getRawSearchData();if(!e)return;const t=this.spec.search.title,r=document.querySelector(t.sel),n=h(t.url,{root:r});return{...e,siteMeta:E(this.siteMeta,{titleBase:I($(n)),idBase:ge()})}}async getReaderTitleId(){const e=await window.HISTORY?.getStored?.();if(!e||typeof e!="object")return;const t=Object.values(e).filter(Boolean);if(t.length)return t.sort((r,n)=>n.time-r.time),t[0].manga_ID}}vt(ue,"specId","mangastream");function bt(a,e){if(!a)return;const t={...e,releases:ce(location.pathname,"/")},r=a.title,n=document.querySelector(r.sel)??void 0;if(!n)return;const s=$(h(r.url,{root:n}));if(s===void 0)return;const i=n.querySelector(r.chapter.sel)??void 0;if(!i)return;const o=$(h(r.chapter.url,{root:i}));if(o!==void 0)return t.titleBase=I(s),t.readerBase=I(o),e.titleIdType===U.id&&(h(r.id,{root:n})||(e.titleIdType=U.name)),E(e,t)}function ge(){return document.querySelector('link[rel="shortlink"][href*="/?p="]')?"?p=":void 0}function E(a,e){const t=Object.keys(e),r={...a};let n=!1;return t.forEach(s=>{const i=e[s];i!==a[s]&&(r[s]=i,n=!0)}),n?r:void 0}function I(a){return ce(a,"/").split("/").slice(0,-1).join("/")}var Rt=Object.defineProperty,$t=(a,e,t)=>e in a?Rt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,St=(a,e,t)=>($t(a,typeof e!="symbol"?e+"":e,t),t);class pe extends R{async getRawReaderData(){const e=await super.getRawReaderData();if(!e)return e;let t=e.title.id;if(!t){const n=this.spec.reader.title;n.id&&await C(n.id.split("|")[0],{lazy:!0}),t=h(n.id)}const r=!!this.context?.disableLazyChapters;return{...e,title:{...e.title,id:t,chapters:r?[]:await Ct(t),hasMoreChapters:r}}}resolveTitleSlug(e){const t=super.resolveTitleSlug(e);if(!t)return;const r=t.lastIndexOf("-"),n=+t.substring(r+1);return r===-1||isNaN(n)||n<1e3?t:t.substring(0,r)}}St(pe,"specId","nettruyen");async function Ct(a){if(!a)return[];const e=await fetch(`/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${a}`).then(t=>t.status===200?t.json():void 0).catch(()=>[]);return e?.chapters?.length?_(e.chapters.map(t=>{const{name:r,url:n}=t,s=P(r);if(!(!s||!n))return{slug:$(n).split("/").filter(Boolean).slice(2).join("/"),...s}})):[]}var xt=Object.defineProperty,Dt=(a,e,t)=>e in a?xt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Tt=(a,e,t)=>(Dt(a,typeof e!="symbol"?e+"":e,t),t);class he extends R{async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,hasMoreChapters:!!X()}}async getRawChaptersData(){const e=await this.getRawTitleData();if(!e?.hasMoreChapters)return e;const t=this.context?.findContinue;if(t){const l=await this.findContinueChapters({rawTitleData:e,chapter:t});return l?{chapters:l,title:{...e,chapters:[]}}:void 0}const r=this.context?.skip,{chapters:n,...s}=e,i=n.length,o=r&&r>=i?Math.floor(r/i)+1:void 0;return o?{chapters:await this.getChaptersByPage({page:o,titleSlug:e.slug})??[],title:{...s,chapters:[]},hasMore:!!X(o),asc:!1,skip:r}:{chapters:n,title:{...s,chapters:[]},hasMore:!!X()}}async findContinueChapters({rawTitleData:e,chapter:{chap:t},curPage:r=1,cacheChaptersByPage:n={},...s}){const i=n[r]??e.chapters,o=i[i.length-1].chap<=t,l=s.maxPage??Mt();if(o){if(i[0].chap>t){const y=[...i].reverse().find(d=>d.chap>t);return y?[y]:i.slice(0,1)}if(r<=1)return i.slice(0,1)}else if(r===l)return i.slice(-1);const c=e.chapters.length,u=Object.keys(n).map(y=>+y).sort((y,d)=>y-d),p=o?-1:1,g=u[u.indexOf(r)+p];if(g===r+p)return o?n[g].slice(-1).concat(i.slice(0,1)):i.slice(-1).concat(n[g].slice(0,1));const f=o?t-i[0].chap:i[0].chap-t,m=Math.floor(f/c)+1,w=o?Math.max(m,(g??1)+1):Math.min(m,(g??l+1)-1,l),v=await this.getChaptersByPage({page:w,titleSlug:e.slug});if(v)return await this.findContinueChapters({rawTitleData:e,chapter:{chap:t},curPage:w,maxPage:l,cacheChaptersByPage:{...n,1:e.chapters,[w]:v}})}async getChaptersByPage({page:e,titleSlug:t}){const r=de(e);if(!r)return;const n=this.spec.title.chapter,s=n.sel,i=document.querySelector(s),o=x(100,30,()=>{const l=document.querySelector(s);if(l&&i!==l)return!0;r.click()});return r.click(),await o,await this.getChapters(n,{lazy:!1,titleSlug:t})}}Tt(he,"specId","reaper");function X(a=1){return de(a+1)}function de(a){const e=`span[wire\\:key="paginator-page-1-page${a}"] button,button[aria-label="Go to page ${a}"]`;return document.querySelector(e)}function Mt(){const a=Array.from(document.querySelectorAll('span[wire\\:key^="paginator-page-"]'));return a.length?+a[a.length-1].getAttribute("wire:key").split("-").slice(-1)[0].replace("page",""):1}var Pt=Object.defineProperty,_t=(a,e,t)=>e in a?Pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Nt=(a,e,t)=>(_t(a,typeof e!="symbol"?e+"":e,t),t);class fe extends R{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=h(".info-detail__row > .genre-btn,.info__right .stats__row:first-child|text",{returnAll:!0})?.map(r=>[r,...r.split(" ")]).flat();return me({...e,tags:this.getTagIdsFromNames(t)??[]},".episode-header .episode-cnt")}async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:me({...e.title,url:`${location.origin}/series/${e.title.slug}/info`,tags:[]},".episode-list .js-ep-cnt")}}async getRawChaptersData(){if(!this.context)return;const{rawId:e,skip:t}=this.context,r=1e3,n=t?Math.floor(t/1e3)+1:1;try{const s=await fetch(`/series/${e}/episodes?page=${n}&sort=NEWEST&max_limit=${r}`);return It(await s.json())}catch{return}}resolveTitleSlug(e){if(!e)return;const t=e.split("/").filter(Boolean);return t[1]??t[0]}}Nt(fe,"specId","tapas");function me(a,e){const t=Bt(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function It(a){const e=a?.data?.episodes;if(!Array.isArray(e))return;const t=e.map(n=>({chap:n.pending_scene??n.scene,slug:n.id+"",ts:new Date(n.publish_date)?.valueOf?.()||void 0})),r=a?.data?.pagination;return{chapters:t,total:r?.total??t.length,hasMore:!!r?.has_next}}function Bt(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var Lt=Object.defineProperty,jt=(a,e,t)=>e in a?Lt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,At=(a,e,t)=>(jt(a,typeof e!="symbol"?e+"":e,t),t);class we extends R{async getRawTitleData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(t||!r)return;const n=await super.getRawTitleData();if(!n)return;const s=location.pathname.split("/")[1];return{...n,id:r,langs:[s].filter(Boolean),chapters:n.chapters.map(i=>({...i,lang:s})),hasMoreChapters:(document.querySelector(".paginate")?.childElementCount??1)>1}}async getRawReaderData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(!t||!r)return;const n=+t;if(n!==n)return;const s=document.title.split("|")[1]?.trim();if(!s)return;const i=location.pathname.split("/"),o=`${i.slice(0,4).join("/")}/list?title_no=${r}`,l=await this.getChapters({sel:"#sequence_scroll li.eg-flick-panel,#toolbar .episode_lst li[data-episode-no]",url:"a|attr:href",label:"|attr:data-episode-no || .num|text"},{lazy:!1}),c=i[1];return{chap:n,lang:c,slug:`${location.pathname}?title_no=${r}&episode_no=${n}`,basePath:"",imgs:await this.getReaderImgs(),isWebtoon:!0,title:{id:r,url:o,slug:o,name:s,langs:[c],chapters:(l??[]).map(u=>({...u,lang:c})),hasMoreChapters:!1}}}async getReaderImgs(){const e=h("#_imageList img|[attr:data-url,attr:src]",{returnAll:!0});return e?.length?e:await x(100,50,()=>window.__viewerState__?.scrollViewerParam?.imageList?.map(({url:t})=>t).filter(Boolean))}resolveReaderSlug(e,t,r){if(!r)return t;if(r.startsWith("http://")||r.startsWith("https://")){const n=W(r);return n.pathname+n.search}return r}}At(we,"specId","webtoon");const Ot=[Q,Ze,ee,re,ue,pe,he,fe,oe,ie,le,we];function ye(a){const e=Ot.find(t=>t.specId===a.spec.id)??R;return new e(a)}async function kt(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:ve(t,e.generic);if(!r.length)return;const n=ye({...a,spec:e,siteMeta:t});return await L(r.map(s=>n.getRawPageByType(s,r.length>1)))}return await L((a.genericSpecs??[]).map(t=>{const r=ve(t.meta,t.generic);if(!r.length)return[];const n=ye({...a,spec:t,siteMeta:t.meta});return r.map(s=>n.getRawPageByType(s,!0))}).flat())}function ve(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,n=location.pathname.split("/").filter(Boolean),s=be(n,r),i=be(n,t);if(s!==i)return s>i?[b.reader]:[b.title];if(s>0)return[b.reader,b.title];if(n.length===1){const o=[!r&&b.reader,!t&&b.title].filter(Boolean);if(o.length)return o}return!r&&!t||e?[b.reader,b.title]:[]}function be(a,e){if(!e)return 0;const t=e.split("/").filter(Boolean),r=t.includes("{slug}"),n=a.length-t.length;return r&&n!==0||!r&&n<1?0:t.filter((s,i)=>a[i]===s||s==="{titleSlug}"||s==="{lang}"||s==="{slug}").length}B.PageType=b,B.scrape=kt});
1
+ (function(_,N){typeof exports=="object"&&typeof module<"u"?N(exports):typeof define=="function"&&define.amd?define(["exports"],N):(_=typeof globalThis<"u"?globalThis:_||self,N(_._trackkun_={}))})(this,function(_){"use strict";function N(a){let e=!1;return new Promise((t,r)=>{Promise.all(a.map(async n=>{const s=await n;!e&&s&&(e=!0,t(s))})).then(()=>{e||t(void 0)})})}function q(a,{removeTrailingSlash:e=!0}={}){if(!a)return;const t=e&&a.endsWith("/")?a.slice(0,-1):a;try{return new URL(t)}catch{return}}function $(a){if(!(!a||typeof a!="string"))return a.startsWith("http://")||a.startsWith("https://")?q(a)?.pathname:a.startsWith("//")?q(`https:${a}`)?.pathname:a}async function x(a,e,t){const r=await t(()=>{a=0});if(r!==void 0)return r;if(!(a<=0))return await new Promise(n=>{setTimeout(async()=>{const s=await x(a-1,e,t);n(s)},e)})}async function S(a,e,t=0){const r=e.root??document.documentElement,n=e.timeoutMs??1e4;return x(e.lazy===!0?n/50:0,50,()=>{const s=e.all===!0?Array.from(r.querySelectorAll(a)):r.querySelector(a)??void 0;return(e.all?!s?.length:!s)?void 0:s})}const Re={text:$e,attr:Ce,"attr-contain":Se,value:xe,row:De};function h(a,e={}){if(!a)return;const{root:t=document.documentElement,returnAll:r,preProcess:n}=e,s=a.split("||").map(p=>p.trim()).filter(p=>!!p&&p.includes("|"));if(s.length>1){for(let p=0;p<s.length;p+=1){const g=h(s[p],e);if(g?.length)return g}return}const[i,o]=a.split("|");if(!o)return;const l=(o?.startsWith("[")&&o.endsWith("]")?o.substring(1,o.length-1).split(","):[o]).map(p=>{const g=p.indexOf(":"),f=g!==-1;return{action:f?p.substring(0,g):p,param:f?p.substring(g+1):""}}),c=i?Array.from(t.querySelectorAll(i)):[t];if(!c.length)return r?[]:void 0;n&&n(c);const u=[];for(const p of c)for(const g of l){const f=Re[g.action],m=f(p,g.param);if(m){if(r){u.push(m);break}return m}}return r?u:void 0}function $e(a){return Array.from(a.childNodes).filter(e=>e.nodeType===3).map(e=>B(e.textContent)).filter(Boolean).join(" ").trim()||B(a.textContent)}function Ce(a,e){return B(a.getAttribute(e))}function Se(a,e){let t=a.getAttribute(e);if(!t){const r=a.getAttributeNames().find(n=>n.includes(e));r&&(t=a.getAttribute(r))}return B(t)}function xe(a){return a.value}function De(a,e){if(!e)return;const t=B(a.textContent)?.toLowerCase(),r=e.toLowerCase();if(!(t!==r&&t!==`${r}:`))return B(a.nextElementSibling?.textContent??a.nextSibling?.textContent)}function B(a){if(a)return a?.replace(/(\n|\t)/g," ").trim()||void 0}var Te=(a=>(a[a.reading=1]="reading",a[a.paused=2]="paused",a[a.plan=3]="plan",a[a.completed=4]="completed",a[a.dropped=5]="dropped",a[a.deleted=6]="deleted",a))(Te||{}),U=(a=>(a.id="id",a.name="name",a.slug="slug",a))(U||{}),F=(a=>(a.blank="about:blank",a.title="meta.title",a.reader="meta.reader",a))(F||{}),Me=(a=>(a[a.string=1]="string",a[a.number=2]="number",a[a.bool=3]="bool",a[a.selection=4]="selection",a))(Me||{}),Pe=(a=>(a[a.pending=0]="pending",a[a.completed=1]="completed",a[a.offline=2]="offline",a[a.incompat=3]="incompat",a))(Pe||{});const Ie=/(vol(ume)?|season)(\s*|-|\.)(\d+)/i,_e=/(ch(ap(t(er)?|\.)?|\.)?|^#|episode\.?)(\s*|-)(\d+([_-~,.]\d+)?)/i,Ne=/\d+([_-~,.]\d+)?/,Be=/[_-~,]/;function T(a){if(!a||!a)return;if(!isNaN(+a))return{chap:+a};const e=a.match(Ie),t=e?.[0]?a.replace(e[0],"").trim():a,r=t.match(_e),n=t.match(Ne),s=r?.[6]??n?.[0];if(!s)return;const i=+s.replace(Be,".");if(isNaN(i))return;const o=e?.[4];return{vol:o&&!isNaN(+o)?+o:void 0,chap:i}}function M(a){return a.sort((e,t)=>e.vol===void 0||t.vol===void 0?t.chap-e.chap:t.vol-e.vol||t.chap-e.chap),Le(a)}function Le(a){const e={};for(let t=a.length-1;t>=0;t--){const r=a[t],n=r.lang??"";r.vol!==void 0?e[n]=r.vol:e[n]!==void 0&&(r.inferVol=e[n])}return a}const je=[{regex:/(sec|giây)/,seconds:1},{regex:/(min|phút)/,seconds:60},{regex:/(hour|giờ)/,seconds:3600},{regex:/(day|ngày)/,seconds:86400},{regex:/(week|tuần)/,seconds:604800},{regex:/(month|tháng)/,seconds:2592e3},{regex:/(year|năm)/,seconds:31536e3}];function X(a){const e=a?.toLowerCase();if(!e||e.includes("now"))return Date.now();if(e.includes("yesterday"))return Date.now()-864e5;const t=new Date(e);if(t instanceof Date){const s=t.valueOf();if(!isNaN(s))return t.getHours()===0&&t.getMinutes()===0?Math.min(Date.now(),s+432e5):s}const r=je.find(s=>s.regex.test(e));if(!r)return;const n=e.split(" ").filter(Boolean);for(let s=0;s<n.length;s++){const i=n[s],o=i==="a"||i==="an"?1:+i;if(!o)continue;if(o<0)return;const l=Date.now()-o*r.seconds*1e3;return l>0?l:void 0}}function V(a,e=location.origin){if(!a)return;const t=new URL(a.startsWith("//")?`${location.protocol}${a}`:a,location.origin+location.pathname).toString();return t.startsWith(e)?t.replace(e,""):t}function Y(a,e){if(!a)return"/";const t=a.replace("{titleSlug}",e),r=t.endsWith("/")?t:t+"/";return r.startsWith("/")?r:"/"+r}function Ae(a,e){const t=[...e],r=[];let n=-1,s=-1;for(let o=0;o<a.length&&!(!t.length&&o>=10);o++){const l={...a[o]},c=t.findIndex(g=>g.slug===l.slug&&g.name===l.name),u=c===-1?void 0:t.splice(c,1)[0],p=!u||u.chapters[0]?.chap!==l.chapters[0]?.chap;c!==-1&&(s=o),p&&(n=o,l.changed=!0),r.push(l)}if(n===-1)return[];if(t.length&&t.length!==e.length){const o=Math.max(10,s+1);r.splice(o);for(let l=s+1;l<r.length;l++)r[l].changed=!1;return r}const i=Math.min(Math.max(n+1,10),Math.max(s+1,100));return r.slice(0,i)}function Oe(a,e){const t={};return a.forEach(r=>{const n=r.chapters.reduce((s,i)=>{const o=i.lang||e||"";return s[o]||(s[o]=[]),s[o].push(i),s},{});Object.entries(n).forEach(([s,i])=>{const o=`${r.slug}:${s}`;t[o]?(t[o].chapters.push(...i),M(t[o].chapters)):t[o]={...r,lang:s===""?void 0:s,chapters:i}})}),Object.values(t)}var b=(a=>(a.title="title",a.reader="reader",a.releases="releases",a.chapters="chapters",a.search="search",a))(b||{}),ke=Object.defineProperty,ze=(a,e,t)=>e in a?ke(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,P=(a,e,t)=>(ze(a,typeof e!="symbol"?e+"":e,t),t);class z{constructor(e){P(this,"spec"),P(this,"siteMeta"),P(this,"tags"),P(this,"context"),P(this,"methodsMap",{[b.title]:()=>this.getRawTitleData(),[b.reader]:()=>this.getRawReaderData(),[b.releases]:()=>this.getRawReleasesData(),[b.search]:()=>this.getRawSearchData(),[b.chapters]:()=>this.getRawChaptersData()}),P(this,"normalizedTagsMap"),this.spec=e.spec,this.siteMeta=e.siteMeta,this.tags=e.tags,this.context=e.context}async getRawSearchData(){throw new Error("Unimplemented")}async getRawPageByType(e,t=!1){const r=await this.methodsMap[e](),n=!r&&We(this.spec);if(t&&!r&&!n)return;const s=location.origin+location.pathname;return{type:e,is404:n,specId:this.spec.id,siteName:h(this.spec.name),url:s,data:r,spec:this.spec,context:this.context}}resolveReaderSlug(e,t,r){const n=t.endsWith("/")?t.slice(0,-1):t;return n.startsWith(e)?n.replace(e,""):n}resolveTitleSlug(e){if(typeof e!="string")return;const t=$(e)?.split("/").filter(Boolean);return!t||!t.length?e:t[t.length-1]}finalizeRawReleasesData(e){const t=this.spec.releases?.title?.lang?this.siteMeta.defaultLang:void 0,r=Oe(e.rawReleases,t);if(r.length)return{rawReleases:this.context?.oldRawReleases?Ae(r,this.context.oldRawReleases):r}}getTagIdsFromNames(e){if(!e?.length)return;const t=this.normalizedTagsMap??(this.normalizedTagsMap=Ee(this.tags)),r=e.map(n=>t[H(n)]).filter(Boolean);return r.length===0?void 0:Array.from(new Set(r)).sort((n,s)=>n-s)}}P(z,"specId");function Ee(a){const e={};return a.forEach(({id:t,name:r,altNames:n})=>{e[H(r)]=t,n&&n.forEach(s=>{e[H(s)]=t})}),e}function H(a){const e=a.toLowerCase().replaceAll(" ","").replaceAll("-","");return e[e.length-1]==="s"?e.substring(0,e.length-1):e}function We(a){return a[404]&&document.querySelector(a[404])?!0:document.title.toLowerCase().includes("not found")}class R extends z{async getRawReleasesData(){if(!this.spec?.releases?.title)return;const{chapter:e,...t}=this.spec.releases.title,r=await S(t.sel,{lazy:!0,all:!0});if(!r?.length)return;const n=r.slice(0,100).map(i=>{const o=h(t.url,{root:i}),l=$(o),c=h(t.name,{root:i}),u=h(t.at,{root:i});if(!(!l||!c))return{titleEl:i,id:h(t.id,{root:i}),path:l,name:c,lang:h(t.lang,{root:i})?.toLowerCase(),at:u?X(u):void 0}}).filter(Boolean);if(!n.length)return;const s=[];return await Promise.all(n.map(async i=>{const{path:o,titleEl:l,lang:c,at:u,...p}=i,g=this.resolveTitleSlug(o);if(!g)return;const f=await this.getChapters(e,{root:l,titleSlug:g})??[];s.push({slug:g,chapters:c||u?f.map(m=>({...m,lang:m.lang??c,ts:m.ts??u})):f,...p})})),this.finalizeRawReleasesData({rawReleases:s})}async getRawTitleData(){const e=this.spec.title;if(!e||e.sel&&!await S(e.sel,{lazy:!!e.lazy}))return;const t=h(e.name);if(!t){await new Promise(l=>setTimeout(l,9e4));return}const r=this.resolveTitleSlug(location.pathname);if(!r)return;let n=h(e.tags,{returnAll:!0})??[];n.length===1&&(n=n[0].split(",").map(l=>l.trim()).filter(Boolean));const s=h(e.type),i=h(e.langs,{returnAll:!0})?.map(l=>l.toLowerCase()),o=await this.getChapters(e.chapter,{lazy:!0,titleSlug:r})??[];return{id:h(e.id),url:location.origin+location.pathname,slug:r,name:t,langs:i?.length?i:e.langs&&this.siteMeta.defaultLang?[this.siteMeta.defaultLang]:void 0,tags:this.getTagIdsFromNames([...n??[],...s?[s]:[]]),chapters:o,img:V(h(e.img))}}async getRawReaderData(){const{spec:e,siteMeta:t}=this;if(!e?.reader||e.generic&&!await R.isReaderPage(e.reader))return;const r=e.reader.content;if(!(!r||await R.verifyImgsLocator(r)))return;const n=e.reader.title,s=document.querySelector(n.sel);if(!s)return;const i=h(n.name,{root:s}),o=h(n.url,{root:s}),l=this.resolveTitleSlug(o),c=h(n.img,{root:s});if(!i||!o||!l)return;const u=!!this.context?.disableLazyChapters,p=await this.getChapters(e.reader?.chapter,{titleSlug:l,lazy:!u,timeoutMs:12e4})??[],g=h(e.reader.label)?.toLowerCase().replace(i.toLowerCase(),"");if(!g)return;const{vol:f,chap:m=0}=T(g)||{},w=Y(t.readerBase,l),v=t.readerBase.split("/").indexOf("{lang}"),y=v!==-1?location.pathname.substring(1).split("/")[v]?.toLowerCase():void 0,d=y?w.replace("{lang}",y):w,D=y??h(e.reader.lang)?.toLowerCase()??(e.reader.lang?this.siteMeta.defaultLang:void 0);return this.finalizeRawReaderData({vol:f,chap:m,lang:D,slug:this.resolveReaderSlug(d,location.pathname,location.href),basePath:d,imgsLocator:e.reader.imgs,title:{id:h(n.id),url:o,slug:l,name:i,langs:D?[D]:void 0,img:V(c),chapters:p,hasMoreChapters:!p.length&&u}},{prevSlug:this.findNeighborChapter({sel:e.reader.prev,basePath:d}),nextSlug:this.findNeighborChapter({sel:e.reader.next,basePath:d})})}async getRawChaptersData(){const e=this.siteMeta.chapters;if(e===F.blank)return;const t=e===F.reader?(await this.getRawReaderData())?.title:await this.getRawTitleData();if(!t)return;const r=this.context?.lang,{chapters:n}=t,s=r?n.filter(i=>!i.lang||i.lang===r):n;return{chapters:s,title:{...t,chapters:[]},hasMore:!1,asc:!1,total:s.length}}async getRawSearchData(){const e=this.spec.search?.title;if(!e)return;const{chapter:t}=e,r=[];return await Promise.all(Array.from(document.querySelectorAll(e.sel)).map(async n=>{const s=h(e.url,{root:n}),i=$(s),o=h(e.name,{root:n}),l=this.resolveTitleSlug(i);!i||!o||!l||r.push({slug:l,name:o,chapters:await this.getChapters(t,{root:n,titleSlug:l})??[]})})),r.length?{rawReleases:r}:void 0}async getChapters(e,{root:t=document.documentElement,titleSlug:r="",lazy:n=!0,timeoutMs:s}){if(!e)return;const i=[],o=await S(e.sel,{root:t,all:!0,lazy:n,timeoutMs:s});if(!o?.length)return i;const l=(o??[]).map(w=>({id:h(e.id,{root:w}),label:h(e.label,{root:w}),url:h(e.url,{root:w}),at:h(e.at,{root:w})})),c=l.map(({label:w})=>T(w)),u=c[1]?.chap;!c[0]&&(u===void 0||u<=1)&&(c[0]={chap:0});const{readerBase:p}=this.siteMeta,g=Y(p,r),f=p.split("/").indexOf("{lang}"),m=f!==-1;return c.forEach((w,v)=>{if(!w)return;const{id:y,url:d,at:D}=l[v],A=d?.startsWith("http")&&!d.startsWith(location.origin),O=A?d:$(d);if(!O)return;const k=!A&&m?O?.substring(1).split("/")[f]?.toLowerCase():void 0,C=A?O:this.resolveReaderSlug(k?g.replace("{lang}",k):g,O,d);i.push({...w,id:y,slug:C,lang:k,ts:X(D)||i[i.length+1]?.ts||Date.now()})}),M(i)}static async isReaderPage(e){return!!e.sel&&!!await S(e.sel,{lazy:!!e.lazy})}static async verifyImgsLocator(e){const t=e.split(",").map(r=>r.trim()).filter(Boolean).map(r=>`${r} img, ${r} canvas`).join(",");return!!await S(t,{lazy:!0,all:!1})}findNeighborChapter({sel:e,basePath:t}){const r=h(e);if(!r||r.startsWith("#")||r.startsWith("/#"))return;const n=$(r);return n?this.resolveReaderSlug(t,n,r):void 0}finalizeRawReaderData(e,{prevSlug:t,nextSlug:r}={}){const n=e.title?.chapters;if(!n?.length){const c=T(t),u=T(r);return!c&&!u?e:{...e,prev:c?{...c,slug:t}:void 0,next:u?{...u,slug:r}:void 0}}let s,i,o,l;for(let c=0;c<n.length&&!(s&&(!t||o)&&!r&&l);c++){const u=n[c];!s&&(e.slug==u.slug||e.chap===u.chap&&(e.vol===u.vol||e.vol===void 0))?(s=u,i=c):!o&&t===u.slug?o=u:!l&&r===u.slug&&(l=u)}return i!==void 0&&(o??(o=n[i+1]),l??(l=n[i-1])),{...e,inferVol:s?.inferVol,prev:o,next:l}}}var qe=Object.defineProperty,Ue=(a,e,t)=>e in a?qe(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Fe=(a,e,t)=>(Ue(a,typeof e!="symbol"?e+"":e,t),t);class Q extends R{resolveTitleSlug(e){return $(e)?.split("/").filter(Boolean)[1]}}Fe(Q,"specId","bato");function Ve(){return Math.random().toString(16).slice(2)}async function He({addListener:a,removeListener:e,transform:t,filter:r,handler:n,onTimeout:s,timeout:i,once:o}){return new Promise(l=>{a(p);const c=()=>o===!0&&e(p),u=i?setTimeout(()=>{c(),l(void 0),s?.()},i):void 0;async function p(g,...f){g=t?t(g):g,g!==void 0&&(!r||r(g,...f))&&(c(),l(g),n?.(g,...f),u&&clearTimeout(u))}})}async function Je(a){return(await He({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...a}))?.data}async function Ge(a){const{receiverWindow:e,timeout:t,targetOrigin:r,event:n,args:s}=a,i={reqId:Ve(),event:n,args:s};return(e||window)?.postMessage(i,r??"*"),(await Je({filter:o=>o?.data?.resId===i.reqId,timeout:t??3e4,once:!0}))?.result}const L={isAny:!0};function j(a,...e){return Ge({event:"tk:fetchResult",args:{baseUrl:a,segments:e}})}var Xe=Object.defineProperty,Ye=(a,e,t)=>e in a?Xe(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Z=(a,e,t)=>(Ye(a,typeof e!="symbol"?e+"":e,t),t);const J=class W extends R{async getRawReleasesData(){let e;try{const r=Array.from({length:2},async(n,s)=>{const i=`${W.apiBase}chapter?accept_erotic_content=true&page=${s+1}&order=new`;return(await fetch(i)).json()});e=(await Promise.all(r)).flat()}catch{return}const t=[];return e.forEach(r=>{const{vol:n,chap:s,hid:i,lang:o,updated_at:l,md_comics:c}=r,u=typeof s=="string"&&!isNaN(+s)?+s:void 0;typeof u=="number"&&t.push({id:c.hid,slug:c.slug,name:c.title,chapters:[{slug:i,vol:typeof n=="string"&&!isNaN(+n)?+n:void 0,chap:u,lang:o,ts:new Date(l).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return e;const t=await j(`https://api.${location.host}`,"comic",L,"chapters");if(!t)return e;const r=t.url.split("/").filter(Boolean).slice(-2)[0],n=K(t.value),s=h("h1 ~ div.text-sm span:first-child|row:demographic"),i=s?this.getTagIdsFromNames([s])?.[0]:void 0;return i&&!e.tags?.includes(i)&&(e.tags?.push(i),e.tags?.sort((o,l)=>o-l)),{...e,img:e.img??V(h(this.spec.title?.img)),id:r,hasMoreChapters:n?.hasMore??!1,chapters:n?.chapters??[]}}async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,lang:e.lang&&e.lang?.length<=6?e.lang:W.getLangFromReaderSlug(e.slug)||e.lang}}static getLangFromReaderSlug(e){const t=e.split("-");let r;for(let n=t.length-1;n>0;n--){const s=t[n];if(!isNaN(+s))break;r=r?`${s}-${r}`:s}return r&&r.length<=6?r:void 0}async getRawChaptersData(){if(!this.context?.rawId)return;const{rawId:e,lang:t="en",skip:r}=this.context,n=r?Math.floor(r/1e3)+1:void 0;try{const s=await fetch(`${W.apiBase}comic/${e}/chapters?lang=${t}&limit=1000${n&&n>1?`&page=${n}`:""}`),i=K(await s.json());return i?{...i,lang:t,asc:!1}:void 0}catch{return}}};Z(J,"specId","comick"),Z(J,"apiBase","https://api.comick.cc/");let Qe=J;function K(a){if(!Array.isArray(a?.chapters))return;const e=[];return a.chapters.forEach(t=>{const{vol:r,chap:n,hid:s,lang:i,updated_at:o}=t,l=typeof n=="string"&&!isNaN(+n)?+n:void 0;typeof l!="number"||e.some(c=>c.vol==r&&c.chap===l&&c.lang===i)||e.push({slug:s,vol:typeof r=="string"&&!isNaN(+r)?+r:void 0,chap:l,lang:i,ts:new Date(o).valueOf()})}),{chapters:M(e),total:a.total??e.length,hasMore:a.total>a.limit}}var Ze=Object.defineProperty,Ke=(a,e,t)=>e in a?Ze(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,et=(a,e,t)=>(Ke(a,typeof e!="symbol"?e+"":e,t),t);class ee extends R{async getRawReleasesData(){const e=await this.getVM();if(!e)return super.getRawReleasesData();const t=e.LatestJSON.slice(0,100).map(r=>{const n=+r.Chapter.substring(1)/10;return{slug:r.IndexName,name:r.SeriesName,chapters:[{chap:n,slug:`${r.IndexName}-chapter-${n}.html`,ts:new Date(r.Date).valueOf()}]}});return this.finalizeRawReleasesData({rawReleases:t})}resolveTitleSlug(e){const t=super.resolveTitleSlug(e);if(!(!t||t.includes("{")))return t}async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,chapters:te(await this.getVM(),e.slug),hasMoreChapters:!1}}resolveReaderSlug(e,t){return super.resolveReaderSlug(e,t).replace(/-page-\d{1,3}\.html\/?$/,".html")}async getRawReaderData(){const e=await this.getVM();if(!e)return;const t=document.querySelector(".ImageGallery img.img-fluid")?.getAttribute("ng-src"),r=e.IndexName,n=ae(e.CurChapter,r);return this.finalizeRawReaderData({chap:n.chap,slug:n.slug,imgs:tt(e,t??void 0),basePath:"/"+this.siteMeta.readerBase.replace("{titleSlug}",r)+"/",title:{name:e.SeriesName,slug:r,url:`/${this.siteMeta.titleBase}/${r}`,chapters:te(e,r),hasMoreChapters:!1}})}getVM(){return x(50,100,()=>window.angular?.element?.(document.documentElement)?.scope()?.vm)}}et(ee,"specId","manga4life");function te(a,e){return(a?.Chapters??a?.CHAPTERS??[]).sort((t,r)=>r.Chapter-t.Chapter).map(t=>ae(t,e))}function ae(a,e){const t=+a.Chapter.substring(1)/10;return{slug:`${e}-chapter-${t}.html`,chap:t,ts:new Date(a.Date).valueOf()}}function tt(a,e){let t=e?.split(".").slice(-1)[0]??"png";t=t.length>=3&&t.length<=4?t:"png";try{const r=a.CurChapter.Chapter.slice(1,-1),n=a.CurChapter.Chapter[a.CurChapter.Chapter.length-1],s=n!=="0"?`${r}.${n}`:r,i=`https://${a.CurPathName}/manga/${a.IndexName}/${a.CurChapter.Directory?`${a.CurChapter.Directory}/`:""}${s}-`;return a.Pages.map(o=>{const l=(o+"").padStart(3,"0");return`${i}${l}.${t}`})}catch{return}}var at=Object.defineProperty,rt=(a,e,t)=>e in a?at(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,nt=(a,e,t)=>(rt(a,typeof e!="symbol"?e+"":e,t),t);class re extends z{resolveTitleSlug(e){return $(e)?.split("/").filter(Boolean)[1]}async getRawReleasesData(){let e=[];try{e=(await(await fetch("https://api.mangadex.org/chapter?limit=96&offset=0&includes[]=manga&contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&order[readableAt]=desc")).json()).data}catch{return}const t=[];return e.forEach(({relationships:r,attributes:n,id:s})=>{const i=r.find(({type:c})=>c==="manga"),o=typeof n.volume=="string"?+n.volume:void 0,l=typeof n.chapter=="string"?+n.chapter:void 0;l&&t.push({slug:i.id,name:Object.values(i.attributes.title)[0],chapters:[{slug:n.externalUrl||s,vol:o,chap:l,lang:n.translatedLanguage,ts:new Date(n.readableAt).valueOf()}]})}),super.finalizeRawReleasesData({rawReleases:t})}async getRawTitleData(){const e="https://api.mangadex.org/manga/",[t,r]=await Promise.all([j(e,L),j(e,L,"feed")]);if(!t||!r)return;const n=r.value.data?.map?.(o=>{const{attributes:l,id:c}=o;if(typeof l!="object"||typeof c!="string"||!c)return;const{externalUrl:u,title:p,volume:g,chapter:f,translatedLanguage:m}=l;return{slug:u||c,label:p||void 0,vol:typeof g=="string"?+g:void 0,chap:typeof f=="string"?+f:void 0,lang:m||"en",ts:new Date(l.readableAt).valueOf()}}).filter(o=>o?.chap!=null)??[],{data:s}=t.value;if(!s)return;const i=se({data:s,getTagIdsFromNames:o=>this.getTagIdsFromNames(o)});if(i)return{...i,chapters:M(n),hasMoreChapters:(r.value.data.total||0)>(r.value.data.limit||0)}}async getRawReaderData(){const e="https://api.mangadex.org/",[t,r,n]=await Promise.all([j(e,"chapter",L),j(e,"at-home","server",L),j(e,"manga",L,"aggregate")]);if(!t||!r||!n)return;const s=t.value.data,{volume:i,chapter:o,externalUrl:l,translatedLanguage:c}=s.attributes||{},{baseUrl:u,chapter:{data:p,dataSaver:g,hash:f}}=r.value,m=s.relationships?.find?.(C=>C.type==="manga");if(!m)return;const w=se({data:m,getTagIdsFromNames:C=>this.getTagIdsFromNames(C)});if(!w||typeof n.value.volumes!="object")return;const v=ne(n.value)??[];(typeof o!="string"||o==="none")&&!v.length&&v.push({chap:0,slug:s.id});const y=v.findIndex(C=>C.slug===s.id),d=s.relationships?.find?.(C=>C.type==="scanlation_group"),D=u.endsWith("/")?u:u+"/",A=!!localStorage.getItem("md")?.includes?.('"dataSaver":true'),O=`${D}${A?"data-saver":"data"}/`,k=((A?g:p)??[]).map?.(C=>`${O}${f}/${C}`)??[];return{externalUrl:l,vol:typeof i=="string"?+i:void 0,inferVol:v[y]?.inferVol,chap:+o||0,imgs:k,lang:c,slug:s.id,prev:v[y+1],next:v[y-1],basePath:"/chapter/",groupName:d?.attributes?.name,groupUrl:d?.attributes?.website,isWebtoon:m?.attributes?.tags?.some(C=>C.attributes.name.en==="Long Strip"),title:{...w,chapters:v}}}async getRawChaptersData(){if(!this.context)return;const{titleSlug:e,lang:t="en"}=this.context;let r;try{const n=await fetch(`https://api.mangadex.org/manga/${e}/aggregate?translatedLanguage[]=${t}`);r=ne(await n.json())}catch{return}if(r)return{chapters:r,lang:t,asc:!1,hasMore:!1,total:r.length}}}nt(re,"specId","mangadex");function ne(a){if(typeof a.volumes!="object")return;const e=Object.values(a.volumes).map(({volume:t,chapters:r})=>{const n=t==="none"||typeof t!="string"?void 0:+t;return Object.values(r).map(({id:s,chapter:i})=>typeof i!="string"||i==="none"?void 0:{vol:n,chap:+i,slug:s})}).flat().filter(Boolean).reverse();return M(e)}function se({data:a,getTagIdsFromNames:e}){const{id:t,attributes:r,relationships:n}=a;if(!t||typeof t!="string"||typeof r!="object")return;const{title:s,availableTranslatedLanguages:i,altTitles:o,tags:l,contentRating:c}=r;if(typeof s!="object"||i&&!Array.isArray(i))return;const u=Object.values(s)[0];if(!u||typeof u!="string")return;const p=st(),g=(i??[])?.map?.(d=>typeof d=="string"?d:void 0).filter(Boolean)??[],f=g.filter(d=>d&&(!p||p.includes(d))),m=o?.map?.(d=>{const[[,D]=[]]=Object.entries(d);return D}),w=n?.find?.(d=>d.type==="cover_art")?.attributes?.fileName,v=w?`https://mangadex.org/covers/${t}/${w}`:void 0,y=(l||[]).map(d=>d?.attributes?.name?.en).concat(c).filter(Boolean);return{url:`${location.origin}/title/${t}`,slug:t,name:u,altNames:m,langs:f.length>0?f:g.length>0?g:["en"],img:v,tags:e(y)}}function st(){const a=localStorage.getItem("md");if(a)try{const e=JSON.parse(a)?.userPreferences?.filteredLanguages;return e?.length?e:void 0}catch{return}}var it=Object.defineProperty,ot=(a,e,t)=>e in a?it(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,lt=(a,e,t)=>(ot(a,typeof e!="symbol"?e+"":e,t),t);class ie extends R{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,rawReleases:e.rawReleases.map(t=>({...t,id:t.id?.split("?")[0]}))}}async getRawReaderData(){if((await S(".current-viewtype",{lazy:!0,all:!1}))?.textContent?.trim().toLowerCase()!=="volume")return await super.getRawReaderData()}async getRawChaptersData(){const e=this.context?.lang;if(!e)return;const t=await S(`.tab-content[data-name="chapter"] a.dropdown-item[data-code="${e.toUpperCase()}"]`,{lazy:!0,all:!1});if(t)return t.click(),await S(`.tab-content[data-name="chapter"] li.item[data-number] a[href*="/${e}/"]`,{lazy:!0,all:!1}),await super.getRawChaptersData()}}lt(ie,"specId","mangafire");var ct=Object.defineProperty,ut=(a,e,t)=>e in a?ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,gt=(a,e,t)=>(ut(a,typeof e!="symbol"?e+"":e,t),t);class oe extends R{async getRawReaderData(){const e=await super.getRawReaderData();return e&&{...e,imgs:await this.getImgs()}}resolveReaderSlug(e,t){const r=super.resolveReaderSlug(e,t),n=r.split("/").filter(Boolean);return n[n.length-1].startsWith("pg-")?n.slice(0,-1).join("/"):r}async getImgs(){const e=await x(100,20,()=>window.imgsrcs),t=window.CryptoJS,r=t.enc.Hex.parse("e11adc3949ba59abbe56e057f20f883e"),n={iv:t.enc.Hex.parse("1234567890abcdef1234567890abcdef"),padding:t.pad.ZeroPadding};return t.AES.decrypt(e,r,n).toString(t.enc.Utf8).split(",")}}gt(oe,"specId","mangago");var pt=Object.defineProperty,ht=(a,e,t)=>e in a?pt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,dt=(a,e,t)=>(ht(a,typeof e!="symbol"?e+"":e,t),t);class le extends z{async getRawReleasesData(){throw new Error("Unimplemented")}async getRawTitleData(){const e=await this.getPageData();if(!e)return;const t=await this.getPrefLangs()??["en"],r=e.chart_count_lang_to_serials?.find(s=>t?.includes(s?.field))?.count,n=await this.getTitleChapters();return{...this.transformRawTitleData(e),chapters:n,hasMoreChapters:r&&r>n.length}}async getRawReaderData(){const e=await this.getPageData(),t=e?.comicNode?.data,r=e?.imageSet;if(!e||!t||!r)return;const{httpLis:n,wordLis:s}=r,i=this.transformRawTitleData(t);return{slug:location.pathname.split("/").filter(Boolean)[2],lang:e.lang,vol:e.volume??void 0,chap:e.serial,imgs:n.map((o,l)=>`${o}?${s[l]}`),title:{...i,chapters:[],hasMoreChapters:!1},...await this.getReaderPrevNext(),basePath:`/title/${i.slug}/`}}async getRawChaptersData(){if(!this.context)return;const{lang:e,titleSlug:t,skip:r}=this.context;if(!e||!t)return;const n=await this.getPrefLangs()??["en"];let s;try{s=await fetch("https://mangapark.net/apo/",{method:"POST",body:JSON.stringify({query:"query get_content_comic_chapters($comicId: Int!, $isPref: Boolean) { get_content_comic_chapters(comicId: $comicId, isPref: $isPref) {serial chapters{lang cids}}}",variables:{comicId:+t,isPref:n.includes(e)},operationName:"get_content_comic_chapters"}),headers:{"Content-Type":"application/json"}})}catch{return}const i=[],o=(await s.json()).data.get_content_comic_chapters.reverse();return(r?o.slice(r):o).forEach(l=>{const c=l.chapters.find(g=>g.lang===e);if(!c)return;const u=c.cids?.[0];if(!c||!u)return;const p=l.serial;i.push({slug:`${u}-${e}-ch.${p}`,chap:p,ts:l.datePublic})}),{chapters:i,lang:e,asc:!1,hasMore:!1,total:i.length}}transformRawTitleData(e){return{url:e.urlPath,slug:e.id+"",name:e.name,langs:e.chart_count_lang_to_serials?.map?.(t=>t?.field?.toLowerCase()).filter(Boolean),img:e.urlCover300??e.urlCover600??e.urlCoverOri,tags:this.getTagIdsFromNames(e.genres)}}async getReaderPrevNext(){let e,t;return await x(20,100,async()=>{const r=await S("main a.btn",{lazy:!0,all:!0});if(r?.length)return e=r.find(n=>n.textContent?.toLowerCase().includes("prev")),t=r.find(n=>n.textContent?.toLowerCase().includes("next")),e||t?!0:void 0}),{prev:this.getChapterFromBtn(e),next:this.getChapterFromBtn(t)}}getChapterFromBtn(e){const t=e?.getAttribute("href");if(!t)return;const r=t.split("/").filter(Boolean).slice(-1)[0];if(!r)return;const n=T(r.split("-").slice(2).join("-"));if(n)return{slug:r,lang:r.split("-")[1]||void 0,...n}}async getTitleChapters(){const e=[],t=await S(".file-list-by-serial time[time]",{lazy:!0,all:!0});if(!t?.length)return e;let r;return t.forEach(n=>{const s=n.parentElement;for(let i=0;i<5;i++){const o=s?.parentElement?.querySelector('a[href*="/title/"]');if(!o)continue;const l=o.getAttribute("href")?.split("/").filter(Boolean)[2],c=o.textContent?.replace(/(\n|\t)/g," ").trim(),u=T(c);if(!u||!l||r&&r.chap==u.chap&&(r.vol??0)==(u.vol??0))break;const p=+n.getAttribute("time");r={...u,slug:l,lang:l.split("-")[1]||void 0,ts:p===p&&typeof p=="number"?p:void 0},e.push(r);break}}),M(e)}getPageData(){return x(100,50,()=>window.__NEXT_DATA__?.props?.pageProps?.dehydratedState?.queries?.[0]?.state?.data?.data)}getPrefLangs(){return x(40,50,()=>{const e=window.__NEXT_DATA__?.props?.pageProps;if(!e)return;const t=e?.extra?.sets?.general_prefLangs?.filter(Boolean);return t?.length?t:["en"]})}}dt(le,"specId","mangapark");function ce(a,e){const t=a[0]===e?a.substring(1):a;return t[t.length-1]===e?t.substring(0,t.length-1):t}var ft=Object.defineProperty,mt=(a,e,t)=>e in a?ft(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,wt=(a,e,t)=>(mt(a,typeof e!="symbol"?e+"":e,t),t);class ue extends R{async getRawReleasesData(){const e=await super.getRawReleasesData();if(e)return{...e,siteMeta:yt(this.spec.releases,this.siteMeta)}}async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=I(location.pathname);let r;if(e.chapters?.length){const n=this.spec.title.chapter,s=document.querySelector(n.sel),i=$(h(n.url,{root:s}));i&&(r=I(i))}return{...e,siteMeta:E(this.siteMeta,{titleBase:t,readerBase:r})}}async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,siteMeta:E(this.siteMeta,{titleBase:I($(e.title.url)),readerBase:I(location.pathname),idBase:ge()}),title:{...e.title,id:await this.getReaderTitleId()}}}async getRawSearchData(){const e=await super.getRawSearchData();if(!e)return;const t=this.spec.search.title,r=document.querySelector(t.sel),n=h(t.url,{root:r});return{...e,siteMeta:E(this.siteMeta,{titleBase:I($(n)),idBase:ge()})}}async getReaderTitleId(){const e=await window.HISTORY?.getStored?.();if(!e||typeof e!="object")return;const t=Object.values(e).filter(Boolean);if(t.length)return t.sort((r,n)=>n.time-r.time),t[0].manga_ID}}wt(ue,"specId","mangastream");function yt(a,e){if(!a)return;const t={...e,releases:ce(location.pathname,"/")},r=a.title,n=document.querySelector(r.sel)??void 0;if(!n)return;const s=$(h(r.url,{root:n}));if(s===void 0)return;const i=n.querySelector(r.chapter.sel)??void 0;if(!i)return;const o=$(h(r.chapter.url,{root:i}));if(o!==void 0)return t.titleBase=I(s),t.readerBase=I(o),e.titleIdType===U.id&&(h(r.id,{root:n})||(e.titleIdType=U.name)),E(e,t)}function ge(){return document.querySelector('link[rel="shortlink"][href*="/?p="]')?"?p=":void 0}function E(a,e){const t=Object.keys(e),r={...a};let n=!1;return t.forEach(s=>{const i=e[s];i!==a[s]&&(r[s]=i,n=!0)}),n?r:void 0}function I(a){return ce(a,"/").split("/").slice(0,-1).join("/")}var vt=Object.defineProperty,bt=(a,e,t)=>e in a?vt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Rt=(a,e,t)=>(bt(a,typeof e!="symbol"?e+"":e,t),t);class pe extends R{async getRawReaderData(){const e=await super.getRawReaderData();if(!e)return e;let t=e.title.id;if(!t){const n=this.spec.reader.title;n.id&&await S(n.id.split("|")[0],{lazy:!0}),t=h(n.id)}const r=!!this.context?.disableLazyChapters;return{...e,title:{...e.title,id:t,chapters:r?[]:await $t(t),hasMoreChapters:r}}}resolveTitleSlug(e){const t=super.resolveTitleSlug(e);if(!t)return;const r=t.lastIndexOf("-"),n=+t.substring(r+1);return r===-1||isNaN(n)||n<1e3?t:t.substring(0,r)}}Rt(pe,"specId","nettruyen");async function $t(a){if(!a)return[];const e=await fetch(`/Comic/Services/ComicService.asmx/ProcessChapterList?comicId=${a}`).then(t=>t.status===200?t.json():void 0).catch(()=>[]);return e?.chapters?.length?M(e.chapters.map(t=>{const{name:r,url:n}=t,s=T(r);if(!(!s||!n))return{slug:$(n).split("/").filter(Boolean).slice(2).join("/"),...s}})):[]}var Ct=Object.defineProperty,St=(a,e,t)=>e in a?Ct(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,xt=(a,e,t)=>(St(a,typeof e!="symbol"?e+"":e,t),t);class he extends R{async getRawTitleData(){const e=await super.getRawTitleData();return e&&{...e,hasMoreChapters:!!G()}}async getRawChaptersData(){const e=await this.getRawTitleData();if(!e?.hasMoreChapters)return e;const t=this.context?.findContinue;if(t){const l=await this.findContinueChapters({rawTitleData:e,chapter:t});return l?{chapters:l,title:{...e,chapters:[]}}:void 0}const r=this.context?.skip,{chapters:n,...s}=e,i=n.length,o=r&&r>=i?Math.floor(r/i)+1:void 0;return o?{chapters:await this.getChaptersByPage({page:o,titleSlug:e.slug})??[],title:{...s,chapters:[]},hasMore:!!G(o),asc:!1,skip:r}:{chapters:n,title:{...s,chapters:[]},hasMore:!!G()}}async findContinueChapters({rawTitleData:e,chapter:{chap:t},curPage:r=1,cacheChaptersByPage:n={},...s}){const i=n[r]??e.chapters,o=i[i.length-1].chap<=t,l=s.maxPage??Dt();if(o){if(i[0].chap>t){const y=[...i].reverse().find(d=>d.chap>t);return y?[y]:i.slice(0,1)}if(r<=1)return i.slice(0,1)}else if(r===l)return i.slice(-1);const c=e.chapters.length,u=Object.keys(n).map(y=>+y).sort((y,d)=>y-d),p=o?-1:1,g=u[u.indexOf(r)+p];if(g===r+p)return o?n[g].slice(-1).concat(i.slice(0,1)):i.slice(-1).concat(n[g].slice(0,1));const f=o?t-i[0].chap:i[0].chap-t,m=Math.floor(f/c)+1,w=o?Math.max(m,(g??1)+1):Math.min(m,(g??l+1)-1,l),v=await this.getChaptersByPage({page:w,titleSlug:e.slug});if(v)return await this.findContinueChapters({rawTitleData:e,chapter:{chap:t},curPage:w,maxPage:l,cacheChaptersByPage:{...n,1:e.chapters,[w]:v}})}async getChaptersByPage({page:e,titleSlug:t}){const r=de(e);if(!r)return;const n=this.spec.title.chapter,s=n.sel,i=document.querySelector(s),o=x(100,30,()=>{const l=document.querySelector(s);if(l&&i!==l)return!0;r.click()});return r.click(),await o,await this.getChapters(n,{lazy:!1,titleSlug:t})}}xt(he,"specId","reaper");function G(a=1){return de(a+1)}function de(a){const e=`span[wire\\:key="paginator-page-1-page${a}"] button,button[aria-label="Go to page ${a}"]`;return document.querySelector(e)}function Dt(){const a=Array.from(document.querySelectorAll('span[wire\\:key^="paginator-page-"]'));return a.length?+a[a.length-1].getAttribute("wire:key").split("-").slice(-1)[0].replace("page",""):1}var Tt=Object.defineProperty,Mt=(a,e,t)=>e in a?Tt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Pt=(a,e,t)=>(Mt(a,typeof e!="symbol"?e+"":e,t),t);class fe extends R{async getRawTitleData(){const e=await super.getRawTitleData();if(!e)return;const t=h(".info-detail__row > .genre-btn,.info__right .stats__row:first-child|text",{returnAll:!0})?.map(r=>[r,...r.split(" ")]).flat();return me({...e,tags:this.getTagIdsFromNames(t)??[]},".episode-header .episode-cnt")}async getRawReaderData(){const e=await super.getRawReaderData();if(e)return{...e,title:me({...e.title,url:`${location.origin}/series/${e.title.slug}/info`,tags:[]},".episode-list .js-ep-cnt")}}async getRawChaptersData(){if(!this.context)return;const{rawId:e,skip:t}=this.context,r=1e3,n=t?Math.floor(t/1e3)+1:1;try{const s=await fetch(`/series/${e}/episodes?page=${n}&sort=NEWEST&max_limit=${r}`);return It(await s.json())}catch{return}}resolveTitleSlug(e){if(!e)return;const t=e.split("/").filter(Boolean);return t[1]??t[0]}}Pt(fe,"specId","tapas");function me(a,e){const t=_t(e)>20;return{...a,chapters:t?[]:a.chapters,hasMoreChapters:t}}function It(a){const e=a?.data?.episodes;if(!Array.isArray(e))return;const t=e.map(n=>({chap:n.pending_scene??n.scene,slug:n.id+"",ts:new Date(n.publish_date)?.valueOf?.()||void 0})),r=a?.data?.pagination;return{chapters:t,total:r?.total??t.length,hasMore:!!r?.has_next}}function _t(a){return+(document.querySelector(a)?.textContent?.trim().split(" ")[0]||0)}var Nt=Object.defineProperty,Bt=(a,e,t)=>e in a?Nt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,Lt=(a,e,t)=>(Bt(a,typeof e!="symbol"?e+"":e,t),t);class we extends R{async getRawTitleData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(t||!r)return;const n=await super.getRawTitleData();if(!n)return;const s=location.pathname.split("/")[1];return{...n,id:r,langs:[s].filter(Boolean),chapters:n.chapters.map(i=>({...i,lang:s})),hasMoreChapters:(document.querySelector(".paginate")?.childElementCount??1)>1}}async getRawReaderData(){const e=new URLSearchParams(location.search),t=e.get("episode_no"),r=e.get("title_no");if(!t||!r)return;const n=+t;if(n!==n)return;const s=document.title.split("|")[1]?.trim();if(!s)return;const i=location.pathname.split("/"),o=`${i.slice(0,4).join("/")}/list?title_no=${r}`,l=await this.getChapters({sel:"#sequence_scroll li.eg-flick-panel,#toolbar .episode_lst li[data-episode-no]",url:"a|attr:href",label:"|attr:data-episode-no || .num|text"},{lazy:!1}),c=i[1];return{chap:n,lang:c,slug:`${location.pathname}?title_no=${r}&episode_no=${n}`,basePath:"",imgs:await this.getReaderImgs(),isWebtoon:!0,title:{id:r,url:o,slug:o,name:s,langs:[c],chapters:(l??[]).map(u=>({...u,lang:c})),hasMoreChapters:!1}}}async getReaderImgs(){const e=h("#_imageList img|[attr:data-url,attr:src]",{returnAll:!0});return e?.length?e:await x(100,50,()=>window.__viewerState__?.scrollViewerParam?.imageList?.map(({url:t})=>t).filter(Boolean))}resolveReaderSlug(e,t,r){if(!r)return t;if(r.startsWith("http://")||r.startsWith("https://")){const n=q(r);return n.pathname+n.search}return r}}Lt(we,"specId","webtoon");const jt=[Q,Qe,ee,re,ue,pe,he,fe,oe,ie,le,we];function ye(a){const e=jt.find(t=>t.specId===a.spec.id)??R;return new e(a)}async function At(a){const{spec:e}=a;if(e){const t=a.siteMeta??e.meta,r=a.type?[a.type]:ve(t,e.generic);if(!r.length)return;const n=ye({...a,spec:e,siteMeta:t});return await N(r.map(s=>n.getRawPageByType(s,r.length>1)))}return await N((a.genericSpecs??[]).map(t=>{const r=ve(t.meta,t.generic);if(!r.length)return[];const n=ye({...a,spec:t,siteMeta:t.meta});return r.map(s=>n.getRawPageByType(s,!0))}).flat())}function ve(a,e){if(location.pathname==="/")return[];const{titleBase:t,readerBase:r}=a,n=location.pathname.split("/").filter(Boolean),s=be(n,r),i=be(n,t);if(s!==i)return s>i?[b.reader]:[b.title];if(s>0)return[b.reader,b.title];if(n.length===1){const o=[!r&&b.reader,!t&&b.title].filter(Boolean);if(o.length)return o}return!r&&!t||e?[b.reader,b.title]:[]}function be(a,e){if(!e)return 0;const t=e.split("/").filter(Boolean),r=t.includes("{slug}"),n=a.length-t.length;return r&&n!==0||!r&&n<1?0:t.filter((s,i)=>a[i]===s||s==="{titleSlug}"||s==="{lang}"||s==="{slug}").length}_.PageType=b,_.scrape=At});
package/init.js CHANGED
@@ -1 +1 @@
1
- (function(){"use strict";async function g({addListener:n,removeListener:e,transform:i,filter:t,handler:a,onTimeout:o,timeout:r,once:s}){return new Promise(c=>{n(w);const f=()=>s===!0&&e(w),y=r?setTimeout(()=>{f(),c(void 0),o?.()},r):void 0;async function w(d,...p){d=i?i(d):d,d!==void 0&&(!t||t(d,...p))&&(f(),c(d),a?.(d,...p),y&&clearTimeout(y))}})}async function h(n){return(await g({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...n}))?.data}function m({event:n,filter:e,handler:i,senderWindow:t,targetOrigin:a}){h({filter:o=>o.data?.event===n&&!!o.data?.reqId&&(!e||e(o)),handler:async o=>{const r=await i?.(o);(t||window).postMessage({resId:o.data.reqId,result:r},a??"*")}})}async function l(n,e,i){const t=await i(()=>{n=0});if(t!==void 0)return t;if(!(n<=0))return await new Promise(a=>{setTimeout(async()=>{const o=await l(n-1,e,i);a(o)},e)})}const u={delay:{loading:!0}};v();function v(){let n=location.pathname,e={...u};async function i(t,a){if(!a.headers.get("Content-Type")?.includes("application/json")){delete e[t];return}e[t]={res:a.clone()}}window.fetch=new Proxy(window.fetch,{apply:async(t,a,o)=>{n!==location.pathname&&(n=location.pathname,e={...u});const[r,s]=o;return s?.method&&s.method.toLowerCase?.()!=="get"?await t.apply(a,o):(e[r]={loading:!0},delete e.delay,await t.apply(a,[r,s]).then(c=>(i(r,c),c)).catch(c=>{throw delete e[r],c}))}}),m({event:"tk:fetchResult",async handler(t){if(t.origin!==location.origin)return;const{baseUrl:a,segments:o}=t.data.args||{};return!Array.isArray(o)||typeof a!="string"?void 0:await b(()=>e,a,o.filter(r=>typeof r=="string"||typeof r?.isAny=="boolean"))}})}function L(n,e,i){const t=Object.keys(n).find(a=>T(a,e,i));return t?n[t]:void 0}function T(n,e,i){const t=n.replace(location.origin,""),a=e.replace(location.origin,"");if(!t.startsWith(a))return!1;const o=t.replace(a,"").split("?")[0].split("#")[0].split("/").filter(Boolean);return o.length===i.length&&i.every((r,s)=>r?.isAny||r===o[s])}function b(n,e,i){let t=15;return l(150,100,async a=>{const o=L(n(),e,i);if(!o){const r=Object.values(n());!(!r.length||r.some(s=>s.loading))&&!--t&&a();return}return await j(o)})}async function j(n){const{res:e,parsed:i,loading:t}=n;if(!t)return n.parsed=i??await e?.json().catch(async()=>JSON.parse(await e.text())).catch(()=>{}),delete n.res,n.parsed}})();
1
+ (function(){"use strict";async function g({addListener:n,removeListener:e,transform:i,filter:t,handler:r,onTimeout:o,timeout:a,once:s}){return new Promise(c=>{n(w);const f=()=>s===!0&&e(w),y=a?setTimeout(()=>{f(),c(void 0),o?.()},a):void 0;async function w(l,...p){l=i?i(l):l,l!==void 0&&(!t||t(l,...p))&&(f(),c(l),r?.(l,...p),y&&clearTimeout(y))}})}async function h(n){return(await g({addListener:e=>window.addEventListener("message",e),removeListener:e=>window.removeEventListener("message",e),...n}))?.data}function m({event:n,filter:e,handler:i,senderWindow:t,targetOrigin:r}){h({filter:o=>o.data?.event===n&&!!o.data?.reqId&&(!e||e(o)),handler:async o=>{const a=await i?.(o);(t||window).postMessage({resId:o.data.reqId,result:a},r??"*")}})}async function d(n,e,i){const t=await i(()=>{n=0});if(t!==void 0)return t;if(!(n<=0))return await new Promise(r=>{setTimeout(async()=>{const o=await d(n-1,e,i);r(o)},e)})}const u={delay:{loading:!0}};v();function v(){let n=location.pathname,e={...u};async function i(t,r){if(!r.headers.get("Content-Type")?.includes("application/json")){delete e[t];return}e[t]={res:r.clone()}}window.fetch=new Proxy(window.fetch,{apply:async(t,r,o)=>{n!==location.pathname&&(n=location.pathname,e={...u});const[a,s]=o;return s?.method&&s.method.toLowerCase?.()!=="get"?await t.apply(r,o):(e[a]={loading:!0},delete e.delay,await t.apply(r,[a,s]).then(c=>(i(a,c),c)).catch(c=>{throw delete e[a],c}))}}),m({event:"tk:fetchResult",async handler(t){if(t.origin!==location.origin)return;const{baseUrl:r,segments:o}=t.data.args||{};return!Array.isArray(o)||typeof r!="string"?void 0:await b(()=>e,r,o.filter(a=>typeof a=="string"||typeof a?.isAny=="boolean"))}})}function L(n,e,i){const t=Object.keys(n).find(r=>T(r,e,i));return t?{url:t,result:n[t]}:void 0}function T(n,e,i){const t=n.replace(location.origin,""),r=e.replace(location.origin,"");if(!t.startsWith(r))return!1;const o=t.replace(r,"").split("?")[0].split("#")[0].split("/").filter(Boolean);return o.length===i.length&&i.every((a,s)=>a?.isAny||a===o[s])}function b(n,e,i){let t=15;return d(150,100,async r=>{const o=L(n(),e,i);if(!o){const s=Object.values(n());!(!s.length||s.some(c=>c.loading))&&!--t&&r();return}const a=await j(o.result);return a?{url:o.url,value:a}:void 0})}async function j(n){const{res:e,parsed:i,loading:t}=n;if(!t)return n.parsed=i??await e?.json().catch(async()=>JSON.parse(await e.text())).catch(()=>{}),delete n.res,n.parsed}})();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trackkun-dom",
3
3
  "author": "endyquang",
4
- "version": "1.1.6",
4
+ "version": "1.1.7",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Trkun DOM parser",
7
7
  "main": "index.js",
package/specs.json CHANGED
@@ -1 +1 @@
1
- [{"404":"#content > .wrapper > .notf img, body:empty","id":"mangastream","generic":true,"name":"meta[itemprop=\"name\"]|attr:content","meta":{"releases":"","titleBase":"series","readerBase":"","searchBase":"?s=","idBase":"?p=","titleIdType":"id","defaultLang":"en"},"releases":{"title":{"sel":".listupd .utao .uta, .bixbox .bs.styletere","id":"a.series[rel]|attr:rel","name":"h4, .info .tt, .tt a|text","url":"a|attr:href","chapter":{"sel":".luf ul li, .chapter-list > a, .chfiv > li","label":"a, .epxs|text","url":"a|attr:href || |attr:href","at":"a + span, .expdate, .newchtimeluffy|text"}}},"title":{"sel":"#chapterlist > ul","id":".bookmark[data-id]|attr:data-id || #rating-form input[name=\"bs_table_id\"]|attr:value","name":"h1.entry-title|text","img":".thumb img|attr-contain:src","type":".imptdt a[href*=\"type=\"]|text || .imptdt:first-of-type i|text","tags":".postbody .mgen > a|text","chapter":{"sel":"#chapterlist > ul > li","url":"a|attr:href","label":".chapternum|text","at":".chapterdate|text"}},"reader":{"sel":"#readerarea","content":"#readerarea","id":".ctop option:selected|attr:data-id","label":"h1.entry-title|text","imgs":"#readerarea > p > img,#readerarea > img|attr-contain:src","title":{"sel":".headpost .allc","name":"a|text","url":"a|attr:href"},"prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","chapter":{"sel":".ctop #chapter option:not([disabled]):not([value=\"\"])","id":"|attr:data-id","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".listupd .bsx","name":".bigor .tt|text","url":"a|attr:href","img":".limit img|attr-contain:src"}}},{"404":".error-404.not-found","id":"madara","generic":true,"name":"a.logo|attr:title || meta[property=\"og:site_name\"]|attr:content","meta":{"releases":"","titleBase":"manga","readerBase":"manga/{titleSlug}","idBase":"?p=","searchBase":"?post_type=wp-manga&s=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".page-listing-item .page-item-detail, .lastest-content .page-item-detail","id":"[data-post-id]|attr:data-post-id","name":"h3 a, .item-summary h3|text","url":"a|attr:href","chapter":{"sel":".chapter-item","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}},"title":{"lazy":true,"sel":".listing-chapters_wrap, #manga-chapters-holder","id":"#manga-chapters-holder|attr:data-id || .rating-post-id|attr:value || [data-action=\"bookmark\"]|attr:data-post","name":"h1|text","img":".summary_image .img-responsive, .summary_image img, .series-img img|[attr:data-src,attr-contain:src]","tags":"a[rel=\"tag\"][href*=\"genre\"],a[rel=\"tag\"][href*=\"tag\"],.genres-content|text","type":".post-content_item .summary-heading|row:type","chapter":{"sel":"li.wp-manga-chapter, .chapter-ul > li","url":"a|attr:href","label":"a, .chapter-title-date > p|text","at":".c-new-tag|attr:title || .chapter-release-date i|text"}},"reader":{"sel":".entry-content .read-container","content":".reading-content","label":".breadcrumb li.active|text","imgs":".reading-content img|[attr:data-src,attr-contain:src]","title":{"sel":".breadcrumb li:nth-last-child(2) a","id":"#manga-reading-nav-head|attr:data-id","name":"|text","url":"|attr:href"},"prev":"a.btn.prev_page|attr:href","next":"a.btn.next_page|attr:href","chapter":{"sel":"#manga-reading-nav-head select.single-chapter-select > option:not([disabled])","label":"|text","url":"|attr:data-redirect"}},"search":{"title":{"sel":".c-tabs-item__content","name":"h3 a|text","url":"a|attr:href","img":".tab-thumb img|attr-contain:src","chapter":{"sel":".tab-meta","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}}},{"404":".elapi > a[href*=\"/search?q=\"]","id":"mangahub","meta":{"releases":"","titleBase":"manga","readerBase":"chapter/{titleSlug}","searchBase":"search?q=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":".list-group-item .media","name":"h4.media-heading a|text","url":".media-heading a|attr:href","at":".media-heading .small|text","chapter":{"sel":".media-body > a","label":"|text","url":"|attr:href"}}},"title":{"sel":"#chapters-tab .tab-content","name":"#mangadetail h1|text","img":"#mangadetail img.manga-thumb|attr-contain:src","tags":"#mangadetail a.genre-label|text","chapter":{"sel":"#chapters-tab li.list-group-item","label":"a:not([rel]) > span:first-child > span:first-child,a > span:first-child > span:first-child|text","url":"a:not([rel])|attr:href || a|attr:href","at":"small|text"}},"reader":{"content":"#mangareader .container-fluid, #mangareader","label":"h3|text","imgs":"#mangareader div img[alt]|attr-contain:src","prev":".chapter-pager .previous a[href*=\"/chapter/\"]|attr:href","next":".chapter-pager .next a[href*=\"/chapter/\"]|attr:href","title":{"sel":"h3 a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pager-dropdown .dropdown-menu > li > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":".media-manga","name":"h4 a|text","img":".media-left img|attr-contain:src","url":"h4 a|attr:href","chapter":{"sel":".media-body","label":"a[href*=\"/chapter/\"]|text","url":"a[href*=\"/chapter/\"]|attr:href"}}}},{"404":"#content > .wrapper > .notf img","id":"manhwafreak","meta":{"releases":"","titleBase":"manga","readerBase":"","searchBase":"?s=","idBase":"?p=","defaultLang":"en","titleIdType":"name"},"releases":{"title":{"sel":".lastest .lastest-serie","name":".lastest-title a|text","url":"a|attr:href","chapter":{"sel":".lastest-chap > a","label":"li|text","url":"|attr:href","at":"li span|text"}}},"title":{"sel":".series + .chapters .chapter-li","name":".series h1.title|text","img":".series .info img|attr-contain:src","tags":"#info > .left > div > p:first-child|row:genre(s)","type":"#info > .left > div > p:first-child|row:type","chapter":{"sel":".chapter-li > a","label":".chapter-info p|text","url":"|attr:href","at":".chapter-info p:nth-child(2)|text"}},"reader":{"content":"#readerarea","label":"h2.entry-title|text","imgs":"#readerarea img.ts-main-image[data-index]|[attr:data-src,attr-contain:src]","prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","title":{"sel":".breadcrumb > ul > li:nth-child(3) a","name":"span|text","url":"|attr:href"}},"search":{"title":{"sel":".listupd .lastest-serie","name":".lastest-title|text","url":"a|attr:href","img":"img.ts-post-image|attr-contain:src","chapter":{"sel":".lastest-chap > a","label":"li|text","url":"|attr:href","at":"li span|text"}}}},{"404":".error-404.not-found","id":"nettruyen","meta":{"releases":"","titleBase":"truyen-tranh","readerBase":"truyen-tranh/{titleSlug}","searchBase":"tim-truyen?keyword=","defaultLang":"vi","titleIdType":"id"},"releases":{"title":{"sel":".items > .row > .item","id":".comic-item|attr:data-id","name":"h3 a|text","url":"h3 a|attr:href","chapter":{"sel":".chapter","label":"a|text","url":"a|attr:href","at":".time|text"}}},"title":{"id":".rating .star[data-id],.follow-link[data-id]|attr:data-id","name":"#item-detail h1.title-detail|text","img":"#item-detail .detail-info img|attr-contain:src","tags":".kind a[href*=\"/tim-truyen/\"]|text","chapter":{"sel":"#nt_listchapter nav > ul > li.row","label":".chapter a|text","url":".chapter a|attr:href","at":".small|text"}},"reader":{"content":".reading-detail","label":"a.itemcrumb.active > span[itemprop=\"name\"]|text","imgs":".reading-detail > .page-chapter > img,.reading-detail > img|[attr:data-original,attr-contain:src]","prev":"a.prev.a_prev:not(.disabled)|attr:href","next":"a.next.a_next:not(.disabled)|attr:href","title":{"sel":"h1.txt-primary a","id":".follow-link[data-id]|attr:data-id","name":"|text","url":"|attr:href"}},"search":{"title":{"sel":".items > .row > .item","name":"h3 a|text","img":".image img|attr-contain:src","url":"h3 a|attr:href"}}},{"id":"manga4life","meta":{"releases":"","titleBase":"manga","readerBase":"read-online","searchBase":"search/?name=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":".BoxBody.LatestChapters .Chapter","name":".Image > a|attr:title","url":".Image > a|attr:href","chapter":{"sel":".Label > a","label":".ChapterLabel|text","url":"|attr:href","at":".DateLabel|text"}}},"title":{"name":".BoxBody h1|text","img":"meta[property=\"og:image\"],meta[property=\"twitter:image:src\"]|attr:content","tags":"a[href*=\"search/?genre=\"]|text","type":"a[href*=\"search/?type=\"]|text"},"search":{"title":{"sel":".SearchFilterNav + .row > div[ng-repeat^=\"Series\"]","name":"div:nth-child(2) a.SeriesName|text","img":"img|attr-contain:src","url":"a|attr:href"}}},{"id":"mangadex","meta":{"releases":"about:blank","titleBase":"title","readerBase":"chapter","searchBase":"titles?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"slug"}},{"id":"comick","meta":{"home":"home","releases":"about:blank","titleBase":"comic","readerBase":"comic/{titleSlug}","searchBase":"search?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"id"},"releases":{"title":{"sel":"#updates-container div[title]","name":"|attr:title","url":"a[href^=\"/comic/\"]|attr:href","chapter":{"sel":"a:last-child","label":"div:first-child|text","url":"|attr:href","at":"div:nth-child(2)|text"}}},"title":{"name":"h1|text","img":"a[href$=\"/covers\"] > img|attr-contain:src","langs":"#chapter-header + div select option:not([value=\"\"]):not([value=\"all\"])|attr:value","tags":"table a.link[href^=\"/search?genres=\"]|text","type":"h1 ~ div.text-sm span:first-child|row:origination"},"reader":{"lazy":true,"sel":".reader-container","content":".reader-container","label":"select:first-of-type option[selected]|text","imgs":".reader-container img|attr-contain:src","title":{"sel":"div > a[href*=\"/comic/\"]","name":"|text || img[alt]|attr:alt","url":"|attr:href","img":"img|attr-contain:src"},"lang":"select:last-child|value","prev":".reader-container a:first-child[href^=\"/comic/\"]:not(:last-child)|attr:href","next":".reader-container a:last-child[href^=\"/comic/\"]|attr:href","chapter":{"sel":"select:first-of-type option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"id":"bato","meta":{"releases":"","titleBase":"series","readerBase":"chapter","searchBase":"search?word=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":"#series-list > .item","name":"a.item-title|text","url":"a.item-title|attr:href","lang":"em[data-lang]|attr:data-lang","chapter":{"sel":".item-volch","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h3.item-title a|text","img":".attr-cover > img|attr-contain:src","langs":".title-set em[data-lang]|attr:data-lang","tags":".attr-main .attr-item .text-muted|row:genres","chapter":{"sel":".episode-list > .main > .item","label":"a.chapt > b|text","url":"a.chapt|attr:href","at":".extra > i|text"}},"reader":{"content":"#viewer","label":"title|text","imgs":"img.page-img|attr-contain:src","title":{"sel":"h3.nav-title a","name":"|text","url":"|attr:href"},"lang":"h3.nav-title em[data-lang]|attr:data-lang","prev":".nav-prev > a[href^=\"/chapter/\"]|attr:href","next":".nav-next > a[href^=\"/chapter/\"]|attr:href","chapter":{"sel":".nav-epis > select option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"404":"#error > .attention","id":"mangago","meta":{"releases":"list/latest","titleBase":"read-manga","readerBase":"read-manga/{titleSlug}","searchBase":"r/l_search/?name=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":"ul#search_list > li > div","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}},"title":{"name":".w-title h1|text","img":".article .cover img,#information img|attr-contain:src","tags":".manga_right a[href*=\"/genre/\"],.manga_info ul.uk-list a[href*=\"/genre/\"]|text","chapter":{"sel":"#chapter_table tbody tr, table.uk-table tbody tr","label":"h4 a b, a.chico b|text || a.chico|text","url":"h4 a, a.chico|attr:href","at":"td:last-child|text"}},"reader":{"label":"#navi h3 span:last-child,#series + a.chapter|text","title":{"sel":"#navi a#series,#reader-nav .nav li:first-child a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pagebar.top ul.dropdown-menu.chapter > li > a,#series ~ ul.chapter li a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#search_list > li .box","name":"a.thm-effect|attr:title","img":"a.thm-effect img|attr-contain:src","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}}},{"404":".nf-large + .nf-desc + a[href=\"/home\"]","id":"kakalot","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"#latest-chap .inner > .item","id":".item-info h3|attr:data-id","name":".item-info h3 a|text","url":"a|attr:href","chapter":{"sel":".chapter-list > .cl-item","label":"a.chapter-name|text","url":"a|attr:href","at":".time|text"}}},"title":{"lazy":true,"sel":"#chapt-list .cl-header","id":"#main|attr:data-id","name":".detail-box h3.manga-name|text","img":".detail-box .manga-poster-img|attr-contain:src","tags":".detail-box .line-content a[href*=\"/genre/\"]|text","langs":"#chap-lang .lang-item|attr:data-code","chapter":{"sel":"#chapt-list .reading-list > .item","label":"a.chapter-name|text","url":"a.chapter-name|attr:href","at":".item-time|text"}},"reader":{"content":"#list-image","imgDivs":".card-wrap[data-url]","label":".breadcrumb-item.active|text","imgs":"#list-image .card-wrap[data-url]|attr:data-url","title":{"sel":".breadcrumb-item:nth-child(2) a","id":"#reading|attr:data-manga-id","name":"|text","url":"|attr:href"},"chapter":{"sel":".kbreadcrumb + .reading-option option.reading-item","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".manga-list > .inner > .item","name":".manga-name a|attr:title","img":".manga-poster img|attr-contain:src","url":".manga-name a|attr:href","chapter":{"sel":".latest-chapter .chapter-name","label":"|text","url":"|attr:href"}}}},{"id":"reaper","meta":{"releases":"latest/comics","titleBase":"comics","readerBase":"comics/{titleSlug}/chapters","searchBase":"?s=","defaultLang":"en","titleIdType":"name"},"releases":{"title":{"sel":"main h2 + div .grid.grid-cols-1 > div","name":"p a|text","url":"a|attr:href","chapter":{"sel":"p + div > a","label":"|text","url":"|attr:href","at":"p|text"}}},"title":{"sel":"div > ul[role=\"list\"]:first-child","name":"h1|text","img":"main .container img[alt]|attr-contain:src","chapter":{"sel":"div > ul[role=\"list\"]:first-child li[wire\\:key^=\"comic-chapter-list\"] a","label":"p|text","url":"|attr:href","at":"div:last-child > p|text"}},"reader":{"content":"main","label":"title|text","imgs":"main nav ~ img.max-w-full|attr-contain:src","prev":"main nav:first-of-type > div:first-child a|attr:href","next":"main nav:first-of-type > div:last-child a:last-child:not(:first-child)|attr:href","title":{"sel":"body","name":"main p|text","url":"main nav:first-of-type > div:last-child a:first-child|attr:href"}}},{"id":"tapas","meta":{"titleBase":"series/{slug}/info","readerBase":"episode","defaultLang":"en","titleIdType":"id","chapters":"about:blank"},"title":{"id":".button--subscribe|attr:data-tiara-event-meta-series-id","name":".info .title|text","img":".thumb img|attr:src","chapter":{"sel":".episode-list .episode-list__item > a","url":"|attr:data-id","label":"|attr:data-scene-number"}},"reader":{"content":".viewer__body","id":"div[id^=\"episode-\"][data-ep-id]|attr:data-ep-id","label":"div[id^=\"episode-\"][data-ep-scene]|attr:data-ep-scene","imgs":".viewer__body img|[attr:data-src,attr-contain:src]","prev":"div[data-prev-id]:not([data-prev-id=\"-1\"])|attr:data-prev-id","next":"div[data-next-id]:not([data-next-id=\"-1\"])|attr:data-next-id","title":{"sel":"body","id":".subscribe-btn|attr:data-id","url":".subscribe-btn|attr:data-id","name":".series-info .title|text","img":".series-info .thumb img|attr:src"},"chapter":{"sel":".episode-list .list-body > li[data-id]","url":"|attr:data-id","label":".info__label|text"}}},{"id":"mangafire","meta":{"home":"home","releases":"updated","titleBase":"manga","readerBase":"read/{titleSlug}/{lang}","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".unit > .inner","id":"a[data-tip]|attr:data-tip","name":".info a|text","url":"a|attr:href","chapter":{"sel":"ul.content li a","label":"span:first-child|text","url":"|attr:href","at":"span:last-child"}}},"title":{"id":".bookmark[data-id]|attr:data-id","name":".info h1[itemprop=\"name\"]|text","img":".poster img|attr-contain:src","tags":"#info-rating a[href*=\"/genre/\"]|text","langs":".tab-content[data-name=\"chapter\"] a.dropdown-item[data-code]|attr:data-code","chapter":{"sel":".tab-content[data-name=\"chapter\"] li.item[data-number]","url":"a|attr:href","label":"|attr:data-number","at":"a span:last-child|text"}},"reader":{"imgs":"","content":"#page-wrapper","imgDivs":".page","lstripBtn":".setting-tab.page-layout [data-value=\"longstrip\"]","label":"#number-panel ul li a[href*=\"/read/\"][data-number].active|attr:data-number","title":{"sel":"#ctrl-menu .head a","id":"body|attr:data-id","url":"|attr:href","name":"|text"},"chapter":{"sel":"#number-panel ul li a[href*=\"/read/\"][data-number]","label":"|attr:data-number","url":"|attr:href"}}},{"id":"mangapark","meta":{"chapters":"about:blank","titleBase":"title","readerBase":"title/{titleSlug}","defaultLang":"en","titleIdType":"slug"}},{"id":"webtoon","meta":{"titleBase":"","readerBase":"","defaultLang":"en","chapters":"meta.reader","titleIdType":"id"},"title":{"name":"h1.subj,.detail_info > p.subj,.info > h3.subj|text","img":"meta[property=\"og:image\"]|attr:content","tags":".info > h2.genre,.detail_info > p.genre,.info > p.genre|text","chapter":{"sel":"li._episodeItem","label":"|attr:data-episode-no","url":"a|attr:href","at":".date|text"}}},{"id":"mangareader","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"#latest-chap .mls-wrap > .item","url":"a|attr:href","name":".manga-name a|text","chapter":{"sel":".fd-list .chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":"[data-manga-id]|attr:data-manga-id","name":"#ani_detail h2.manga-name|text","img":"#ani_detail img.manga-poster-img|attr:src","type":".anisc-info .item-head|row:type","tags":".anisc-detail .genres a|text","langs":"a.c-select-lang|attr:data-code","chapter":{"sel":".chapters-list-ul > ul > li","label":"|attr:data-number","url":"a|attr:href"}},"reader":{"imgs":"","content":"#main-wrapper","imgDivs":".iv-card[data-url]","lstrip":"a.active[data-value=\"vertical\"]","lstripBtn":".dropdown-menu a[data-value=\"vertical\"]","label":".reading-list .chapter-item.active|attr:data-number","title":{"id":"[data-manga-id]|attr:data-manga-id","sel":"#header a.hr-manga","name":"h2,.manga-name|text","url":"|attr:href"},"chapter":{"sel":".reading-list.active > .chapter-item","url":"a|attr:href","label":"|attr:data-number"}}}]
1
+ [{"404":"#content > .wrapper > .notf img, body:empty","id":"mangastream","generic":true,"name":"meta[itemprop=\"name\"]|attr:content","meta":{"releases":"","titleBase":"series","readerBase":"","searchBase":"?s=","idBase":"?p=","titleIdType":"id","defaultLang":"en"},"releases":{"title":{"sel":".listupd .utao .uta, .bixbox .bs.styletere","id":"a.series[rel]|attr:rel","name":"h4, .info .tt, .tt a|text","url":"a|attr:href","chapter":{"sel":".luf ul li, .chapter-list > a, .chfiv > li","label":"a, .epxs|text","url":"a|attr:href || |attr:href","at":"a + span, .expdate, .newchtimeluffy|text"}}},"title":{"sel":"#chapterlist > ul","id":".bookmark[data-id]|attr:data-id || #rating-form input[name=\"bs_table_id\"]|attr:value","name":"h1.entry-title|text","img":".thumb img|attr-contain:src","type":".imptdt a[href*=\"type=\"]|text || .imptdt:first-of-type i|text","tags":".postbody .mgen > a|text","chapter":{"sel":"#chapterlist > ul > li","url":"a|attr:href","label":".chapternum|text","at":".chapterdate|text"}},"reader":{"sel":"#readerarea","content":"#readerarea","id":".ctop option:selected|attr:data-id","label":"h1.entry-title|text","imgs":"#readerarea > p > img,#readerarea > img|attr-contain:src","title":{"sel":".headpost .allc","name":"a|text","url":"a|attr:href"},"prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","chapter":{"sel":".ctop #chapter option:not([disabled]):not([value=\"\"])","id":"|attr:data-id","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".listupd .bsx","name":".bigor .tt|text","url":"a|attr:href","img":".limit img|attr-contain:src"}}},{"404":".error-404.not-found","id":"madara","generic":true,"name":"a.logo|attr:title || meta[property=\"og:site_name\"]|attr:content","meta":{"releases":"","titleBase":"manga","readerBase":"manga/{titleSlug}","idBase":"?p=","searchBase":"?post_type=wp-manga&s=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".page-listing-item .page-item-detail, .lastest-content .page-item-detail","id":"[data-post-id]|attr:data-post-id","name":"h3 a, .item-summary h3|text","url":"a|attr:href","chapter":{"sel":".chapter-item","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}},"title":{"lazy":true,"sel":".listing-chapters_wrap, #manga-chapters-holder","id":"#manga-chapters-holder|attr:data-id || .rating-post-id|attr:value || [data-action=\"bookmark\"]|attr:data-post","name":"h1|text","img":".summary_image .img-responsive, .summary_image img, .series-img img|[attr:data-src,attr-contain:src]","tags":"a[rel=\"tag\"][href*=\"genre\"],a[rel=\"tag\"][href*=\"tag\"],.genres-content|text","type":".post-content_item .summary-heading|row:type","chapter":{"sel":"li.wp-manga-chapter, .chapter-ul > li","url":"a|attr:href","label":"a, .chapter-title-date > p|text","at":".c-new-tag|attr:title || .chapter-release-date i|text"}},"reader":{"sel":".entry-content .read-container","content":".reading-content","label":".breadcrumb li.active|text","imgs":".reading-content img|[attr:data-src,attr-contain:src]","title":{"sel":".breadcrumb li:nth-last-child(2) a","id":"#manga-reading-nav-head|attr:data-id","name":"|text","url":"|attr:href"},"prev":"a.btn.prev_page|attr:href","next":"a.btn.next_page|attr:href","chapter":{"sel":"#manga-reading-nav-head select.single-chapter-select > option:not([disabled])","label":"|text","url":"|attr:data-redirect"}},"search":{"title":{"sel":".c-tabs-item__content","name":"h3 a|text","url":"a|attr:href","img":".tab-thumb img|attr-contain:src","chapter":{"sel":".tab-meta","label":".chapter a|text","url":".chapter a|attr:href","at":".c-new-tag|attr:title || .post-on|text"}}}},{"404":".elapi > a[href*=\"/search?q=\"]","id":"mangahub","meta":{"releases":"","titleBase":"manga","readerBase":"chapter/{titleSlug}","searchBase":"search?q=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":".list-group-item .media","name":"h4.media-heading a|text","url":".media-heading a|attr:href","at":".media-heading .small|text","chapter":{"sel":".media-body > a","label":"|text","url":"|attr:href"}}},"title":{"sel":"#chapters-tab .tab-content","name":"#mangadetail h1|text","img":"#mangadetail img.manga-thumb|attr-contain:src","tags":"#mangadetail a.genre-label|text","chapter":{"sel":"#chapters-tab li.list-group-item","label":"a:not([rel]) > span:first-child > span:first-child,a > span:first-child > span:first-child|text","url":"a:not([rel])|attr:href || a|attr:href","at":"small|text"}},"reader":{"content":"#mangareader .container-fluid, #mangareader","label":"h3|text","imgs":"#mangareader div img[alt]|attr-contain:src","prev":".chapter-pager .previous a[href*=\"/chapter/\"]|attr:href","next":".chapter-pager .next a[href*=\"/chapter/\"]|attr:href","title":{"sel":"h3 a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pager-dropdown .dropdown-menu > li > a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":".media-manga","name":"h4 a|text","img":".media-left img|attr-contain:src","url":"h4 a|attr:href","chapter":{"sel":".media-body","label":"a[href*=\"/chapter/\"]|text","url":"a[href*=\"/chapter/\"]|attr:href"}}}},{"404":"#content > .wrapper > .notf img","id":"manhwafreak","meta":{"releases":"","titleBase":"manga","readerBase":"","searchBase":"?s=","idBase":"?p=","defaultLang":"en","titleIdType":"name"},"releases":{"title":{"sel":".lastest .lastest-serie","name":".lastest-title a|text","url":"a|attr:href","chapter":{"sel":".lastest-chap > a","label":"li|text","url":"|attr:href","at":"li span|text"}}},"title":{"sel":".series + .chapters .chapter-li","name":".series h1.title|text","img":".series .info img|attr-contain:src","tags":"#info > .left > div > p:first-child|row:genre(s)","type":"#info > .left > div > p:first-child|row:type","chapter":{"sel":".chapter-li > a","label":".chapter-info p|text","url":"|attr:href","at":".chapter-info p:nth-child(2)|text"}},"reader":{"content":"#readerarea","label":"h2.entry-title|text","imgs":"#readerarea img.ts-main-image[data-index]|[attr:data-src,attr-contain:src]","prev":"a.ch-prev-btn:not(.disabled)|attr:href","next":"a.ch-next-btn:not(.disabled)|attr:href","title":{"sel":".breadcrumb > ul > li:nth-child(3) a","name":"span|text","url":"|attr:href"}},"search":{"title":{"sel":".listupd .lastest-serie","name":".lastest-title|text","url":"a|attr:href","img":"img.ts-post-image|attr-contain:src","chapter":{"sel":".lastest-chap > a","label":"li|text","url":"|attr:href","at":"li span|text"}}}},{"404":".error-404.not-found","id":"nettruyen","meta":{"releases":"","titleBase":"truyen-tranh","readerBase":"truyen-tranh/{titleSlug}","searchBase":"tim-truyen?keyword=","defaultLang":"vi","titleIdType":"id"},"releases":{"title":{"sel":".items > .row > .item","id":".comic-item|attr:data-id","name":"h3 a|text","url":"h3 a|attr:href","chapter":{"sel":".chapter","label":"a|text","url":"a|attr:href","at":".time|text"}}},"title":{"id":".rating .star[data-id],.follow-link[data-id]|attr:data-id","name":"#item-detail h1.title-detail|text","img":"#item-detail .detail-info img|attr-contain:src","tags":".kind a[href*=\"/tim-truyen/\"]|text","chapter":{"sel":"#nt_listchapter nav > ul > li.row","label":".chapter a|text","url":".chapter a|attr:href","at":".small|text"}},"reader":{"content":".reading-detail","label":"a.itemcrumb.active > span[itemprop=\"name\"]|text","imgs":".reading-detail > .page-chapter > img,.reading-detail > img|[attr:data-original,attr-contain:src]","prev":"a.prev.a_prev:not(.disabled)|attr:href","next":"a.next.a_next:not(.disabled)|attr:href","title":{"sel":"h1.txt-primary a","id":".follow-link[data-id]|attr:data-id","name":"|text","url":"|attr:href"}},"search":{"title":{"sel":".items > .row > .item","name":"h3 a|text","img":".image img|attr-contain:src","url":"h3 a|attr:href"}}},{"id":"manga4life","meta":{"releases":"","titleBase":"manga","readerBase":"read-online","searchBase":"search/?name=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":".BoxBody.LatestChapters .Chapter","name":".Image > a|attr:title","url":".Image > a|attr:href","chapter":{"sel":".Label > a","label":".ChapterLabel|text","url":"|attr:href","at":".DateLabel|text"}}},"title":{"name":".BoxBody h1|text","img":"meta[property=\"og:image\"],meta[property=\"twitter:image:src\"]|attr:content","tags":"a[href*=\"search/?genre=\"]|text","type":"a[href*=\"search/?type=\"]|text"},"search":{"title":{"sel":".SearchFilterNav + .row > div[ng-repeat^=\"Series\"]","name":"div:nth-child(2) a.SeriesName|text","img":"img|attr-contain:src","url":"a|attr:href"}}},{"id":"mangadex","meta":{"releases":"about:blank","titleBase":"title","readerBase":"chapter","searchBase":"titles?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"slug"}},{"id":"comick","meta":{"home":"home","releases":"about:blank","titleBase":"comic","readerBase":"comic/{titleSlug}","searchBase":"search?q=","defaultLang":"en","chapters":"about:blank","titleIdType":"id"},"releases":{"title":{"sel":"#updates-container div[title]","name":"|attr:title","url":"a[href^=\"/comic/\"]|attr:href","chapter":{"sel":"a:last-child","label":"div:first-child|text","url":"|attr:href","at":"div:nth-child(2)|text"}}},"title":{"name":"h1|text","img":"a[href$=\"/covers\"] > img|attr-contain:src","langs":"#chapter-header + div select option:not([value=\"\"]):not([value=\"all\"])|attr:value","tags":"table a.link[href^=\"/search?genres=\"]|text","type":"h1 ~ div.text-sm span:first-child|row:origination"},"reader":{"lazy":true,"sel":".reader-container","content":".reader-container","label":"select:first-of-type option[selected]|text","imgs":".reader-container img|attr-contain:src","title":{"sel":"div > a[href*=\"/comic/\"]","name":"|text || img[alt]|attr:alt","url":"|attr:href"},"lang":"select:last-of-type|value","prev":".reader-container a:first-child[href^=\"/comic/\"]:not(:last-child)|attr:href","next":".reader-container a:last-child[href^=\"/comic/\"]|attr:href","chapter":{"sel":"select:first-of-type option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"id":"bato","meta":{"releases":"","titleBase":"series","readerBase":"chapter","searchBase":"search?word=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":"#series-list > .item","name":"a.item-title|text","url":"a.item-title|attr:href","lang":"em[data-lang]|attr:data-lang","chapter":{"sel":".item-volch","label":"a|text","url":"a|attr:href","at":"i|text"}}},"title":{"name":"h3.item-title a|text","img":".attr-cover > img|attr-contain:src","langs":".title-set em[data-lang]|attr:data-lang","tags":".attr-main .attr-item .text-muted|row:genres","chapter":{"sel":".episode-list > .main > .item","label":"a.chapt > b|text","url":"a.chapt|attr:href","at":".extra > i|text"}},"reader":{"content":"#viewer","label":"title|text","imgs":"img.page-img|attr-contain:src","title":{"sel":"h3.nav-title a","name":"|text","url":"|attr:href"},"lang":"h3.nav-title em[data-lang]|attr:data-lang","prev":".nav-prev > a[href^=\"/chapter/\"]|attr:href","next":".nav-next > a[href^=\"/chapter/\"]|attr:href","chapter":{"sel":".nav-epis > select option:not([disabled]):not([value=\"\"])","label":"|text","url":"|attr:value"}}},{"404":"#error > .attention","id":"mangago","meta":{"releases":"list/latest","titleBase":"read-manga","readerBase":"read-manga/{titleSlug}","searchBase":"r/l_search/?name=","defaultLang":"en","titleIdType":"slug"},"releases":{"title":{"sel":"ul#search_list > li > div","name":"a.thm-effect|attr:title","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}},"title":{"name":".w-title h1|text","img":".article .cover img,#information img|attr-contain:src","tags":".manga_right a[href*=\"/genre/\"],.manga_info ul.uk-list a[href*=\"/genre/\"]|text","chapter":{"sel":"#chapter_table tbody tr, table.uk-table tbody tr","label":"h4 a b, a.chico b|text || a.chico|text","url":"h4 a, a.chico|attr:href","at":"td:last-child|text"}},"reader":{"label":"#navi h3 span:last-child,#series + a.chapter|text","title":{"sel":"#navi a#series,#reader-nav .nav li:first-child a","name":"|text","url":"|attr:href"},"chapter":{"sel":".pagebar.top ul.dropdown-menu.chapter > li > a,#series ~ ul.chapter li a","label":"|text","url":"|attr:href"}},"search":{"title":{"sel":"#search_list > li .box","name":"a.thm-effect|attr:title","img":"a.thm-effect img|attr-contain:src","url":"a.thm-effect|attr:href","chapter":{"sel":"a.chico","label":"|text","url":"|attr:href"}}}},{"404":".nf-large + .nf-desc + a[href=\"/home\"]","id":"kakalot","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","searchBase":"search?keyword=","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"#latest-chap .inner > .item","id":".item-info h3|attr:data-id","name":".item-info h3 a|text","url":"a|attr:href","chapter":{"sel":".chapter-list > .cl-item","label":"a.chapter-name|text","url":"a|attr:href","at":".time|text"}}},"title":{"lazy":true,"sel":"#chapt-list .cl-header","id":"#main|attr:data-id","name":".detail-box h3.manga-name|text","img":".detail-box .manga-poster-img|attr-contain:src","tags":".detail-box .line-content a[href*=\"/genre/\"]|text","langs":"#chap-lang .lang-item|attr:data-code","chapter":{"sel":"#chapt-list .reading-list > .item","label":"a.chapter-name|text","url":"a.chapter-name|attr:href","at":".item-time|text"}},"reader":{"content":"#list-image","imgDivs":".card-wrap[data-url]","label":".breadcrumb-item.active|text","imgs":"#list-image .card-wrap[data-url]|attr:data-url","title":{"sel":".breadcrumb-item:nth-child(2) a","id":"#reading|attr:data-manga-id","name":"|text","url":"|attr:href"},"chapter":{"sel":".kbreadcrumb + .reading-option option.reading-item","label":"|text","url":"|attr:value"}},"search":{"title":{"sel":".manga-list > .inner > .item","name":".manga-name a|attr:title","img":".manga-poster img|attr-contain:src","url":".manga-name a|attr:href","chapter":{"sel":".latest-chapter .chapter-name","label":"|text","url":"|attr:href"}}}},{"id":"reaper","meta":{"releases":"latest/comics","titleBase":"comics","readerBase":"comics/{titleSlug}/chapters","searchBase":"?s=","defaultLang":"en","titleIdType":"name"},"releases":{"title":{"sel":"main h2 + div .grid.grid-cols-1 > div","name":"p a|text","url":"a|attr:href","chapter":{"sel":"p + div > a","label":"|text","url":"|attr:href","at":"p|text"}}},"title":{"sel":"div > ul[role=\"list\"]:first-child","name":"h1|text","img":"main .container img[alt]|attr-contain:src","chapter":{"sel":"div > ul[role=\"list\"]:first-child li[wire\\:key^=\"comic-chapter-list\"] a","label":"p|text","url":"|attr:href","at":"div:last-child > p|text"}},"reader":{"content":"main","label":"title|text","imgs":"main nav ~ img.max-w-full|attr-contain:src","prev":"main nav:first-of-type > div:first-child a|attr:href","next":"main nav:first-of-type > div:last-child a:last-child:not(:first-child)|attr:href","title":{"sel":"body","name":"main p|text","url":"main nav:first-of-type > div:last-child a:first-child|attr:href"}}},{"id":"tapas","meta":{"titleBase":"series/{slug}/info","readerBase":"episode","defaultLang":"en","titleIdType":"id","chapters":"about:blank"},"title":{"id":".button--subscribe|attr:data-tiara-event-meta-series-id","name":".info .title|text","img":".thumb img|attr:src","chapter":{"sel":".episode-list .episode-list__item > a","url":"|attr:data-id","label":"|attr:data-scene-number"}},"reader":{"content":".viewer__body","id":"div[id^=\"episode-\"][data-ep-id]|attr:data-ep-id","label":"div[id^=\"episode-\"][data-ep-scene]|attr:data-ep-scene","imgs":".viewer__body img|[attr:data-src,attr-contain:src]","prev":"div[data-prev-id]:not([data-prev-id=\"-1\"])|attr:data-prev-id","next":"div[data-next-id]:not([data-next-id=\"-1\"])|attr:data-next-id","title":{"sel":"body","id":".subscribe-btn|attr:data-id","url":".subscribe-btn|attr:data-id","name":".series-info .title|text","img":".series-info .thumb img|attr:src"},"chapter":{"sel":".episode-list .list-body > li[data-id]","url":"|attr:data-id","label":".info__label|text"}}},{"id":"mangafire","meta":{"home":"home","releases":"updated","titleBase":"manga","readerBase":"read/{titleSlug}/{lang}","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":".unit > .inner","id":"a[data-tip]|attr:data-tip","name":".info a|text","url":"a|attr:href","chapter":{"sel":"ul.content li a","label":"span:first-child|text","url":"|attr:href","at":"span:last-child"}}},"title":{"id":".bookmark[data-id]|attr:data-id","name":".info h1[itemprop=\"name\"]|text","img":".poster img|attr-contain:src","tags":"#info-rating a[href*=\"/genre/\"]|text","langs":".tab-content[data-name=\"chapter\"] a.dropdown-item[data-code]|attr:data-code","chapter":{"sel":".tab-content[data-name=\"chapter\"] li.item[data-number]","url":"a|attr:href","label":"|attr:data-number","at":"a span:last-child|text"}},"reader":{"imgs":"","content":"#page-wrapper","imgDivs":".page","lstripBtn":".setting-tab.page-layout [data-value=\"longstrip\"]","label":"#number-panel ul li a[href*=\"/read/\"][data-number].active|attr:data-number","title":{"sel":"#ctrl-menu .head a","id":"body|attr:data-id","url":"|attr:href","name":"|text"},"chapter":{"sel":"#number-panel ul li a[href*=\"/read/\"][data-number]","label":"|attr:data-number","url":"|attr:href"}}},{"id":"mangapark","meta":{"chapters":"about:blank","titleBase":"title","readerBase":"title/{titleSlug}","defaultLang":"en","titleIdType":"slug"}},{"id":"webtoon","meta":{"titleBase":"","readerBase":"","defaultLang":"en","chapters":"meta.reader","titleIdType":"id"},"title":{"name":"h1.subj,.detail_info > p.subj,.info > h3.subj|text","img":"meta[property=\"og:image\"]|attr:content","tags":".info > h2.genre,.detail_info > p.genre,.info > p.genre|text","chapter":{"sel":"li._episodeItem","label":"|attr:data-episode-no","url":"a|attr:href","at":".date|text"}}},{"id":"mangareader","meta":{"home":"home","releases":"home","titleBase":"","readerBase":"read/{titleSlug}/{lang}","defaultLang":"en","titleIdType":"id"},"releases":{"title":{"sel":"#latest-chap .mls-wrap > .item","url":"a|attr:href","name":".manga-name a|text","chapter":{"sel":".fd-list .chapter a","label":"|text","url":"|attr:href"}}},"title":{"id":"[data-manga-id]|attr:data-manga-id","name":"#ani_detail h2.manga-name|text","img":"#ani_detail img.manga-poster-img|attr:src","type":".anisc-info .item-head|row:type","tags":".anisc-detail .genres a|text","langs":"a.c-select-lang|attr:data-code","chapter":{"sel":".chapters-list-ul > ul > li","label":"|attr:data-number","url":"a|attr:href"}},"reader":{"imgs":"","content":"#main-wrapper","imgDivs":".iv-card[data-url]","lstrip":"a.active[data-value=\"vertical\"]","lstripBtn":".dropdown-menu a[data-value=\"vertical\"]","label":".reading-list .chapter-item.active|attr:data-number","title":{"id":"[data-manga-id]|attr:data-manga-id","sel":"#header a.hr-manga","name":"h2,.manga-name|text","url":"|attr:href"},"chapter":{"sel":".reading-list.active > .chapter-item","url":"a|attr:href","label":"|attr:data-number"}}}]