UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

1 lines • 39.6 kB
{"version":3,"file":"clientTreeShakePlugin.js","names":[],"sources":["esm/vite/plugins/clientTreeShakePlugin.js"],"sourcesContent":["import { extname, relative } from \"node:path\";\nimport MagicString from \"magic-string\";\nimport { parseSync } from \"oxc-parser\";\nimport { EMPTY_LOADER_STRING, makeLoaderRouteIdStub } from \"../constants\";\nconst clientTreeShakePlugin = (opts) => {\n const runtime = opts?.runtime ?? \"vite\";\n const routerRoot = opts?.routerRoot ?? \"app\";\n return {\n name: \"one-client-tree-shake\",\n enforce: \"pre\",\n ...runtime === \"vite\" && {\n applyToEnvironment(env) {\n return env.name === \"client\" || env.name === \"ios\" || env.name === \"android\";\n }\n },\n transform: {\n order: \"pre\",\n async handler(code, id, settings) {\n if (runtime === \"vite\" && this.environment?.name === \"ssr\") {\n return;\n }\n if (!/\\.(js|jsx|ts|tsx)$/.test(extname(id))) {\n return;\n }\n if (/node_modules/.test(id)) {\n return;\n }\n const out = await transformTreeShakeClient(code, id, process.cwd(), routerRoot);\n return out;\n }\n }\n };\n};\nfunction extractPatternBindings(node, names) {\n if (!node) return;\n switch (node.type) {\n case \"Identifier\":\n names.add(node.name);\n break;\n case \"ObjectPattern\":\n for (const prop of node.properties) {\n if (prop.type === \"Property\") {\n extractPatternBindings(prop.value, names);\n } else if (prop.type === \"RestElement\") {\n extractPatternBindings(prop.argument, names);\n }\n }\n break;\n case \"ArrayPattern\":\n for (const element of node.elements) {\n if (element) {\n extractPatternBindings(element, names);\n }\n }\n break;\n case \"AssignmentPattern\":\n extractPatternBindings(node.left, names);\n break;\n case \"RestElement\":\n extractPatternBindings(node.argument, names);\n break;\n case \"TSParameterProperty\":\n extractPatternBindings(node.parameter, names);\n break;\n }\n}\nfunction getReferencedIdentifiers(rootNode, candidateNames) {\n const referenced = /* @__PURE__ */ new Set();\n const scopeStack = [];\n function isShadowed(name) {\n for (let i = scopeStack.length - 1; i >= 0; i--) {\n if (scopeStack[i].has(name)) return true;\n }\n return false;\n }\n function checkIdentifier(name) {\n if (!isShadowed(name) && candidateNames.has(name)) {\n referenced.add(name);\n }\n }\n function walk(node) {\n if (!node || typeof node !== \"object\") return;\n if (node.type === \"TSTypeAnnotation\" || node.type === \"TSTypeReference\" || node.type === \"TSTypeAliasDeclaration\" || node.type === \"TSInterfaceDeclaration\" || node.type === \"TSTypeParameterDeclaration\" || node.type === \"TSTypeParameterInstantiation\") {\n return;\n }\n if (node.type === \"TSAsExpression\" || node.type === \"TSTypeAssertion\" || node.type === \"TSSatisfiesExpression\" || node.type === \"TSNonNullExpression\") {\n walk(node.expression);\n return;\n }\n function walkPatternExpressions(pat) {\n if (!pat || typeof pat !== \"object\") return;\n switch (pat.type) {\n case \"AssignmentPattern\":\n walk(pat.right);\n walkPatternExpressions(pat.left);\n break;\n case \"ObjectPattern\":\n for (const prop of pat.properties) {\n if (prop.type === \"Property\") {\n if (prop.computed) {\n walk(prop.key);\n }\n walkPatternExpressions(prop.value);\n } else if (prop.type === \"RestElement\") {\n walkPatternExpressions(prop.argument);\n }\n }\n break;\n case \"ArrayPattern\":\n for (const element of pat.elements) {\n if (element) {\n walkPatternExpressions(element);\n }\n }\n break;\n case \"RestElement\":\n walkPatternExpressions(pat.argument);\n break;\n case \"TSParameterProperty\":\n walkPatternExpressions(pat.parameter);\n break;\n }\n }\n if (node.type === \"FunctionDeclaration\" || node.type === \"FunctionExpression\" || node.type === \"ArrowFunctionExpression\") {\n let addVars = function(n) {\n if (!n || typeof n !== \"object\") return;\n if (n.type === \"FunctionDeclaration\" || n.type === \"FunctionExpression\" || n.type === \"ArrowFunctionExpression\") {\n return;\n }\n if (n.type === \"VariableDeclaration\" && n.kind === \"var\") {\n for (const d of n.declarations) {\n extractPatternBindings(d.id, scope);\n }\n }\n for (const k of Object.keys(n)) {\n if (k === \"parent\") continue;\n const val = n[k];\n if (Array.isArray(val)) {\n for (const item of val) addVars(item);\n } else if (val && typeof val === \"object\") {\n addVars(val);\n }\n }\n };\n const scope = /* @__PURE__ */ new Set();\n if (node.type === \"FunctionExpression\" && node.id) {\n scope.add(node.id.name);\n }\n if (node.params) {\n for (const param of node.params) {\n walkPatternExpressions(param);\n extractPatternBindings(param, scope);\n }\n }\n addVars(node.body);\n scopeStack.push(scope);\n walk(node.body);\n scopeStack.pop();\n return;\n }\n if (node.type === \"BlockStatement\") {\n const scope = /* @__PURE__ */ new Set();\n for (const stmt of node.body) {\n if (stmt.type === \"VariableDeclaration\" && (stmt.kind === \"let\" || stmt.kind === \"const\")) {\n for (const decl of stmt.declarations) {\n extractPatternBindings(decl.id, scope);\n }\n } else if (stmt.type === \"FunctionDeclaration\" && stmt.id) {\n scope.add(stmt.id.name);\n } else if (stmt.type === \"ClassDeclaration\" && stmt.id) {\n scope.add(stmt.id.name);\n }\n }\n scopeStack.push(scope);\n for (const stmt of node.body) {\n walk(stmt);\n }\n scopeStack.pop();\n return;\n }\n if (node.type === \"CatchClause\") {\n const scope = /* @__PURE__ */ new Set();\n if (node.param) {\n extractPatternBindings(node.param, scope);\n }\n scopeStack.push(scope);\n walk(node.body);\n scopeStack.pop();\n return;\n }\n if (node.type === \"ForStatement\" || node.type === \"ForInStatement\" || node.type === \"ForOfStatement\") {\n const scope = /* @__PURE__ */ new Set();\n const initOrLeft = node.init || node.left;\n if (initOrLeft && initOrLeft.type === \"VariableDeclaration\" && initOrLeft.kind !== \"var\") {\n for (const decl of initOrLeft.declarations) {\n extractPatternBindings(decl.id, scope);\n }\n }\n scopeStack.push(scope);\n if (node.init) walk(node.init);\n if (node.left) walk(node.left);\n if (node.right) walk(node.right);\n if (node.test) walk(node.test);\n if (node.update) walk(node.update);\n walk(node.body);\n scopeStack.pop();\n return;\n }\n if (node.type === \"Identifier\") {\n checkIdentifier(node.name);\n return;\n }\n if (node.type === \"JSXOpeningElement\") {\n if (node.name) {\n if (node.name.type === \"JSXIdentifier\") {\n if (node.name.name && /^[A-Z]/.test(node.name.name)) {\n checkIdentifier(node.name.name);\n }\n } else if (node.name.type === \"JSXMemberExpression\") {\n let rootObj = node.name.object;\n while (rootObj && rootObj.type === \"JSXMemberExpression\") {\n rootObj = rootObj.object;\n }\n if (rootObj && rootObj.type === \"JSXIdentifier\") {\n checkIdentifier(rootObj.name);\n }\n }\n }\n if (node.attributes) {\n for (const attr of node.attributes) {\n walk(attr);\n }\n }\n return;\n }\n if (node.type === \"JSXAttribute\") {\n if (node.value) walk(node.value);\n return;\n }\n if (node.type === \"JSXClosingElement\") {\n return;\n }\n if (node.type === \"Property\") {\n if (node.computed) {\n walk(node.key);\n }\n walk(node.value);\n return;\n }\n if (node.type === \"MemberExpression\") {\n walk(node.object);\n if (node.computed) {\n walk(node.property);\n }\n return;\n }\n if (node.type === \"VariableDeclarator\") {\n walkPatternExpressions(node.id);\n if (node.init) {\n walk(node.init);\n }\n return;\n }\n if (node.type === \"ExportSpecifier\") {\n if (node.local && node.local.type === \"Identifier\") {\n checkIdentifier(node.local.name);\n }\n return;\n }\n for (const key of Object.keys(node)) {\n if (key === \"parent\") continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) {\n if (item && typeof item === \"object\") walk(item);\n }\n } else if (child && typeof child === \"object\") {\n walk(child);\n }\n }\n }\n walk(rootNode);\n return referenced;\n}\nasync function transformTreeShakeClient(code, id, root, routerRoot = \"app\") {\n if (!/generateStaticParams|loader/.test(code)) {\n return;\n }\n const isProd = process.env.NODE_ENV === \"production\";\n const filename = (id || \"file.tsx\").split(\"?\")[0].split(\"#\")[0];\n let parseResult;\n try {\n parseResult = parseSync(filename, code);\n if (parseResult.errors && parseResult.errors.length > 0) {\n const errorMessage = parseResult.errors.map((e) => e.message).join(\"\\n\");\n if (isProd) {\n throw new Error(\n `[one] Failed to parse ${id} with server exports:\n${errorMessage}`\n );\n }\n console.warn(\n `[one] Skipping tree shaking for ${id} due to syntax error:`,\n errorMessage\n );\n return;\n }\n } catch (error) {\n if (isProd) {\n throw error instanceof Error ? error : new Error(String(error));\n }\n const errorMessage = error instanceof Error ? error.message : String(error);\n console.warn(\n `[one] Skipping tree shaking for ${id} due to syntax error:`,\n errorMessage\n );\n return;\n }\n const ast = parseResult.program;\n try {\n return doTreeShakeClient(code, id, root, ast, routerRoot);\n } catch (error) {\n if (isProd) {\n throw error instanceof Error ? error : new Error(String(error));\n }\n const errorMessage = error instanceof Error ? error.message : String(error);\n console.warn(\n `[one] Skipping tree shaking for ${id} due to analysis error:`,\n errorMessage\n );\n return;\n }\n}\nfunction doTreeShakeClient(code, id, root, ast, routerRoot) {\n const removed = {\n loader: false,\n generateStaticParams: false\n };\n const serverExportStmts = /* @__PURE__ */ new Map();\n for (const stmt of ast.body) {\n if (stmt.type === \"ExportNamedDeclaration\" && stmt.declaration) {\n if (stmt.declaration.type === \"FunctionDeclaration\") {\n const fnName = stmt.declaration.id?.name;\n if (fnName === \"loader\" || fnName === \"generateStaticParams\") {\n removed[fnName] = true;\n serverExportStmts.set(stmt, {\n names: /* @__PURE__ */ new Set([fnName]),\n replaceAll: true,\n declaratorsToRemove: /* @__PURE__ */ new Set()\n });\n }\n } else if (stmt.declaration.type === \"VariableDeclaration\") {\n const found = [];\n for (const d of stmt.declaration.declarations) {\n if (d.id?.type === \"Identifier\" && (d.id.name === \"loader\" || d.id.name === \"generateStaticParams\")) {\n found.push(d);\n removed[d.id.name] = true;\n }\n }\n if (found.length > 0) {\n serverExportStmts.set(stmt, {\n names: new Set(found.map((d) => d.id.name)),\n replaceAll: found.length === stmt.declaration.declarations.length,\n declaratorsToRemove: new Set(found)\n });\n }\n }\n }\n }\n const removedFunctions = Object.keys(removed).filter((k) => removed[k]);\n if (removedFunctions.length === 0) {\n return;\n }\n const moduleBindings = /* @__PURE__ */ new Map();\n for (const stmt of ast.body) {\n if (stmt.type === \"ImportDeclaration\") {\n const isDeclType = stmt.importKind === \"type\";\n for (const sp of stmt.specifiers) {\n const isType = isDeclType || sp.importKind === \"type\";\n moduleBindings.set(sp.local.name, {\n kind: \"import\",\n stmt,\n node: sp,\n isType\n });\n }\n } else if (stmt.type === \"ExportNamedDeclaration\" && stmt.declaration) {\n const decl = stmt.declaration;\n if (decl.type === \"FunctionDeclaration\" && decl.id) {\n moduleBindings.set(decl.id.name, { kind: \"function\", stmt, node: decl });\n } else if (decl.type === \"VariableDeclaration\") {\n for (const d of decl.declarations) {\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n for (const name of names) {\n moduleBindings.set(name, { kind: \"variable\", stmt, node: d });\n }\n }\n } else if (decl.type === \"ClassDeclaration\" && decl.id) {\n moduleBindings.set(decl.id.name, { kind: \"class\", stmt, node: decl });\n }\n } else if (stmt.type === \"FunctionDeclaration\" && stmt.id) {\n moduleBindings.set(stmt.id.name, { kind: \"function\", stmt, node: stmt });\n } else if (stmt.type === \"VariableDeclaration\") {\n for (const d of stmt.declarations) {\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n for (const name of names) {\n moduleBindings.set(name, { kind: \"variable\", stmt, node: d });\n }\n }\n } else if (stmt.type === \"ClassDeclaration\" && stmt.id) {\n moduleBindings.set(stmt.id.name, { kind: \"class\", stmt, node: stmt });\n } else if (stmt.type === \"TSEnumDeclaration\" && stmt.id) {\n moduleBindings.set(stmt.id.name, { kind: \"enum\", stmt, node: stmt });\n }\n }\n const allBindingNames = new Set(moduleBindings.keys());\n const topLevelDeps = /* @__PURE__ */ new Map();\n const clientRootDeps = /* @__PURE__ */ new Set();\n for (const [name, info] of moduleBindings) {\n if (info.kind === \"import\") {\n topLevelDeps.set(name, /* @__PURE__ */ new Set());\n } else if (info.kind === \"function\") {\n topLevelDeps.set(name, getReferencedIdentifiers(info.node, allBindingNames));\n } else if (info.kind === \"variable\") {\n const deps = getReferencedIdentifiers(info.node, allBindingNames);\n deps.delete(name);\n topLevelDeps.set(name, deps);\n } else if (info.kind === \"class\") {\n topLevelDeps.set(name, getReferencedIdentifiers(info.node, allBindingNames));\n } else if (info.kind === \"enum\") {\n topLevelDeps.set(name, getReferencedIdentifiers(info.node, allBindingNames));\n }\n }\n const serverNeeded = /* @__PURE__ */ new Set();\n const serverQueue = [];\n for (const fn of removedFunctions) {\n const deps = topLevelDeps.get(fn);\n if (deps) {\n for (const dep of deps) serverQueue.push(dep);\n }\n }\n while (serverQueue.length > 0) {\n const name = serverQueue.shift();\n if (serverNeeded.has(name)) continue;\n serverNeeded.add(name);\n const deps = topLevelDeps.get(name);\n if (deps) {\n for (const dep of deps) {\n if (!serverNeeded.has(dep)) serverQueue.push(dep);\n }\n }\n }\n for (const stmt of ast.body) {\n if (stmt.type === \"ImportDeclaration\") {\n continue;\n }\n if (serverExportStmts.has(stmt)) {\n const info = serverExportStmts.get(stmt);\n if (!info.replaceAll && stmt.declaration?.declarations) {\n for (const d of stmt.declaration.declarations) {\n if (!info.declaratorsToRemove.has(d)) {\n const deps2 = getReferencedIdentifiers(d, allBindingNames);\n for (const dep of deps2) clientRootDeps.add(dep);\n }\n }\n }\n continue;\n }\n if (stmt.type === \"VariableDeclaration\") {\n const allInServer = stmt.declarations.every((d) => {\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n return names.size > 0 && Array.from(names).every((n) => serverNeeded.has(n));\n });\n if (!allInServer) {\n for (const d of stmt.declarations) {\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n const inServer = names.size > 0 && Array.from(names).every((n) => serverNeeded.has(n));\n if (!inServer) {\n const deps2 = getReferencedIdentifiers(d, allBindingNames);\n for (const dep of deps2) clientRootDeps.add(dep);\n }\n }\n }\n continue;\n }\n if ((stmt.type === \"FunctionDeclaration\" || stmt.type === \"ClassDeclaration\" || stmt.type === \"TSEnumDeclaration\") && stmt.id && serverNeeded.has(stmt.id.name)) {\n continue;\n }\n const deps = getReferencedIdentifiers(stmt, allBindingNames);\n for (const dep of deps) clientRootDeps.add(dep);\n }\n const clientNeeded = /* @__PURE__ */ new Set();\n const clientQueue = Array.from(clientRootDeps);\n while (clientQueue.length > 0) {\n const name = clientQueue.shift();\n if (clientNeeded.has(name)) continue;\n clientNeeded.add(name);\n if (name === \"loader\" || name === \"generateStaticParams\") continue;\n const deps = topLevelDeps.get(name);\n if (deps) {\n for (const dep of deps) {\n if (!clientNeeded.has(dep)) clientQueue.push(dep);\n }\n }\n }\n const exclusiveServerBindings = /* @__PURE__ */ new Set();\n for (const name of serverNeeded) {\n if (!clientNeeded.has(name)) {\n exclusiveServerBindings.add(name);\n }\n }\n const s = new MagicString(code);\n const overwritePreservingLines = (start, end, replacement = \"\") => {\n const lineBreaks = code.slice(start, end).match(/\\r\\n|\\r|\\n/g)?.join(\"\") ?? \"\";\n s.overwrite(start, end, replacement + lineBreaks);\n };\n for (const [stmt, info] of serverExportStmts) {\n const stubs = [];\n if (info.names.has(\"loader\")) {\n if (root) {\n const fromRoot = relative(root, id).replace(/\\\\/g, \"/\");\n const prefix = routerRoot.replace(/^\\.\\//, \"\").replace(/\\/$/, \"\") + \"/\";\n const routeId = \"./\" + (fromRoot.startsWith(prefix) ? fromRoot.slice(prefix.length) : fromRoot);\n stubs.push(makeLoaderRouteIdStub(routeId));\n } else {\n stubs.push(EMPTY_LOADER_STRING);\n }\n }\n if (info.names.has(\"generateStaticParams\")) {\n stubs.push(\"export function generateStaticParams() {};\");\n }\n if (info.replaceAll) {\n overwritePreservingLines(stmt.start, stmt.end, stubs.join(\" \"));\n } else {\n const decl = stmt.declaration;\n for (let i = decl.declarations.length - 1; i >= 0; i--) {\n const d = decl.declarations[i];\n if (info.declaratorsToRemove.has(d)) {\n if (i === 0) {\n const next = decl.declarations[1];\n overwritePreservingLines(d.start, next.start);\n } else {\n const prev = decl.declarations[i - 1];\n overwritePreservingLines(prev.end, d.end);\n }\n }\n }\n s.appendRight(stmt.end, \"; \" + stubs.join(\" \"));\n }\n }\n for (const stmt of ast.body) {\n if (serverExportStmts.has(stmt) || stmt.type === \"ImportDeclaration\") continue;\n if ((stmt.type === \"FunctionDeclaration\" || stmt.type === \"ClassDeclaration\" || stmt.type === \"TSEnumDeclaration\") && stmt.id && exclusiveServerBindings.has(stmt.id.name)) {\n let end = stmt.end;\n if (code[end] === \";\") end++;\n if (code[end] === \"\\r\" && code[end + 1] === \"\\n\") end += 2;\n else if (code[end] === \"\\n\") end += 1;\n overwritePreservingLines(stmt.start, end);\n } else if (stmt.type === \"VariableDeclaration\") {\n const allExclusive = stmt.declarations.every((d) => {\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n return Array.from(names).every((n) => exclusiveServerBindings.has(n));\n });\n if (allExclusive) {\n let end = stmt.end;\n if (code[end] === \";\") end++;\n if (code[end] === \"\\r\" && code[end + 1] === \"\\n\") end += 2;\n else if (code[end] === \"\\n\") end += 1;\n overwritePreservingLines(stmt.start, end);\n } else {\n for (let i = stmt.declarations.length - 1; i >= 0; i--) {\n const d = stmt.declarations[i];\n const names = /* @__PURE__ */ new Set();\n extractPatternBindings(d.id, names);\n if (Array.from(names).every((n) => exclusiveServerBindings.has(n))) {\n if (i === 0) {\n const next = stmt.declarations[1];\n overwritePreservingLines(d.start, next.start);\n } else {\n const prev = stmt.declarations[i - 1];\n overwritePreservingLines(prev.end, d.end);\n }\n }\n }\n }\n } else if (stmt.type === \"ClassDeclaration\" && stmt.id && exclusiveServerBindings.has(stmt.id.name)) {\n let end = stmt.end;\n if (code[end] === \";\") end++;\n if (code[end] === \"\\r\" && code[end + 1] === \"\\n\") end += 2;\n else if (code[end] === \"\\n\") end += 1;\n overwritePreservingLines(stmt.start, end);\n }\n }\n for (const stmt of ast.body) {\n if (stmt.type !== \"ImportDeclaration\") continue;\n if (stmt.importKind === \"type\") continue;\n if (!stmt.specifiers || stmt.specifiers.length === 0) continue;\n const kept = stmt.specifiers.filter((sp) => {\n if (sp.importKind === \"type\") return true;\n return !exclusiveServerBindings.has(sp.local.name);\n });\n if (kept.length === 0) {\n let end = stmt.end;\n if (code[end] === \";\") end++;\n if (code[end] === \"\\r\" && code[end + 1] === \"\\n\") end += 2;\n else if (code[end] === \"\\n\") end += 1;\n overwritePreservingLines(stmt.start, end);\n } else if (kept.length < stmt.specifiers.length) {\n const declCode = code.slice(stmt.start, stmt.source.start);\n const prefixMatch = declCode.match(/^import\\s+/);\n const prefixEnd = stmt.start + (prefixMatch ? prefixMatch[0].length : 7);\n let pos = stmt.source.start - 1;\n while (pos >= 0 && /\\s/.test(code[pos])) pos--;\n const fromStart = pos - 3;\n const defaultSpec = kept.find((sp) => sp.type === \"ImportDefaultSpecifier\");\n const namespaceSpec = kept.find((sp) => sp.type === \"ImportNamespaceSpecifier\");\n const namedSpecs = kept.filter((sp) => sp.type === \"ImportSpecifier\");\n const parts = [];\n if (defaultSpec) parts.push(defaultSpec.local.name);\n if (namespaceSpec) parts.push(\"* as \" + namespaceSpec.local.name);\n if (namedSpecs.length > 0) {\n const namedStr = namedSpecs.map((sp) => {\n const typePrefix = sp.importKind === \"type\" ? \"type \" : \"\";\n const importedName = sp.imported.raw || sp.imported.name;\n if (importedName === sp.local.name) {\n return typePrefix + sp.local.name;\n }\n return typePrefix + importedName + \" as \" + sp.local.name;\n }).join(\", \");\n parts.push(\"{ \" + namedStr + \" }\");\n }\n overwritePreservingLines(prefixEnd, fromStart, parts.join(\", \") + \" \");\n }\n }\n console.info(\n ` \\u{1F9F9} [one] ${relative(process.cwd(), id)} removed ${removedFunctions.length} server-only exports`\n );\n return {\n code: s.toString(),\n map: s.generateMap({ hires: \"boundary\", source: id, includeContent: true })\n };\n}\nexport {\n clientTreeShakePlugin,\n transformTreeShakeClient\n};\n//# sourceMappingURL=clientTreeShakePlugin.js.map\n"],"mappings":";;;;;;AAIA,MAAM,yBAAyB,SAAS;CACtC,MAAM,UAAU,MAAM,WAAW;CACjC,MAAM,aAAa,MAAM,cAAc;CACvC,OAAO;EACL,MAAM;EACN,SAAS;EACT,GAAG,YAAY,UAAU,EACvB,mBAAmB,KAAK;GACtB,OAAO,IAAI,SAAS,YAAY,IAAI,SAAS,SAAS,IAAI,SAAS;EACrE,EACF;EACA,WAAW;GACT,O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