1 line
50 KiB
Plaintext
1 line
50 KiB
Plaintext
{"version":3,"file":"index.js","sources":["../src/shouldStoreRHSInTemporaryVariable.ts","../src/compat-data.ts","../src/index.ts"],"sourcesContent":["import type { types as t } from \"@babel/core\";\n\n/**\n * This is a helper function to determine if we should create an intermediate variable\n * such that the RHS of an assignment is not duplicated.\n *\n * See https://github.com/babel/babel/pull/13711#issuecomment-914388382 for discussion\n * on further optimizations.\n */\nexport default function shouldStoreRHSInTemporaryVariable(\n node: t.LVal,\n): boolean {\n if (!node) return false;\n if (node.type === \"ArrayPattern\") {\n const nonNullElements = node.elements.filter(element => element !== null);\n if (nonNullElements.length > 1) return true;\n else return shouldStoreRHSInTemporaryVariable(nonNullElements[0]);\n } else if (node.type === \"ObjectPattern\") {\n const { properties } = node;\n if (properties.length > 1) return true;\n else if (properties.length === 0) return false;\n else {\n const firstProperty = properties[0];\n if (firstProperty.type === \"ObjectProperty\") {\n // the value of the property must be an LVal\n return shouldStoreRHSInTemporaryVariable(firstProperty.value as t.LVal);\n } else {\n return shouldStoreRHSInTemporaryVariable(firstProperty);\n }\n }\n } else if (node.type === \"AssignmentPattern\") {\n return shouldStoreRHSInTemporaryVariable(node.left);\n } else if (node.type === \"RestElement\") {\n if (node.argument.type === \"Identifier\") return true;\n return shouldStoreRHSInTemporaryVariable(node.argument);\n } else {\n // node is Identifier or MemberExpression\n return false;\n }\n}\n","export default {\n \"Object.assign\": {\n chrome: \"49\",\n opera: \"36\",\n edge: \"13\",\n firefox: \"36\",\n safari: \"10\",\n node: \"6\",\n deno: \"1\",\n ios: \"10\",\n samsung: \"5\",\n opera_mobile: \"36\",\n electron: \"0.37\",\n },\n};\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { PluginPass } from \"@babel/core\";\nimport type { NodePath, Scope } from \"@babel/traverse\";\nimport { convertFunctionParams } from \"@babel/plugin-transform-parameters\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport shouldStoreRHSInTemporaryVariable from \"./shouldStoreRHSInTemporaryVariable.ts\";\nimport compatData from \"./compat-data.ts\";\n\nconst { isAssignmentPattern, isObjectProperty } = t;\n// @babel/types <=7.3.3 counts FOO as referenced in var { x: FOO }.\n// We need to detect this bug to know if \"unused\" means 0 or 1 references.\nif (!process.env.BABEL_8_BREAKING) {\n const node = t.identifier(\"a\");\n const property = t.objectProperty(t.identifier(\"key\"), node);\n const pattern = t.objectPattern([property]);\n\n // eslint-disable-next-line no-var\n var ZERO_REFS = t.isReferenced(node, property, pattern) ? 1 : 0;\n}\n\ntype Param = NodePath<t.Function[\"params\"][number]>;\nexport interface Options {\n useBuiltIns?: boolean;\n loose?: boolean;\n}\n\nexport default declare((api, opts: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const targets = api.targets();\n const supportsObjectAssign = !isRequired(\"Object.assign\", targets, {\n compatData,\n });\n\n const { useBuiltIns = supportsObjectAssign, loose = false } = opts;\n\n if (typeof loose !== \"boolean\") {\n throw new Error(\".loose must be a boolean, or undefined\");\n }\n\n const ignoreFunctionLength = api.assumption(\"ignoreFunctionLength\") ?? loose;\n const objectRestNoSymbols = api.assumption(\"objectRestNoSymbols\") ?? loose;\n const pureGetters = api.assumption(\"pureGetters\") ?? loose;\n const setSpreadProperties = api.assumption(\"setSpreadProperties\") ?? loose;\n\n function getExtendsHelper(\n file: PluginPass,\n ): t.MemberExpression | t.Identifier {\n return useBuiltIns\n ? t.memberExpression(t.identifier(\"Object\"), t.identifier(\"assign\"))\n : file.addHelper(\"extends\");\n }\n\n function hasRestElement(path: Param) {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n foundRestElement = true;\n restElement.stop();\n });\n return foundRestElement;\n }\n\n function hasObjectPatternRestElement(path: NodePath): boolean {\n let foundRestElement = false;\n visitRestElements(path, restElement => {\n if (restElement.parentPath.isObjectPattern()) {\n foundRestElement = true;\n restElement.stop();\n }\n });\n return foundRestElement;\n }\n\n function visitRestElements(\n path: NodePath,\n visitor: (path: NodePath<t.RestElement>) => any,\n ) {\n path.traverse({\n Expression(path) {\n const { parent, key } = path;\n if (\n (isAssignmentPattern(parent) && key === \"right\") ||\n (isObjectProperty(parent) && parent.computed && key === \"key\")\n ) {\n path.skip();\n }\n },\n RestElement: visitor,\n });\n }\n\n function hasSpread(node: t.ObjectExpression): boolean {\n for (const prop of node.properties) {\n if (t.isSpreadElement(prop)) {\n return true;\n }\n }\n return false;\n }\n\n // returns an array of all keys of an object, and a status flag indicating if all extracted keys\n // were converted to stringLiterals or not\n // e.g. extracts {keys: [\"a\", \"b\", \"3\", ++x], allPrimitives: false }\n // from ast of {a: \"foo\", b, 3: \"bar\", [++x]: \"baz\"}\n // `allPrimitives: false` doesn't necessarily mean that there is a non-primitive, but just\n // that we are not sure.\n function extractNormalizedKeys(node: t.ObjectPattern) {\n // RestElement has been removed in createObjectRest\n const props = node.properties as t.ObjectProperty[];\n const keys: t.Expression[] = [];\n let allPrimitives = true;\n let hasTemplateLiteral = false;\n\n for (const prop of props) {\n const { key } = prop;\n if (t.isIdentifier(key) && !prop.computed) {\n // since a key {a: 3} is equivalent to {\"a\": 3}, use the latter\n keys.push(t.stringLiteral(key.name));\n } else if (t.isTemplateLiteral(key)) {\n keys.push(t.cloneNode(key));\n hasTemplateLiteral = true;\n } else if (t.isLiteral(key)) {\n keys.push(\n t.stringLiteral(\n String(\n // @ts-expect-error prop.key can not be a NullLiteral\n key.value,\n ),\n ),\n );\n } else {\n // @ts-expect-error private name has been handled by destructuring-private\n keys.push(t.cloneNode(key));\n\n if (\n (t.isMemberExpression(key, { computed: false }) &&\n t.isIdentifier(key.object, { name: \"Symbol\" })) ||\n (t.isCallExpression(key) &&\n t.matchesPattern(key.callee, \"Symbol.for\"))\n ) {\n // there all return a primitive\n } else {\n allPrimitives = false;\n }\n }\n }\n\n return { keys, allPrimitives, hasTemplateLiteral };\n }\n\n // replaces impure computed keys with new identifiers\n // and returns variable declarators of these new identifiers\n function replaceImpureComputedKeys(\n properties: NodePath<t.ObjectProperty>[],\n scope: Scope,\n ) {\n const impureComputedPropertyDeclarators: t.VariableDeclarator[] = [];\n for (const propPath of properties) {\n // PrivateName is handled in destructuring-private plugin\n const key = propPath.get(\"key\") as NodePath<t.Expression>;\n if (propPath.node.computed && !key.isPure()) {\n const name = scope.generateUidBasedOnNode(key.node);\n const declarator = t.variableDeclarator(t.identifier(name), key.node);\n impureComputedPropertyDeclarators.push(declarator);\n key.replaceWith(t.identifier(name));\n }\n }\n return impureComputedPropertyDeclarators;\n }\n\n function removeUnusedExcludedKeys(path: NodePath<t.ObjectPattern>): void {\n const bindings = path.getOuterBindingIdentifierPaths();\n\n Object.keys(bindings).forEach(bindingName => {\n const bindingParentPath = bindings[bindingName].parentPath;\n if (\n path.scope.getBinding(bindingName).references >\n (process.env.BABEL_8_BREAKING ? 0 : ZERO_REFS) ||\n !bindingParentPath.isObjectProperty()\n ) {\n return;\n }\n bindingParentPath.remove();\n });\n }\n\n //expects path to an object pattern\n function createObjectRest(\n path: NodePath<t.ObjectPattern>,\n file: PluginPass,\n objRef: t.Identifier | t.MemberExpression,\n ): [t.VariableDeclarator[], t.LVal, t.CallExpression] {\n const props = path.get(\"properties\");\n const last = props[props.length - 1];\n t.assertRestElement(last.node);\n const restElement = t.cloneNode(last.node);\n last.remove();\n\n const impureComputedPropertyDeclarators = replaceImpureComputedKeys(\n path.get(\"properties\") as NodePath<t.ObjectProperty>[],\n path.scope,\n );\n const { keys, allPrimitives, hasTemplateLiteral } = extractNormalizedKeys(\n path.node,\n );\n\n if (keys.length === 0) {\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(getExtendsHelper(file), [\n t.objectExpression([]),\n t.sequenceExpression([\n t.callExpression(file.addHelper(\"objectDestructuringEmpty\"), [\n t.cloneNode(objRef),\n ]),\n t.cloneNode(objRef),\n ]),\n ]),\n ];\n }\n\n let keyExpression;\n if (!allPrimitives) {\n // map to toPropertyKey to handle the possible non-string values\n keyExpression = t.callExpression(\n t.memberExpression(t.arrayExpression(keys), t.identifier(\"map\")),\n [file.addHelper(\"toPropertyKey\")],\n );\n } else {\n keyExpression = t.arrayExpression(keys);\n\n if (!hasTemplateLiteral && !t.isProgram(path.scope.block)) {\n // Hoist definition of excluded keys, so that it's not created each time.\n const program = path.findParent(path => path.isProgram());\n const id = path.scope.generateUidIdentifier(\"excluded\");\n\n program.scope.push({\n id,\n init: keyExpression,\n kind: \"const\",\n });\n\n keyExpression = t.cloneNode(id);\n }\n }\n\n return [\n impureComputedPropertyDeclarators,\n restElement.argument,\n t.callExpression(\n file.addHelper(\n `objectWithoutProperties${objectRestNoSymbols ? \"Loose\" : \"\"}`,\n ),\n [t.cloneNode(objRef), keyExpression],\n ),\n ];\n }\n\n function replaceRestElement(\n parentPath: NodePath<t.Function | t.CatchClause>,\n paramPath: NodePath<\n t.Function[\"params\"][number] | t.AssignmentPattern[\"left\"]\n >,\n container?: t.VariableDeclaration[],\n ): void {\n if (paramPath.isAssignmentPattern()) {\n replaceRestElement(parentPath, paramPath.get(\"left\"), container);\n return;\n }\n\n if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {\n const elements = paramPath.get(\"elements\");\n\n for (let i = 0; i < elements.length; i++) {\n replaceRestElement(parentPath, elements[i], container);\n }\n }\n\n if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {\n const uid = parentPath.scope.generateUidIdentifier(\"ref\");\n\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(paramPath.node, uid),\n ]);\n\n if (container) {\n container.push(declar);\n } else {\n parentPath.ensureBlock();\n (parentPath.get(\"body\") as NodePath<t.BlockStatement>).unshiftContainer(\n \"body\",\n declar,\n );\n }\n paramPath.replaceWith(t.cloneNode(uid));\n }\n }\n\n return {\n name: \"transform-object-rest-spread\",\n inherits:\n USE_ESM || IS_STANDALONE || api.version[0] === \"8\"\n ? undefined\n : // eslint-disable-next-line no-restricted-globals\n require(\"@babel/plugin-syntax-object-rest-spread\").default,\n\n visitor: {\n // function a({ b, ...c }) {}\n Function(path) {\n const params = path.get(\"params\");\n const paramsWithRestElement = new Set<number>();\n const idsInRestParams = new Set();\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (hasRestElement(param)) {\n paramsWithRestElement.add(i);\n for (const name of Object.keys(param.getBindingIdentifiers())) {\n idsInRestParams.add(name);\n }\n }\n }\n\n // if true, a parameter exists that has an id in its initializer\n // that is also an id bound in a rest parameter\n // example: f({...R}, a = R)\n let idInRest = false;\n\n const IdentifierHandler = function (\n path: NodePath<t.Identifier>,\n functionScope: Scope,\n ) {\n const name = path.node.name;\n if (\n path.scope.getBinding(name) === functionScope.getBinding(name) &&\n idsInRestParams.has(name)\n ) {\n idInRest = true;\n path.stop();\n }\n };\n\n let i: number;\n for (i = 0; i < params.length && !idInRest; ++i) {\n const param = params[i];\n if (!paramsWithRestElement.has(i)) {\n if (param.isReferencedIdentifier() || param.isBindingIdentifier()) {\n IdentifierHandler(param, path.scope);\n } else {\n param.traverse(\n {\n \"Scope|TypeAnnotation|TSTypeAnnotation\": path => path.skip(),\n \"ReferencedIdentifier|BindingIdentifier\": IdentifierHandler,\n },\n path.scope,\n );\n }\n }\n }\n\n if (!idInRest) {\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n if (paramsWithRestElement.has(i)) {\n replaceRestElement(path, param);\n }\n }\n } else {\n const shouldTransformParam = (idx: number) =>\n idx >= i - 1 || paramsWithRestElement.has(idx);\n convertFunctionParams(\n path,\n ignoreFunctionLength,\n shouldTransformParam,\n replaceRestElement,\n );\n }\n },\n\n // adapted from transform-destructuring/src/index.js#pushObjectRest\n // const { a, ...b } = c;\n VariableDeclarator(path, file) {\n if (!path.get(\"id\").isObjectPattern()) {\n return;\n }\n\n let insertionPath = path;\n const originalPath = path;\n\n visitRestElements(path.get(\"id\"), path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n if (\n // skip single-property case, e.g.\n // const { ...x } = foo();\n // since the RHS will not be duplicated\n shouldStoreRHSInTemporaryVariable(originalPath.node.id) &&\n !t.isIdentifier(originalPath.node.init)\n ) {\n // const { a, ...b } = foo();\n // to avoid calling foo() twice, as a first step convert it to:\n // const _foo = foo(),\n // { a, ...b } = _foo;\n const initRef = path.scope.generateUidIdentifierBasedOnNode(\n originalPath.node.init,\n \"ref\",\n );\n // insert _foo = foo()\n originalPath.insertBefore(\n t.variableDeclarator(initRef, originalPath.node.init),\n );\n // replace foo() with _foo\n originalPath.replaceWith(\n t.variableDeclarator(originalPath.node.id, t.cloneNode(initRef)),\n );\n\n return;\n }\n\n let ref = originalPath.node.init;\n const refPropertyPath: NodePath<t.ObjectProperty>[] = [];\n let kind;\n\n path.findParent((path: NodePath): boolean => {\n if (path.isObjectProperty()) {\n refPropertyPath.unshift(path);\n } else if (path.isVariableDeclarator()) {\n kind = path.parentPath.node.kind;\n return true;\n }\n });\n\n const impureObjRefComputedDeclarators = replaceImpureComputedKeys(\n refPropertyPath,\n path.scope,\n );\n refPropertyPath.forEach(prop => {\n const { node } = prop;\n ref = t.memberExpression(\n ref,\n t.cloneNode(node.key),\n node.computed || t.isLiteral(node.key),\n );\n });\n\n //@ts-expect-error: findParent can not apply assertions on result shape\n const objectPatternPath: NodePath<t.ObjectPattern> = path.findParent(\n path => path.isObjectPattern(),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(\n objectPatternPath,\n file,\n ref as t.MemberExpression,\n );\n\n if (pureGetters) {\n removeUnusedExcludedKeys(objectPatternPath);\n }\n\n t.assertIdentifier(argument);\n\n insertionPath.insertBefore(impureComputedPropertyDeclarators);\n\n insertionPath.insertBefore(impureObjRefComputedDeclarators);\n\n insertionPath = insertionPath.insertAfter(\n t.variableDeclarator(argument, callExpression),\n )[0] as NodePath<t.VariableDeclarator>;\n\n path.scope.registerBinding(kind, insertionPath);\n\n if (objectPatternPath.node.properties.length === 0) {\n objectPatternPath\n .findParent(\n path => path.isObjectProperty() || path.isVariableDeclarator(),\n )\n .remove();\n }\n });\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n // export var { a, ...b } = c;\n ExportNamedDeclaration(path) {\n const declaration = path.get(\"declaration\");\n if (!declaration.isVariableDeclaration()) return;\n\n const hasRest = declaration\n .get(\"declarations\")\n .some(path => hasObjectPatternRestElement(path.get(\"id\")));\n if (!hasRest) return;\n\n const specifiers = [];\n\n for (const name of Object.keys(path.getOuterBindingIdentifiers(true))) {\n specifiers.push(\n t.exportSpecifier(t.identifier(name), t.identifier(name)),\n );\n }\n\n // Split the declaration and export list into two declarations so that the variable\n // declaration can be split up later without needing to worry about not being a\n // top-level statement.\n path.replaceWith(declaration.node);\n path.insertAfter(t.exportNamedDeclaration(null, specifiers));\n },\n\n // try {} catch ({a, ...b}) {}\n CatchClause(path) {\n const paramPath = path.get(\"param\");\n replaceRestElement(path, paramPath);\n },\n\n // ({a, ...b} = c);\n AssignmentExpression(path, file) {\n const leftPath = path.get(\"left\");\n if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {\n const nodes = [];\n\n const refName = path.scope.generateUidBasedOnNode(\n path.node.right,\n \"ref\",\n );\n\n nodes.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(refName), path.node.right),\n ]),\n );\n\n const [impureComputedPropertyDeclarators, argument, callExpression] =\n createObjectRest(leftPath, file, t.identifier(refName));\n\n if (impureComputedPropertyDeclarators.length > 0) {\n nodes.push(\n t.variableDeclaration(\"var\", impureComputedPropertyDeclarators),\n );\n }\n\n const nodeWithoutSpread = t.cloneNode(path.node);\n nodeWithoutSpread.right = t.identifier(refName);\n nodes.push(t.expressionStatement(nodeWithoutSpread));\n nodes.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", argument, callExpression),\n ),\n );\n nodes.push(t.expressionStatement(t.identifier(refName)));\n\n path.replaceWithMultiple(nodes);\n }\n },\n\n // taken from transform-destructuring/src/index.js#visitor\n ForXStatement(path: NodePath<t.ForXStatement>) {\n const { node, scope } = path;\n const leftPath = path.get(\"left\");\n const left = node.left;\n\n if (!hasObjectPatternRestElement(leftPath)) {\n return;\n }\n\n if (!t.isVariableDeclaration(left)) {\n // for ({a, ...b} of []) {}\n const temp = scope.generateUidIdentifier(\"ref\");\n\n node.left = t.variableDeclaration(\"var\", [\n t.variableDeclarator(temp),\n ]);\n\n path.ensureBlock();\n const body = path.node.body as t.BlockStatement;\n\n if (body.body.length === 0 && path.isCompletionRecord()) {\n body.body.unshift(\n t.expressionStatement(scope.buildUndefinedNode()),\n );\n }\n\n body.body.unshift(\n t.expressionStatement(\n t.assignmentExpression(\"=\", left, t.cloneNode(temp)),\n ),\n );\n } else {\n // for (var {a, ...b} of []) {}\n const pattern = left.declarations[0].id;\n\n const key = scope.generateUidIdentifier(\"ref\");\n node.left = t.variableDeclaration(left.kind, [\n t.variableDeclarator(key, null),\n ]);\n\n path.ensureBlock();\n const body = node.body as t.BlockStatement;\n\n body.body.unshift(\n t.variableDeclaration(node.left.kind, [\n t.variableDeclarator(pattern, t.cloneNode(key)),\n ]),\n );\n }\n },\n\n // [{a, ...b}] = c;\n ArrayPattern(path) {\n const objectPatterns: t.VariableDeclarator[] = [];\n\n visitRestElements(path, path => {\n if (!path.parentPath.isObjectPattern()) {\n // Return early if the parent is not an ObjectPattern, but\n // (for example) an ArrayPattern or Function, because that\n // means this RestElement is an not an object property.\n return;\n }\n\n const objectPattern = path.parentPath;\n\n const uid = path.scope.generateUidIdentifier(\"ref\");\n objectPatterns.push(t.variableDeclarator(objectPattern.node, uid));\n\n objectPattern.replaceWith(t.cloneNode(uid));\n path.skip();\n });\n\n if (objectPatterns.length > 0) {\n const statementPath = path.getStatementParent();\n const statementNode = statementPath.node;\n const kind =\n statementNode.type === \"VariableDeclaration\"\n ? statementNode.kind\n : \"var\";\n statementPath.insertAfter(\n t.variableDeclaration(kind, objectPatterns),\n );\n }\n },\n\n // var a = { ...b, ...c }\n ObjectExpression(path, file) {\n if (!hasSpread(path.node)) return;\n\n let helper: t.Identifier | t.MemberExpression;\n if (setSpreadProperties) {\n helper = getExtendsHelper(file);\n } else {\n if (process.env.BABEL_8_BREAKING) {\n helper = file.addHelper(\"objectSpread2\");\n } else {\n try {\n helper = file.addHelper(\"objectSpread2\");\n } catch {\n // TODO: This is needed to workaround https://github.com/babel/babel/issues/10187\n // and https://github.com/babel/babel/issues/10179 for older @babel/core versions\n // where #10187 isn't fixed.\n this.file.declarations[\"objectSpread2\"] = null;\n\n // objectSpread2 has been introduced in v7.5.0\n // We have to maintain backward compatibility.\n helper = file.addHelper(\"objectSpread\");\n }\n }\n }\n\n let exp: t.CallExpression = null;\n let props: t.ObjectMember[] = [];\n\n function make() {\n const hadProps = props.length > 0;\n const obj = t.objectExpression(props);\n props = [];\n\n if (!exp) {\n exp = t.callExpression(helper, [obj]);\n return;\n }\n\n // When we can assume that getters are pure and don't depend on\n // the order of evaluation, we can avoid making multiple calls.\n if (pureGetters) {\n if (hadProps) {\n exp.arguments.push(obj);\n }\n return;\n }\n\n exp = t.callExpression(t.cloneNode(helper), [\n exp,\n // If we have static props, we need to insert an empty object\n // because the odd arguments are copied with [[Get]], not\n // [[GetOwnProperty]]\n ...(hadProps ? [t.objectExpression([]), obj] : []),\n ]);\n }\n\n for (const prop of path.node.properties) {\n if (t.isSpreadElement(prop)) {\n make();\n exp.arguments.push(prop.argument);\n } else {\n props.push(prop);\n }\n }\n\n if (props.length) make();\n\n path.replaceWith(exp);\n },\n },\n };\n});\n"],"names":["shouldStoreRHSInTemporaryVariable","node","type","nonNullElements","elements","filter","element","length","properties","firstProperty","value","left","argument","chrome","opera","edge","firefox","safari","deno","ios","samsung","opera_mobile","electron","isAssignmentPattern","isObjectProperty","t","identifier","property","objectProperty","pattern","objectPattern","ZERO_REFS","isReferenced","declare","api","opts","_api$assumption","_api$assumption2","_api$assumption3","_api$assumption4","assertVersion","targets","supportsObjectAssign","isRequired","compatData","useBuiltIns","loose","Error","ignoreFunctionLength","assumption","objectRestNoSymbols","pureGetters","setSpreadProperties","getExtendsHelper","file","memberExpression","addHelper","hasRestElement","path","foundRestElement","visitRestElements","restElement","stop","hasObjectPatternRestElement","parentPath","isObjectPattern","visitor","traverse","Expression","parent","key","computed","skip","RestElement","hasSpread","prop","isSpreadElement","extractNormalizedKeys","props","keys","allPrimitives","hasTemplateLiteral","isIdentifier","push","stringLiteral","name","isTemplateLiteral","cloneNode","isLiteral","String","isMemberExpression","object","isCallExpression","matchesPattern","callee","replaceImpureComputedKeys","scope","impureComputedPropertyDeclarators","propPath","get","isPure","generateUidBasedOnNode","declarator","variableDeclarator","replaceWith","removeUnusedExcludedKeys","bindings","getOuterBindingIdentifierPaths","Object","forEach","bindingName","bindingParentPath","getBinding","references","remove","createObjectRest","objRef","last","assertRestElement","callExpression","objectExpression","sequenceExpression","keyExpression","arrayExpression","isProgram","block","program","findParent","id","generateUidIdentifier","init","kind","replaceRestElement","paramPath","container","isArrayPattern","i","uid","declar","variableDeclaration","ensureBlock","unshiftContainer","inherits","version","undefined","require","default","Function","params","paramsWithRestElement","Set","idsInRestParams","param","add","getBindingIdentifiers","idInRest","IdentifierHandler","functionScope","has","isReferencedIdentifier","isBindingIdentifier","shouldTransformParam","idx","convertFunctionParams","VariableDeclarator","insertionPath","originalPath","initRef","generateUidIdentifierBasedOnNode","insertBefore","ref","refPropertyPath","unshift","isVariableDeclarator","impureObjRefComputedDeclarators","objectPatternPath","assertIdentifier","insertAfter","registerBinding","ExportNamedDeclaration","declaration","isVariableDeclaration","hasRest","some","specifiers","getOuterBindingIdentifiers","exportSpecifier","exportNamedDeclaration","CatchClause","AssignmentExpression","leftPath","nodes","refName","right","nodeWithoutSpread","expressionStatement","assignmentExpression","replaceWithMultiple","ForXStatement","temp","body","isCompletionRecord","buildUndefinedNode","declarations","ArrayPattern","objectPatterns","statementPath","getStatementParent","statementNode","ObjectExpression","helper","_unused","exp","make","hadProps","obj","arguments"],"mappings":";;;;;;;;;AASe,S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