From 9bdb95c9e34cef640534e5e5a1e2225a80442000 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期四, 09 六月 2022 15:48:15 +0800
Subject: [PATCH] TODO#139894 [ footer -最下方說明與保經代合作 ] 文案修改

---
 PAMapp/node_modules/uglify-js/bin/uglifyjs |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/PAMapp/node_modules/uglify-js/bin/uglifyjs b/PAMapp/node_modules/uglify-js/bin/uglifyjs
index 08e3d49..d7a6498 100755
--- a/PAMapp/node_modules/uglify-js/bin/uglifyjs
+++ b/PAMapp/node_modules/uglify-js/bin/uglifyjs
@@ -10,7 +10,9 @@
 var path = require("path");
 var UglifyJS = require("../tools/node");
 
-var skip_keys = [ "cname", "fixed", "inlined", "parent_scope", "scope", "uses_eval", "uses_with" ];
+var skip_keys = [ "cname", "fixed", "in_arg", "inlined", "length_read", "parent_scope", "redef", "scope", "unused" ];
+var truthy_keys = [ "optional", "pure", "terminal", "uses_arguments", "uses_eval", "uses_with" ];
+
 var files = {};
 var options = {};
 var short_forms = {
@@ -70,6 +72,7 @@
                 } else {
                     if (padding.length < name.length) padding = Array(name.length + 1).join(" ");
                     toplevels.push([ {
+                        keep_fargs: "keep-fargs",
                         keep_fnames: "keep-fnames",
                         nameCache: "name-cache",
                     }[name] || name, option ]);
@@ -102,6 +105,7 @@
                 "  -d, --define <expr>[=value]              Global definitions.",
                 "  -e, --enclose [arg[,...][:value[,...]]]  Embed everything in a big function, with configurable argument(s) & value(s).",
                 "  --ie                                     Support non-standard Internet Explorer.",
+                "  --keep-fargs                             Do not mangle/drop function arguments.",
                 "  --keep-fnames                            Do not mangle/drop function names. Useful for code relying on Function.prototype.name.",
                 "  --name-cache <file>                      File to hold mangled name mappings.",
                 "  --rename                                 Force symbol expansion.",
@@ -157,6 +161,9 @@
         break;
       case "no-annotations":
         options.annotations = false;
+        break;
+      case "keep-fargs":
+        options.keep_fargs = true;
         break;
       case "keep-fnames":
         options.keep_fnames = true;
@@ -430,7 +437,7 @@
               case "thedef":
                 return symdef(value);
             }
-            if (skip_key(key)) return;
+            if (skip_property(key, value)) return;
             if (value instanceof UglifyJS.AST_Token) return;
             if (value instanceof UglifyJS.Dictionary) return;
             if (value instanceof UglifyJS.AST_Node) {
@@ -519,7 +526,7 @@
 }
 
 function parse_js(value, options, flag) {
-    if (!options || typeof options != "object") options = {};
+    if (!options || typeof options != "object") options = Object.create(null);
     if (typeof value == "string") try {
         UglifyJS.parse(value, {
             expression: true
@@ -559,8 +566,10 @@
     return options;
 }
 
-function skip_key(key) {
-    return skip_keys.indexOf(key) >= 0;
+function skip_property(key, value) {
+    return skip_keys.indexOf(key) >= 0
+        // only skip truthy_keys if their value is falsy
+        || truthy_keys.indexOf(key) >= 0 && !value;
 }
 
 function symdef(def) {

--
Gitblit v1.8.0