Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/LICENSE
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/README.md
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,19 @@
+# @babel/plugin-transform-parameters
+
+> Compile ES2015 default and rest parameters to ES5
+
+See our website [@babel/plugin-transform-parameters](https://babeljs.io/docs/babel-plugin-transform-parameters) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-transform-parameters
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-transform-parameters --dev
+```
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+Object.defineProperty(exports, "convertFunctionParams", {
+  enumerable: true,
+  get: function () {
+    return _params.default;
+  }
+});
+exports.default = void 0;
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+var _params = require("./params.js");
+var _rest = require("./rest.js");
+var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) => {
+  var _api$assumption, _api$assumption2;
+  api.assertVersion(7);
+  const ignoreFunctionLength = (_api$assumption = api.assumption("ignoreFunctionLength")) != null ? _api$assumption : options.loose;
+  const noNewArrows = (_api$assumption2 = api.assumption("noNewArrows")) != null ? _api$assumption2 : true;
+  return {
+    name: "transform-parameters",
+    visitor: {
+      Function(path) {
+        if (path.isArrowFunctionExpression() && path.get("params").some(param => param.isRestElement() || param.isAssignmentPattern())) {
+          path.arrowFunctionToExpression({
+            allowInsertArrowWithRest: false,
+            noNewArrows
+          });
+          if (!path.isFunctionExpression()) return;
+        }
+        const convertedRest = (0, _rest.default)(path);
+        const convertedParams = (0, _params.default)(path, ignoreFunctionLength);
+        if (convertedRest || convertedParams) {
+          path.scope.crawl();
+        }
+      }
+    }
+  };
+});
+
+//# sourceMappingURL=index.js.map
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js.map
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/index.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"names":["_helperPluginUtils","require","_params","_rest","_default","exports","default","declare","api","options","_api$assumption","_api$assumption2","assertVersion","ignoreFunctionLength","assumption","loose","noNewArrows","name","visitor","Function","path","isArrowFunctionExpression","get","some","param","isRestElement","isAssignmentPattern","arrowFunctionToExpression","allowInsertArrowWithRest","isFunctionExpression","convertedRest","convertFunctionRest","convertedParams","convertFunctionParams","scope","crawl"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport convertFunctionParams from \"./params.ts\";\nimport convertFunctionRest from \"./rest.ts\";\nexport { convertFunctionParams };\n\nexport interface Options {\n  loose?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n  api.assertVersion(REQUIRED_VERSION(7));\n\n  const ignoreFunctionLength =\n    api.assumption(\"ignoreFunctionLength\") ?? options.loose;\n  // Todo(BABEL 8): Consider default it to false\n  const noNewArrows = api.assumption(\"noNewArrows\") ?? true;\n\n  return {\n    name: \"transform-parameters\",\n\n    visitor: {\n      Function(path) {\n        if (\n          path.isArrowFunctionExpression() &&\n          path\n            .get(\"params\")\n            .some(param => param.isRestElement() || param.isAssignmentPattern())\n        ) {\n          // default/rest visitors require access to `arguments`, so it cannot be an arrow\n          path.arrowFunctionToExpression({\n            allowInsertArrowWithRest: false,\n            noNewArrows,\n          });\n\n          // In some cases arrowFunctionToExpression replaces the function with a wrapper.\n          // Return early; the wrapped function will be visited later in the AST traversal.\n          if (!path.isFunctionExpression()) return;\n        }\n\n        const convertedRest = convertFunctionRest(path);\n        const convertedParams = convertFunctionParams(\n          path,\n          ignoreFunctionLength,\n        );\n\n        if (convertedRest || convertedParams) {\n          // Manually reprocess this scope to ensure that the moved params are updated.\n          path.scope.crawl();\n        }\n      },\n    },\n  };\n});\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAA4C,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAO7B,IAAAC,0BAAO,EAAC,CAACC,GAAG,EAAEC,OAAgB,KAAK;EAAA,IAAAC,eAAA,EAAAC,gBAAA;EAChDH,GAAG,CAACI,aAAa,CAAkB,CAAE,CAAC;EAEtC,MAAMC,oBAAoB,IAAAH,eAAA,GACxBF,GAAG,CAACM,UAAU,CAAC,sBAAsB,CAAC,YAAAJ,eAAA,GAAID,OAAO,CAACM,KAAK;EAEzD,MAAMC,WAAW,IAAAL,gBAAA,GAAGH,GAAG,CAACM,UAAU,CAAC,aAAa,CAAC,YAAAH,gBAAA,GAAI,IAAI;EAEzD,OAAO;IACLM,IAAI,EAAE,sBAAsB;IAE5BC,OAAO,EAAE;MACPC,QAAQA,CAACC,IAAI,EAAE;QACb,IACEA,IAAI,CAACC,yBAAyB,CAAC,CAAC,IAChCD,IAAI,CACDE,GAAG,CAAC,QAAQ,CAAC,CACbC,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACC,aAAa,CAAC,CAAC,IAAID,KAAK,CAACE,mBAAmB,CAAC,CAAC,CAAC,EACtE;UAEAN,IAAI,CAACO,yBAAyB,CAAC;YAC7BC,wBAAwB,EAAE,KAAK;YAC/BZ;UACF,CAAC,CAAC;UAIF,IAAI,CAACI,IAAI,CAACS,oBAAoB,CAAC,CAAC,EAAE;QACpC;QAEA,MAAMC,aAAa,GAAG,IAAAC,aAAmB,EAACX,IAAI,CAAC;QAC/C,MAAMY,eAAe,GAAG,IAAAC,eAAqB,EAC3Cb,IAAI,EACJP,oBACF,CAAC;QAED,IAAIiB,aAAa,IAAIE,eAAe,EAAE;UAEpCZ,IAAI,CAACc,KAAK,CAACC,KAAK,CAAC,CAAC;QACpB;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,144 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = convertFunctionParams;
+var _core = require("@babel/core");
+var _shadowUtils = require("./shadow-utils.js");
+const buildDefaultParam = _core.template.statement(`
+  let VARIABLE_NAME =
+    arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?
+      arguments[ARGUMENT_KEY]
+    :
+      DEFAULT_VALUE;
+`);
+const buildLooseDefaultParam = _core.template.statement(`
+  if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {
+    ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;
+  }
+`);
+const buildLooseDestructuredDefaultParam = _core.template.statement(`
+  let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;
+`);
+const buildSafeArgumentsAccess = _core.template.statement(`
+  let $0 = arguments.length > $1 ? arguments[$1] : undefined;
+`);
+function convertFunctionParams(path, ignoreFunctionLength, shouldTransformParam, replaceRestElement) {
+  const params = path.get("params");
+  const isSimpleParameterList = params.every(param => param.isIdentifier());
+  if (isSimpleParameterList) return false;
+  const {
+    node,
+    scope
+  } = path;
+  const body = [];
+  const shadowedParams = new Set();
+  for (const param of params) {
+    (0, _shadowUtils.collectShadowedParamsNames)(param, scope, shadowedParams);
+  }
+  const state = {
+    needsOuterBinding: false,
+    scope
+  };
+  if (shadowedParams.size === 0) {
+    for (const param of params) {
+      if (!param.isIdentifier()) param.traverse(_shadowUtils.iifeVisitor, state);
+      if (state.needsOuterBinding) break;
+    }
+  }
+  let firstOptionalIndex = null;
+  for (let i = 0; i < params.length; i++) {
+    const param = params[i];
+    if (shouldTransformParam && !shouldTransformParam(i)) {
+      continue;
+    }
+    const transformedRestNodes = [];
+    if (replaceRestElement) {
+      replaceRestElement(path, param, transformedRestNodes);
+    }
+    const paramIsAssignmentPattern = param.isAssignmentPattern();
+    if (paramIsAssignmentPattern && (ignoreFunctionLength || _core.types.isMethod(node, {
+      kind: "set"
+    }))) {
+      const left = param.get("left");
+      const right = param.get("right");
+      const undefinedNode = scope.buildUndefinedNode();
+      if (left.isIdentifier()) {
+        body.push(buildLooseDefaultParam({
+          ASSIGNMENT_IDENTIFIER: _core.types.cloneNode(left.node),
+          DEFAULT_VALUE: right.node,
+          UNDEFINED: undefinedNode
+        }));
+        param.replaceWith(left.node);
+      } else if (left.isObjectPattern() || left.isArrayPattern()) {
+        const paramName = scope.generateUidIdentifier();
+        body.push(buildLooseDestructuredDefaultParam({
+          ASSIGNMENT_IDENTIFIER: left.node,
+          DEFAULT_VALUE: right.node,
+          PARAMETER_NAME: _core.types.cloneNode(paramName),
+          UNDEFINED: undefinedNode
+        }));
+        param.replaceWith(paramName);
+      }
+    } else if (paramIsAssignmentPattern) {
+      if (firstOptionalIndex === null) firstOptionalIndex = i;
+      const left = param.get("left");
+      const right = param.get("right");
+      const defNode = buildDefaultParam({
+        VARIABLE_NAME: left.node,
+        DEFAULT_VALUE: right.node,
+        ARGUMENT_KEY: _core.types.numericLiteral(i)
+      });
+      body.push(defNode);
+    } else if (firstOptionalIndex !== null) {
+      const defNode = buildSafeArgumentsAccess([param.node, _core.types.numericLiteral(i)]);
+      body.push(defNode);
+    } else if (param.isObjectPattern() || param.isArrayPattern()) {
+      const uid = path.scope.generateUidIdentifier("ref");
+      uid.typeAnnotation = param.node.typeAnnotation;
+      const defNode = _core.types.variableDeclaration("let", [_core.types.variableDeclarator(param.node, uid)]);
+      body.push(defNode);
+      param.replaceWith(_core.types.cloneNode(uid));
+    }
+    if (transformedRestNodes) {
+      for (const transformedNode of transformedRestNodes) {
+        body.push(transformedNode);
+      }
+    }
+  }
+  if (firstOptionalIndex !== null) {
+    node.params = node.params.slice(0, firstOptionalIndex);
+  }
+  path.ensureBlock();
+  const path2 = path;
+  const {
+    async,
+    generator
+  } = node;
+  if (generator || state.needsOuterBinding || shadowedParams.size > 0) {
+    body.push((0, _shadowUtils.buildScopeIIFE)(shadowedParams, path2.node.body));
+    path.set("body", _core.types.blockStatement(body));
+    const bodyPath = path2.get("body.body");
+    const arrowPath = bodyPath[bodyPath.length - 1].get("argument.callee");
+    arrowPath.arrowFunctionToExpression();
+    arrowPath.node.generator = generator;
+    arrowPath.node.async = async;
+    node.generator = false;
+    node.async = false;
+    if (async) {
+      path2.node.body = _core.template.statement.ast`{
+        try {
+          ${path2.node.body.body}
+        } catch (e) {
+          return Promise.reject(e);
+        }
+      }`;
+    }
+  } else {
+    path2.get("body").unshiftContainer("body", body);
+  }
+  return true;
+}
+
+//# sourceMappingURL=params.js.map
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js.map
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/params.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"names":["_core","require","_shadowUtils","buildDefaultParam","template","statement","buildLooseDefaultParam","buildLooseDestructuredDefaultParam","buildSafeArgumentsAccess","convertFunctionParams","path","ignoreFunctionLength","shouldTransformParam","replaceRestElement","params","get","isSimpleParameterList","every","param","isIdentifier","node","scope","body","shadowedParams","Set","collectShadowedParamsNames","state","needsOuterBinding","size","traverse","iifeVisitor","firstOptionalIndex","i","length","transformedRestNodes","paramIsAssignmentPattern","isAssignmentPattern","t","isMethod","kind","left","right","undefinedNode","buildUndefinedNode","push","ASSIGNMENT_IDENTIFIER","cloneNode","DEFAULT_VALUE","UNDEFINED","replaceWith","isObjectPattern","isArrayPattern","paramName","generateUidIdentifier","PARAMETER_NAME","defNode","VARIABLE_NAME","ARGUMENT_KEY","numericLiteral","uid","typeAnnotation","variableDeclaration","variableDeclarator","transformedNode","slice","ensureBlock","path2","async","generator","buildScopeIIFE","set","blockStatement","bodyPath","arrowPath","arrowFunctionToExpression","ast","unshiftContainer"],"sources":["../src/params.ts"],"sourcesContent":["import { template, types as t, type NodePath } from \"@babel/core\";\n\nimport {\n  iifeVisitor,\n  collectShadowedParamsNames,\n  buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildDefaultParam = template.statement(`\n  let VARIABLE_NAME =\n    arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n      arguments[ARGUMENT_KEY]\n    :\n      DEFAULT_VALUE;\n`);\n\nconst buildLooseDefaultParam = template.statement(`\n  if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n    ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n  }\n`);\n\nconst buildLooseDestructuredDefaultParam = template.statement(`\n  let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n`);\n\nconst buildSafeArgumentsAccess = template.statement(`\n  let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n`);\n\n// last 2 parameters are optional -- they are used by transform-object-rest-spread/src/index.js\nexport default function convertFunctionParams(\n  path: NodePath<t.Function>,\n  ignoreFunctionLength: boolean | void,\n  shouldTransformParam?: (index: number) => boolean,\n  replaceRestElement?: (\n    path: NodePath<t.Function>,\n    paramPath: NodePath<t.Function[\"params\"][number]>,\n    transformedRestNodes: t.Statement[],\n  ) => void,\n) {\n  const params = path.get(\"params\");\n\n  const isSimpleParameterList = params.every(param => param.isIdentifier());\n  if (isSimpleParameterList) return false;\n\n  const { node, scope } = path;\n\n  const body = [];\n  const shadowedParams = new Set<string>();\n\n  for (const param of params) {\n    collectShadowedParamsNames(param, scope, shadowedParams);\n  }\n\n  const state = {\n    needsOuterBinding: false,\n    scope,\n  };\n  if (shadowedParams.size === 0) {\n    for (const param of params) {\n      if (!param.isIdentifier()) param.traverse(iifeVisitor, state);\n      if (state.needsOuterBinding) break;\n    }\n  }\n\n  let firstOptionalIndex = null;\n\n  for (let i = 0; i < params.length; i++) {\n    const param = params[i];\n\n    if (shouldTransformParam && !shouldTransformParam(i)) {\n      continue;\n    }\n    const transformedRestNodes: t.Statement[] = [];\n    if (replaceRestElement) {\n      replaceRestElement(path, param, transformedRestNodes);\n    }\n\n    const paramIsAssignmentPattern = param.isAssignmentPattern();\n    if (\n      paramIsAssignmentPattern &&\n      (ignoreFunctionLength || t.isMethod(node, { kind: \"set\" }))\n    ) {\n      const left = param.get(\"left\");\n      const right = param.get(\"right\");\n\n      const undefinedNode = scope.buildUndefinedNode();\n\n      if (left.isIdentifier()) {\n        body.push(\n          buildLooseDefaultParam({\n            ASSIGNMENT_IDENTIFIER: t.cloneNode(left.node),\n            DEFAULT_VALUE: right.node,\n            UNDEFINED: undefinedNode,\n          }),\n        );\n        param.replaceWith(left.node);\n      } else if (left.isObjectPattern() || left.isArrayPattern()) {\n        const paramName = scope.generateUidIdentifier();\n        body.push(\n          buildLooseDestructuredDefaultParam({\n            ASSIGNMENT_IDENTIFIER: left.node,\n            DEFAULT_VALUE: right.node,\n            PARAMETER_NAME: t.cloneNode(paramName),\n            UNDEFINED: undefinedNode,\n          }),\n        );\n        param.replaceWith(paramName);\n      }\n    } else if (paramIsAssignmentPattern) {\n      if (firstOptionalIndex === null) firstOptionalIndex = i;\n\n      const left = param.get(\"left\");\n      const right = param.get(\"right\");\n\n      const defNode = buildDefaultParam({\n        VARIABLE_NAME: left.node,\n        DEFAULT_VALUE: right.node,\n        ARGUMENT_KEY: t.numericLiteral(i),\n      });\n      body.push(defNode);\n    } else if (firstOptionalIndex !== null) {\n      const defNode = buildSafeArgumentsAccess([\n        param.node,\n        t.numericLiteral(i),\n      ]);\n      body.push(defNode);\n    } else if (param.isObjectPattern() || param.isArrayPattern()) {\n      const uid = path.scope.generateUidIdentifier(\"ref\");\n      uid.typeAnnotation = param.node.typeAnnotation;\n\n      const defNode = t.variableDeclaration(\"let\", [\n        t.variableDeclarator(param.node, uid),\n      ]);\n      body.push(defNode);\n\n      param.replaceWith(t.cloneNode(uid));\n    }\n\n    if (transformedRestNodes) {\n      for (const transformedNode of transformedRestNodes) {\n        body.push(transformedNode);\n      }\n    }\n  }\n\n  // we need to cut off all trailing parameters\n  if (firstOptionalIndex !== null) {\n    node.params = node.params.slice(0, firstOptionalIndex);\n  }\n\n  // ensure it's a block, useful for arrow functions\n  path.ensureBlock();\n  const path2 = path as NodePath<typeof path.node & { body: t.BlockStatement }>;\n\n  const { async, generator } = node;\n  if (generator || state.needsOuterBinding || shadowedParams.size > 0) {\n    body.push(buildScopeIIFE(shadowedParams, path2.node.body));\n\n    path.set(\"body\", t.blockStatement(body as t.Statement[]));\n\n    // We inject an arrow and then transform it to a normal function, to be\n    // sure that we correctly handle this and arguments.\n    const bodyPath = path2.get(\"body.body\");\n    const arrowPath = bodyPath[bodyPath.length - 1].get(\n      \"argument.callee\",\n    ) as NodePath<t.ArrowFunctionExpression>;\n\n    // This is an IIFE, so we don't need to worry about the noNewArrows assumption\n    arrowPath.arrowFunctionToExpression();\n\n    arrowPath.node.generator = generator;\n    arrowPath.node.async = async;\n\n    node.generator = false;\n    node.async = false;\n    if (async) {\n      // If the default value of a parameter throws, it must reject asynchronously.\n      path2.node.body = template.statement.ast`{\n        try {\n          ${path2.node.body.body}\n        } catch (e) {\n          return Promise.reject(e);\n        }\n      }` as t.BlockStatement;\n    }\n  } else {\n    path2.get(\"body\").unshiftContainer(\"body\", body);\n  }\n\n  return true;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAMA,MAAME,iBAAiB,GAAGC,cAAQ,CAACC,SAAS,CAAC;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AAEF,MAAMC,sBAAsB,GAAGF,cAAQ,CAACC,SAAS,CAAC;AAClD;AACA;AACA;AAC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I,CAACgD,SAAS,GAAG,KAAK;IACtBhD,IAAI,CAAC+C,KAAK,GAAG,KAAK;IAClB,IAAIA,KAAK,EAAE;MAETD,KAAK,CAAC9C,IAAI,CAACE,IAAI,GAAGlB,cAAQ,CAACC,SAAS,CAACsE,GAAG;AAC9C;AACA,YAAYT,KAAK,CAAC9C,IAAI,CAACE,IAAI,CAACA,IAAI;AAChC;AACA;AACA;AACA,QAA4B;IACxB;EACF,CAAC,MAAM;IACL4C,KAAK,CAACnD,GAAG,CAAC,MAAM,CAAC,CAAC6D,gBAAgB,CAAC,MAAM,EAAEtD,IAAI,CAAC;EAClD;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,284 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.default = convertFunctionRest;
+var _core = require("@babel/core");
+var _shadowUtils = require("./shadow-utils.js");
+const buildRest = _core.template.statement(`
+  for (var LEN = ARGUMENTS.length,
+           ARRAY = new Array(ARRAY_LEN),
+           KEY = START;
+       KEY < LEN;
+       KEY++) {
+    ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];
+  }
+`);
+const restIndex = _core.template.expression(`
+  (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]
+`);
+const restIndexImpure = _core.template.expression(`
+  REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]
+`);
+const restLength = _core.template.expression(`
+  ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET
+`);
+function referencesRest(path, state) {
+  if (path.node.name === state.name) {
+    return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);
+  }
+  return false;
+}
+const memberExpressionOptimisationVisitor = {
+  Scope(path, state) {
+    if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
+      path.skip();
+    }
+  },
+  Flow(path) {
+    if (path.isTypeCastExpression()) return;
+    path.skip();
+  },
+  Function(path, state) {
+    const oldNoOptimise = state.noOptimise;
+    state.noOptimise = true;
+    path.traverse(memberExpressionOptimisationVisitor, state);
+    state.noOptimise = oldNoOptimise;
+    path.skip();
+  },
+  ReferencedIdentifier(path, state) {
+    const {
+      node
+    } = path;
+    if (node.name === "arguments") {
+      state.deopted = true;
+    }
+    if (!referencesRest(path, state)) return;
+    if (state.noOptimise) {
+      state.deopted = true;
+    } else {
+      const {
+        parentPath
+      } = path;
+      if (parentPath.listKey === "params" && parentPath.key < state.offset) {
+        return;
+      }
+      if (parentPath.isMemberExpression({
+        object: node
+      })) {
+        const grandparentPath = parentPath.parentPath;
+        const argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({
+          operator: "delete"
+        }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee);
+        if (argsOptEligible) {
+          if (parentPath.node.computed) {
+            if (parentPath.get("property").isBaseType("number")) {
+              state.candidates.push({
+                cause: "indexGetter",
+                path
+              });
+              return;
+            }
+          } else if (parentPath.node.property.name === "length") {
+            state.candidates.push({
+              cause: "lengthGetter",
+              path
+            });
+            return;
+          }
+        }
+      }
+      if (state.offset === 0 && parentPath.isSpreadElement()) {
+        const call = parentPath.parentPath;
+        if (call.isCallExpression() && call.node.arguments.length === 1) {
+          state.candidates.push({
+            cause: "argSpread",
+            path
+          });
+          return;
+        }
+      }
+      state.references.push(path);
+    }
+  },
+  BindingIdentifier(path, state) {
+    if (referencesRest(path, state)) {
+      state.deopted = true;
+    }
+  }
+};
+function getParamsCount(node) {
+  let count = node.params.length;
+  if (count > 0 && _core.types.isIdentifier(node.params[0], {
+    name: "this"
+  })) {
+    count -= 1;
+  }
+  return count;
+}
+function hasRest(node) {
+  const length = node.params.length;
+  return length > 0 && _core.types.isRestElement(node.params[length - 1]);
+}
+function optimiseIndexGetter(path, argsId, offset) {
+  const offsetLiteral = _core.types.numericLiteral(offset);
+  let index;
+  const parent = path.parent;
+  if (_core.types.isNumericLiteral(parent.property)) {
+    index = _core.types.numericLiteral(parent.property.value + offset);
+  } else if (offset === 0) {
+    index = parent.property;
+  } else {
+    index = _core.types.binaryExpression("+", parent.property, _core.types.cloneNode(offsetLiteral));
+  }
+  const {
+    scope,
+    parentPath
+  } = path;
+  if (!scope.isPure(index)) {
+    const temp = scope.generateUidIdentifierBasedOnNode(index);
+    scope.push({
+      id: temp,
+      kind: "var"
+    });
+    parentPath.replaceWith(restIndexImpure({
+      ARGUMENTS: argsId,
+      OFFSET: offsetLiteral,
+      INDEX: index,
+      REF: _core.types.cloneNode(temp)
+    }));
+  } else {
+    parentPath.replaceWith(restIndex({
+      ARGUMENTS: argsId,
+      OFFSET: offsetLiteral,
+      INDEX: index
+    }));
+    const replacedParentPath = parentPath;
+    const offsetTestPath = replacedParentPath.get("test");
+    const valRes = offsetTestPath.get("left").evaluate();
+    if (valRes.confident) {
+      if (valRes.value === true) {
+        replacedParentPath.replaceWith(scope.buildUndefinedNode());
+      } else {
+        offsetTestPath.replaceWith(offsetTestPath.get("right"));
+      }
+    }
+  }
+}
+function optimiseLengthGetter(path, argsId, offset) {
+  if (offset) {
+    path.parentPath.replaceWith(restLength({
+      ARGUMENTS: argsId,
+      OFFSET: _core.types.numericLiteral(offset)
+    }));
+  } else {
+    path.replaceWith(argsId);
+  }
+}
+function convertFunctionRest(path) {
+  const {
+    node,
+    scope
+  } = path;
+  if (!hasRest(node)) return false;
+  const restPath = path.get(`params.${node.params.length - 1}.argument`);
+  if (!restPath.isIdentifier()) {
+    const shadowedParams = new Set();
+    (0, _shadowUtils.collectShadowedParamsNames)(restPath, path.scope, shadowedParams);
+    let needsIIFE = shadowedParams.size > 0;
+    if (!needsIIFE) {
+      const state = {
+        needsOuterBinding: false,
+        scope
+      };
+      restPath.traverse(_shadowUtils.iifeVisitor, state);
+      needsIIFE = state.needsOuterBinding;
+    }
+    if (needsIIFE) {
+      path.ensureBlock();
+      path.set("body", _core.types.blockStatement([(0, _shadowUtils.buildScopeIIFE)(shadowedParams, path.node.body)]));
+    }
+  }
+  let rest = restPath.node;
+  node.params.pop();
+  if (_core.types.isPattern(rest)) {
+    const pattern = rest;
+    rest = scope.generateUidIdentifier("ref");
+    const declar = _core.types.variableDeclaration("let", [_core.types.variableDeclarator(pattern, rest)]);
+    path.ensureBlock();
+    node.body.body.unshift(declar);
+  } else if (rest.name === "arguments") {
+    scope.rename(rest.name);
+  }
+  const argsId = _core.types.identifier("arguments");
+  const paramsCount = getParamsCount(node);
+  const state = {
+    references: [],
+    offset: paramsCount,
+    argumentsNode: argsId,
+    outerBinding: scope.getBindingIdentifier(rest.name),
+    candidates: [],
+    name: rest.name,
+    deopted: false
+  };
+  path.traverse(memberExpressionOptimisationVisitor, state);
+  if (!state.deopted && !state.references.length) {
+    for (const {
+      path,
+      cause
+    } of state.candidates) {
+      const clonedArgsId = _core.types.cloneNode(argsId);
+      switch (cause) {
+        case "indexGetter":
+          optimiseIndexGetter(path, clonedArgsId, state.offset);
+          break;
+        case "lengthGetter":
+          optimiseLengthGetter(path, clonedArgsId, state.offset);
+          break;
+        default:
+          path.replaceWith(clonedArgsId);
+      }
+    }
+    return true;
+  }
+  state.references.push(...state.candidates.map(({
+    path
+  }) => path));
+  const start = _core.types.numericLiteral(paramsCount);
+  const key = scope.generateUidIdentifier("key");
+  const len = scope.generateUidIdentifier("len");
+  let arrKey, arrLen;
+  if (paramsCount) {
+    arrKey = _core.types.binaryExpression("-", _core.types.cloneNode(key), _core.types.cloneNode(start));
+    arrLen = _core.types.conditionalExpression(_core.types.binaryExpression(">", _core.types.cloneNode(len), _core.types.cloneNode(start)), _core.types.binaryExpression("-", _core.types.cloneNode(len), _core.types.cloneNode(start)), _core.types.numericLiteral(0));
+  } else {
+    arrKey = _core.types.identifier(key.name);
+    arrLen = _core.types.identifier(len.name);
+  }
+  const loop = buildRest({
+    ARGUMENTS: argsId,
+    ARRAY_KEY: arrKey,
+    ARRAY_LEN: arrLen,
+    START: start,
+    ARRAY: rest,
+    KEY: key,
+    LEN: len
+  });
+  if (state.deopted) {
+    node.body.body.unshift(loop);
+  } else {
+    let target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent();
+    target.findParent(path => {
+      if (path.isLoop()) {
+        target = path;
+      } else {
+        return path.isFunction();
+      }
+    });
+    target.insertBefore(loop);
+  }
+  return true;
+}
+
+//# sourceMappingURL=rest.js.map
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js.map
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/rest.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"names":["_core","require","_shadowUtils","buildRest","template","statement","restIndex","expression","restIndexImpure","restLength","referencesRest","path","state","node","name","scope","bindingIdentifierEquals","outerBinding","memberExpressionOptimisationVisitor","Scope","skip","Flow","isTypeCastExpression","Function","oldNoOptimise","noOptimise","traverse","ReferencedIdentifier","deopted","parentPath","listKey","key","offset","isMemberExpression","object","grandparentPath","argsOptEligible","isAssignmentExpression","left","isLVal","isForXStatement","isUpdateExpression","isUnaryExpression","operator","isCallExpression","isNewExpression","callee","computed","get","isBaseType","candidates","push","cause","property","isSpreadElement","call","arguments","length","references","BindingIdentifier","getParamsCount","count","params","t","isIdentifier","hasRest","isRestElement","optimiseIndexGetter","argsId","offsetLiteral","numericLiteral","index","parent","isNumericLiteral","value","binaryExpression","cloneNode","isPure","temp","generateUidIdentifierBasedOnNode","id","kind","replaceWith","ARGUMENTS","OFFSET","INDEX","REF","replacedParentPath","offsetTestPath","valRes","evaluate","confident","buildUndefinedNode","optimiseLengthGetter","convertFunctionRest","restPath","shadowedParams","Set","collectShadowedParamsNames","needsIIFE","size","needsOuterBinding","iifeVisitor","ensureBlock","set","blockStatement","buildScopeIIFE","body","rest","pop","isPattern","pattern","generateUidIdentifier","declar","variableDeclaration","variableDeclarator","unshift","rename","identifier","paramsCount","argumentsNode","getBindingIdentifier","clonedArgsId","map","start","len","arrKey","arrLen","conditionalExpression","loop","ARRAY_KEY","ARRAY_LEN","START","ARRAY","KEY","LEN","target","getEarliestCommonAncestorFrom","getStatementParent","findParent","isLoop","isFunction","insertBefore"],"sources":["../src/rest.ts"],"sourcesContent":["import { template, types as t } from \"@babel/core\";\nimport type { NodePath, Visitor } from \"@babel/core\";\n\nimport {\n  iifeVisitor,\n  collectShadowedParamsNames,\n  buildScopeIIFE,\n} from \"./shadow-utils.ts\";\n\nconst buildRest = template.statement(`\n  for (var LEN = ARGUMENTS.length,\n           ARRAY = new Array(ARRAY_LEN),\n           KEY = START;\n       KEY < LEN;\n       KEY++) {\n    ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n  }\n`);\n\nconst restIndex = template.expression(`\n  (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n`);\n\nconst restIndexImpure = template.expression(`\n  REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n`);\n\nconst restLength = template.expression(`\n  ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n`);\n\nfunction referencesRest(\n  path: NodePath<t.Identifier | t.JSXIdentifier>,\n  state: State,\n) {\n  if (path.node.name === state.name) {\n    // Check rest parameter is not shadowed by a binding in another scope.\n    return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);\n  }\n\n  return false;\n}\n\ntype Candidate = {\n  cause: \"argSpread\" | \"indexGetter\" | \"lengthGetter\";\n  path: NodePath<t.Identifier | t.JSXIdentifier>;\n};\n\ntype State = {\n  references: NodePath<t.Identifier | t.JSXIdentifier>[];\n  offset: number;\n\n  argumentsNode: t.Identifier;\n  outerBinding: t.Identifier;\n\n  // candidate member expressions we could optimise if there are no other references\n  candidates: Candidate[];\n\n  // local rest binding name\n  name: string;\n\n  /*\n  It may be possible to optimize the output code in certain ways, such as\n  not generating code to initialize an array (perhaps substituting direct\n  references to arguments[i] or arguments.length for reads of the\n  corresponding rest parameter property) or positioning the initialization\n  code so that it may not have to execute depending on runtime conditions.\n\n  This property tracks eligibility for optimization. \"deopted\" means give up\n  and don't perform optimization. For example, when any of rest's elements /\n  properties is assigned to at the top level, or referenced at all in a\n  nested function.\n  */\n  deopted: boolean;\n  noOptimise?: boolean;\n};\n\nconst memberExpressionOptimisationVisitor: Visitor<State> = {\n  Scope(path, state) {\n    // check if this scope has a local binding that will shadow the rest parameter\n    if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {\n      path.skip();\n    }\n  },\n\n  Flow(path: NodePath<t.Flow>) {\n    // Do not skip TypeCastExpressions as the contain valid non flow code\n    if (path.isTypeCastExpression()) return;\n    // don't touch reference in type annotations\n    path.skip();\n  },\n\n  Function(path, state) {\n    // Detect whether any reference to rest is contained in nested functions to\n    // determine if deopt is necessary.\n    const oldNoOptimise = state.noOptimise;\n    state.noOptimise = true;\n    path.traverse(memberExpressionOptimisationVisitor, state);\n    state.noOptimise = oldNoOptimise;\n\n    // Skip because optimizing references to rest would refer to the `arguments`\n    // of the nested function.\n    path.skip();\n  },\n\n  ReferencedIdentifier(path, state) {\n    const { node } = path;\n\n    // we can't guarantee the purity of arguments\n    if (node.name === \"arguments\") {\n      state.deopted = true;\n    }\n\n    // is this a referenced identifier and is it referencing the rest parameter?\n    if (!referencesRest(path, state)) return;\n\n    if (state.noOptimise) {\n      state.deopted = true;\n    } else {\n      const { parentPath } = path;\n\n      // Is this identifier the right hand side of a default parameter?\n      if (\n        parentPath.listKey === \"params\" &&\n        (parentPath.key as number) < state.offset\n      ) {\n        return;\n      }\n\n      // ex: `args[0]`\n      // ex: `args.whatever`\n      if (parentPath.isMemberExpression({ object: node })) {\n        const grandparentPath = parentPath.parentPath;\n\n        const argsOptEligible =\n          !state.deopted &&\n          !(\n            // ex: `args[0] = \"whatever\"`\n            (\n              (grandparentPath.isAssignmentExpression() &&\n                parentPath.node === grandparentPath.node.left) ||\n              // ex: `[args[0]] = [\"whatever\"]`\n              grandparentPath.isLVal() ||\n              // ex: `for (rest[0] in this)`\n              // ex: `for (rest[0] of this)`\n              grandparentPath.isForXStatement() ||\n              // ex: `++args[0]`\n              // ex: `args[0]--`\n              grandparentPath.isUpdateExpression() ||\n              // ex: `delete args[0]`\n              grandparentPath.isUnaryExpression({ operator: \"delete\" }) ||\n              // ex: `args[0]()`\n              // ex: `new args[0]()`\n              // ex: `new args[0]`\n              ((grandparentPath.isCallExpression() ||\n                grandparentPath.isNewExpression()) &&\n                parentPath.node === grandparentPath.node.callee)\n            )\n          );\n\n        if (argsOptEligible) {\n          if (parentPath.node.computed) {\n            // if we know that this member expression is referencing a number then\n            // we can safely optimise it\n            if (parentPath.get(\"property\").isBaseType(\"number\")) {\n              state.candidates.push({ cause: \"indexGetter\", path });\n              return;\n            }\n          } else if (\n            // @ts-expect-error .length must not be a private name\n            parentPath.node.property.name === \"length\"\n          ) {\n            // args.length\n            state.candidates.push({ cause: \"lengthGetter\", path });\n            return;\n          }\n        }\n      }\n\n      // we can only do these optimizations if the rest variable would match\n      // the arguments exactly\n      // optimise single spread args in calls\n      // ex: fn(...args)\n      if (state.offset === 0 && parentPath.isSpreadElement()) {\n        const call = parentPath.parentPath;\n        if (call.isCallExpression() && call.node.arguments.length === 1) {\n          state.candidates.push({ cause: \"argSpread\", path });\n          return;\n        }\n      }\n\n      state.references.push(path);\n    }\n  },\n\n  /**\n   * Deopt on use of a binding identifier with the same name as our rest param.\n   *\n   * See https://github.com/babel/babel/issues/2091\n   */\n\n  BindingIdentifier(path, state) {\n    if (referencesRest(path, state)) {\n      state.deopted = true;\n    }\n  },\n};\n\nfunction getParamsCount(node: t.Function) {\n  let count = node.params.length;\n  // skip the first parameter if it is a TypeScript 'this parameter'\n  if (count > 0 && t.isIdentifier(node.params[0], { name: \"this\" })) {\n    count -= 1;\n  }\n  return count;\n}\n\nfunction hasRest(node: t.Function) {\n  const length = node.params.length;\n  return length > 0 && t.isRestElement(node.params[length - 1]);\n}\n\nfunction optimiseIndexGetter(\n  path: NodePath<t.Identifier | t.JSXIdentifier>,\n  argsId: t.Identifier,\n  offset: number,\n) {\n  const offsetLiteral = t.numericLiteral(offset);\n  let index;\n  const parent = path.parent as t.MemberExpression;\n\n  if (t.isNumericLiteral(parent.property)) {\n    index = t.numericLiteral(parent.property.value + offset);\n  } else if (offset === 0) {\n    // Avoid unnecessary '+ 0'\n    index = parent.property;\n  } else {\n    index = t.binaryExpression(\n      \"+\",\n      parent.property,\n      t.cloneNode(offsetLiteral),\n    );\n  }\n\n  const { scope, parentPath } = path;\n  if (!scope.isPure(index)) {\n    const temp = scope.generateUidIdentifierBasedOnNode(index);\n    scope.push({ id: temp, kind: \"var\" });\n    parentPath.replaceWith(\n      restIndexImpure({\n        ARGUMENTS: argsId,\n        OFFSET: offsetLiteral,\n        INDEX: index,\n        REF: t.cloneNode(temp),\n      }),\n    );\n  } else {\n    parentPath.replaceWith(\n      restIndex({\n        ARGUMENTS: argsId,\n        OFFSET: offsetLiteral,\n        INDEX: index,\n      }),\n    );\n    const replacedParentPath = parentPath as NodePath<t.ConditionalExpression>;\n\n    // See if we can statically evaluate the first test (i.e. index < offset)\n    // and optimize the AST accordingly.\n    const offsetTestPath = replacedParentPath.get(\n      \"test\",\n    ) as NodePath<t.BinaryExpression>;\n    const valRes = offsetTestPath.get(\"left\").evaluate();\n    if (valRes.confident) {\n      if (valRes.value === true) {\n        replacedParentPath.replaceWith(scope.buildUndefinedNode());\n      } else {\n        offsetTestPath.replaceWith(offsetTestPath.get(\"right\"));\n      }\n    }\n  }\n}\n\nfunction optimiseLengthGetter(\n  path: NodePath<t.Identifier | t.JSXIdentifier>,\n  argsId: t.Identifier,\n  offset: number,\n) {\n  if (offset) {\n    path.parentPath.replaceWith(\n      restLength({\n        ARGUMENTS: argsId,\n        OFFSET: t.numericLiteral(offset),\n      }),\n    );\n  } else {\n    path.replaceWith(argsId);\n  }\n}\n\nexport default function convertFunctionRest(path: NodePath<t.Function>) {\n  const { node, scope } = path;\n  if (!hasRest(node)) return false;\n\n  const restPath = path.get(\n    `params.${node.params.length - 1}.argument`,\n  ) as NodePath<t.ArrayPattern | t.ObjectPattern | t.Identifier>;\n\n  if (!restPath.isIdentifier()) {\n    const shadowedParams = new Set<string>();\n    collectShadowedParamsNames(restPath, path.scope, shadowedParams);\n\n    let needsIIFE = shadowedParams.size > 0;\n    if (!needsIIFE) {\n      const state = {\n        needsOuterBinding: false,\n        scope,\n      };\n      restPath.traverse(iifeVisitor, state);\n      needsIIFE = state.needsOuterBinding;\n    }\n\n    if (needsIIFE) {\n      path.ensureBlock();\n      path.set(\n        \"body\",\n        t.blockStatement([\n          buildScopeIIFE(shadowedParams, path.node.body as t.BlockStatement),\n        ]),\n      );\n    }\n  }\n\n  let rest = restPath.node;\n  node.params.pop(); // This returns 'rest'\n\n  if (t.isPattern(rest)) {\n    const pattern = rest;\n    rest = scope.generateUidIdentifier(\"ref\");\n\n    const declar = t.variableDeclaration(\"let\", [\n      t.variableDeclarator(pattern, rest),\n    ]);\n    path.ensureBlock();\n    (node.body as t.BlockStatement).body.unshift(declar);\n  } else if (rest.name === \"arguments\") {\n    scope.rename(rest.name);\n  }\n\n  const argsId = t.identifier(\"arguments\");\n  const paramsCount = getParamsCount(node);\n\n  // check and optimise for extremely common cases\n  const state: State = {\n    references: [],\n    offset: paramsCount,\n    argumentsNode: argsId,\n    outerBinding: scope.getBindingIdentifier(rest.name),\n    candidates: [],\n    name: rest.name,\n    deopted: false,\n  };\n\n  path.traverse(memberExpressionOptimisationVisitor, state);\n\n  // There are only \"shorthand\" references\n  if (!state.deopted && !state.references.length) {\n    for (const { path, cause } of state.candidates) {\n      const clonedArgsId = t.cloneNode(argsId);\n      switch (cause) {\n        case \"indexGetter\":\n          optimiseIndexGetter(path, clonedArgsId, state.offset);\n          break;\n        case \"lengthGetter\":\n          optimiseLengthGetter(path, clonedArgsId, state.offset);\n          break;\n        default:\n          path.replaceWith(clonedArgsId);\n      }\n    }\n    return true;\n  }\n\n  state.references.push(...state.candidates.map(({ path }) => path));\n\n  const start = t.numericLiteral(paramsCount);\n  const key = scope.generateUidIdentifier(\"key\");\n  const len = scope.generateUidIdentifier(\"len\");\n\n  let arrKey, arrLen;\n  if (paramsCount) {\n    // this method has additional params, so we need to subtract\n    // the index of the current argument position from the\n    // position in the array that we want to populate\n    arrKey = t.binaryExpression(\"-\", t.cloneNode(key), t.cloneNode(start));\n\n    // we need to work out the size of the array that we're\n    // going to store all the rest parameters\n    //\n    // we need to add a check to avoid constructing the array\n    // with <0 if there are less arguments than params as it'll\n    // cause an error\n    arrLen = t.conditionalExpression(\n      t.binaryExpression(\">\", t.cloneNode(len), t.cloneNode(start)),\n      t.binaryExpression(\"-\", t.cloneNode(len), t.cloneNode(start)),\n      t.numericLiteral(0),\n    );\n  } else {\n    arrKey = t.identifier(key.name);\n    arrLen = t.identifier(len.name);\n  }\n\n  const loop = buildRest({\n    ARGUMENTS: argsId,\n    ARRAY_KEY: arrKey,\n    ARRAY_LEN: arrLen,\n    START: start,\n    ARRAY: rest,\n    KEY: key,\n    LEN: len,\n  });\n\n  if (state.deopted) {\n    (node.body as t.BlockStatement).body.unshift(loop);\n  } else {\n    let target = path\n      .getEarliestCommonAncestorFrom(state.references)\n      .getStatementParent();\n\n    // don't perform the allocation inside a loop\n    target.findParent(path => {\n      if (path.isLoop()) {\n        target = path;\n      } else {\n        // Stop crawling up if this is a function.\n        return path.isFunction();\n      }\n    });\n\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MAAM,GAAG/D,WAAC,CAACuD,UAAU,CAACvF,GAAG,CAACjB,IAAI,CAAC;IAC/BiH,MAAM,GAAGhE,WAAC,CAACuD,UAAU,CAACO,GAAG,CAAC/G,IAAI,CAAC;EACjC;EAEA,MAAMmH,IAAI,GAAG9H,SAAS,CAAC;IACrBgF,SAAS,EAAEf,MAAM;IACjB8D,SAAS,EAAEJ,MAAM;IACjBK,SAAS,EAAEJ,MAAM;IACjBK,KAAK,EAAER,KAAK;IACZS,KAAK,EAAEzB,IAAI;IACX0B,GAAG,EAAEvG,GAAG;IACRwG,GAAG,EAAEV;EACP,CAAC,CAAC;EAEF,IAAIjH,KAAK,CAACgB,OAAO,EAAE;IAChBf,IAAI,CAAC8F,IAAI,CAAsBA,IAAI,CAACS,OAAO,CAACa,IAAI,CAAC;EACpD,CAAC,MAAM;IACL,IAAIO,MAAM,GAAG7H,IAAI,CACd8H,6BAA6B,CAAC7H,KAAK,CAAC8C,UAAU,CAAC,CAC/CgF,kBAAkB,CAAC,CAAC;IAGvBF,MAAM,CAACG,UAAU,CAAChI,IAAI,IAAI;MACxB,IAAIA,IAAI,CAACiI,MAAM,CAAC,CAAC,EAAE;QACjBJ,MAAM,GAAG7H,IAAI;MACf,CAAC,MAAM;QAEL,OAAOA,IAAI,CAACkI,UAAU,CAAC,CAAC;MAC1B;IACF,CAAC,CAAC;IAEFL,MAAM,CAACM,YAAY,CAACb,IAAI,CAAC;EAC3B;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,64 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+  value: true
+});
+exports.buildScopeIIFE = buildScopeIIFE;
+exports.collectShadowedParamsNames = collectShadowedParamsNames;
+exports.iifeVisitor = void 0;
+var _core = require("@babel/core");
+const iifeVisitor = exports.iifeVisitor = {
+  "ReferencedIdentifier|BindingIdentifier"(path, state) {
+    const {
+      scope,
+      node
+    } = path;
+    const {
+      name
+    } = node;
+    if (name === "eval" || scope.getBinding(name) === state.scope.parent.getBinding(name) && state.scope.hasOwnBinding(name)) {
+      state.needsOuterBinding = true;
+      path.stop();
+    }
+  },
+  "TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration": path => path.skip()
+};
+function collectShadowedParamsNames(param, functionScope, shadowedParams) {
+  for (const name of Object.keys(param.getBindingIdentifiers())) {
+    var _functionScope$bindin;
+    const constantViolations = (_functionScope$bindin = functionScope.bindings[name]) == null ? void 0 : _functionScope$bindin.constantViolations;
+    if (constantViolations) {
+      for (const redeclarator of constantViolations) {
+        const node = redeclarator.node;
+        switch (node.type) {
+          case "VariableDeclarator":
+            {
+              if (node.init === null) {
+                const declaration = redeclarator.parentPath;
+                if (!declaration.parentPath.isFor() || declaration.parentPath.get("body") === declaration) {
+                  redeclarator.remove();
+                  break;
+                }
+              }
+              shadowedParams.add(name);
+              break;
+            }
+          case "FunctionDeclaration":
+            shadowedParams.add(name);
+            break;
+        }
+      }
+    }
+  }
+}
+function buildScopeIIFE(shadowedParams, body) {
+  const args = [];
+  const params = [];
+  for (const name of shadowedParams) {
+    args.push(_core.types.identifier(name));
+    params.push(_core.types.identifier(name));
+  }
+  return _core.types.returnStatement(_core.types.callExpression(_core.types.arrowFunctionExpression(params, body), args));
+}
+
+//# sourceMappingURL=shadow-utils.js.map
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js.map
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/lib/shadow-utils.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"names":["_core","require","iifeVisitor","exports","ReferencedIdentifier|BindingIdentifier","path","state","scope","node","name","getBinding","parent","hasOwnBinding","needsOuterBinding","stop","skip","collectShadowedParamsNames","param","functionScope","shadowedParams","Object","keys","getBindingIdentifiers","_functionScope$bindin","constantViolations","bindings","redeclarator","type","init","declaration","parentPath","isFor","get","remove","add","buildScopeIIFE","body","args","params","push","t","identifier","returnStatement","callExpression","arrowFunctionExpression"],"sources":["../src/shadow-utils.ts"],"sourcesContent":["import { types as t } from \"@babel/core\";\nimport type { NodePath, Scope, Visitor } from \"@babel/core\";\n\ntype State = {\n  needsOuterBinding: boolean;\n  scope: Scope;\n};\n\nexport const iifeVisitor: Visitor<State> = {\n  \"ReferencedIdentifier|BindingIdentifier\"(\n    path: NodePath<t.Identifier>,\n    state,\n  ) {\n    const { scope, node } = path;\n    const { name } = node;\n\n    if (\n      name === \"eval\" ||\n      (scope.getBinding(name) === state.scope.parent.getBinding(name) &&\n        state.scope.hasOwnBinding(name))\n    ) {\n      state.needsOuterBinding = true;\n      path.stop();\n    }\n  },\n  // type annotations don't use or introduce \"real\" bindings\n  \"TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration\":\n    (path: NodePath) => path.skip(),\n};\n\nexport function collectShadowedParamsNames(\n  param: NodePath<t.Function[\"params\"][number]>,\n  functionScope: Scope,\n  shadowedParams: Set<string>,\n) {\n  for (const name of Object.keys(param.getBindingIdentifiers())) {\n    const constantViolations = functionScope.bindings[name]?.constantViolations;\n    if (constantViolations) {\n      for (const redeclarator of constantViolations) {\n        const node = redeclarator.node;\n        // If a constant violation is a var or a function declaration,\n        // we first check to see if it's a var without an init.\n        // If so, we remove that declarator.\n        // Otherwise, we have to wrap it in an IIFE.\n        switch (node.type) {\n          case \"VariableDeclarator\": {\n            if (node.init === null) {\n              const declaration = redeclarator.parentPath;\n              // The following uninitialized var declarators should not be removed\n              // for (var x in {})\n              // for (var x;;)\n              if (\n                !declaration.parentPath.isFor() ||\n                declaration.parentPath.get(\"body\") === declaration\n              ) {\n                redeclarator.remove();\n                break;\n              }\n            }\n\n            shadowedParams.add(name);\n            break;\n          }\n          case \"FunctionDeclaration\":\n            shadowedParams.add(name);\n            break;\n        }\n      }\n    }\n  }\n}\n\nexport function buildScopeIIFE(\n  shadowedParams: Set<string>,\n  body: t.BlockStatement,\n) {\n  const args = [];\n  const params = [];\n\n  for (const name of shadowedParams) {\n    // We create them twice; the other option is to use t.cloneNode\n    args.push(t.identifier(name));\n    params.push(t.identifier(name));\n  }\n\n  return t.returnStatement(\n    t.callExpression(t.arrowFunctionExpression(params, body), args),\n  );\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAQO,MAAMC,WAA2B,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzC,wCAAwCE,CACtCC,IAA4B,EAC5BC,KAAK,EACL;IACA,MAAM;MAAEC,KAAK;MAAEC;IAAK,CAAC,GAAGH,IAAI;IAC5B,MAAM;MAAEI;IAAK,CAAC,GAAGD,IAAI;IAErB,IACEC,IAAI,KAAK,MAAM,IACdF,KAAK,CAACG,UAAU,CAACD,IAAI,CAAC,KAAKH,KAAK,CAACC,KAAK,CAACI,MAAM,CAACD,UAAU,CAACD,IAAI,CAAC,IAC7DH,KAAK,CAACC,KAAK,CAACK,aAAa,CAACH,IAAI,CAAE,EAClC;MACAH,KAAK,CAACO,iBAAiB,GAAG,IAAI;MAC9BR,IAAI,CAACS,IAAI,CAAC,CAAC;IACb;EACF,CAAC;EAED,qFAAqF,EAClFT,IAAc,IAAKA,IAAI,CAACU,IAAI,CAAC;AAClC,CAAC;AAEM,SAASC,0BAA0BA,CACxCC,KAA6C,EAC7CC,aAAoB,EACpBC,cAA2B,EAC3B;EACA,KAAK,MAAMV,IAAI,IAAIW,MAAM,CAACC,IAAI,CAACJ,KAAK,CAACK,qBAAqB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AEC,IAAI,CAChE,CAAC;AACH","ignoreList":[]}
Index: imaps-frontend/node_modules/@babel/plugin-transform-parameters/package.json
===================================================================
--- imaps-frontend/node_modules/@babel/plugin-transform-parameters/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/@babel/plugin-transform-parameters/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,34 @@
+{
+  "name": "@babel/plugin-transform-parameters",
+  "version": "7.25.9",
+  "description": "Compile ES2015 default and rest parameters to ES5",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/babel/babel.git",
+    "directory": "packages/babel-plugin-transform-parameters"
+  },
+  "homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-parameters",
+  "license": "MIT",
+  "publishConfig": {
+    "access": "public"
+  },
+  "main": "./lib/index.js",
+  "dependencies": {
+    "@babel/helper-plugin-utils": "^7.25.9"
+  },
+  "keywords": [
+    "babel-plugin"
+  ],
+  "peerDependencies": {
+    "@babel/core": "^7.0.0-0"
+  },
+  "devDependencies": {
+    "@babel/core": "^7.25.9",
+    "@babel/helper-plugin-test-runner": "^7.25.9"
+  },
+  "engines": {
+    "node": ">=6.9.0"
+  },
+  "author": "The Babel Team (https://babel.dev/team)",
+  "type": "commonjs"
+}
