[{"data":1,"prerenderedAt":651},["ShallowReactive",2],{"navigation_docs":3,"trending-repo-LibreSpark\u002FLibreTV":244},[4,29,99,119,189],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89,94],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"path":96,"stem":97,"icon":98},"Similar functions","\u002Fguides\u002Fsimilarity","2.guides\u002F13.similarity","i-lucide-list-tree",{"title":100,"icon":6,"path":101,"stem":102,"children":103,"page":6},"Concepts","\u002Fconcepts","3.concepts",[104,109,114],{"title":105,"path":106,"stem":107,"icon":108},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":110,"path":111,"stem":112,"icon":113},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":115,"path":116,"stem":117,"icon":118},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":120,"icon":6,"path":121,"stem":122,"children":123,"page":6},"Reference","\u002Freference","4.reference",[124,129,134,139,176,181,185],{"title":125,"path":126,"stem":127,"icon":128},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":130,"path":131,"stem":132,"icon":133},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":135,"path":136,"stem":137,"icon":138},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":140,"icon":6,"path":141,"stem":142,"children":143},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[144,146,151,156,161,166,171],{"title":140,"path":141,"stem":142,"icon":145},"i-lucide-file-chart-column",{"title":147,"path":148,"stem":149,"icon":150},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":152,"path":153,"stem":154,"icon":155},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":157,"path":158,"stem":159,"icon":160},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":162,"path":163,"stem":164,"icon":165},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":167,"path":168,"stem":169,"icon":170},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":172,"path":173,"stem":174,"icon":175},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":177,"path":178,"stem":179,"icon":180},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":182,"path":183,"stem":184,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":186,"path":187,"stem":188,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":190,"icon":6,"path":191,"stem":192,"children":193,"page":6},"Project","\u002Fproject","5.project",[194,199,204,209,234,239],{"title":195,"path":196,"stem":197,"icon":198},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":200,"path":201,"stem":202,"icon":203},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":205,"path":206,"stem":207,"icon":208},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":210,"icon":6,"path":211,"stem":212,"children":213},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[214,216,221,225,230],{"title":210,"path":211,"stem":212,"icon":215},"i-lucide-gauge",{"title":217,"path":218,"stem":219,"icon":220},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":222,"path":223,"stem":224,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":226,"path":227,"stem":228,"icon":229},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":231,"path":232,"stem":233,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":235,"path":236,"stem":237,"icon":238},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":240,"path":241,"stem":242,"icon":243},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"name":245,"url":246,"appearances":247,"latest":263},"LibreSpark\u002FLibreTV","https:\u002F\u002Fgithub.com\u002FLibreSpark\u002FLibreTV",[248],{"date":249,"rank":250,"stars":251,"starsToday":252,"headSha":253,"sources":254,"lines":255,"clones":256,"duplicatedLines":257,"percentage":258,"codePercentage":259,"codeSources":260,"healthScore":261,"healthGrade":262},"2026-10-16",4,18227,978,"a24ad336a3f7c8a16ca93d1f1198e08ac6b7e943",141,22245,24,227,1.02,0.93,105,75.9,"B",{"date":249,"generatedAt":264,"name":245,"url":246,"description":265,"language":266,"stars":251,"starsToday":252,"defaultBranch":267,"headSha":253,"durationMs":268,"total":269,"formats":273,"topClones":318,"code":462,"health":547,"complexity":580,"deadCode":628},"2026-10-16T05:28:44.455Z","一分钟搭建影视站，支持Docker等部署方式","TypeScript","main",1025,{"sources":254,"lines":255,"tokens":270,"clones":256,"duplicatedLines":257,"duplicatedTokens":271,"percentage":258,"percentageTokens":272},139512,1613,1.16,[274,281,288,294,300,305,308,311,315],{"format":275,"sources":276,"lines":277,"clones":278,"duplicatedLines":279,"percentage":280},"typescript",89,12122,12,103,0.85,{"format":282,"sources":283,"lines":284,"clones":285,"duplicatedLines":286,"percentage":287},"tsx",33,8410,8,90,1.07,{"format":289,"sources":290,"lines":291,"clones":290,"duplicatedLines":292,"percentage":293},"yaml",3,345,28,8.12,{"format":295,"sources":296,"lines":297,"clones":296,"duplicatedLines":298,"percentage":299},"css",1,156,6,3.85,{"format":301,"sources":302,"lines":303,"clones":304,"duplicatedLines":304,"percentage":304},"bash",10,710,0,{"format":306,"sources":296,"lines":307,"clones":304,"duplicatedLines":304,"percentage":304},"markdown",246,{"format":309,"sources":296,"lines":310,"clones":304,"duplicatedLines":304,"percentage":304},"perl",168,{"format":312,"sources":313,"lines":314,"clones":304,"duplicatedLines":304,"percentage":304},"json",2,62,{"format":316,"sources":296,"lines":317,"clones":304,"duplicatedLines":304,"percentage":304},"javascript",26,[319,350,372,397,407,420,431,439,444,455],{"format":275,"lines":320,"tokens":321,"first":322,"others":326,"copies":290,"excerpt":333,"excerptSecond":345,"kind":349},15,78,{"name":323,"start":324,"end":325},"src\u002Flib\u002Fm3u8.ts",85,99,[327,330],{"name":323,"start":328,"end":329},169,178,{"name":323,"start":331,"end":332},257,266,{"lines":334,"total":320},[335,336,337,338,339,340,341,342,343,344],"export function stripLeadAdGroup(m3u8Content: string): string {","  if (!m3u8Content) return '';","  const lines = m3u8Content.split('\\n');","  const isDisc = (l: string) => l.trim() === '#EXT-X-DISCONTINUITY';","  const isSegment = (l: string) => {","    const t = l.trim();","    return t !== '' && !t.startsWith('#');","  };","","  \u002F\u002F 多分组封装（采集站把流按固定块切分、每个衔接处都打 DISCONTINUITY）不是广告。",{"lines":346,"total":302},[347,336,337,338,339,340,341,342,343,348],"function stripMarkedAdGroups(m3u8Content: string): string {","  const drop = new Array\u003Cboolean>(lines.length).fill(false);","code",{"format":282,"lines":351,"tokens":352,"first":353,"others":357,"copies":313,"excerpt":361,"kind":349},19,110,{"name":354,"start":355,"end":356},"src\u002Fcomponents\u002Fdouban-section.tsx",120,138,[358],{"name":354,"start":359,"end":360},165,183,{"lines":362,"total":351},[363,364,365,366,343,367,368,369,370,371],"      {name}","    \u003C\u002FChipButton>","  ))}","\u003C\u002Fdiv>","{query.isError ? (","  \u003Cp className=\"text-center text-sm text-faint py-8\">推荐内容加载失败，可稍后重试或在设置中关闭\u003C\u002Fp>",") : query.isLoading ? (","  \u003CGridSkeleton \u002F>",") : (",{"format":275,"lines":302,"tokens":373,"first":374,"others":378,"copies":313,"excerpt":382,"excerptSecond":394,"kind":349},107,{"name":375,"start":376,"end":377},"src\u002Flib\u002Fm3u8-downloader.ts",231,240,[379],{"name":375,"start":380,"end":381},244,253,{"lines":383,"total":302},[384,385,386,387,388,389,390,391,392,393],"for (let i = 1; i \u003C= total; i++) {","  if (signal.aborted) return;","  await pause.waitIfPaused();","  const resp = await cache.match(new Request(chunkKey(i)));","  if (!resp) throw new Error(`分片 ${i} 缓存丢失，请重试`);","  let data = await resp.arrayBuffer();","  if (aesKey && parsed.aesConf) {","    data = await decryptSegment(data, aesKey, parsed.aesConf.iv, parsed.mediaSequence, i - 1);","  }","  await transmuxer.pushAndTransmux(new Uint8Array(data));",{"lines":395,"total":302},[384,385,386,387,388,389,390,391,392,396],"  await target.write(new Uint8Array(data));",{"format":295,"lines":298,"tokens":279,"first":398,"others":402,"copies":313,"kind":406},{"name":399,"start":400,"end":401},"src\u002Fapp\u002Fglobals.css",30,35,[403],{"name":399,"start":404,"end":405},61,66,"styles",{"format":275,"lines":298,"tokens":408,"first":409,"others":413,"copies":290,"kind":349},51,{"name":410,"start":411,"end":412},"src\u002Flib\u002Fenv-live-sources.ts",9,14,[414,416],{"name":415,"start":411,"end":412},"src\u002Flib\u002Fenv-sources.ts",{"name":417,"start":418,"end":419},"src\u002Flib\u002Fenv-subscriptions.ts",13,18,{"format":282,"lines":412,"tokens":421,"first":422,"others":426,"copies":313,"kind":349},81,{"name":423,"start":424,"end":425},"src\u002Fcomponents\u002Flive-source-manager.tsx",159,172,[427],{"name":428,"start":429,"end":430},"src\u002Fcomponents\u002Fsource-manager.tsx",321,334,{"format":275,"lines":411,"tokens":432,"first":433,"others":435,"copies":313,"kind":438},77,{"name":434,"start":296,"end":411},"src\u002Flib\u002Fstore.test.ts",[436],{"name":437,"start":296,"end":411},"src\u002Flib\u002Fsubscription-sync.test.ts","tests",{"format":275,"lines":411,"tokens":440,"first":441,"others":442,"copies":313,"kind":349},74,{"name":410,"start":419,"end":317},[443],{"name":415,"start":419,"end":317},{"format":289,"lines":445,"tokens":446,"first":447,"others":450,"copies":313,"kind":454},11,68,{"name":448,"start":449,"end":432},".github\u002Fworkflows\u002Fdocker-publish.yml",67,[451],{"name":448,"start":452,"end":453},129,139,"data",{"format":282,"lines":445,"tokens":446,"first":456,"others":459,"copies":313,"kind":349},{"name":354,"start":457,"end":458},84,94,[460],{"name":354,"start":461,"end":356},128,{"sources":260,"lines":463,"tokens":464,"clones":465,"duplicatedLines":466,"duplicatedTokens":467,"percentage":259,"percentageTokens":287,"formats":468,"topClones":478,"generated":545},17617,102118,16,163,1097,[469,470,474,476,477],{"format":282,"sources":283,"lines":284,"clones":285,"duplicatedLines":286,"percentage":287},{"format":275,"sources":404,"lines":471,"clones":285,"duplicatedLines":472,"percentage":473},8319,73,0.88,{"format":301,"sources":411,"lines":475,"clones":304,"duplicatedLines":304,"percentage":304},694,{"format":309,"sources":296,"lines":310,"clones":304,"duplicatedLines":304,"percentage":304},{"format":316,"sources":296,"lines":317,"clones":304,"duplicatedLines":304,"percentage":304},[479,488,494,502,507,511,515,519,527,535],{"format":275,"lines":320,"tokens":321,"first":480,"others":481,"copies":290,"excerpt":484,"excerptSecond":486,"kind":349},{"name":323,"start":324,"end":325},[482,483],{"name":323,"start":328,"end":329},{"name":323,"start":331,"end":332},{"lines":485,"total":320},[335,336,337,338,339,340,341,342,343,344],{"lines":487,"total":302},[347,336,337,338,339,340,341,342,343,348],{"format":282,"lines":351,"tokens":352,"first":489,"others":490,"copies":313,"excerpt":492,"kind":349},{"name":354,"start":355,"end":356},[491],{"name":354,"start":359,"end":360},{"lines":493,"total":351},[363,364,365,366,343,367,368,369,370,371],{"format":275,"lines":302,"tokens":373,"first":495,"others":496,"copies":313,"excerpt":498,"excerptSecond":500,"kind":349},{"name":375,"start":376,"end":377},[497],{"name":375,"start":380,"end":381},{"lines":499,"total":302},[384,385,386,387,388,389,390,391,392,393],{"lines":501,"total":302},[384,385,386,387,388,389,390,391,392,396],{"format":275,"lines":298,"tokens":408,"first":503,"others":504,"copies":290,"kind":349},{"name":410,"start":411,"end":412},[505,506],{"name":415,"start":411,"end":412},{"name":417,"start":418,"end":419},{"format":282,"lines":412,"tokens":421,"first":508,"others":509,"copies":313,"kind":349},{"name":423,"start":424,"end":425},[510],{"name":428,"start":429,"end":430},{"format":275,"lines":411,"tokens":440,"first":512,"others":513,"copies":313,"kind":349},{"name":410,"start":419,"end":317},[514],{"name":415,"start":419,"end":317},{"format":282,"lines":445,"tokens":446,"first":516,"others":517,"copies":313,"kind":349},{"name":354,"start":457,"end":458},[518],{"name":354,"start":461,"end":356},{"format":282,"lines":298,"tokens":449,"first":520,"others":523,"copies":313,"kind":349},{"name":428,"start":521,"end":522},801,806,[524],{"name":428,"start":525,"end":526},847,852,{"format":282,"lines":528,"tokens":404,"first":529,"others":531,"copies":313,"kind":349},7,{"name":423,"start":530,"end":317},20,[532],{"name":428,"start":533,"end":534},213,219,{"format":282,"lines":302,"tokens":536,"first":537,"others":540,"copies":313,"kind":349},60,{"name":538,"start":539,"end":297},"src\u002Fcomponents\u002Fdetail-modal.tsx",147,[541],{"name":542,"start":543,"end":544},"src\u002Fcomponents\u002Fswitch-source.tsx",194,201,{"files":304,"minified":304,"sample":546},[],{"score":261,"grade":262,"size":548,"dimensions":552},{"lines":549,"files":550,"class":551},21420,133,"M",[553,565,573],{"id":554,"source":555,"value":556,"adjusted":557,"lines":558,"halfLife":559,"formats":560,"excluded":561,"weight":296,"score":564},"duplication","jscpd",0.9,1.1,193,8.5,[275,282,301,309,316],[562,563,454],"markup","text",91.2,{"id":566,"source":555,"value":567,"adjusted":568,"lines":283,"halfLife":569,"coverage":570,"weight":571,"score":572},"dead-code",0.2,0.4,7.5,96,0.96,96.2,{"id":574,"source":555,"value":575,"adjusted":576,"lines":577,"halfLife":578,"weight":296,"score":579},"complexity",52.1,49.4,11152,50,50.4,{"total":581,"mean":582,"files":583},4534,34.1,[584,588,593,597,601,606,611,616,619,623],{"path":428,"complexity":585,"lines":586,"bytes":587},290,1271,48663,{"path":589,"complexity":590,"lines":591,"bytes":592},"src\u002Flib\u002Fstore.ts",239,872,38654,{"path":594,"complexity":297,"lines":595,"bytes":596},"src\u002Fcomponents\u002Flive-channel-list.tsx",594,23898,{"path":598,"complexity":355,"lines":599,"bytes":600},"src\u002Fcomponents\u002Fplayer-shell.tsx",528,22460,{"path":602,"complexity":603,"lines":604,"bytes":605},"src\u002Fapp\u002Fapi\u002Flive\u002Fprobe\u002Froute.ts",119,591,22088,{"path":607,"complexity":608,"lines":609,"bytes":610},"src\u002Flib\u002Ftvbox-parser.ts",114,397,13861,{"path":612,"complexity":613,"lines":614,"bytes":615},"src\u002Fapp\u002Flive\u002Fpage.tsx",113,468,20612,{"path":323,"complexity":352,"lines":617,"bytes":618},309,13216,{"path":620,"complexity":260,"lines":621,"bytes":622},"src\u002Fapp\u002Fwatch\u002Fpage.tsx",402,15321,{"path":624,"complexity":625,"lines":626,"bytes":627},"src\u002Fcomponents\u002Flive-player.tsx",100,430,16328,{"percentage":629,"findings":250,"files":630,"byCategory":631,"largest":634},0.16,124,[632],{"category":633,"count":250},"unused-export",[635,639,642,646],{"category":633,"path":636,"name":637,"line":638,"lines":445},"src\u002Flib\u002Fvideo-cache.ts","hasCachedSegment",98,{"category":633,"path":636,"name":640,"line":641,"lines":445},"deleteEpisodeCache",262,{"category":633,"path":643,"name":644,"line":645,"lines":298},"src\u002Flib\u002Ffetch-utils.ts","fetchUpstreamJson",116,{"category":633,"path":647,"name":648,"line":649,"lines":650},"src\u002Flib\u002Fclient-api.ts","SearchFailure",267,5,1792128591389]