From 26fa49f4b0aa658d65a21fffe828f39e78302573 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 17:46:58 +0800
Subject: [PATCH] Revert "Update#139889 [ 快速篩選 ] 年資文案調整"

---
 PAMapp/node_modules/@babel/generator/lib/source-map.js |   80 ++++++++++++++++------------------------
 1 files changed, 32 insertions(+), 48 deletions(-)

diff --git a/PAMapp/node_modules/@babel/generator/lib/source-map.js b/PAMapp/node_modules/@babel/generator/lib/source-map.js
index 99da1de..e611778 100644
--- a/PAMapp/node_modules/@babel/generator/lib/source-map.js
+++ b/PAMapp/node_modules/@babel/generator/lib/source-map.js
@@ -5,67 +5,51 @@
 });
 exports.default = void 0;
 
-var _sourceMap = require("source-map");
+var _genMapping = require("@jridgewell/gen-mapping");
 
 class SourceMap {
   constructor(opts, code) {
-    this._cachedMap = void 0;
-    this._code = void 0;
-    this._opts = void 0;
+    var _opts$sourceFileName;
+
+    this._map = void 0;
     this._rawMappings = void 0;
-    this._lastGenLine = void 0;
-    this._lastSourceLine = void 0;
-    this._lastSourceColumn = void 0;
-    this._cachedMap = null;
-    this._code = code;
-    this._opts = opts;
-    this._rawMappings = [];
+    this._sourceFileName = void 0;
+    this._lastGenLine = 0;
+    this._lastSourceLine = 0;
+    this._lastSourceColumn = 0;
+    const map = this._map = new _genMapping.GenMapping({
+      sourceRoot: opts.sourceRoot
+    });
+    this._sourceFileName = (_opts$sourceFileName = opts.sourceFileName) == null ? void 0 : _opts$sourceFileName.replace(/\\/g, "/");
+    this._rawMappings = undefined;
+
+    if (typeof code === "string") {
+      (0, _genMapping.setSourceContent)(map, this._sourceFileName, code);
+    } else if (typeof code === "object") {
+      Object.keys(code).forEach(sourceFileName => {
+        (0, _genMapping.setSourceContent)(map, sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
+      });
+    }
   }
 
   get() {
-    if (!this._cachedMap) {
-      const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
-        sourceRoot: this._opts.sourceRoot
-      });
-      const code = this._code;
+    return (0, _genMapping.toEncodedMap)(this._map);
+  }
 
-      if (typeof code === "string") {
-        map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code);
-      } else if (typeof code === "object") {
-        Object.keys(code).forEach(sourceFileName => {
-          map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
-        });
-      }
-
-      this._rawMappings.forEach(mapping => map.addMapping(mapping), map);
-    }
-
-    return this._cachedMap.toJSON();
+  getDecoded() {
+    return (0, _genMapping.toDecodedMap)(this._map);
   }
 
   getRawMappings() {
-    return this._rawMappings.slice();
+    return this._rawMappings || (this._rawMappings = (0, _genMapping.allMappings)(this._map));
   }
 
-  mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
-    if (this._lastGenLine !== generatedLine && line === null) return;
-
-    if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
-      return;
-    }
-
-    this._cachedMap = null;
-    this._lastGenLine = generatedLine;
-    this._lastSourceLine = line;
-    this._lastSourceColumn = column;
-
-    this._rawMappings.push({
-      name: identifierName || undefined,
-      generated: {
-        line: generatedLine,
-        column: generatedColumn
-      },
-      source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
+  mark(generated, line, column, identifierName, filename) {
+    this._rawMappings = undefined;
+    (0, _genMapping.maybeAddMapping)(this._map, {
+      name: identifierName,
+      generated,
+      source: line == null ? undefined : (filename == null ? void 0 : filename.replace(/\\/g, "/")) || this._sourceFileName,
       original: line == null ? undefined : {
         line: line,
         column: column

--
Gitblit v1.8.0