summaryrefslogtreecommitdiff
path: root/node_modules/@babel/plugin-transform-classes/lib
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@babel/plugin-transform-classes/lib
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/@babel/plugin-transform-classes/lib')
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/index.js75
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/index.js.map1
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js73
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js.map1
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/transformClass.js544
-rw-r--r--node_modules/@babel/plugin-transform-classes/lib/transformClass.js.map1
6 files changed, 0 insertions, 695 deletions
diff --git a/node_modules/@babel/plugin-transform-classes/lib/index.js b/node_modules/@babel/plugin-transform-classes/lib/index.js
deleted file mode 100644
index a8a5d2c9..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = void 0;
-var _helperPluginUtils = require("@babel/helper-plugin-utils");
-var _helperCompilationTargets = require("@babel/helper-compilation-targets");
-var _helperAnnotateAsPure = require("@babel/helper-annotate-as-pure");
-var _core = require("@babel/core");
-var _globals = require("globals");
-var _transformClass = require("./transformClass.js");
-const getBuiltinClasses = category => Object.keys(_globals[category]).filter(name => /^[A-Z]/.test(name));
-const builtinClasses = new Set([...getBuiltinClasses("builtin"), ...getBuiltinClasses("browser")]);
-var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) => {
- var _api$assumption, _api$assumption2, _api$assumption3, _api$assumption4;
- api.assertVersion(7);
- const {
- loose = false
- } = options;
- const setClassMethods = (_api$assumption = api.assumption("setClassMethods")) != null ? _api$assumption : loose;
- const constantSuper = (_api$assumption2 = api.assumption("constantSuper")) != null ? _api$assumption2 : loose;
- const superIsCallableConstructor = (_api$assumption3 = api.assumption("superIsCallableConstructor")) != null ? _api$assumption3 : loose;
- const noClassCalls = (_api$assumption4 = api.assumption("noClassCalls")) != null ? _api$assumption4 : loose;
- const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets());
- const VISITED = new WeakSet();
- return {
- name: "transform-classes",
- visitor: {
- ExportDefaultDeclaration(path) {
- if (!path.get("declaration").isClassDeclaration()) return;
- {
- var _path$splitExportDecl;
- (_path$splitExportDecl = path.splitExportDeclaration) != null ? _path$splitExportDecl : path.splitExportDeclaration = require("@babel/traverse").NodePath.prototype.splitExportDeclaration;
- }
- path.splitExportDeclaration();
- },
- ClassDeclaration(path) {
- const {
- node
- } = path;
- const ref = node.id ? _core.types.cloneNode(node.id) : path.scope.generateUidIdentifier("class");
- path.replaceWith(_core.types.variableDeclaration("let", [_core.types.variableDeclarator(ref, _core.types.toExpression(node))]));
- },
- ClassExpression(path, state) {
- const {
- node
- } = path;
- if (VISITED.has(node)) return;
- {
- var _path$ensureFunctionN;
- (_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
- }
- const replacement = path.ensureFunctionName(supportUnicodeId);
- if (replacement && replacement.node !== node) return;
- VISITED.add(node);
- const [replacedPath] = path.replaceWith((0, _transformClass.default)(path, state.file, builtinClasses, loose, {
- setClassMethods,
- constantSuper,
- superIsCallableConstructor,
- noClassCalls
- }, supportUnicodeId));
- if (replacedPath.isCallExpression()) {
- (0, _helperAnnotateAsPure.default)(replacedPath);
- const callee = replacedPath.get("callee");
- if (callee.isArrowFunctionExpression()) {
- callee.arrowFunctionToExpression();
- }
- }
- }
- }
- };
-});
-
-//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/plugin-transform-classes/lib/index.js.map b/node_modules/@babel/plugin-transform-classes/lib/index.js.map
deleted file mode 100644
index f46bea40..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"names":["_helperPluginUtils","require","_helperCompilationTargets","_helperAnnotateAsPure","_core","_globals","_transformClass","getBuiltinClasses","category","Object","keys","globals","filter","name","test","builtinClasses","Set","_default","exports","default","declare","api","options","_api$assumption","_api$assumption2","_api$assumption3","_api$assumption4","assertVersion","loose","setClassMethods","assumption","constantSuper","superIsCallableConstructor","noClassCalls","supportUnicodeId","isRequired","targets","VISITED","WeakSet","visitor","ExportDefaultDeclaration","path","get","isClassDeclaration","_path$splitExportDecl","splitExportDeclaration","NodePath","prototype","ClassDeclaration","node","ref","id","t","cloneNode","scope","generateUidIdentifier","replaceWith","variableDeclaration","variableDeclarator","toExpression","ClassExpression","state","has","_path$ensureFunctionN","ensureFunctionName","replacement","add","replacedPath","transformClass","file","isCallExpression","annotateAsPure","callee","isArrowFunctionExpression","arrowFunctionToExpression"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { isRequired } from \"@babel/helper-compilation-targets\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\nimport { types as t } from \"@babel/core\";\nimport globals from \"globals\";\nimport transformClass from \"./transformClass.ts\";\n\nconst getBuiltinClasses = (category: keyof typeof globals) =>\n Object.keys(globals[category]).filter(name => /^[A-Z]/.test(name));\n\nconst builtinClasses = new Set([\n ...getBuiltinClasses(\"builtin\"),\n ...getBuiltinClasses(\"browser\"),\n]);\n\nexport interface Options {\n loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n const { loose = false } = options;\n\n const setClassMethods = api.assumption(\"setClassMethods\") ?? loose;\n const constantSuper = api.assumption(\"constantSuper\") ?? loose;\n const superIsCallableConstructor =\n api.assumption(\"superIsCallableConstructor\") ?? loose;\n const noClassCalls = api.assumption(\"noClassCalls\") ?? loose;\n const supportUnicodeId = !isRequired(\n \"transform-unicode-escapes\",\n api.targets(),\n );\n\n // todo: investigate traversal requeueing\n const VISITED = new WeakSet();\n\n return {\n name: \"transform-classes\",\n\n visitor: {\n ExportDefaultDeclaration(path) {\n if (!path.get(\"declaration\").isClassDeclaration()) return;\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.splitExportDeclaration ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.splitExportDeclaration;\n }\n path.splitExportDeclaration();\n },\n\n ClassDeclaration(path) {\n const { node } = path;\n\n const ref = node.id\n ? t.cloneNode(node.id)\n : path.scope.generateUidIdentifier(\"class\");\n\n path.replaceWith(\n t.variableDeclaration(\"let\", [\n t.variableDeclarator(ref, t.toExpression(node)),\n ]),\n );\n },\n\n ClassExpression(path, state) {\n const { node } = path;\n if (VISITED.has(node)) return;\n\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n const replacement = path.ensureFunctionName(supportUnicodeId);\n if (replacement && replacement.node !== node) return;\n\n VISITED.add(node);\n\n const [replacedPath] = path.replaceWith(\n transformClass(\n path,\n state.file,\n builtinClasses,\n loose,\n {\n setClassMethods,\n constantSuper,\n superIsCallableConstructor,\n noClassCalls,\n },\n supportUnicodeId,\n ),\n );\n\n if (replacedPath.isCallExpression()) {\n annotateAsPure(replacedPath);\n const callee = replacedPath.get(\"callee\");\n if (callee.isArrowFunctionExpression()) {\n // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n callee.arrowFunctionToExpression();\n }\n }\n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AAtB,IAAI,CAACuB,kBAAkB,YAAAD,qBAAA,GAAvBtB,IAAI,CAACuB,kBAAkB,GAErB/D,OAAO,CAAC,iBAAiB,CAAC,CAAC6C,QAAQ,CAACC,SAAS,CAACiB,kBAAkB;QACpE;QACA,MAAMC,WAAW,GAAGxB,IAAI,CAACuB,kBAAkB,CAAC9B,gBAAgB,CAAC;QAC7D,IAAI+B,WAAW,IAAIA,WAAW,CAAChB,IAAI,KAAKA,IAAI,EAAE;QAE9CZ,OAAO,CAAC6B,GAAG,CAACjB,IAAI,CAAC;QAEjB,MAAM,CAACkB,YAAY,CAAC,GAAG1B,IAAI,CAACe,WAAW,CACrC,IAAAY,uBAAc,EACZ3B,IAAI,EACJoB,KAAK,CAACQ,IAAI,EACVtD,cAAc,EACda,KAAK,EACL;UACEC,eAAe;UACfE,aAAa;UACbC,0BAA0B;UAC1BC;QACF,CAAC,EACDC,gBACF,CACF,CAAC;QAED,IAAIiC,YAAY,CAACG,gBAAgB,CAAC,CAAC,EAAE;UACnC,IAAAC,6BAAc,EAACJ,YAAY,CAAC;UAC5B,MAAMK,MAAM,GAAGL,YAAY,CAACzB,GAAG,CAAC,QAAQ,CAAC;UACzC,IAAI8B,MAAM,CAACC,yBAAyB,CAAC,CAAC,EAAE;YAEtCD,MAAM,CAACE,yBAAyB,CAAC,CAAC;UACpC;QACF;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js b/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js
deleted file mode 100644
index f7a6618e..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js
+++ /dev/null
@@ -1,73 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = addCallSuperHelper;
-var _core = require("@babel/core");
-const helper = _core.template.statement`
- function CALL_SUPER(
- _this,
- derived,
- args,
- ) {
- function isNativeReflectConstruct() {
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
-
- // core-js@3
- if (Reflect.construct.sham) return false;
-
- // Proxy can't be polyfilled. Every browser implemented
- // proxies before or at the same time as Reflect.construct,
- // so if they support Proxy they also support Reflect.construct.
- if (typeof Proxy === "function") return true;
-
- // Since Reflect.construct can't be properly polyfilled, some
- // implementations (e.g. core-js@2) don't set the correct internal slots.
- // Those polyfills don't allow us to subclass built-ins, so we need to
- // use our fallback implementation.
- try {
- // If the internal slots aren't set, this throws an error similar to
- // TypeError: this is not a Boolean object.
- return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}),);
- } catch (e) {
- return false;
- }
- }
-
- // Super
- derived = GET_PROTOTYPE_OF(derived);
- return POSSIBLE_CONSTRUCTOR_RETURN(
- _this,
- isNativeReflectConstruct()
- ? // NOTE: This doesn't work if this.__proto__.constructor has been modified.
- Reflect.construct(
- derived,
- args || [],
- GET_PROTOTYPE_OF(_this).constructor,
- )
- : derived.apply(_this, args),
- );
- }
-`;
-const helperIDs = new WeakMap();
-function addCallSuperHelper(file) {
- if (helperIDs.has(file)) {
- return (_core.types.cloneNode || _core.types.clone)(helperIDs.get(file));
- }
- try {
- return file.addHelper("callSuper");
- } catch (_unused) {}
- const id = file.scope.generateUidIdentifier("callSuper");
- helperIDs.set(file, id);
- const fn = helper({
- CALL_SUPER: id,
- GET_PROTOTYPE_OF: file.addHelper("getPrototypeOf"),
- POSSIBLE_CONSTRUCTOR_RETURN: file.addHelper("possibleConstructorReturn")
- });
- file.path.unshiftContainer("body", [fn]);
- file.scope.registerDeclaration(file.path.get("body.0"));
- return _core.types.cloneNode(id);
-}
-
-//# sourceMappingURL=inline-callSuper-helpers.js.map
diff --git a/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js.map b/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js.map
deleted file mode 100644
index 1c5d89e8..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/inline-callSuper-helpers.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"names":["_core","require","helper","template","statement","helperIDs","WeakMap","addCallSuperHelper","file","has","t","cloneNode","clone","get","addHelper","_unused","id","scope","generateUidIdentifier","set","fn","CALL_SUPER","GET_PROTOTYPE_OF","POSSIBLE_CONSTRUCTOR_RETURN","path","unshiftContainer","registerDeclaration"],"sources":["../src/inline-callSuper-helpers.ts"],"sourcesContent":["import { template, types as t, type File } from \"@babel/core\";\n\nconst helper = template.statement`\n function CALL_SUPER(\n _this,\n derived,\n args,\n ) {\n function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n // core-js@3\n if (Reflect.construct.sham) return false;\n\n // Proxy can't be polyfilled. Every browser implemented\n // proxies before or at the same time as Reflect.construct,\n // so if they support Proxy they also support Reflect.construct.\n if (typeof Proxy === \"function\") return true;\n\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}),);\n } catch (e) {\n return false;\n }\n }\n\n // Super\n derived = GET_PROTOTYPE_OF(derived);\n return POSSIBLE_CONSTRUCTOR_RETURN(\n _this,\n isNativeReflectConstruct()\n ? // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n Reflect.construct(\n derived,\n args || [],\n GET_PROTOTYPE_OF(_this).constructor,\n )\n : derived.apply(_this, args),\n );\n }\n`;\n\nconst helperIDs = new WeakMap();\n\nexport default function addCallSuperHelper(file: File) {\n if (helperIDs.has(file)) {\n // TODO: Only use t.cloneNode in Babel 8\n // t.cloneNode isn't supported in every version\n return (t.cloneNode || t.clone)(helperIDs.get(file));\n }\n\n try {\n return file.addHelper(\"callSuper\");\n } catch {\n // old Babel doesn't support the helper.\n }\n\n const id = file.scope.generateUidIdentifier(\"callSuper\");\n helperIDs.set(file, id);\n\n const fn = helper({\n CALL_SUPER: id,\n GET_PROTOTYPE_OF: file.addHelper(\"getPrototypeOf\"),\n POSSIBLE_CONSTRUCTOR_RETURN: file.addHelper(\"possibleConstructorReturn\"),\n });\n\n file.path.unshiftContainer(\"body\", [fn]);\n file.scope.registerDeclaration(file.path.get(\"body.0\"));\n\n return t.cloneNode(id);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,MAAMC,MAAM,GAAGC,cAAQ,CAACC,SAAS;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,SAAS,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEhB,SAASC,kBAAkBA,CAACC,IAAU,EAAE;EACrD,IAAIH,SAAS,CAACI,GAAG,CAACD,IAAI,CAAC,EAAE;IAGvB,OAAO,CAACE,WAAC,CAACC,SAAS,IAAID,WAAC,CAACE,KAAK,EAAEP,SAAS,CAACQ,GAAG,CAACL,IAAI,CAAC,CAAC;EACtD;EAEA,IAAI;IACF,OAAOA,IAAI,CAACM,SAAS,CAAC,WAAW,CAAC;EACpC,CAAC,CAAC,OAAAC,OAAA,EAAM,CAER;EAEA,MAAMC,EAAE,GAAGR,IAAI,CAACS,KAAK,CAACC,qBAAqB,CAAC,WAAW,CAAC;EACxDb,SAAS,CAACc,GAAG,CAACX,IAAI,EAAEQ,EAAE,CAAC;EAEvB,MAAMI,EAAE,GAAGlB,MAAM,CAAC;IAChBmB,UAAU,EAAEL,EAAE;IACdM,gBAAgB,EAAEd,IAAI,CAACM,SAAS,CAAC,gBAAgB,CAAC;IAClDS,2BAA2B,EAAEf,IAAI,CAACM,SAAS,CAAC,2BAA2B;EACzE,CAAC,CAAC;EAEFN,IAAI,CAACgB,IAAI,CAACC,gBAAgB,CAAC,MAAM,EAAE,CAACL,EAAE,CAAC,CAAC;EACxCZ,IAAI,CAACS,KAAK,CAACS,mBAAmB,CAAClB,IAAI,CAACgB,IAAI,CAACX,GAAG,CAAC,QAAQ,CAAC,CAAC;EAEvD,OAAOH,WAAC,CAACC,SAAS,CAACK,EAAE,CAAC;AACxB","ignoreList":[]} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-transform-classes/lib/transformClass.js b/node_modules/@babel/plugin-transform-classes/lib/transformClass.js
deleted file mode 100644
index 953eff4a..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/transformClass.js
+++ /dev/null
@@ -1,544 +0,0 @@
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = transformClass;
-var _helperReplaceSupers = require("@babel/helper-replace-supers");
-var _core = require("@babel/core");
-var _traverse = require("@babel/traverse");
-var _helperAnnotateAsPure = require("@babel/helper-annotate-as-pure");
-var _inlineCallSuperHelpers = require("./inline-callSuper-helpers.js");
-function buildConstructor(classRef, constructorBody, node) {
- const func = _core.types.functionDeclaration(_core.types.cloneNode(classRef), [], constructorBody);
- _core.types.inherits(func, node);
- return func;
-}
-function transformClass(path, file, builtinClasses, isLoose, assumptions, supportUnicodeId) {
- const classState = {
- parent: undefined,
- scope: undefined,
- node: undefined,
- path: undefined,
- file: undefined,
- classId: undefined,
- classRef: undefined,
- superName: null,
- superReturns: [],
- isDerived: false,
- extendsNative: false,
- construct: undefined,
- constructorBody: undefined,
- userConstructor: undefined,
- userConstructorPath: undefined,
- hasConstructor: false,
- body: [],
- superThises: [],
- pushedInherits: false,
- pushedCreateClass: false,
- protoAlias: null,
- isLoose: false,
- dynamicKeys: new Map(),
- methods: {
- instance: {
- hasComputed: false,
- list: [],
- map: new Map()
- },
- static: {
- hasComputed: false,
- list: [],
- map: new Map()
- }
- }
- };
- const setState = newState => {
- Object.assign(classState, newState);
- };
- const findThisesVisitor = _traverse.visitors.environmentVisitor({
- ThisExpression(path) {
- classState.superThises.push(path);
- }
- });
- function createClassHelper(args) {
- return _core.types.callExpression(classState.file.addHelper("createClass"), args);
- }
- function maybeCreateConstructor() {
- const classBodyPath = classState.path.get("body");
- for (const path of classBodyPath.get("body")) {
- if (path.isClassMethod({
- kind: "constructor"
- })) return;
- }
- let params, body;
- if (classState.isDerived) {
- const constructor = _core.template.expression.ast`
- (function () {
- super(...arguments);
- })
- `;
- params = constructor.params;
- body = constructor.body;
- } else {
- params = [];
- body = _core.types.blockStatement([]);
- }
- classBodyPath.unshiftContainer("body", _core.types.classMethod("constructor", _core.types.identifier("constructor"), params, body));
- }
- function buildBody() {
- maybeCreateConstructor();
- pushBody();
- verifyConstructor();
- if (classState.userConstructor) {
- const {
- constructorBody,
- userConstructor,
- construct
- } = classState;
- constructorBody.body.push(...userConstructor.body.body);
- _core.types.inherits(construct, userConstructor);
- _core.types.inherits(constructorBody, userConstructor.body);
- }
- pushDescriptors();
- }
- function pushBody() {
- const classBodyPaths = classState.path.get("body.body");
- for (const path of classBodyPaths) {
- const node = path.node;
- if (path.isClassProperty() || path.isClassPrivateProperty()) {
- throw path.buildCodeFrameError("Missing class properties transform.");
- }
- if (node.decorators) {
- throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
- }
- if (_core.types.isClassMethod(node)) {
- const isConstructor = node.kind === "constructor";
- const replaceSupers = new _helperReplaceSupers.default({
- methodPath: path,
- objectRef: classState.classRef,
- superRef: classState.superName,
- constantSuper: assumptions.constantSuper,
- file: classState.file,
- refToPreserve: classState.classRef
- });
- replaceSupers.replace();
- const superReturns = [];
- path.traverse(_traverse.visitors.environmentVisitor({
- ReturnStatement(path) {
- if (!path.getFunctionParent().isArrowFunctionExpression()) {
- superReturns.push(path);
- }
- }
- }));
- if (isConstructor) {
- pushConstructor(superReturns, node, path);
- } else {
- {
- var _path$ensureFunctionN;
- (_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
- }
- path.ensureFunctionName(supportUnicodeId);
- let wrapped;
- if (node !== path.node) {
- wrapped = path.node;
- path.replaceWith(node);
- }
- pushMethod(node, wrapped);
- }
- }
- }
- }
- function pushDescriptors() {
- pushInheritsToBody();
- const {
- body
- } = classState;
- const props = {
- instance: null,
- static: null
- };
- for (const placement of ["static", "instance"]) {
- if (classState.methods[placement].list.length) {
- props[placement] = classState.methods[placement].list.map(desc => {
- const obj = _core.types.objectExpression([_core.types.objectProperty(_core.types.identifier("key"), desc.key)]);
- for (const kind of ["get", "set", "value"]) {
- if (desc[kind] != null) {
- obj.properties.push(_core.types.objectProperty(_core.types.identifier(kind), desc[kind]));
- }
- }
- return obj;
- });
- }
- }
- if (props.instance || props.static) {
- let args = [_core.types.cloneNode(classState.classRef), props.instance ? _core.types.arrayExpression(props.instance) : _core.types.nullLiteral(), props.static ? _core.types.arrayExpression(props.static) : _core.types.nullLiteral()];
- let lastNonNullIndex = 0;
- for (let i = 0; i < args.length; i++) {
- if (!_core.types.isNullLiteral(args[i])) lastNonNullIndex = i;
- }
- args = args.slice(0, lastNonNullIndex + 1);
- body.push(_core.types.returnStatement(createClassHelper(args)));
- classState.pushedCreateClass = true;
- }
- }
- function wrapSuperCall(bareSuper, superRef, thisRef, body) {
- const bareSuperNode = bareSuper.node;
- let call;
- if (assumptions.superIsCallableConstructor) {
- bareSuperNode.arguments.unshift(_core.types.thisExpression());
- if (bareSuperNode.arguments.length === 2 && _core.types.isSpreadElement(bareSuperNode.arguments[1]) && _core.types.isIdentifier(bareSuperNode.arguments[1].argument, {
- name: "arguments"
- })) {
- bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
- bareSuperNode.callee = _core.types.memberExpression(_core.types.cloneNode(superRef), _core.types.identifier("apply"));
- } else {
- bareSuperNode.callee = _core.types.memberExpression(_core.types.cloneNode(superRef), _core.types.identifier("call"));
- }
- call = _core.types.logicalExpression("||", bareSuperNode, _core.types.thisExpression());
- } else {
- var _bareSuperNode$argume;
- const args = [_core.types.thisExpression(), _core.types.cloneNode(classState.classRef)];
- if ((_bareSuperNode$argume = bareSuperNode.arguments) != null && _bareSuperNode$argume.length) {
- const bareSuperNodeArguments = bareSuperNode.arguments;
- if (bareSuperNodeArguments.length === 1 && _core.types.isSpreadElement(bareSuperNodeArguments[0]) && _core.types.isIdentifier(bareSuperNodeArguments[0].argument, {
- name: "arguments"
- })) {
- args.push(bareSuperNodeArguments[0].argument);
- } else {
- args.push(_core.types.arrayExpression(bareSuperNodeArguments));
- }
- }
- call = _core.types.callExpression((0, _inlineCallSuperHelpers.default)(classState.file), args);
- }
- if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
- if (classState.superThises.length) {
- call = _core.types.assignmentExpression("=", thisRef(), call);
- }
- bareSuper.parentPath.replaceWith(_core.types.returnStatement(call));
- } else {
- bareSuper.replaceWith(_core.types.assignmentExpression("=", thisRef(), call));
- }
- }
- function verifyConstructor() {
- if (!classState.isDerived) return;
- const path = classState.userConstructorPath;
- const body = path.get("body");
- const constructorBody = path.get("body");
- let maxGuaranteedSuperBeforeIndex = constructorBody.node.body.length;
- path.traverse(findThisesVisitor);
- let thisRef = function () {
- const ref = path.scope.generateDeclaredUidIdentifier("this");
- maxGuaranteedSuperBeforeIndex++;
- thisRef = () => _core.types.cloneNode(ref);
- return ref;
- };
- const buildAssertThisInitialized = function () {
- return _core.types.callExpression(classState.file.addHelper("assertThisInitialized"), [thisRef()]);
- };
- const bareSupers = [];
- path.traverse(_traverse.visitors.environmentVisitor({
- Super(path) {
- const {
- node,
- parentPath
- } = path;
- if (parentPath.isCallExpression({
- callee: node
- })) {
- bareSupers.unshift(parentPath);
- }
- }
- }));
- for (const bareSuper of bareSupers) {
- wrapSuperCall(bareSuper, classState.superName, thisRef, body);
- if (maxGuaranteedSuperBeforeIndex >= 0) {
- let lastParentPath;
- bareSuper.find(function (parentPath) {
- if (parentPath === constructorBody) {
- maxGuaranteedSuperBeforeIndex = Math.min(maxGuaranteedSuperBeforeIndex, lastParentPath.key);
- return true;
- }
- const {
- type
- } = parentPath;
- switch (type) {
- case "ExpressionStatement":
- case "SequenceExpression":
- case "AssignmentExpression":
- case "BinaryExpression":
- case "MemberExpression":
- case "CallExpression":
- case "NewExpression":
- case "VariableDeclarator":
- case "VariableDeclaration":
- case "BlockStatement":
- case "ArrayExpression":
- case "ObjectExpression":
- case "ObjectProperty":
- case "TemplateLiteral":
- lastParentPath = parentPath;
- return false;
- default:
- if (type === "LogicalExpression" && parentPath.node.left === lastParentPath.node || parentPath.isConditional() && parentPath.node.test === lastParentPath.node || type === "OptionalCallExpression" && parentPath.node.callee === lastParentPath.node || type === "OptionalMemberExpression" && parentPath.node.object === lastParentPath.node) {
- lastParentPath = parentPath;
- return false;
- }
- }
- maxGuaranteedSuperBeforeIndex = -1;
- return true;
- });
- }
- }
- const guaranteedCalls = new Set();
- for (const thisPath of classState.superThises) {
- const {
- node,
- parentPath
- } = thisPath;
- if (parentPath.isMemberExpression({
- object: node
- })) {
- thisPath.replaceWith(thisRef());
- continue;
- }
- let thisIndex;
- thisPath.find(function (parentPath) {
- if (parentPath.parentPath === constructorBody) {
- thisIndex = parentPath.key;
- return true;
- }
- });
- let exprPath = thisPath.parentPath.isSequenceExpression() ? thisPath.parentPath : thisPath;
- if (exprPath.listKey === "arguments" && (exprPath.parentPath.isCallExpression() || exprPath.parentPath.isOptionalCallExpression())) {
- exprPath = exprPath.parentPath;
- } else {
- exprPath = null;
- }
- if (maxGuaranteedSuperBeforeIndex !== -1 && thisIndex > maxGuaranteedSuperBeforeIndex || guaranteedCalls.has(exprPath)) {
- thisPath.replaceWith(thisRef());
- } else {
- if (exprPath) {
- guaranteedCalls.add(exprPath);
- }
- thisPath.replaceWith(buildAssertThisInitialized());
- }
- }
- let wrapReturn;
- if (classState.isLoose) {
- wrapReturn = returnArg => {
- const thisExpr = buildAssertThisInitialized();
- return returnArg ? _core.types.logicalExpression("||", returnArg, thisExpr) : thisExpr;
- };
- } else {
- wrapReturn = returnArg => {
- const returnParams = [thisRef()];
- if (returnArg != null) {
- returnParams.push(returnArg);
- }
- return _core.types.callExpression(classState.file.addHelper("possibleConstructorReturn"), returnParams);
- };
- }
- const bodyPaths = body.get("body");
- const guaranteedSuperBeforeFinish = maxGuaranteedSuperBeforeIndex !== -1 && maxGuaranteedSuperBeforeIndex < bodyPaths.length;
- if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {
- body.pushContainer("body", _core.types.returnStatement(guaranteedSuperBeforeFinish ? thisRef() : buildAssertThisInitialized()));
- }
- for (const returnPath of classState.superReturns) {
- returnPath.get("argument").replaceWith(wrapReturn(returnPath.node.argument));
- }
- }
- function pushMethod(node, wrapped) {
- if (node.kind === "method") {
- if (processMethod(node)) return;
- }
- const placement = node.static ? "static" : "instance";
- const methods = classState.methods[placement];
- const descKey = node.kind === "method" ? "value" : node.kind;
- const key = _core.types.isNumericLiteral(node.key) || _core.types.isBigIntLiteral(node.key) ? _core.types.stringLiteral(String(node.key.value)) : _core.types.toComputedKey(node);
- methods.hasComputed = !_core.types.isStringLiteral(key);
- const fn = wrapped != null ? wrapped : _core.types.toExpression(node);
- let descriptor;
- if (!methods.hasComputed && methods.map.has(key.value)) {
- descriptor = methods.map.get(key.value);
- descriptor[descKey] = fn;
- if (descKey === "value") {
- descriptor.get = null;
- descriptor.set = null;
- } else {
- descriptor.value = null;
- }
- } else {
- descriptor = {
- key: key,
- [descKey]: fn
- };
- methods.list.push(descriptor);
- if (!methods.hasComputed) {
- methods.map.set(key.value, descriptor);
- }
- }
- }
- function processMethod(node) {
- if (assumptions.setClassMethods && !node.decorators) {
- let {
- classRef
- } = classState;
- if (!node.static) {
- insertProtoAliasOnce();
- classRef = classState.protoAlias;
- }
- const methodName = _core.types.memberExpression(_core.types.cloneNode(classRef), node.key, node.computed || _core.types.isLiteral(node.key));
- const func = _core.types.functionExpression(node.id, node.params, node.body, node.generator, node.async);
- _core.types.inherits(func, node);
- const expr = _core.types.expressionStatement(_core.types.assignmentExpression("=", methodName, func));
- _core.types.inheritsComments(expr, node);
- classState.body.push(expr);
- return true;
- }
- return false;
- }
- function insertProtoAliasOnce() {
- if (classState.protoAlias === null) {
- setState({
- protoAlias: classState.scope.generateUidIdentifier("proto")
- });
- const classProto = _core.types.memberExpression(classState.classRef, _core.types.identifier("prototype"));
- const protoDeclaration = _core.types.variableDeclaration("var", [_core.types.variableDeclarator(classState.protoAlias, classProto)]);
- classState.body.push(protoDeclaration);
- }
- }
- function pushConstructor(superReturns, method, path) {
- setState({
- userConstructorPath: path,
- userConstructor: method,
- hasConstructor: true,
- superReturns
- });
- const {
- construct
- } = classState;
- _core.types.inheritsComments(construct, method);
- construct.params = method.params;
- _core.types.inherits(construct.body, method.body);
- construct.body.directives = method.body.directives;
- if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {
- pushDescriptors();
- }
- pushInheritsToBody();
- }
- function pushInheritsToBody() {
- if (!classState.isDerived || classState.pushedInherits) return;
- classState.pushedInherits = true;
- classState.body.unshift(_core.types.expressionStatement(_core.types.callExpression(classState.file.addHelper(classState.isLoose ? "inheritsLoose" : "inherits"), [_core.types.cloneNode(classState.classRef), _core.types.cloneNode(classState.superName)])));
- }
- function extractDynamicKeys() {
- const {
- dynamicKeys,
- node,
- scope
- } = classState;
- for (const elem of node.body.body) {
- if (!_core.types.isClassMethod(elem) || !elem.computed) continue;
- if (scope.isPure(elem.key, true)) continue;
- const id = scope.generateUidIdentifierBasedOnNode(elem.key);
- dynamicKeys.set(id.name, elem.key);
- elem.key = id;
- }
- }
- function setupClosureParamsArgs() {
- const {
- superName,
- dynamicKeys
- } = classState;
- const closureParams = [];
- const closureArgs = [];
- if (classState.isDerived) {
- let arg = _core.types.cloneNode(superName);
- if (classState.extendsNative) {
- arg = _core.types.callExpression(classState.file.addHelper("wrapNativeSuper"), [arg]);
- (0, _helperAnnotateAsPure.default)(arg);
- }
- const param = classState.scope.generateUidIdentifierBasedOnNode(superName);
- closureParams.push(param);
- closureArgs.push(arg);
- setState({
- superName: _core.types.cloneNode(param)
- });
- }
- for (const [name, value] of dynamicKeys) {
- closureParams.push(_core.types.identifier(name));
- closureArgs.push(value);
- }
- return {
- closureParams,
- closureArgs
- };
- }
- function classTransformer(path, file, builtinClasses, isLoose) {
- setState({
- parent: path.parent,
- scope: path.scope,
- node: path.node,
- path,
- file,
- isLoose
- });
- setState({
- classId: classState.node.id,
- classRef: classState.node.id ? _core.types.identifier(classState.node.id.name) : classState.scope.generateUidIdentifier("class"),
- superName: classState.node.superClass,
- isDerived: !!classState.node.superClass,
- constructorBody: _core.types.blockStatement([])
- });
- setState({
- extendsNative: _core.types.isIdentifier(classState.superName) && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true)
- });
- const {
- classRef,
- node,
- constructorBody
- } = classState;
- setState({
- construct: buildConstructor(classRef, constructorBody, node)
- });
- extractDynamicKeys();
- const {
- body
- } = classState;
- const {
- closureParams,
- closureArgs
- } = setupClosureParamsArgs();
- buildBody();
- if (!assumptions.noClassCalls) {
- constructorBody.body.unshift(_core.types.expressionStatement(_core.types.callExpression(classState.file.addHelper("classCallCheck"), [_core.types.thisExpression(), _core.types.cloneNode(classState.classRef)])));
- }
- const isStrict = path.isInStrictMode();
- let constructorOnly = body.length === 0;
- if (constructorOnly && !isStrict) {
- for (const param of classState.construct.params) {
- if (!_core.types.isIdentifier(param)) {
- constructorOnly = false;
- break;
- }
- }
- }
- const directives = constructorOnly ? classState.construct.body.directives : [];
- if (!isStrict) {
- directives.push(_core.types.directive(_core.types.directiveLiteral("use strict")));
- }
- if (constructorOnly) {
- const expr = _core.types.toExpression(classState.construct);
- return classState.isLoose ? expr : createClassHelper([expr]);
- }
- if (!classState.pushedCreateClass) {
- body.push(_core.types.returnStatement(classState.isLoose ? _core.types.cloneNode(classState.classRef) : createClassHelper([_core.types.cloneNode(classState.classRef)])));
- }
- body.unshift(classState.construct);
- const container = _core.types.arrowFunctionExpression(closureParams, _core.types.blockStatement(body, directives));
- return _core.types.callExpression(container, closureArgs);
- }
- return classTransformer(path, file, builtinClasses, isLoose);
-}
-
-//# sourceMappingURL=transformClass.js.map
diff --git a/node_modules/@babel/plugin-transform-classes/lib/transformClass.js.map b/node_modules/@babel/plugin-transform-classes/lib/transformClass.js.map
deleted file mode 100644
index 6fe6bb65..00000000
--- a/node_modules/@babel/plugin-transform-classes/lib/transformClass.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"names":["_helperReplaceSupers","require","_core","_traverse","_helperAnnotateAsPure","_inlineCallSuperHelpers","buildConstructor","classRef","constructorBody","node","func","t","functionDeclaration","cloneNode","inherits","transformClass","path","file","builtinClasses","isLoose","assumptions","supportUnicodeId","classState","parent","undefined","scope","classId","superName","superReturns","isDerived","extendsNative","construct","userConstructor","userConstructorPath","hasConstructor","body","superThises","pushedInherits","pushedCreateClass","protoAlias","dynamicKeys","Map","methods","instance","hasComputed","list","map","static","setState","newState","Object","assign","findThisesVisitor","visitors","environmentVisitor","ThisExpression","push","createClassHelper","args","callExpression","addHelper","maybeCreateConstructor","classBodyPath","get","isClassMethod","kind","params","constructor","template","expression","ast","blockStatement","unshiftContainer","classMethod","identifier","buildBody","pushBody","verifyConstructor","pushDescriptors","classBodyPaths","isClassProperty","isClassPrivateProperty","buildCodeFrameError","decorators","isConstructor","replaceSupers","ReplaceSupers","methodPath","objectRef","superRef","constantSuper","refToPreserve","replace","traverse","ReturnStatement","getFunctionParent","isArrowFunctionExpression","pushConstructor","_path$ensureFunctionN","ensureFunctionName","NodePath","prototype","wrapped","replaceWith","pushMethod","pushInheritsToBody","props","placement","length","desc","obj","objectExpression","objectProperty","key","properties","arrayExpression","nullLiteral","lastNonNullIndex","i","isNullLiteral","slice","returnStatement","wrapSuperCall","bareSuper","thisRef","bareSuperNode","call","superIsCallableConstructor","arguments","unshift","thisExpression","isSpreadElement","isIdentifier","argument","name","callee","memberExpression","logicalExpression","_bareSuperNode$argume","bareSuperNodeArguments","addCallSuperHelper","parentPath","isExpressionStatement","container","assignmentExpression","maxGuaranteedSuperBeforeIndex","ref","generateDeclaredUidIdentifier","buildAssertThisInitialized","bareSupers","Super","isCallExpression","lastParentPath","find","Math","min","type","left","isConditional","test","object","guaranteedCalls","Set","thisPath","isMemberExpression","thisIndex","exprPath","isSequenceExpression","listKey","isOptionalCallExpression","has","add","wrapReturn","returnArg","thisExpr","returnParams","bodyPaths","guaranteedSuperBeforeFinish","pop","isReturnStatement","pushContainer","returnPath","processMethod","descKey","isNumericLiteral","isBigIntLiteral","stringLiteral","String","value","toComputedKey","isStringLiteral","fn","toExpression","descriptor","set","setClassMethods","insertProtoAliasOnce","methodName","computed","isLiteral","functionExpression","id","generator","async","expr","expressionStatement","inheritsComments","generateUidIdentifier","classProto","protoDeclaration","variableDeclaration","variableDeclarator","method","directives","hasInstanceDescriptors","hasStaticDescriptors","extractDynamicKeys","elem","isPure","generateUidIdentifierBasedOnNode","setupClosureParamsArgs","closureParams","closureArgs","arg","annotateAsPure","param","classTransformer","superClass","hasBinding","noClassCalls","isStrict","isInStrictMode","constructorOnly","directive","directiveLiteral","arrowFunctionExpression"],"sources":["../src/transformClass.ts"],"sourcesContent":["import type { NodePath, Scope, File } from \"@babel/core\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { template, types as t } from \"@babel/core\";\nimport { visitors } from \"@babel/traverse\";\nimport annotateAsPure from \"@babel/helper-annotate-as-pure\";\n\nimport addCallSuperHelper from \"./inline-callSuper-helpers.ts\";\n\ntype ClassAssumptions = {\n setClassMethods: boolean;\n constantSuper: boolean;\n superIsCallableConstructor: boolean;\n noClassCalls: boolean;\n};\n\ntype ClassConstructor = t.ClassMethod & { kind: \"constructor\" };\n\nfunction buildConstructor(\n classRef: t.Identifier,\n constructorBody: t.BlockStatement,\n node: t.Class,\n) {\n const func = t.functionDeclaration(\n t.cloneNode(classRef),\n [],\n constructorBody,\n );\n t.inherits(func, node);\n return func;\n}\n\ntype Descriptor = {\n key: t.Expression;\n get?: t.Expression | null;\n set?: t.Expression | null;\n value?: t.Expression | null;\n constructor?: t.Expression | null;\n};\n\ntype State = {\n parent: t.Node;\n scope: Scope;\n node: t.Class;\n path: NodePath<t.Class>;\n file: File;\n\n classId: t.Identifier | void;\n classRef: t.Identifier;\n superName: t.Expression | null;\n superReturns: NodePath<t.ReturnStatement>[];\n isDerived: boolean;\n extendsNative: boolean;\n\n construct: t.FunctionDeclaration;\n constructorBody: t.BlockStatement;\n userConstructor: ClassConstructor;\n userConstructorPath: NodePath<ClassConstructor>;\n hasConstructor: boolean;\n\n body: t.Statement[];\n superThises: NodePath<t.ThisExpression>[];\n pushedInherits: boolean;\n pushedCreateClass: boolean;\n protoAlias: t.Identifier | null;\n isLoose: boolean;\n\n dynamicKeys: Map<string, t.Expression>;\n\n methods: {\n // 'list' is in the same order as the elements appear in the class body.\n // if there aren't computed keys, we can safely reorder class elements\n // and use 'map' to merge duplicates.\n instance: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map<string, Descriptor>;\n };\n static: {\n hasComputed: boolean;\n list: Descriptor[];\n map: Map<string, Descriptor>;\n };\n };\n};\n\ntype PropertyInfo = {\n instance: t.ObjectExpression[] | null;\n static: t.ObjectExpression[] | null;\n};\n\nexport default function transformClass(\n path: NodePath<t.Class>,\n file: File,\n builtinClasses: ReadonlySet<string>,\n isLoose: boolean,\n assumptions: ClassAssumptions,\n supportUnicodeId: boolean,\n) {\n const classState: State = {\n parent: undefined,\n scope: undefined,\n node: undefined,\n path: undefined,\n file: undefined,\n\n classId: undefined,\n classRef: undefined,\n superName: null,\n superReturns: [],\n isDerived: false,\n extendsNative: false,\n\n construct: undefined,\n constructorBody: undefined,\n userConstructor: undefined,\n userConstructorPath: undefined,\n hasConstructor: false,\n\n body: [],\n superThises: [],\n pushedInherits: false,\n pushedCreateClass: false,\n protoAlias: null,\n isLoose: false,\n\n dynamicKeys: new Map(),\n\n methods: {\n instance: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n static: {\n hasComputed: false,\n list: [],\n map: new Map(),\n },\n },\n };\n\n const setState = (newState: Partial<State>) => {\n Object.assign(classState, newState);\n };\n\n const findThisesVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n classState.superThises.push(path);\n },\n });\n\n function createClassHelper(args: t.Expression[]) {\n return t.callExpression(classState.file.addHelper(\"createClass\"), args);\n }\n\n /**\n * Creates a class constructor or bail out if there is one\n */\n function maybeCreateConstructor() {\n const classBodyPath = classState.path.get(\"body\");\n for (const path of classBodyPath.get(\"body\")) {\n if (path.isClassMethod({ kind: \"constructor\" })) return;\n }\n\n let params: t.FunctionExpression[\"params\"], body;\n\n if (classState.isDerived) {\n const constructor = template.expression.ast`\n (function () {\n super(...arguments);\n })\n ` as t.FunctionExpression;\n params = constructor.params;\n body = constructor.body;\n } else {\n params = [];\n body = t.blockStatement([]);\n }\n\n classBodyPath.unshiftContainer(\n \"body\",\n t.classMethod(\"constructor\", t.identifier(\"constructor\"), params, body),\n );\n }\n\n function buildBody() {\n maybeCreateConstructor();\n pushBody();\n verifyConstructor();\n\n if (classState.userConstructor) {\n const { constructorBody, userConstructor, construct } = classState;\n\n constructorBody.body.push(...userConstructor.body.body);\n t.inherits(construct, userConstructor);\n t.inherits(constructorBody, userConstructor.body);\n }\n\n pushDescriptors();\n }\n\n function pushBody() {\n const classBodyPaths: Array<any> = classState.path.get(\"body.body\");\n\n for (const path of classBodyPaths) {\n const node = path.node;\n\n if (path.isClassProperty() || path.isClassPrivateProperty()) {\n throw path.buildCodeFrameError(\"Missing class properties transform.\");\n }\n\n if (node.decorators) {\n throw path.buildCodeFrameError(\n \"Method has decorators, put the decorator plugin before the classes one.\",\n );\n }\n\n if (t.isClassMethod(node)) {\n const isConstructor = node.kind === \"constructor\";\n\n const replaceSupers = new ReplaceSupers({\n methodPath: path,\n objectRef: classState.classRef,\n superRef: classState.superName,\n constantSuper: assumptions.constantSuper,\n file: classState.file,\n refToPreserve: classState.classRef,\n });\n\n replaceSupers.replace();\n\n const superReturns: NodePath<t.ReturnStatement>[] = [];\n path.traverse(\n visitors.environmentVisitor({\n ReturnStatement(path) {\n if (!path.getFunctionParent().isArrowFunctionExpression()) {\n superReturns.push(path);\n }\n },\n }),\n );\n\n if (isConstructor) {\n pushConstructor(superReturns, node as ClassConstructor, path);\n } else {\n if (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n // polyfill when being run by an older Babel version\n path.ensureFunctionName ??=\n // eslint-disable-next-line no-restricted-globals\n require(\"@babel/traverse\").NodePath.prototype.ensureFunctionName;\n }\n path.ensureFunctionName(supportUnicodeId);\n let wrapped;\n if (node !== path.node) {\n wrapped = path.node;\n // The node has been wrapped. Reset it to the original once, but store the wrapper.\n path.replaceWith(node);\n }\n\n pushMethod(node, wrapped);\n }\n }\n }\n }\n\n function pushDescriptors() {\n pushInheritsToBody();\n\n const { body } = classState;\n\n const props: PropertyInfo = {\n instance: null,\n static: null,\n };\n\n for (const placement of [\"static\", \"instance\"] as const) {\n if (classState.methods[placement].list.length) {\n props[placement] = classState.methods[placement].list.map(desc => {\n const obj = t.objectExpression([\n t.objectProperty(t.identifier(\"key\"), desc.key),\n ]);\n\n for (const kind of [\"get\", \"set\", \"value\"] as const) {\n if (desc[kind] != null) {\n obj.properties.push(\n t.objectProperty(t.identifier(kind), desc[kind]),\n );\n }\n }\n\n return obj;\n });\n }\n }\n\n if (props.instance || props.static) {\n let args = [\n t.cloneNode(classState.classRef), // Constructor\n props.instance ? t.arrayExpression(props.instance) : t.nullLiteral(), // instanceDescriptors\n props.static ? t.arrayExpression(props.static) : t.nullLiteral(), // staticDescriptors\n ];\n\n let lastNonNullIndex = 0;\n for (let i = 0; i < args.length; i++) {\n if (!t.isNullLiteral(args[i])) lastNonNullIndex = i;\n }\n args = args.slice(0, lastNonNullIndex + 1);\n\n body.push(t.returnStatement(createClassHelper(args)));\n classState.pushedCreateClass = true;\n }\n }\n\n function wrapSuperCall(\n bareSuper: NodePath<t.CallExpression>,\n superRef: t.Expression,\n thisRef: () => t.Identifier,\n body: NodePath<t.BlockStatement>,\n ) {\n const bareSuperNode = bareSuper.node;\n let call;\n\n if (assumptions.superIsCallableConstructor) {\n bareSuperNode.arguments.unshift(t.thisExpression());\n if (\n bareSuperNode.arguments.length === 2 &&\n t.isSpreadElement(bareSuperNode.arguments[1]) &&\n t.isIdentifier(bareSuperNode.arguments[1].argument, {\n name: \"arguments\",\n })\n ) {\n // special case single arguments spread\n bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"apply\"),\n );\n } else {\n bareSuperNode.callee = t.memberExpression(\n t.cloneNode(superRef),\n t.identifier(\"call\"),\n );\n }\n\n call = t.logicalExpression(\"||\", bareSuperNode, t.thisExpression());\n } else {\n const args: t.Expression[] = [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ];\n if (bareSuperNode.arguments?.length) {\n const bareSuperNodeArguments = bareSuperNode.arguments as (\n | t.Expression\n | t.SpreadElement\n )[];\n\n /**\n * test262/test/language/expressions/super/call-spread-err-sngl-err-itr-get-get.js\n *\n * var iter = {};\n * Object.defineProperty(iter, Symbol.iterator, {\n * get: function() {\n * throw new Test262Error();\n * }\n * })\n * super(...iter);\n */\n\n if (\n bareSuperNodeArguments.length === 1 &&\n t.isSpreadElement(bareSuperNodeArguments[0]) &&\n t.isIdentifier(bareSuperNodeArguments[0].argument, {\n name: \"arguments\",\n })\n ) {\n args.push(bareSuperNodeArguments[0].argument);\n } else {\n args.push(t.arrayExpression(bareSuperNodeArguments));\n }\n }\n call = t.callExpression(addCallSuperHelper(classState.file), args);\n }\n\n if (\n bareSuper.parentPath.isExpressionStatement() &&\n bareSuper.parentPath.container === body.node.body &&\n body.node.body.length - 1 === bareSuper.parentPath.key\n ) {\n // this super call is the last statement in the body so we can just straight up\n // turn it into a return\n\n if (classState.superThises.length) {\n call = t.assignmentExpression(\"=\", thisRef(), call);\n }\n\n bareSuper.parentPath.replaceWith(t.returnStatement(call));\n } else {\n bareSuper.replaceWith(t.assignmentExpression(\"=\", thisRef(), call));\n }\n }\n\n function verifyConstructor() {\n if (!classState.isDerived) return;\n\n const path = classState.userConstructorPath;\n const body = path.get(\"body\");\n\n const constructorBody = path.get(\"body\");\n\n let maxGuaranteedSuperBeforeIndex = constructorBody.node.body.length;\n\n path.traverse(findThisesVisitor);\n\n let thisRef = function () {\n const ref = path.scope.generateDeclaredUidIdentifier(\"this\");\n maxGuaranteedSuperBeforeIndex++;\n thisRef = () => t.cloneNode(ref);\n return ref;\n };\n\n const buildAssertThisInitialized = function () {\n return t.callExpression(\n classState.file.addHelper(\"assertThisInitialized\"),\n [thisRef()],\n );\n };\n\n const bareSupers: NodePath<t.CallExpression>[] = [];\n path.traverse(\n visitors.environmentVisitor({\n Super(path) {\n const { node, parentPath } = path;\n if (parentPath.isCallExpression({ callee: node })) {\n bareSupers.unshift(parentPath);\n }\n },\n }),\n );\n\n for (const bareSuper of bareSupers) {\n wrapSuperCall(bareSuper, classState.superName, thisRef, body);\n\n if (maxGuaranteedSuperBeforeIndex >= 0) {\n let lastParentPath: NodePath;\n bareSuper.find(function (parentPath) {\n // hit top so short circuit\n if (parentPath === constructorBody) {\n maxGuaranteedSuperBeforeIndex = Math.min(\n maxGuaranteedSuperBeforeIndex,\n lastParentPath.key as number,\n );\n return true;\n }\n\n const { type } = parentPath;\n switch (type) {\n case \"ExpressionStatement\":\n case \"SequenceExpression\":\n case \"AssignmentExpression\":\n case \"BinaryExpression\":\n case \"MemberExpression\":\n case \"CallExpression\":\n case \"NewExpression\":\n case \"VariableDeclarator\":\n case \"VariableDeclaration\":\n case \"BlockStatement\":\n case \"ArrayExpression\":\n case \"ObjectExpression\":\n case \"ObjectProperty\":\n case \"TemplateLiteral\":\n lastParentPath = parentPath;\n return false;\n default:\n if (\n (type === \"LogicalExpression\" &&\n parentPath.node.left === lastParentPath.node) ||\n (parentPath.isConditional() &&\n parentPath.node.test === lastParentPath.node) ||\n (type === \"OptionalCallExpression\" &&\n parentPath.node.callee === lastParentPath.node) ||\n (type === \"OptionalMemberExpression\" &&\n parentPath.node.object === lastParentPath.node)\n ) {\n lastParentPath = parentPath;\n return false;\n }\n }\n\n maxGuaranteedSuperBeforeIndex = -1;\n return true;\n });\n }\n }\n\n const guaranteedCalls = new Set<NodePath>();\n\n for (const thisPath of classState.superThises) {\n const { node, parentPath } = thisPath;\n if (parentPath.isMemberExpression({ object: node })) {\n thisPath.replaceWith(thisRef());\n continue;\n }\n\n let thisIndex: number;\n thisPath.find(function (parentPath) {\n if (parentPath.parentPath === constructorBody) {\n thisIndex = parentPath.key as number;\n return true;\n }\n });\n\n let exprPath: NodePath = thisPath.parentPath.isSequenceExpression()\n ? thisPath.parentPath\n : thisPath;\n if (\n exprPath.listKey === \"arguments\" &&\n (exprPath.parentPath.isCallExpression() ||\n exprPath.parentPath.isOptionalCallExpression())\n ) {\n exprPath = exprPath.parentPath;\n } else {\n exprPath = null;\n }\n\n if (\n (maxGuaranteedSuperBeforeIndex !== -1 &&\n thisIndex > maxGuaranteedSuperBeforeIndex) ||\n guaranteedCalls.has(exprPath)\n ) {\n thisPath.replaceWith(thisRef());\n } else {\n if (exprPath) {\n guaranteedCalls.add(exprPath);\n }\n thisPath.replaceWith(buildAssertThisInitialized());\n }\n }\n\n let wrapReturn;\n\n if (classState.isLoose) {\n wrapReturn = (returnArg: t.Expression | void) => {\n const thisExpr = buildAssertThisInitialized();\n return returnArg\n ? t.logicalExpression(\"||\", returnArg, thisExpr)\n : thisExpr;\n };\n } else {\n wrapReturn = (returnArg: t.Expression | undefined) => {\n const returnParams: t.Expression[] = [thisRef()];\n if (returnArg != null) {\n returnParams.push(returnArg);\n }\n return t.callExpression(\n classState.file.addHelper(\"possibleConstructorReturn\"),\n returnParams,\n );\n };\n }\n\n // if we have a return as the last node in the body then we've already caught that\n // return\n const bodyPaths = body.get(\"body\");\n const guaranteedSuperBeforeFinish =\n maxGuaranteedSuperBeforeIndex !== -1 &&\n maxGuaranteedSuperBeforeIndex < bodyPaths.length;\n if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {\n body.pushContainer(\n \"body\",\n t.returnStatement(\n guaranteedSuperBeforeFinish\n ? thisRef()\n : buildAssertThisInitialized(),\n ),\n );\n }\n\n for (const returnPath of classState.superReturns) {\n returnPath\n .get(\"argument\")\n .replaceWith(wrapReturn(returnPath.node.argument));\n }\n }\n\n /**\n * Push a method to its respective mutatorMap.\n */\n function pushMethod(node: t.ClassMethod, wrapped?: t.Expression) {\n if (node.kind === \"method\") {\n if (processMethod(node)) return;\n }\n\n const placement = node.static ? \"static\" : \"instance\";\n const methods = classState.methods[placement];\n\n const descKey = node.kind === \"method\" ? \"value\" : node.kind;\n const key =\n t.isNumericLiteral(node.key) || t.isBigIntLiteral(node.key)\n ? t.stringLiteral(String(node.key.value))\n : t.toComputedKey(node);\n methods.hasComputed = !t.isStringLiteral(key);\n\n const fn: t.Expression = wrapped ?? t.toExpression(node);\n\n let descriptor: Descriptor;\n if (\n !methods.hasComputed &&\n methods.map.has((key as t.StringLiteral).value)\n ) {\n descriptor = methods.map.get((key as t.StringLiteral).value);\n descriptor[descKey] = fn;\n\n if (descKey === \"value\") {\n descriptor.get = null;\n descriptor.set = null;\n } else {\n descriptor.value = null;\n }\n } else {\n descriptor = {\n key:\n // private name has been handled in class-properties transform\n key as t.Expression,\n [descKey]: fn,\n } as Descriptor;\n methods.list.push(descriptor);\n\n if (!methods.hasComputed) {\n methods.map.set((key as t.StringLiteral).value, descriptor);\n }\n }\n }\n\n function processMethod(node: t.ClassMethod) {\n if (assumptions.setClassMethods && !node.decorators) {\n // use assignments instead of define properties for loose classes\n let { classRef } = classState;\n if (!node.static) {\n insertProtoAliasOnce();\n classRef = classState.protoAlias;\n }\n const methodName = t.memberExpression(\n t.cloneNode(classRef),\n node.key,\n node.computed || t.isLiteral(node.key),\n );\n\n const func: t.Expression = t.functionExpression(\n // @ts-expect-error We actually set and id through .ensureFunctionName\n node.id,\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n node.params,\n node.body,\n node.generator,\n node.async,\n );\n t.inherits(func, node);\n\n const expr = t.expressionStatement(\n t.assignmentExpression(\"=\", methodName, func),\n );\n t.inheritsComments(expr, node);\n classState.body.push(expr);\n return true;\n }\n\n return false;\n }\n\n function insertProtoAliasOnce() {\n if (classState.protoAlias === null) {\n setState({ protoAlias: classState.scope.generateUidIdentifier(\"proto\") });\n const classProto = t.memberExpression(\n classState.classRef,\n t.identifier(\"prototype\"),\n );\n const protoDeclaration = t.variableDeclaration(\"var\", [\n t.variableDeclarator(classState.protoAlias, classProto),\n ]);\n\n classState.body.push(protoDeclaration);\n }\n }\n\n /**\n * Replace the constructor body of our class.\n */\n function pushConstructor(\n superReturns: NodePath<t.ReturnStatement>[],\n method: ClassConstructor,\n path: NodePath<ClassConstructor>,\n ) {\n setState({\n userConstructorPath: path,\n userConstructor: method,\n hasConstructor: true,\n superReturns,\n });\n\n const { construct } = classState;\n\n t.inheritsComments(construct, method);\n\n // @ts-expect-error Fixme: should throw when we see TSParameterProperty\n construct.params = method.params;\n\n t.inherits(construct.body, method.body);\n construct.body.directives = method.body.directives;\n\n // we haven't pushed any descriptors yet\n // @ts-expect-error todo(flow->ts) maybe remove this block - properties from condition are not used anywhere else\n if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {\n pushDescriptors();\n }\n\n pushInheritsToBody();\n }\n\n /**\n * Push inherits helper to body.\n */\n function pushInheritsToBody() {\n if (!classState.isDerived || classState.pushedInherits) return;\n\n classState.pushedInherits = true;\n\n // Unshift to ensure that the constructor inheritance is set up before\n // any properties can be assigned to the prototype.\n\n classState.body.unshift(\n t.expressionStatement(\n t.callExpression(\n classState.file.addHelper(\n classState.isLoose ? \"inheritsLoose\" : \"inherits\",\n ),\n [t.cloneNode(classState.classRef), t.cloneNode(classState.superName)],\n ),\n ),\n );\n }\n\n function extractDynamicKeys() {\n const { dynamicKeys, node, scope } = classState;\n\n for (const elem of node.body.body) {\n if (!t.isClassMethod(elem) || !elem.computed) continue;\n if (scope.isPure(elem.key, /* constants only*/ true)) continue;\n\n const id = scope.generateUidIdentifierBasedOnNode(elem.key);\n dynamicKeys.set(id.name, elem.key);\n\n elem.key = id;\n }\n }\n\n function setupClosureParamsArgs() {\n const { superName, dynamicKeys } = classState;\n const closureParams = [];\n const closureArgs = [];\n\n if (classState.isDerived) {\n let arg = t.cloneNode(superName);\n if (classState.extendsNative) {\n arg = t.callExpression(classState.file.addHelper(\"wrapNativeSuper\"), [\n arg,\n ]);\n annotateAsPure(arg);\n }\n\n const param =\n classState.scope.generateUidIdentifierBasedOnNode(superName);\n\n closureParams.push(param);\n closureArgs.push(arg);\n\n setState({ superName: t.cloneNode(param) });\n }\n\n for (const [name, value] of dynamicKeys) {\n closureParams.push(t.identifier(name));\n closureArgs.push(value);\n }\n\n return { closureParams, closureArgs };\n }\n\n function classTransformer(\n path: NodePath<t.Class>,\n file: File,\n builtinClasses: ReadonlySet<string>,\n isLoose: boolean,\n ) {\n setState({\n parent: path.parent,\n scope: path.scope,\n node: path.node,\n path,\n file,\n isLoose,\n });\n\n setState({\n classId: classState.node.id,\n // this is the name of the binding that will **always** reference the class we've constructed\n classRef: classState.node.id\n ? t.identifier(classState.node.id.name)\n : classState.scope.generateUidIdentifier(\"class\"),\n superName: classState.node.superClass,\n isDerived: !!classState.node.superClass,\n constructorBody: t.blockStatement([]),\n });\n\n setState({\n extendsNative:\n t.isIdentifier(classState.superName) &&\n builtinClasses.has(classState.superName.name) &&\n !classState.scope.hasBinding(\n classState.superName.name,\n /* noGlobals */ true,\n ),\n });\n\n const { classRef, node, constructorBody } = classState;\n\n setState({\n construct: buildConstructor(classRef, constructorBody, node),\n });\n\n extractDynamicKeys();\n\n const { body } = classState;\n const { closureParams, closureArgs } = setupClosureParamsArgs();\n\n buildBody();\n\n // make sure this class isn't directly called (with A() instead new A())\n if (!assumptions.noClassCalls) {\n constructorBody.body.unshift(\n t.expressionStatement(\n t.callExpression(classState.file.addHelper(\"classCallCheck\"), [\n t.thisExpression(),\n t.cloneNode(classState.classRef),\n ]),\n ),\n );\n }\n\n const isStrict = path.isInStrictMode();\n let constructorOnly = body.length === 0;\n if (constructorOnly && !isStrict) {\n for (const param of classState.construct.params) {\n // It's illegal to put a use strict directive into the body of a function\n // with non-simple parameters for some reason. So, we have to use a strict\n // wrapper function.\n if (!t.isIdentifier(param)) {\n constructorOnly = false;\n break;\n }\n }\n }\n\n const directives = constructorOnly\n ? classState.construct.body.directives\n : [];\n if (!isStrict) {\n directives.push(t.directive(t.directiveLiteral(\"use strict\")));\n }\n\n if (constructorOnly) {\n // named class with only a constructor\n const expr = t.toExpression(classState.construct);\n return classState.isLoose ? expr : createClassHelper([expr]);\n }\n\n if (!classState.pushedCreateClass) {\n body.push(\n t.returnStatement(\n classState.isLoose\n ? t.cloneNode(classState.classRef)\n : createClassHelper([t.cloneNode(classState.classRef)]),\n ),\n );\n }\n\n body.unshift(classState.construct);\n\n const container = t.arrowFunctionExpression(\n closureParams,\n t.blockStatement(body, directives),\n );\n return t.callExpression(container, closureArgs);\n }\n\n return classTransformer(path, file, builtinClasses, isLoose);\n}\n"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,uBAAA,GAAAJ,OAAA;AAWA,SAASK,gBAAgBA,CACvBC,QAAsB,EACtBC,eAAiC,EACjCC,IAAa,EACb;EACA,MAAMC,IAAI,GAAGC,WAAC,CAACC,mBAAmB,CAChCD,WAAC,CAACE,SAAS,CAACN,QAAQ,CAAC,EACrB,EAAE,EACFC,eACF,CAAC;EAC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