mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 00:49:29 +08:00
1 line
No EOL
30 KiB
Text
1 line
No EOL
30 KiB
Text
{"version":3,"file":"vfs.cjs.production.min.js","sources":["../src/index.ts"],"sourcesContent":["type System = import(\"typescript\").System\ntype CompilerOptions = import(\"typescript\").CompilerOptions\ntype CustomTransformers = import(\"typescript\").CustomTransformers\ntype LanguageServiceHost = import(\"typescript\").LanguageServiceHost\ntype CompilerHost = import(\"typescript\").CompilerHost\ntype SourceFile = import(\"typescript\").SourceFile\ntype TS = typeof import(\"typescript\")\n\nlet hasLocalStorage = false\ntry {\n hasLocalStorage = typeof localStorage !== `undefined`\n} catch (error) {}\n\nconst hasProcess = typeof process !== `undefined`\nconst shouldDebug = (hasLocalStorage && localStorage.getItem(\"DEBUG\")) || (hasProcess && process.env.DEBUG)\nconst debugLog = shouldDebug ? console.log : (_message?: any, ..._optionalParams: any[]) => \"\"\n\nexport interface VirtualTypeScriptEnvironment {\n sys: System\n languageService: import(\"typescript\").LanguageService\n getSourceFile: (fileName: string) => import(\"typescript\").SourceFile | undefined\n createFile: (fileName: string, content: string) => void\n updateFile: (fileName: string, content: string, replaceTextSpan?: import(\"typescript\").TextSpan) => void\n}\n\n/**\n * Makes a virtual copy of the TypeScript environment. This is the main API you want to be using with\n * @typescript/vfs. A lot of the other exposed functions are used by this function to get set up.\n *\n * @param sys an object which conforms to the TS Sys (a shim over read/write access to the fs)\n * @param rootFiles a list of files which are considered inside the project\n * @param ts a copy pf the TypeScript module\n * @param compilerOptions the options for this compiler run\n * @param customTransformers custom transformers for this compiler run\n */\n\nexport function createVirtualTypeScriptEnvironment(\n sys: System,\n rootFiles: string[],\n ts: TS,\n compilerOptions: CompilerOptions = {},\n customTransformers?: CustomTransformers\n): VirtualTypeScriptEnvironment {\n const mergedCompilerOpts = { ...defaultCompilerOptions(ts), ...compilerOptions }\n\n const { languageServiceHost, updateFile } = createVirtualLanguageServiceHost(\n sys,\n rootFiles,\n mergedCompilerOpts,\n ts,\n customTransformers\n )\n const languageService = ts.createLanguageService(languageServiceHost)\n const diagnostics = languageService.getCompilerOptionsDiagnostics()\n\n if (diagnostics.length) {\n const compilerHost = createVirtualCompilerHost(sys, compilerOptions, ts)\n throw new Error(ts.formatDiagnostics(diagnostics, compilerHost.compilerHost))\n }\n\n return {\n // @ts-ignore\n name: \"vfs\",\n sys,\n languageService,\n getSourceFile: fileName => languageService.getProgram()?.getSourceFile(fileName),\n\n createFile: (fileName, content) => {\n updateFile(ts.createSourceFile(fileName, content, mergedCompilerOpts.target!, false))\n },\n updateFile: (fileName, content, optPrevTextSpan) => {\n const prevSourceFile = languageService.getProgram()!.getSourceFile(fileName)\n if (!prevSourceFile) {\n throw new Error(\"Did not find a source file for \" + fileName)\n }\n const prevFullContents = prevSourceFile.text\n\n // TODO: Validate if the default text span has a fencepost error?\n const prevTextSpan = optPrevTextSpan ?? ts.createTextSpan(0, prevFullContents.length)\n const newText =\n prevFullContents.slice(0, prevTextSpan.start) +\n content +\n prevFullContents.slice(prevTextSpan.start + prevTextSpan.length)\n const newSourceFile = ts.updateSourceFile(prevSourceFile, newText, {\n span: prevTextSpan,\n newLength: content.length,\n })\n\n updateFile(newSourceFile)\n },\n }\n}\n\n/**\n * Grab the list of lib files for a particular target, will return a bit more than necessary (by including\n * the dom) but that's OK\n *\n * @param target The compiler settings target baseline\n * @param ts A copy of the TypeScript module\n */\nexport const knownLibFilesForCompilerOptions = (compilerOptions: CompilerOptions, ts: TS) => {\n const target = compilerOptions.target || ts.ScriptTarget.ES5\n const lib = compilerOptions.lib || []\n\n const files = [\n \"lib.d.ts\",\n \"lib.dom.d.ts\",\n \"lib.dom.iterable.d.ts\",\n \"lib.webworker.d.ts\",\n \"lib.webworker.importscripts.d.ts\",\n \"lib.scripthost.d.ts\",\n \"lib.es5.d.ts\",\n \"lib.es6.d.ts\",\n \"lib.es2015.collection.d.ts\",\n \"lib.es2015.core.d.ts\",\n \"lib.es2015.d.ts\",\n \"lib.es2015.generator.d.ts\",\n \"lib.es2015.iterable.d.ts\",\n \"lib.es2015.promise.d.ts\",\n \"lib.es2015.proxy.d.ts\",\n \"lib.es2015.reflect.d.ts\",\n \"lib.es2015.symbol.d.ts\",\n \"lib.es2015.symbol.wellknown.d.ts\",\n \"lib.es2016.array.include.d.ts\",\n \"lib.es2016.d.ts\",\n \"lib.es2016.full.d.ts\",\n \"lib.es2017.d.ts\",\n \"lib.es2017.full.d.ts\",\n \"lib.es2017.intl.d.ts\",\n \"lib.es2017.object.d.ts\",\n \"lib.es2017.sharedmemory.d.ts\",\n \"lib.es2017.string.d.ts\",\n \"lib.es2017.typedarrays.d.ts\",\n \"lib.es2018.asyncgenerator.d.ts\",\n \"lib.es2018.asynciterable.d.ts\",\n \"lib.es2018.d.ts\",\n \"lib.es2018.full.d.ts\",\n \"lib.es2018.intl.d.ts\",\n \"lib.es2018.promise.d.ts\",\n \"lib.es2018.regexp.d.ts\",\n \"lib.es2019.array.d.ts\",\n \"lib.es2019.d.ts\",\n \"lib.es2019.full.d.ts\",\n \"lib.es2019.object.d.ts\",\n \"lib.es2019.string.d.ts\",\n \"lib.es2019.symbol.d.ts\",\n \"lib.es2020.d.ts\",\n \"lib.es2020.full.d.ts\",\n \"lib.es2020.string.d.ts\",\n \"lib.es2020.symbol.wellknown.d.ts\",\n \"lib.es2020.bigint.d.ts\",\n \"lib.es2020.promise.d.ts\",\n \"lib.es2020.sharedmemory.d.ts\",\n \"lib.es2020.intl.d.ts\",\n \"lib.es2021.d.ts\",\n \"lib.es2021.full.d.ts\",\n \"lib.es2021.promise.d.ts\",\n \"lib.es2021.string.d.ts\",\n \"lib.es2021.weakref.d.ts\",\n \"lib.esnext.d.ts\",\n \"lib.esnext.full.d.ts\",\n \"lib.esnext.intl.d.ts\",\n \"lib.esnext.promise.d.ts\",\n \"lib.esnext.string.d.ts\",\n \"lib.esnext.weakref.d.ts\",\n ]\n\n const targetToCut = ts.ScriptTarget[target]\n const matches = files.filter(f => f.startsWith(`lib.${targetToCut.toLowerCase()}`))\n const targetCutIndex = files.indexOf(matches.pop()!)\n\n const getMax = (array: number[]) =>\n array && array.length ? array.reduce((max, current) => (current > max ? current : max)) : undefined\n\n // Find the index for everything in\n const indexesForCutting = lib.map(lib => {\n const matches = files.filter(f => f.startsWith(`lib.${lib.toLowerCase()}`))\n if (matches.length === 0) return 0\n\n const cutIndex = files.indexOf(matches.pop()!)\n return cutIndex\n })\n\n const libCutIndex = getMax(indexesForCutting) || 0\n\n const finalCutIndex = Math.max(targetCutIndex, libCutIndex)\n return files.slice(0, finalCutIndex + 1)\n}\n\n/**\n * Sets up a Map with lib contents by grabbing the necessary files from\n * the local copy of typescript via the file system.\n */\nexport const createDefaultMapFromNodeModules = (compilerOptions: CompilerOptions, ts?: typeof import(\"typescript\")) => {\n const tsModule = ts || require(\"typescript\")\n const path = requirePath()\n const fs = requireFS()\n\n const getLib = (name: string) => {\n const lib = path.dirname(require.resolve(\"typescript\"))\n return fs.readFileSync(path.join(lib, name), \"utf8\")\n }\n\n const libs = knownLibFilesForCompilerOptions(compilerOptions, tsModule)\n const fsMap = new Map<string, string>()\n libs.forEach(lib => {\n fsMap.set(\"/\" + lib, getLib(lib))\n })\n return fsMap\n}\n\n/**\n * Adds recursively files from the FS into the map based on the folder\n */\nexport const addAllFilesFromFolder = (map: Map<string, string>, workingDir: string): void => {\n const path = requirePath()\n const fs = requireFS()\n\n const walk = function (dir: string) {\n let results: string[] = []\n const list = fs.readdirSync(dir)\n list.forEach(function (file: string) {\n file = path.join(dir, file)\n const stat = fs.statSync(file)\n if (stat && stat.isDirectory()) {\n /* Recurse into a subdirectory */\n results = results.concat(walk(file))\n } else {\n /* Is a file */\n results.push(file)\n }\n })\n return results\n }\n\n const allFiles = walk(workingDir)\n\n allFiles.forEach(lib => {\n const fsPath = \"/node_modules/@types\" + lib.replace(workingDir, \"\")\n const content = fs.readFileSync(lib, \"utf8\")\n const validExtensions = [\".ts\", \".tsx\"]\n\n if (validExtensions.includes(path.extname(fsPath))) {\n map.set(fsPath, content)\n }\n })\n}\n\n/** Adds all files from node_modules/@types into the FS Map */\nexport const addFilesForTypesIntoFolder = (map: Map<string, string>) =>\n addAllFilesFromFolder(map, \"node_modules/@types\")\n\n/**\n * Create a virtual FS Map with the lib files from a particular TypeScript\n * version based on the target, Always includes dom ATM.\n *\n * @param options The compiler target, which dictates the libs to set up\n * @param version the versions of TypeScript which are supported\n * @param cache should the values be stored in local storage\n * @param ts a copy of the typescript import\n * @param lzstring an optional copy of the lz-string import\n * @param fetcher an optional replacement for the global fetch function (tests mainly)\n * @param storer an optional replacement for the localStorage global (tests mainly)\n */\nexport const createDefaultMapFromCDN = (\n options: CompilerOptions,\n version: string,\n cache: boolean,\n ts: TS,\n lzstring?: typeof import(\"lz-string\"),\n fetcher?: typeof fetch,\n storer?: typeof localStorage\n) => {\n const fetchlike = fetcher || fetch\n const fsMap = new Map<string, string>()\n const files = knownLibFilesForCompilerOptions(options, ts)\n const prefix = `https://typescript.azureedge.net/cdn/${version}/typescript/lib/`\n\n function zip(str: string) {\n return lzstring ? lzstring.compressToUTF16(str) : str\n }\n\n function unzip(str: string) {\n return lzstring ? lzstring.decompressFromUTF16(str) : str\n }\n\n // Map the known libs to a node fetch promise, then return the contents\n function uncached() {\n return Promise.all(files.map(lib => fetchlike(prefix + lib).then(resp => resp.text()))).then(contents => {\n contents.forEach((text, index) => fsMap.set(\"/\" + files[index], text))\n })\n }\n\n // A localstorage and lzzip aware version of the lib files\n function cached() {\n const storelike = storer || localStorage\n\n const keys = Object.keys(localStorage)\n keys.forEach(key => {\n // Remove anything which isn't from this version\n if (key.startsWith(\"ts-lib-\") && !key.startsWith(\"ts-lib-\" + version)) {\n storelike.removeItem(key)\n }\n })\n\n return Promise.all(\n files.map(lib => {\n const cacheKey = `ts-lib-${version}-${lib}`\n const content = storelike.getItem(cacheKey)\n\n if (!content) {\n // Make the API call and store the text concent in the cache\n return fetchlike(prefix + lib)\n .then(resp => resp.text())\n .then(t => {\n storelike.setItem(cacheKey, zip(t))\n return t\n })\n } else {\n return Promise.resolve(unzip(content))\n }\n })\n ).then(contents => {\n contents.forEach((text, index) => {\n const name = \"/\" + files[index]\n fsMap.set(name, text)\n })\n })\n }\n\n const func = cache ? cached : uncached\n return func().then(() => fsMap)\n}\n\nfunction notImplemented(methodName: string): any {\n throw new Error(`Method '${methodName}' is not implemented.`)\n}\n\nfunction audit<ArgsT extends any[], ReturnT>(\n name: string,\n fn: (...args: ArgsT) => ReturnT\n): (...args: ArgsT) => ReturnT {\n return (...args) => {\n const res = fn(...args)\n\n const smallres = typeof res === \"string\" ? res.slice(0, 80) + \"...\" : res\n debugLog(\"> \" + name, ...args)\n debugLog(\"< \" + smallres)\n\n return res\n }\n}\n\n/** The default compiler options if TypeScript could ever change the compiler options */\nconst defaultCompilerOptions = (ts: typeof import(\"typescript\")): CompilerOptions => {\n return {\n ...ts.getDefaultCompilerOptions(),\n jsx: ts.JsxEmit.React,\n strict: true,\n esModuleInterop: true,\n module: ts.ModuleKind.ESNext,\n suppressOutputPathCheck: true,\n skipLibCheck: true,\n skipDefaultLibCheck: true,\n moduleResolution: ts.ModuleResolutionKind.NodeJs,\n }\n}\n\n// \"/DOM.d.ts\" => \"/lib.dom.d.ts\"\nconst libize = (path: string) => path.replace(\"/\", \"/lib.\").toLowerCase()\n\n/**\n * Creates an in-memory System object which can be used in a TypeScript program, this\n * is what provides read/write aspects of the virtual fs\n */\nexport function createSystem(files: Map<string, string>): System {\n return {\n args: [],\n createDirectory: () => notImplemented(\"createDirectory\"),\n // TODO: could make a real file tree\n directoryExists: audit(\"directoryExists\", directory => {\n return Array.from(files.keys()).some(path => path.startsWith(directory))\n }),\n exit: () => notImplemented(\"exit\"),\n fileExists: audit(\"fileExists\", fileName => files.has(fileName) || files.has(libize(fileName))),\n getCurrentDirectory: () => \"/\",\n getDirectories: () => [],\n getExecutingFilePath: () => notImplemented(\"getExecutingFilePath\"),\n readDirectory: audit(\"readDirectory\", directory => (directory === \"/\" ? Array.from(files.keys()) : [])),\n readFile: audit(\"readFile\", fileName => files.get(fileName) || files.get(libize(fileName))),\n resolvePath: path => path,\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: () => notImplemented(\"write\"),\n writeFile: (fileName, contents) => {\n files.set(fileName, contents)\n },\n }\n}\n\n/**\n * Creates a file-system backed System object which can be used in a TypeScript program, you provide\n * a set of virtual files which are prioritised over the FS versions, then a path to the root of your\n * project (basically the folder your node_modules lives)\n */\nexport function createFSBackedSystem(files: Map<string, string>, _projectRoot: string, ts: TS): System {\n // We need to make an isolated folder for the tsconfig, but also need to be able to resolve the\n // existing node_modules structures going back through the history\n const root = _projectRoot + \"/vfs\"\n const path = requirePath()\n\n // The default System in TypeScript\n const nodeSys = ts.sys\n const tsLib = path.dirname(require.resolve(\"typescript\"))\n\n return {\n // @ts-ignore\n name: \"fs-vfs\",\n root,\n args: [],\n createDirectory: () => notImplemented(\"createDirectory\"),\n // TODO: could make a real file tree\n directoryExists: audit(\"directoryExists\", directory => {\n return Array.from(files.keys()).some(path => path.startsWith(directory)) || nodeSys.directoryExists(directory)\n }),\n exit: nodeSys.exit,\n fileExists: audit(\"fileExists\", fileName => {\n if (files.has(fileName)) return true\n // Don't let other tsconfigs end up touching the vfs\n if (fileName.includes(\"tsconfig.json\") || fileName.includes(\"tsconfig.json\")) return false\n if (fileName.startsWith(\"/lib\")) {\n const tsLibName = `${tsLib}/${fileName.replace(\"/\", \"\")}`\n return nodeSys.fileExists(tsLibName)\n }\n return nodeSys.fileExists(fileName)\n }),\n getCurrentDirectory: () => root,\n getDirectories: nodeSys.getDirectories,\n getExecutingFilePath: () => notImplemented(\"getExecutingFilePath\"),\n readDirectory: audit(\"readDirectory\", (...args) => {\n if (args[0] === \"/\") {\n return Array.from(files.keys())\n } else {\n return nodeSys.readDirectory(...args)\n }\n }),\n readFile: audit(\"readFile\", fileName => {\n if (files.has(fileName)) return files.get(fileName)\n if (fileName.startsWith(\"/lib\")) {\n const tsLibName = `${tsLib}/${fileName.replace(\"/\", \"\")}`\n const result = nodeSys.readFile(tsLibName)\n if (!result) {\n const libs = nodeSys.readDirectory(tsLib)\n throw new Error(\n `TSVFS: A request was made for ${tsLibName} but there wasn't a file found in the file map. You likely have a mismatch in the compiler options for the CDN download vs the compiler program. Existing Libs: ${libs}.`\n )\n }\n return result\n }\n return nodeSys.readFile(fileName)\n }),\n resolvePath: path => {\n if (files.has(path)) return path\n return nodeSys.resolvePath(path)\n },\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: () => notImplemented(\"write\"),\n writeFile: (fileName, contents) => {\n files.set(fileName, contents)\n },\n }\n}\n\n/**\n * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System\n * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile\n * instances to the in-memory file system.\n */\nexport function createVirtualCompilerHost(sys: System, compilerOptions: CompilerOptions, ts: TS) {\n const sourceFiles = new Map<string, SourceFile>()\n const save = (sourceFile: SourceFile) => {\n sourceFiles.set(sourceFile.fileName, sourceFile)\n return sourceFile\n }\n\n type Return = {\n compilerHost: CompilerHost\n updateFile: (sourceFile: SourceFile) => boolean\n }\n\n const vHost: Return = {\n compilerHost: {\n ...sys,\n getCanonicalFileName: fileName => fileName,\n getDefaultLibFileName: () => \"/\" + ts.getDefaultLibFileName(compilerOptions), // '/lib.d.ts',\n // getDefaultLibLocation: () => '/',\n getDirectories: () => [],\n getNewLine: () => sys.newLine,\n getSourceFile: fileName => {\n return (\n sourceFiles.get(fileName) ||\n save(\n ts.createSourceFile(\n fileName,\n sys.readFile(fileName)!,\n compilerOptions.target || defaultCompilerOptions(ts).target!,\n false\n )\n )\n )\n },\n useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,\n },\n updateFile: sourceFile => {\n const alreadyExists = sourceFiles.has(sourceFile.fileName)\n sys.writeFile(sourceFile.fileName, sourceFile.text)\n sourceFiles.set(sourceFile.fileName, sourceFile)\n return alreadyExists\n },\n }\n return vHost\n}\n\n/**\n * Creates an object which can host a language service against the virtual file-system\n */\nexport function createVirtualLanguageServiceHost(\n sys: System,\n rootFiles: string[],\n compilerOptions: CompilerOptions,\n ts: TS,\n customTransformers?: CustomTransformers\n) {\n const fileNames = [...rootFiles]\n const { compilerHost, updateFile } = createVirtualCompilerHost(sys, compilerOptions, ts)\n const fileVersions = new Map<string, string>()\n let projectVersion = 0\n const languageServiceHost: LanguageServiceHost = {\n ...compilerHost,\n getProjectVersion: () => projectVersion.toString(),\n getCompilationSettings: () => compilerOptions,\n getCustomTransformers: () => customTransformers,\n getScriptFileNames: () => fileNames,\n getScriptSnapshot: fileName => {\n const contents = sys.readFile(fileName)\n if (contents) {\n return ts.ScriptSnapshot.fromString(contents)\n }\n return\n },\n getScriptVersion: fileName => {\n return fileVersions.get(fileName) || \"0\"\n },\n writeFile: sys.writeFile,\n }\n\n type Return = {\n languageServiceHost: LanguageServiceHost\n updateFile: (sourceFile: import(\"typescript\").SourceFile) => void\n }\n\n const lsHost: Return = {\n languageServiceHost,\n updateFile: sourceFile => {\n projectVersion++\n fileVersions.set(sourceFile.fileName, projectVersion.toString())\n if (!fileNames.includes(sourceFile.fileName)) {\n fileNames.push(sourceFile.fileName)\n }\n updateFile(sourceFile)\n },\n }\n return lsHost\n}\n\nconst requirePath = () => {\n return require(String.fromCharCode(112, 97, 116, 104)) as typeof import(\"path\")\n}\n\nconst requireFS = () => {\n return require(String.fromCharCode(102, 115)) as typeof import(\"fs\")\n}\n"],"names":["hasLocalStorage","localStorage","error","hasProcess","process","debugLog","getItem","env","DEBUG","console","log","_message","knownLibFilesForCompilerOptions","compilerOptions","ts","array","lib","files","targetToCut","ScriptTarget","target","ES5","matches","filter","f","startsWith","toLowerCase","targetCutIndex","indexOf","pop","libCutIndex","map","length","reduce","max","current","undefined","finalCutIndex","Math","slice","addAllFilesFromFolder","workingDir","path","requirePath","fs","requireFS","walk","dir","results","readdirSync","forEach","file","join","stat","statSync","isDirectory","concat","push","fsPath","replace","content","readFileSync","includes","extname","set","notImplemented","methodName","Error","audit","name","fn","args","res","smallres","defaultCompilerOptions","getDefaultCompilerOptions","jsx","JsxEmit","React","strict","esModuleInterop","module","ModuleKind","ESNext","suppressOutputPathCheck","skipLibCheck","skipDefaultLibCheck","moduleResolution","ModuleResolutionKind","NodeJs","libize","createVirtualCompilerHost","sys","sourceFiles","Map","compilerHost","getCanonicalFileName","fileName","getDefaultLibFileName","getDirectories","getNewLine","newLine","getSourceFile","get","sourceFile","createSourceFile","readFile","useCaseSensitiveFileNames","updateFile","alreadyExists","has","writeFile","text","createVirtualLanguageServiceHost","rootFiles","customTransformers","fileNames","fileVersions","projectVersion","languageServiceHost","getProjectVersion","toString","getCompilationSettings","getCustomTransformers","getScriptFileNames","getScriptSnapshot","contents","ScriptSnapshot","fromString","getScriptVersion","require","String","fromCharCode","options","version","cache","lzstring","fetcher","storer","fetchlike","fetch","fsMap","prefix","storelike","Object","keys","key","removeItem","Promise","all","str","cacheKey","resolve","decompressFromUTF16","then","resp","t","setItem","compressToUTF16","index","tsModule","libs","dirname","getLib","_projectRoot","root","nodeSys","tsLib","createDirectory","directoryExists","directory","Array","from","some","exit","fileExists","tsLibName","getCurrentDirectory","getExecutingFilePath","readDirectory","result","resolvePath","write","mergedCompilerOpts","languageService","createLanguageService","diagnostics","getCompilerOptionsDiagnostics","formatDiagnostics","getProgram","_languageService$getP","createFile","optPrevTextSpan","prevSourceFile","prevFullContents","prevTextSpan","createTextSpan","newText","start","newSourceFile","updateSourceFile","span","newLength"],"mappings":"mRAQA,IAAIA,GAAkB,EACtB,IACEA,sBAAyBC,aACzB,MAAOC,IAET,IAAMC,sBAAoBC,QAEpBC,EADeL,GAAmBC,aAAaK,QAAQ,UAAcH,GAAcC,QAAQG,IAAIC,MACtEC,QAAQC,IAAM,SAACC,SAA8C,IAqF/EC,EAAkC,SAACC,EAAkCC,OAuEhEC,EArEVC,EAAMH,EAAgBG,KAAO,GAE7BC,EAAQ,CACZ,WACA,e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